diff --git a/package.json b/package.json index cbcf643a..ca0ed556 100644 --- a/package.json +++ b/package.json @@ -57,5 +57,17 @@ "node": ">=18", "pnpm": ">=9" }, - "packageManager": "pnpm@10.12.4+sha256.cadfd9e6c9fcc2cb76fe7c0779a5250b632898aea5f53d833a73690c77a778d9" + "packageManager": "pnpm@10.12.4+sha256.cadfd9e6c9fcc2cb76fe7c0779a5250b632898aea5f53d833a73690c77a778d9", + "imports": { + "#lib": "./src/lib/index.js", + "#lib/*": "./src/lib/*", + "#components": "./src/lib/components/index.js", + "#components/*": "./src/lib/components/*", + "#assets": "./src/lib/assets/index.js", + "#assets/*": "./src/lib/assets/*", + "#styles": "./src/lib/styles/index.js", + "#styles/*": "./src/lib/styles/*", + "#api": "./src/routes/api/v2/index.js", + "#api/*": "./src/routes/api/v2/*" + } } diff --git a/src/app.d.ts b/src/app.d.ts index fe685445..ab1a8b60 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,7 +1,7 @@ // See https://kit.svelte.dev/docs/types#app -import type { ISession } from '$lib/types/session'; -import { Permissions } from '$lib/auth/permissions'; +import type { ISession } from '#lib/types/session.js'; +import { Permissions } from '#lib/auth/permissions.js'; // for information about these interfaces declare global { diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 75670842..35a193ec 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -2,12 +2,12 @@ import { deleteSessionTokenCookie, setSessionTokenCookie, validateAndRenewSession, -} from '$lib/auth/session'; -import connect from '$lib/db/mongodb'; -import type { Handle } from '@sveltejs/kit'; -import { Permissions } from '$lib/auth/permissions'; -import { startFileClearInterval } from '$lib/db/s3'; -import { dev } from '$app/environment'; +} from '#lib/auth/session.js'; +import connect from '#lib/db/mongodb.js'; +import type { Handle } from '@sveltejs/kit/hooks'; +import { Permissions } from '#lib/auth/permissions.js'; +import { startFileClearInterval } from '#lib/db/s3.js'; +import { dev } from '$app/env'; // Ensure correct time zone process.env.TZ = 'America/Los_Angeles'; diff --git a/src/lib/auth/oauth.ts b/src/lib/auth/oauth.ts index 102fdca7..14018c2a 100644 --- a/src/lib/auth/oauth.ts +++ b/src/lib/auth/oauth.ts @@ -1,6 +1,6 @@ import { Google } from 'arctic'; import { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET } from '$app/env/private'; -import { dev } from '$app/environment'; +import { dev } from '$app/env'; import { PUBLIC_BASE_URL } from '$app/env/public'; const callbackUrl = new URL( diff --git a/src/lib/auth/permissions.ts b/src/lib/auth/permissions.ts index a4e40517..c64bd966 100644 --- a/src/lib/auth/permissions.ts +++ b/src/lib/auth/permissions.ts @@ -1,5 +1,5 @@ -import type { ISessionUser } from '$api/users/types'; -import type { ISession } from '$lib/types/session'; +import type { ISessionUser } from '#api/users/types.js'; +import type { ISession } from '#lib/types/session.js'; export enum Permission { /** diff --git a/src/lib/auth/session.ts b/src/lib/auth/session.ts index 89cca090..805c07ff 100644 --- a/src/lib/auth/session.ts +++ b/src/lib/auth/session.ts @@ -1,6 +1,6 @@ -import type { ISessionUser } from '$api/users/types'; -import { Session } from '$lib/models/sessionModel'; -import type { ISession } from '$lib/types/session'; +import type { ISessionUser } from '#api/users/types.js'; +import { Session } from '#lib/models/sessionModel.js'; +import type { ISession } from '#lib/types/session.js'; import { sha256 } from '@oslojs/crypto/sha2'; import { encodeBase32LowerCaseNoPadding } from '@oslojs/encoding'; import type { Cookies } from '@sveltejs/kit'; diff --git a/src/lib/components/ContactForm.svelte b/src/lib/components/ContactForm.svelte index be6f1248..122ea147 100644 --- a/src/lib/components/ContactForm.svelte +++ b/src/lib/components/ContactForm.svelte @@ -9,15 +9,15 @@ @@ -10,11 +10,11 @@
- +
If you are looking for a shortened URL, try clicking here.
If that doesn't work, double check the URL you entered, and if you think its correct, contact the diff --git a/src/lib/components/SectionHeader.svelte b/src/lib/components/SectionHeader.svelte index 9a7ae060..2c379e74 100644 --- a/src/lib/components/SectionHeader.svelte +++ b/src/lib/components/SectionHeader.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/(public)/+layout.ts b/src/routes/(public)/+layout.ts index ad9eb9a3..31a0aa8b 100644 --- a/src/routes/(public)/+layout.ts +++ b/src/routes/(public)/+layout.ts @@ -1,5 +1,5 @@ -import type { IAnnouncement } from '$api/page_data/announcement/types'; -import type { LinkCardListData } from '$api/page_data/usefulLinks/types'; +import type { IAnnouncement } from '#api/page_data/announcement/types.js'; +import type { LinkCardListData } from '#api/page_data/usefulLinks/types.js'; import type { LayoutLoad } from './$types'; export const load = (async ({ url, fetch }) => { diff --git a/src/routes/(public)/+page.svelte b/src/routes/(public)/+page.svelte index bbc0f59c..9b186942 100644 --- a/src/routes/(public)/+page.svelte +++ b/src/routes/(public)/+page.svelte @@ -1,8 +1,8 @@
diff --git a/src/routes/(public)/extra/+page.svelte b/src/routes/(public)/extra/+page.svelte index e1fab963..fcb09abe 100644 --- a/src/routes/(public)/extra/+page.svelte +++ b/src/routes/(public)/extra/+page.svelte @@ -1,7 +1,7 @@ diff --git a/src/routes/(public)/file-transfer/+page.server.ts b/src/routes/(public)/file-transfer/+page.server.ts index 52a6cd72..7b02e97e 100644 --- a/src/routes/(public)/file-transfer/+page.server.ts +++ b/src/routes/(public)/file-transfer/+page.server.ts @@ -1,6 +1,6 @@ import { redirect } from '@sveltejs/kit'; import type { PageServerLoad } from './$types'; -import { fileTransferCodeValidator } from '$api/file_transfer/validator'; +import { fileTransferCodeValidator } from '#api/file_transfer/validator.js'; export const load = (async ({ url, cookies }) => { let existingCode = url.searchParams.get('code'); diff --git a/src/routes/(public)/file-transfer/+page.svelte b/src/routes/(public)/file-transfer/+page.svelte index 6fed2c60..2d690ad7 100644 --- a/src/routes/(public)/file-transfer/+page.svelte +++ b/src/routes/(public)/file-transfer/+page.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/(public)/link-generator/ShortLinkForm.svelte b/src/routes/(public)/link-generator/ShortLinkForm.svelte index 41e22ab7..2e9fc934 100644 --- a/src/routes/(public)/link-generator/ShortLinkForm.svelte +++ b/src/routes/(public)/link-generator/ShortLinkForm.svelte @@ -1,8 +1,8 @@ diff --git a/src/routes/(public)/qr-generator/QrCodeForm.svelte b/src/routes/(public)/qr-generator/QrCodeForm.svelte index 14fa31b8..05d6a003 100644 --- a/src/routes/(public)/qr-generator/QrCodeForm.svelte +++ b/src/routes/(public)/qr-generator/QrCodeForm.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0e035193..8a6593bd 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,8 +1,8 @@ @@ -9,6 +9,6 @@
- +
diff --git a/src/routes/admin/(auth)/Header.svelte b/src/routes/admin/(auth)/Header.svelte index f9ca2e11..d7eb7be5 100644 --- a/src/routes/admin/(auth)/Header.svelte +++ b/src/routes/admin/(auth)/Header.svelte @@ -1,9 +1,9 @@