서버, 클라이언트, 서비스 워커 공용 코드를 lib/shared로 분리하고 브라우저 전용 모듈을 lib/client로 재구성

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
staticandClaude Opus 5.5 committed 2026-10-12 00:04:56 +09:00
1 parent 6a6aa1765b
commit aee87fd9b6
82 files changed
+326 -221

No files matched your search

@@ -3,7 +3,7 @@
import { CheckBox, RowVirtualizer } from "#lib/components/atoms/index.js";
import { SubCategories, TopBar } from "#lib/components/molecules/index.js";
import { CategoryCreateModal } from "#lib/components/organisms/index.js";
import { updateCategoryInfo } from "#lib/indexedDB/index.js";
import { updateCategoryInfo } from "#lib/client/storage/indexedDB/index.js";
import { getCategoryInfo, type MaybeCategoryInfo } from "#lib/modules/filesystem/index.js";
import { masterKeyStore } from "#lib/stores/index.js";
import { HybridPromise, sortEntries } from "#lib/utils/index.js";
@@ -1,7 +1,7 @@
<script lang="ts">
import { ActionEntryButton } from "#lib/components/atoms/index.js";
import { DirectoryEntryLabel } from "#lib/components/molecules/index.js";
import { getFileThumbnail } from "#lib/modules/file/index.js";
import { getFileThumbnail } from "#lib/client/cache/index.js";
import type { CategoryFileInfo } from "#lib/modules/filesystem/index.js";
import { formatDateTime } from "#lib/utils/index.js";
import type { SelectedFile } from "./service.svelte";
@@ -1,6 +1,6 @@
import { getContext, setContext } from "svelte";
import { encryptString } from "#lib/modules/crypto/index.js";
import type { SelectedCategory } from "#lib/components/molecules/index.js";
import { encryptString } from "#lib/shared/crypto/index.js";
import { trpc } from "#trpc/client.js";
export { requestCategoryCreation, requestFileRemovalFromCategory } from "#lib/services/category.js";
@@ -1,7 +1,7 @@
<script lang="ts">
import { ActionEntryButton, RowVirtualizer } from "#lib/components/atoms/index.js";
import { DirectoryEntryLabel } from "#lib/components/molecules/index.js";
import { getUploadingFiles, type LiveFileUploadState } from "#lib/modules/file/index.js";
import { getUploadingFiles, type LiveFileUploadState } from "#lib/client/transfer/index.js";
import type { DirectoryInfo } from "#lib/modules/filesystem/index.js";
import { sortEntries } from "#lib/utils/index.js";
import File from "./File.svelte";
@@ -1,7 +1,7 @@
<script lang="ts">
import { ActionEntryButton } from "#lib/components/atoms/index.js";
import { DirectoryEntryLabel } from "#lib/components/molecules/index.js";
import { getFileThumbnail } from "#lib/modules/file/index.js";
import { getFileThumbnail } from "#lib/client/cache/index.js";
import type { SummarizedFileInfo } from "#lib/modules/filesystem/index.js";
import { formatDateTime } from "#lib/utils/index.js";
import type { SelectedEntry } from "../service.svelte";
@@ -1,5 +1,5 @@
<script lang="ts">
import type { LiveFileUploadState } from "#lib/modules/file/index.js";
import type { LiveFileUploadState } from "#lib/client/transfer/index.js";
import { formatNetworkSpeed } from "#lib/utils/index.js";
import IconDraft from "~icons/material-symbols/draft";
@@ -1,5 +1,5 @@
<script lang="ts">
import { getDownloadingFiles } from "#lib/modules/file/index.js";
import { getDownloadingFiles } from "#lib/client/transfer/index.js";
interface Props {
onclick: () => void;
@@ -1,5 +1,5 @@
<script lang="ts">
import { getUploadingFiles } from "#lib/modules/file/index.js";
import { getUploadingFiles } from "#lib/client/transfer/index.js";
interface Props {
onclick: () => void;
@@ -1,19 +1,19 @@
import { getContext, setContext } from "svelte";
import { storeHmacSecrets } from "#lib/indexedDB/index.js";
import {
generateDataKey,
wrapDataKey,
unwrapHmacSecret,
encryptString,
} from "#lib/modules/crypto/index.js";
import {
storeFileCache,
deleteFileCache,
storeFileThumbnailCache,
deleteFileThumbnailCache,
uploadFile,
} from "#lib/modules/file/index.js";
} from "#lib/client/cache/index.js";
import { storeHmacSecrets } from "#lib/client/storage/indexedDB/index.js";
import { uploadFile } from "#lib/client/transfer/index.js";
import type { DataKey } from "#lib/modules/filesystem/index.js";
import {
generateDataKey,
wrapDataKey,
unwrapHmacSecret,
encryptString,
} from "#lib/shared/crypto/index.js";
import { hmacSecretStore, type MasterKey, type HmacSecret } from "#lib/stores/index.js";
import { trpc } from "#trpc/client.js";
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { ActionEntryButton } from "#lib/components/atoms/index.js";
import { DirectoryEntryLabel } from "#lib/components/molecules/index.js";
import { getFileThumbnail } from "#lib/modules/file/index.js";
import { getFileThumbnail } from "#lib/client/cache/index.js";
import type { SummarizedFileInfo } from "#lib/modules/filesystem/index.js";
import { formatDateTime } from "#lib/utils/index.js";
+1 -1
View File
@@ -1,4 +1,4 @@
import { getAllFileInfos } from "#lib/indexedDB/index.js";
import { getAllFileInfos } from "#lib/client/storage/indexedDB/index.js";
export const requestFreshMediaFilesRetrieval = async (limit = 8) => {
const files = await getAllFileInfos();