Chore: Update packages

This commit is contained in:
Aron Malcher 2024-02-12 20:20:57 +01:00
parent c4251d9f51
commit 18c6535d1c
Signed by: aronmal
GPG key ID: 816B7707426FC612
5 changed files with 1055 additions and 1024 deletions

View file

@ -14,7 +14,7 @@
},
"dependencies": {
"@auth/core": "^0.19.0",
"@auth/drizzle-adapter": "^0.3.12",
"@auth/drizzle-adapter": "^0.6.3",
"@auth/solid-start": "0.1.2",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/pro-duotone-svg-icons": "^6.5.1",
@ -23,29 +23,29 @@
"@fortawesome/pro-solid-svg-icons": "^6.5.1",
"@fortawesome/pro-thin-svg-icons": "^6.5.1",
"@fortawesome/sharp-solid-svg-icons": "^6.5.1",
"@solidjs/meta": "^0.29.2",
"@solidjs/router": "^0.10.9",
"@solidjs/start": "^0.4.9",
"drizzle-orm": "^0.29.2",
"moment-timezone": "^0.5.44",
"@solidjs/meta": "^0.29.3",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"drizzle-orm": "^0.29.3",
"moment-timezone": "^0.5.45",
"openapi-fetch": "^0.8.2",
"postgres": "^3.4.3",
"solid-js": "^1.8.11",
"vinxi": "^0.1.2"
"solid-js": "^1.8.14",
"vinxi": "^0.2.1"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.17.0",
"dotenv": "^16.3.1",
"drizzle-kit": "^0.20.9",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"dotenv": "^16.4.2",
"drizzle-kit": "^0.20.14",
"drizzle-zod": "^0.5.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-solid": "^0.13.1",
"openapi-typescript": "^6.7.3",
"openapi-typescript": "^6.7.4",
"pg": "^8.11.3",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"sass": "^1.69.6",
"sass": "^1.70.0",
"typescript": "^5.3.3",
"zod": "3.22.4"
},

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,4 @@
import { createHandler } from "@solidjs/start/entry";
import { StartServer } from "@solidjs/start/server";
import { StartServer, createHandler } from "@solidjs/start/server";
export default createHandler(() => (
<StartServer

View file

@ -37,7 +37,6 @@ const initialValue = (params: ReturnType<typeof useParams>) => ({
const getPayload = async (
id: string,
pathName: string,
): Promise<
| { success: false; message: string }
| (ReturnType<typeof initialValue> & { success: true })
@ -47,6 +46,7 @@ const getPayload = async (
const event = getRequestEvent();
if (!event) return { success: false, message: "No request event!" };
const pathname = new URL(event.request.url).pathname;
const session = await getSession(event.request, authOptions);
if (!session?.user?.id)
return { success: false, message: "No user with id!" };
@ -77,7 +77,7 @@ const getPayload = async (
headers: { Authorization: `Bot ${import.meta.env.VITE_DISCORD_BOT_TOKEN}` },
});
if (guildsRequest.error || channelsRequest.error) {
console.log(guildsRequest.error, channelsRequest.error, event.path);
console.log(guildsRequest.error, channelsRequest.error, pathname);
return {
success: false,
message: "Error on one of the discord api requests!",
@ -107,11 +107,7 @@ const getPayload = async (
});
});
console.log(
pathName,
pathName == event.path ? "server" : "client",
"success",
);
console.log(new URL(event.request.url).pathname, "success");
return {
success: true,
@ -143,9 +139,7 @@ function config() {
const [payload] = createResource(
params.guildId,
async (id) => {
const payload = await getPayload(id, location.pathname).catch((e) =>
console.warn(e, id),
);
const payload = await getPayload(id).catch((e) => console.warn(e, id));
if (!payload) {
console.error(location.pathname, payload);

View file

@ -26,9 +26,7 @@ const initialValue = () => ({
}[],
});
const getPayload = async (
pathName: string,
): Promise<
const getPayload = async (): Promise<
| { success: false; message: string }
| (ReturnType<typeof initialValue> & { success: true })
> => {
@ -37,6 +35,7 @@ const getPayload = async (
const event = getRequestEvent();
if (!event) return { success: false, message: "No request event!" };
const pathname = new URL(event.request.url).pathname;
const session = await getSession(event.request, authOptions);
if (!session?.user?.id)
return { success: false, message: "No user with id!" };
@ -63,11 +62,7 @@ const getPayload = async (
console.log(error);
return { success: false, message: "Error on discord api request!" };
}
console.log(
pathName,
pathName == event.path ? "server" : "client",
"success",
);
console.log(pathname, "success");
return {
success: true,
@ -85,9 +80,7 @@ function index() {
const [payload] = createResource(
// eslint-disable-next-line solid/reactivity
async () => {
const payload = await getPayload(location.pathname).catch((e) =>
console.warn(e),
);
const payload = await getPayload().catch((e) => console.warn(e));
if (!payload) {
console.error(location.pathname, payload);