diff --git a/@sammo/api_def/src/gateway.ts b/@sammo/api_def/src/gateway.ts index 80f5224..5905f6f 100644 --- a/@sammo/api_def/src/gateway.ts +++ b/@sammo/api_def/src/gateway.ts @@ -2,24 +2,16 @@ import { GET, POST, type DefAPINamespace } from "@strpc/def"; //굳이 할 필요는 없지만, d.ts가 깔끔해짐 import type { - InvalidResponse, ValidResponse + // eslint-disable-next-line @typescript-eslint/no-unused-vars + InvalidResponse, ValidResponse } from "@strpc/def"; import type { - ArgDeleteAPI, - ArgGetAPI, - ArgHeadAPI, - ArgPatchAPI, - ArgPostAPI, - ArgPutAPI, - EmptyDeleteAPI, - EmptyGetAPI, - EmptyHeadAPI, - EmptyPatchAPI, - EmptyPostAPI, - EmptyPutAPI, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ArgDeleteAPI, ArgGetAPI, ArgHeadAPI, ArgPatchAPI, ArgPostAPI, ArgPutAPI, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + EmptyDeleteAPI, EmptyGetAPI, EmptyHeadAPI, EmptyPatchAPI, EmptyPostAPI, EmptyPutAPI, } from "@strpc/def/types"; - export type LoginResponse = { result: true, nextToken: [number, string] | undefined, @@ -49,7 +41,6 @@ export type AutoLoginFailed = { reason: string, } -/** @internal */ export const structure = { Login: { LoginByID: POST<{ diff --git a/@sammo/api_def/src/index.ts b/@sammo/api_def/src/index.ts index cc4d393..e85e954 100644 --- a/@sammo/api_def/src/index.ts +++ b/@sammo/api_def/src/index.ts @@ -1,26 +1,20 @@ import type { DefAPINamespace, } from "@strpc/def"; +import { GET, POST } from '@strpc/def'; //굳이 할 필요는 없지만, d.ts가 깔끔해짐 import type { - InvalidResponse, ValidResponse + // eslint-disable-next-line @typescript-eslint/no-unused-vars + InvalidResponse, ValidResponse } from "@strpc/def"; import type { - ArgDeleteAPI, - ArgGetAPI, - ArgHeadAPI, - ArgPatchAPI, - ArgPostAPI, - ArgPutAPI, - EmptyDeleteAPI, - EmptyGetAPI, - EmptyHeadAPI, - EmptyPatchAPI, - EmptyPostAPI, - EmptyPutAPI, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ArgDeleteAPI, ArgGetAPI, ArgHeadAPI, ArgPatchAPI, ArgPostAPI, ArgPutAPI, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + EmptyDeleteAPI, EmptyGetAPI, EmptyHeadAPI, EmptyPatchAPI, EmptyPostAPI, EmptyPutAPI, } from "@strpc/def/types"; -import { GET, POST } from '@strpc/def'; + export type { InferResponse, diff --git a/@sammo/client/package.json b/@sammo/client/package.json index 31e2b5f..092c5b8 100644 --- a/@sammo/client/package.json +++ b/@sammo/client/package.json @@ -5,10 +5,9 @@ "main": "dist/index.js", "scripts": { "dev": "vite", - "build": "run-p type-check build-only", + "build": "vue-tsc && vite build", "preview": "vite preview", "build-only": "vite build", - "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "format": "prettier --write src/" }, @@ -19,6 +18,7 @@ "@popperjs/core": "^2.11.8", "@sammo/game_logic": "workspace:^", "@sammo/util": "workspace:^", + "@strpc/client_ky": "workspace:^", "@strpc/def": "workspace:^", "bootstrap": "^5.3.1", "bootstrap-vue-next": "^0.9.26", diff --git a/@sammo/client/env.d.ts b/@sammo/client/src/vite-env.d.ts similarity index 100% rename from @sammo/client/env.d.ts rename to @sammo/client/src/vite-env.d.ts diff --git a/@sammo/client/tsconfig.app.json b/@sammo/client/tsconfig.app.json deleted file mode 100644 index 3af40b0..0000000 --- a/@sammo/client/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"] - } - } - } \ No newline at end of file diff --git a/@sammo/client/tsconfig.json b/@sammo/client/tsconfig.json index 7087b3f..0086802 100644 --- a/@sammo/client/tsconfig.json +++ b/@sammo/client/tsconfig.json @@ -1,28 +1,23 @@ { - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", - }, - "exclude": [ - + "extends": "../../tsconfig.vite.json", + "include": [ + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.tsx", + "src/**/*.vue" ], "references": [ - { - - "path": "../util" - }, - { - "path": "../secure_token" - }, - { - "path": "../../@strpc/def" - }, - { - "path": "./tsconfig.node.json" - }, - { - "path": "./tsconfig.app.json" - }, + { + "path": "../util" + }, + { + "path": "../secure_token" + }, + { + "path": "../../@strpc/def" + }, + { + "path": "./tsconfig.node.json" + } ] - } +} \ No newline at end of file diff --git a/@sammo/client/tsconfig.node.json b/@sammo/client/tsconfig.node.json index 9ccb58a..42872c5 100644 --- a/@sammo/client/tsconfig.node.json +++ b/@sammo/client/tsconfig.node.json @@ -1,18 +1,10 @@ { - "extends": "@tsconfig/node20/tsconfig.json", - "include": [ - "vite.config.*", - "vitest.config.*", - "cypress.config.*", - "nightwatch.conf.*", - "playwright.config.*" - ], "compilerOptions": { "composite": true, + "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "Bundler", - "types": ["node"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - } + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] } diff --git a/@sammo/gateway_client/package.json b/@sammo/gateway_client/package.json index 7707322..8be5974 100644 --- a/@sammo/gateway_client/package.json +++ b/@sammo/gateway_client/package.json @@ -18,6 +18,7 @@ "dependencies": { "@popperjs/core": "^2.11.8", "@sammo/util": "workspace:^", + "@strpc/client_ky": "workspace:^", "@strpc/def": "workspace:^", "bootstrap": "^5.3.1", "bootstrap-vue-next": "^0.9.26", diff --git a/@sammo/gateway_client/tsconfig.app.json b/@sammo/gateway_client/tsconfig.app.json deleted file mode 100644 index 3af40b0..0000000 --- a/@sammo/gateway_client/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"] - } - } - } \ No newline at end of file diff --git a/@sammo/gateway_client/tsconfig.json b/@sammo/gateway_client/tsconfig.json index 7087b3f..d6637d8 100644 --- a/@sammo/gateway_client/tsconfig.json +++ b/@sammo/gateway_client/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.vite.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", @@ -20,9 +20,6 @@ }, { "path": "./tsconfig.node.json" - }, - { - "path": "./tsconfig.app.json" - }, + } ] } diff --git a/package.json b/package.json index c6d9a9e..cc111f6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "run-p dev:client dev:server dev:gateway_server dev:gateway_client", "build": "run-s build:ts build:vite", - "build:ts": "run-p build:server build:gateway_server", + "build:ts": "run-s build:server build:gateway_server", "build:vite": "run-s build:client build:gateway_client", "type-check": "run-p type-check:server type-check:client type-check:gateway_server type-check:gateway_client", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f736ce..66c7991 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,6 +81,9 @@ importers: '@sammo/util': specifier: workspace:^ version: link:../util + '@strpc/client_ky': + specifier: workspace:^ + version: link:../../@strpc/client_ky '@strpc/def': specifier: workspace:^ version: link:../../@strpc/def @@ -237,6 +240,9 @@ importers: '@sammo/util': specifier: workspace:^ version: link:../util + '@strpc/client_ky': + specifier: workspace:^ + version: link:../../@strpc/client_ky '@strpc/def': specifier: workspace:^ version: link:../../@strpc/def diff --git a/tsconfig.json b/tsconfig.json index 5f408c3..9a33424 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,11 @@ { "extends": "./tsconfig.base.json", "references": [ - { - "path": "./@sammo/gateway_client" - }, { "path": "./@sammo/gateway_server" }, { "path": "./@sammo/server" - }, - { - "path": "./@sammo/client" - }, + } ], } diff --git a/tsconfig.vite.json b/tsconfig.vite.json new file mode 100644 index 0000000..178d0f9 --- /dev/null +++ b/tsconfig.vite.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + "verbatimModuleSyntax": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, +} \ No newline at end of file