fix: use #lib instead of $lib

This commit is contained in:
2026-10-10 21:29:02 -04:00
parent f2559eaad0
commit 8d060204c8
42 changed files with 119 additions and 119 deletions
@@ -1,10 +1,10 @@
<script lang="ts">
import QRCode from 'qrcode';
import { getRefreshToken, getToken, setTokens } from '$lib/utils/auth';
import { parseTotpEnabled } from '$lib/utils/totp';
import { getRefreshToken, getToken, setTokens } from '#lib/utils/auth';
import { parseTotpEnabled } from '#lib/utils/totp';
import { tick } from 'svelte';
import { extractError } from '$lib/utils/misc';
import type { ModalItem, ModalMode } from '$lib/types/modal';
import { extractError } from '#lib/utils/misc';
import type { ModalItem, ModalMode } from '#lib/types/modal';
interface Props {
show?: boolean;
@@ -1,6 +1,6 @@
<script lang="ts">
import Modal from '$lib/components/Modal.svelte';
import { cancelModal, confirmModal, modal } from '$lib/stores/modal';
import Modal from '#lib/components/Modal.svelte';
import { cancelModal, confirmModal, modal } from '#lib/stores/modal';
let state = $derived($modal);
</script>
@@ -1,9 +1,9 @@
<script lang="ts">
import { user } from '$lib/stores/user';
import { user } from '#lib/stores/user';
import { resolve } from '$app/paths';
import { page } from '$app/state';
import { clearTokens, hasRole } from '$lib/utils/auth';
import logo from '$lib/assets/favicon.svg';
import { clearTokens, hasRole } from '#lib/utils/auth';
import logo from '#lib/assets/favicon.svg';
import type { PageData } from '../../routes/$types';
import { slide } from 'svelte/transition';
import { Menu, X } from '@lucide/svelte';
@@ -1,5 +1,5 @@
<script lang="ts">
import { tooltip, dateToRelativeString, formatNumber, formatBytes } from '$lib/utils/misc';
import { tooltip, dateToRelativeString, formatNumber, formatBytes } from '#lib/utils/misc';
import { resolve } from '$app/paths';
import {
Eye,
@@ -15,8 +15,8 @@
HatGlasses,
ThumbsUp
} from '@lucide/svelte';
import { syntaxes } from '$lib/consts';
import type { Paste } from '$lib/types/paste';
import { syntaxes } from '#lib/consts';
import type { Paste } from '#lib/types/paste';
interface Props {
paste: Paste;
@@ -1,14 +1,14 @@
<script lang="ts">
import type { CommentReaction, CommentTreeNode } from '$lib/types/comment';
import { dateToRelativeString, tooltip } from '$lib/utils/misc';
import { parseCommentMarkdown } from '$lib/utils/markdown';
import { escapeHtml } from '$lib/utils/html';
import { user } from '$lib/stores/user';
import PasteCommentItem from '$lib/components/PasteCommentItem.svelte';
import type { CommentReaction, CommentTreeNode } from '#lib/types/comment';
import { dateToRelativeString, tooltip } from '#lib/utils/misc';
import { parseCommentMarkdown } from '#lib/utils/markdown';
import { escapeHtml } from '#lib/utils/html';
import { user } from '#lib/stores/user';
import PasteCommentItem from '#lib/components/PasteCommentItem.svelte';
import { ThumbsUp, ThumbsDown, Trash2, Shredder, Reply, Quote } from '@lucide/svelte';
import { resolve } from '$app/paths';
import RichTextEditor from './RichTextEditor.svelte';
import { hasRole, roles } from '$lib/utils/auth';
import { hasRole, roles } from '#lib/utils/auth';
interface Props {
node: CommentTreeNode;
@@ -1,17 +1,17 @@
<script lang="ts">
import { onMount } from 'svelte';
import { getToken } from '$lib/utils/auth';
import { user } from '$lib/stores/user';
import { getToken } from '#lib/utils/auth';
import { user } from '#lib/stores/user';
import type {
CommentReaction,
CommentReactionResult,
PasteComment,
CommentTreeNode
} from '$lib/types/comment';
import PasteCommentItem from '$lib/components/PasteCommentItem.svelte';
} from '#lib/types/comment';
import PasteCommentItem from '#lib/components/PasteCommentItem.svelte';
import { SvelteMap } from 'svelte/reactivity';
import RichTextEditor from './RichTextEditor.svelte';
import { openModal } from '$lib/stores/modal';
import { openModal } from '#lib/stores/modal';
import { RefreshCw } from '@lucide/svelte';
interface Props {
@@ -1,6 +1,6 @@
<script lang="ts">
import { Bold, Italic, CodeXml, Quote, Send, Eye, Pencil } from '@lucide/svelte';
import { parseCommentMarkdown } from '$lib/utils/markdown';
import { parseCommentMarkdown } from '#lib/utils/markdown';
interface Props {
class?: string;
+1 -1
View File
@@ -1 +1 @@
// place files you want to import through the `$lib` alias in this folder.
// place files you want to import through the `#lib` alias in this folder.
+1 -1
View File
@@ -1,4 +1,4 @@
import { apiUrl } from '$lib/server/api';
import { apiUrl } from '#lib/server/api';
const methodsWithoutBody = new Set(['GET', 'HEAD']);
+1 -1
View File
@@ -1,5 +1,5 @@
import { writable } from 'svelte/store';
import type { ModalOpenOptions, ModalState } from '$lib/types/modal';
import type { ModalOpenOptions, ModalState } from '#lib/types/modal';
const initialState: ModalState = {
show: false,
+1 -1
View File
@@ -1,6 +1,6 @@
import { writable } from 'svelte/store';
import { browser } from '$app/environment';
import type { AuthUser } from '$lib/types/user';
import type { AuthUser } from '#lib/types/user';
let initial: AuthUser | null = null;
+2 -2
View File
@@ -1,7 +1,7 @@
import { browser } from '$app/environment';
import type { Cookies } from '@sveltejs/kit';
import { user } from '$lib/stores/user';
import type { JWTUser } from '$lib/types/user';
import { user } from '#lib/stores/user';
import type { JWTUser } from '#lib/types/user';
export const roles = {
User: 1,
+1 -1
View File
@@ -1,7 +1,7 @@
import { marked } from 'marked';
import createDOMPurify from 'dompurify';
import type { WindowLike } from 'dompurify';
import { trustedDomains } from '$lib/consts';
import { trustedDomains } from '#lib/consts';
import { escapeHtml } from './html';
export const externalMediaWarningStorageKey = 'sharpbin:ignore-external-media-warning';
+1 -1
View File
@@ -1,4 +1,4 @@
import { syntaxes } from '$lib/consts';
import { syntaxes } from '#lib/consts';
/**
* @param bytes Bytes to format.