mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
Svelte 컴포넌트를 제외한 파일, 폴더 및 라우팅 경로의 이름을 kebab-case로 통일하고 import 경로에 실제 파일 확장자를 사용하도록 변경
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
225ad3515f
commit
306fcb2420
201 files changed
+550
-545
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ import { observable } from "@trpc/server/observable";
|
||||
import superjson from "superjson";
|
||||
import { goto } from "$app/navigation";
|
||||
import { navigating } from "$app/state";
|
||||
import type { AppRouter } from "./router.server";
|
||||
import type { AppRouter } from "./router.server.ts";
|
||||
|
||||
// Procedures that report invalid credentials as UNAUTHORIZED, not an expired session
|
||||
const CREDENTIAL_PROCEDURES = new Set(["auth.login", "auth.upgrade"]);
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import type { Category } from "#lib/server/db/repositories/category.js";
|
||||
import type { Directory } from "#lib/server/db/repositories/directory.js";
|
||||
import type { File } from "#lib/server/db/repositories/file.js";
|
||||
import type { Category } from "#lib/server/db/repositories/category.ts";
|
||||
import type { Directory } from "#lib/server/db/repositories/directory.ts";
|
||||
import type { File } from "#lib/server/db/repositories/file.ts";
|
||||
|
||||
// Shapes of filesystem entries exposed by the API
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { RequestEvent } from "@sveltejs/kit";
|
||||
import { initTRPC, TRPCError } from "@trpc/server";
|
||||
import superjson from "superjson";
|
||||
import { authorize, type ClientSession, type Session } from "#lib/server/auth.js";
|
||||
import { AppError, type ErrorCode } from "#lib/server/errors.js";
|
||||
import { authorize, type ClientSession, type Session } from "#lib/server/auth.ts";
|
||||
import { AppError, type ErrorCode } from "#lib/server/errors.ts";
|
||||
|
||||
export const createContext = (event: RequestEvent) => event;
|
||||
export type Context = Awaited<ReturnType<typeof createContext>>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { inferRouterInputs, inferRouterOutputs } from "@trpc/server";
|
||||
import { router } from "./init.server";
|
||||
import { router } from "./init.server.ts";
|
||||
import {
|
||||
authRouter,
|
||||
categoryRouter,
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
searchRouter,
|
||||
uploadRouter,
|
||||
userRouter,
|
||||
} from "./routers";
|
||||
} from "./routers/index.ts";
|
||||
|
||||
export const appRouter = router({
|
||||
auth: authRouter,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import { cookieOptions } from "#lib/server/auth.js";
|
||||
import { AuthService } from "#lib/server/services/index.js";
|
||||
import { router, publicProcedure, roleProcedure } from "#trpc/init.server.js";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.js";
|
||||
import { cookieOptions } from "#lib/server/auth.ts";
|
||||
import { AuthService } from "#lib/server/services/index.ts";
|
||||
import { router, publicProcedure, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.ts";
|
||||
|
||||
const authRouter = router({
|
||||
login: publicProcedure
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { z } from "zod";
|
||||
import { CategoryService } from "#lib/server/services/index.js";
|
||||
import { toCategoryDto, toFileDto } from "#trpc/dto.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { CategoryService } from "#lib/server/services/index.ts";
|
||||
import { toCategoryDto, toFileDto } from "#trpc/dto.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import {
|
||||
Base64Schema,
|
||||
CategoryIdSchema,
|
||||
EncryptedNameSchema,
|
||||
IdSchema,
|
||||
toCiphertext,
|
||||
} from "#trpc/schemas.js";
|
||||
} from "#trpc/schemas.ts";
|
||||
|
||||
const categoryRouter = router({
|
||||
get: roleProcedure["activeClient"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { ClientService } from "#lib/server/services/index.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.js";
|
||||
import { ClientService } from "#lib/server/services/index.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.ts";
|
||||
|
||||
const clientRouter = router({
|
||||
register: roleProcedure["notClient"]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { z } from "zod";
|
||||
import { DirectoryService } from "#lib/server/services/index.js";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { DirectoryService } from "#lib/server/services/index.ts";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import {
|
||||
Base64Schema,
|
||||
DirectoryIdSchema,
|
||||
EncryptedNameSchema,
|
||||
IdSchema,
|
||||
toCiphertext,
|
||||
} from "#trpc/schemas.js";
|
||||
} from "#trpc/schemas.ts";
|
||||
|
||||
const directoryRouter = router({
|
||||
get: roleProcedure["activeClient"]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import { DirectoryService, FileService } from "#lib/server/services/index.js";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { IdSchema } from "#trpc/schemas.js";
|
||||
import { DirectoryService, FileService } from "#lib/server/services/index.ts";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { IdSchema } from "#trpc/schemas.ts";
|
||||
|
||||
const IdInputSchema = z.object({ id: IdSchema });
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import { FileService } from "#lib/server/services/index.js";
|
||||
import { toFileDto, toFileWithCategoriesDto } from "#trpc/dto.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { Base64Schema, EncryptedNameSchema, IdSchema, toCiphertext } from "#trpc/schemas.js";
|
||||
import { FileService } from "#lib/server/services/index.ts";
|
||||
import { toFileDto, toFileWithCategoriesDto } from "#trpc/dto.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { Base64Schema, EncryptedNameSchema, IdSchema, toCiphertext } from "#trpc/schemas.ts";
|
||||
|
||||
const fileRouter = router({
|
||||
get: roleProcedure["activeClient"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { KeyService } from "#lib/server/services/index.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.js";
|
||||
import { KeyService } from "#lib/server/services/index.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { Base64Schema, IdSchema } from "#trpc/schemas.ts";
|
||||
|
||||
const hskRouter = router({
|
||||
list: roleProcedure["activeClient"].query(async ({ ctx }) => {
|
||||
|
||||
+11
-11
@@ -1,11 +1,11 @@
|
||||
export { default as authRouter } from "./auth";
|
||||
export { default as categoryRouter } from "./category";
|
||||
export { default as clientRouter } from "./client";
|
||||
export { default as directoryRouter } from "./directory";
|
||||
export { default as favoritesRouter } from "./favorites";
|
||||
export { default as fileRouter } from "./file";
|
||||
export { default as hskRouter } from "./hsk";
|
||||
export { default as mekRouter } from "./mek";
|
||||
export { default as searchRouter } from "./search";
|
||||
export { default as uploadRouter } from "./upload";
|
||||
export { default as userRouter } from "./user";
|
||||
export { default as authRouter } from "./auth.ts";
|
||||
export { default as categoryRouter } from "./category.ts";
|
||||
export { default as clientRouter } from "./client.ts";
|
||||
export { default as directoryRouter } from "./directory.ts";
|
||||
export { default as favoritesRouter } from "./favorites.ts";
|
||||
export { default as fileRouter } from "./file.ts";
|
||||
export { default as hskRouter } from "./hsk.ts";
|
||||
export { default as mekRouter } from "./mek.ts";
|
||||
export { default as searchRouter } from "./search.ts";
|
||||
export { default as uploadRouter } from "./upload.ts";
|
||||
export { default as userRouter } from "./user.ts";
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { KeyService } from "#lib/server/services/index.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { Base64Schema } from "#trpc/schemas.js";
|
||||
import { KeyService } from "#lib/server/services/index.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { Base64Schema } from "#trpc/schemas.ts";
|
||||
|
||||
const mekRouter = router({
|
||||
list: roleProcedure["activeClient"].query(async ({ ctx }) => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import { SearchService } from "#lib/server/services/index.js";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { DirectoryIdSchema, IdSchema } from "#trpc/schemas.js";
|
||||
import { SearchService } from "#lib/server/services/index.ts";
|
||||
import { toDirectoryDto, toFileDto } from "#trpc/dto.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import { DirectoryIdSchema, IdSchema } from "#trpc/schemas.ts";
|
||||
|
||||
const searchRouter = router({
|
||||
search: roleProcedure["activeClient"]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import mime from "mime";
|
||||
import { z } from "zod";
|
||||
import { UploadService } from "#lib/server/services/index.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { UploadService } from "#lib/server/services/index.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
import {
|
||||
Base64Schema,
|
||||
DirectoryIdSchema,
|
||||
EncryptedNameSchema,
|
||||
IdSchema,
|
||||
toCiphertext,
|
||||
} from "#trpc/schemas.js";
|
||||
} from "#trpc/schemas.ts";
|
||||
|
||||
const uploadRouter = router({
|
||||
startFileUpload: roleProcedure["activeClient"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UserService } from "#lib/server/services/index.js";
|
||||
import { router, roleProcedure } from "#trpc/init.server.js";
|
||||
import { UserService } from "#lib/server/services/index.ts";
|
||||
import { router, roleProcedure } from "#trpc/init.server.ts";
|
||||
|
||||
const userRouter = router({
|
||||
get: roleProcedure["any"].query(async ({ ctx }) => {
|
||||
|
||||
Reference in new issue
Block a user