Chore: Update packages
This commit is contained in:
parent
c4251d9f51
commit
18c6535d1c
5 changed files with 1055 additions and 1024 deletions
28
package.json
28
package.json
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@auth/core": "^0.19.0",
|
"@auth/core": "^0.19.0",
|
||||||
"@auth/drizzle-adapter": "^0.3.12",
|
"@auth/drizzle-adapter": "^0.6.3",
|
||||||
"@auth/solid-start": "0.1.2",
|
"@auth/solid-start": "0.1.2",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
||||||
"@fortawesome/pro-duotone-svg-icons": "^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-solid-svg-icons": "^6.5.1",
|
||||||
"@fortawesome/pro-thin-svg-icons": "^6.5.1",
|
"@fortawesome/pro-thin-svg-icons": "^6.5.1",
|
||||||
"@fortawesome/sharp-solid-svg-icons": "^6.5.1",
|
"@fortawesome/sharp-solid-svg-icons": "^6.5.1",
|
||||||
"@solidjs/meta": "^0.29.2",
|
"@solidjs/meta": "^0.29.3",
|
||||||
"@solidjs/router": "^0.10.9",
|
"@solidjs/router": "^0.12.0",
|
||||||
"@solidjs/start": "^0.4.9",
|
"@solidjs/start": "^0.5.4",
|
||||||
"drizzle-orm": "^0.29.2",
|
"drizzle-orm": "^0.29.3",
|
||||||
"moment-timezone": "^0.5.44",
|
"moment-timezone": "^0.5.45",
|
||||||
"openapi-fetch": "^0.8.2",
|
"openapi-fetch": "^0.8.2",
|
||||||
"postgres": "^3.4.3",
|
"postgres": "^3.4.3",
|
||||||
"solid-js": "^1.8.11",
|
"solid-js": "^1.8.14",
|
||||||
"vinxi": "^0.1.2"
|
"vinxi": "^0.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.4.2",
|
||||||
"drizzle-kit": "^0.20.9",
|
"drizzle-kit": "^0.20.14",
|
||||||
"drizzle-zod": "^0.5.1",
|
"drizzle-zod": "^0.5.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-solid": "^0.13.1",
|
"eslint-plugin-solid": "^0.13.1",
|
||||||
"openapi-typescript": "^6.7.3",
|
"openapi-typescript": "^6.7.4",
|
||||||
"pg": "^8.11.3",
|
"pg": "^8.11.3",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.2.5",
|
||||||
"prettier-plugin-organize-imports": "^3.2.4",
|
"prettier-plugin-organize-imports": "^3.2.4",
|
||||||
"sass": "^1.69.6",
|
"sass": "^1.70.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"zod": "3.22.4"
|
"zod": "3.22.4"
|
||||||
},
|
},
|
||||||
|
|
2019
pnpm-lock.yaml
2019
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,4 @@
|
||||||
import { createHandler } from "@solidjs/start/entry";
|
import { StartServer, createHandler } from "@solidjs/start/server";
|
||||||
import { StartServer } from "@solidjs/start/server";
|
|
||||||
|
|
||||||
export default createHandler(() => (
|
export default createHandler(() => (
|
||||||
<StartServer
|
<StartServer
|
||||||
|
|
|
@ -37,7 +37,6 @@ const initialValue = (params: ReturnType<typeof useParams>) => ({
|
||||||
|
|
||||||
const getPayload = async (
|
const getPayload = async (
|
||||||
id: string,
|
id: string,
|
||||||
pathName: string,
|
|
||||||
): Promise<
|
): Promise<
|
||||||
| { success: false; message: string }
|
| { success: false; message: string }
|
||||||
| (ReturnType<typeof initialValue> & { success: true })
|
| (ReturnType<typeof initialValue> & { success: true })
|
||||||
|
@ -47,6 +46,7 @@ const getPayload = async (
|
||||||
const event = getRequestEvent();
|
const event = getRequestEvent();
|
||||||
if (!event) return { success: false, message: "No request event!" };
|
if (!event) return { success: false, message: "No request event!" };
|
||||||
|
|
||||||
|
const pathname = new URL(event.request.url).pathname;
|
||||||
const session = await getSession(event.request, authOptions);
|
const session = await getSession(event.request, authOptions);
|
||||||
if (!session?.user?.id)
|
if (!session?.user?.id)
|
||||||
return { success: false, message: "No user with 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}` },
|
headers: { Authorization: `Bot ${import.meta.env.VITE_DISCORD_BOT_TOKEN}` },
|
||||||
});
|
});
|
||||||
if (guildsRequest.error || channelsRequest.error) {
|
if (guildsRequest.error || channelsRequest.error) {
|
||||||
console.log(guildsRequest.error, channelsRequest.error, event.path);
|
console.log(guildsRequest.error, channelsRequest.error, pathname);
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
message: "Error on one of the discord api requests!",
|
message: "Error on one of the discord api requests!",
|
||||||
|
@ -107,11 +107,7 @@ const getPayload = async (
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(
|
console.log(new URL(event.request.url).pathname, "success");
|
||||||
pathName,
|
|
||||||
pathName == event.path ? "server" : "client",
|
|
||||||
"success",
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
|
@ -143,9 +139,7 @@ function config() {
|
||||||
const [payload] = createResource(
|
const [payload] = createResource(
|
||||||
params.guildId,
|
params.guildId,
|
||||||
async (id) => {
|
async (id) => {
|
||||||
const payload = await getPayload(id, location.pathname).catch((e) =>
|
const payload = await getPayload(id).catch((e) => console.warn(e, id));
|
||||||
console.warn(e, id),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!payload) {
|
if (!payload) {
|
||||||
console.error(location.pathname, payload);
|
console.error(location.pathname, payload);
|
||||||
|
|
|
@ -26,9 +26,7 @@ const initialValue = () => ({
|
||||||
}[],
|
}[],
|
||||||
});
|
});
|
||||||
|
|
||||||
const getPayload = async (
|
const getPayload = async (): Promise<
|
||||||
pathName: string,
|
|
||||||
): Promise<
|
|
||||||
| { success: false; message: string }
|
| { success: false; message: string }
|
||||||
| (ReturnType<typeof initialValue> & { success: true })
|
| (ReturnType<typeof initialValue> & { success: true })
|
||||||
> => {
|
> => {
|
||||||
|
@ -37,6 +35,7 @@ const getPayload = async (
|
||||||
const event = getRequestEvent();
|
const event = getRequestEvent();
|
||||||
if (!event) return { success: false, message: "No request event!" };
|
if (!event) return { success: false, message: "No request event!" };
|
||||||
|
|
||||||
|
const pathname = new URL(event.request.url).pathname;
|
||||||
const session = await getSession(event.request, authOptions);
|
const session = await getSession(event.request, authOptions);
|
||||||
if (!session?.user?.id)
|
if (!session?.user?.id)
|
||||||
return { success: false, message: "No user with id!" };
|
return { success: false, message: "No user with id!" };
|
||||||
|
@ -63,11 +62,7 @@ const getPayload = async (
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return { success: false, message: "Error on discord api request!" };
|
return { success: false, message: "Error on discord api request!" };
|
||||||
}
|
}
|
||||||
console.log(
|
console.log(pathname, "success");
|
||||||
pathName,
|
|
||||||
pathName == event.path ? "server" : "client",
|
|
||||||
"success",
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
|
@ -85,9 +80,7 @@ function index() {
|
||||||
const [payload] = createResource(
|
const [payload] = createResource(
|
||||||
// eslint-disable-next-line solid/reactivity
|
// eslint-disable-next-line solid/reactivity
|
||||||
async () => {
|
async () => {
|
||||||
const payload = await getPayload(location.pathname).catch((e) =>
|
const payload = await getPayload().catch((e) => console.warn(e));
|
||||||
console.warn(e),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!payload) {
|
if (!payload) {
|
||||||
console.error(location.pathname, payload);
|
console.error(location.pathname, payload);
|
||||||
|
|
Loading…
Reference in a new issue