From 3f00bfc56401964b49b8fe81877e877784c4249a Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:11:30 +0900 Subject: [PATCH 01/11] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20package=20json=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/.eslintrc.cjs | 2 +- Caecae/jest.config.cjs | 6 + Caecae/package-lock.json | 121 +++++++++++++++- Caecae/package.json | 5 +- Caecae/tsconfig.app.json | 2 +- Caecae/tsconfig.json | 15 +- Caecae/yarn.lock | 298 ++++++++------------------------------- 7 files changed, 190 insertions(+), 259 deletions(-) create mode 100644 Caecae/jest.config.cjs diff --git a/Caecae/.eslintrc.cjs b/Caecae/.eslintrc.cjs index d267197d..9d32d282 100644 --- a/Caecae/.eslintrc.cjs +++ b/Caecae/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { root: true, - env: { browser: true, es2020: true }, + env: { browser: true, es2020: true,node: true, jest: true }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', diff --git a/Caecae/jest.config.cjs b/Caecae/jest.config.cjs new file mode 100644 index 00000000..8d330619 --- /dev/null +++ b/Caecae/jest.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + testMatch: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts?(x)'], +}; diff --git a/Caecae/package-lock.json b/Caecae/package-lock.json index 0f4da863..978a7446 100644 --- a/Caecae/package-lock.json +++ b/Caecae/package-lock.json @@ -28,9 +28,11 @@ "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.7", "jest": "^29.7.0", - "ts-jest": "^29.2.3", + "terser-brunch": "^4.1.0", + "ts-jest": "^29.2.4", "typescript": "^5.5.4", - "vite": "^5.4.0" + "vite": "^5.4.0", + "vite-plugin-compression": "^0.5.1" } }, "node_modules/@alloc/quick-lru": { @@ -1307,6 +1309,16 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -1502,7 +1514,6 @@ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -3183,6 +3194,20 @@ } } }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4329,6 +4354,18 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -5702,6 +5739,54 @@ "node": ">=14.0.0" } }, + "node_modules/terser": { + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-brunch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/terser-brunch/-/terser-brunch-4.1.0.tgz", + "integrity": "sha512-B4I/x1ewiM2OPjlc8bKmCJZhlIeSwNanplmdm10S8CHv/rMrGRAenqLUbyTb+HkPEz/JOZ8m9ygBPqcKNxFZVA==", + "deprecated": "Deprecated", + "dev": true, + "dependencies": { + "anymatch": "^3.1.2", + "terser": "^5.7.1" + }, + "engines": { + "node": ">= 10.16" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/terser/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -5791,11 +5876,10 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, "node_modules/ts-jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", - "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz", + "integrity": "sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw==", "dev": true, - "license": "MIT", "dependencies": { "bs-logger": "0.x", "ejs": "^3.1.10", @@ -5899,6 +5983,15 @@ "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "dev": true }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", @@ -6018,6 +6111,20 @@ } } }, + "node_modules/vite-plugin-compression": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz", + "integrity": "sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "debug": "^4.3.3", + "fs-extra": "^10.0.0" + }, + "peerDependencies": { + "vite": ">=2.0.0" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", diff --git a/Caecae/package.json b/Caecae/package.json index ed813ebb..96042a68 100644 --- a/Caecae/package.json +++ b/Caecae/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "test": "jest --silent --noStackTrace" }, "dependencies": { "autoprefixer": "^10.4.19", @@ -31,7 +32,7 @@ "eslint-plugin-react-refresh": "^0.4.7", "jest": "^29.7.0", "terser-brunch": "^4.1.0", - "ts-jest": "^29.2.3", + "ts-jest": "^29.2.4", "typescript": "^5.5.4", "vite": "^5.4.0", "vite-plugin-compression": "^0.5.1" diff --git a/Caecae/tsconfig.app.json b/Caecae/tsconfig.app.json index cd093446..c52aa8c7 100644 --- a/Caecae/tsconfig.app.json +++ b/Caecae/tsconfig.app.json @@ -23,5 +23,5 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src", "public/assets"] + "include": ["src", "public/assets", "__test__"] } diff --git a/Caecae/tsconfig.json b/Caecae/tsconfig.json index 9ab9d450..5cfd200a 100644 --- a/Caecae/tsconfig.json +++ b/Caecae/tsconfig.json @@ -1,20 +1,17 @@ { "compilerOptions": { + "target": "ES2020", // ECMAScript 타겟을 ES2020으로 설정 (ES6 이상으로 설정) + "lib": ["ES2020", "DOM"], // ES2020 기능과 브라우저 DOM API 포함 + "esModuleInterop": true, "noUnusedLocals": false, "noUnusedParameters": false, + "moduleResolution": "node", "baseUrl": ".", "paths": { "@assets/*": ["./public/assets/*"] }, "jsx": "react-jsx", + "types": ["jest"] // Jest의 타입 정의를 명시적으로 포함 }, - "files": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.node.json" - } - ] + "include": ["src", "__tests__"] } diff --git a/Caecae/yarn.lock b/Caecae/yarn.lock index 0b713f41..07d04edb 100644 --- a/Caecae/yarn.lock +++ b/Caecae/yarn.lock @@ -28,7 +28,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz" integrity sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.24.5": +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.24.5", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": version "7.24.9" resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz" integrity sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg== @@ -320,121 +320,11 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@esbuild/aix-ppc64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" - integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== - -"@esbuild/android-arm64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" - integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== - -"@esbuild/android-arm@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" - integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== - -"@esbuild/android-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" - integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== - "@esbuild/darwin-arm64@0.21.5": version "0.21.5" resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz" integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== -"@esbuild/darwin-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" - integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== - -"@esbuild/freebsd-arm64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" - integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== - -"@esbuild/freebsd-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" - integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== - -"@esbuild/linux-arm64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" - integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== - -"@esbuild/linux-arm@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" - integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== - -"@esbuild/linux-ia32@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" - integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== - -"@esbuild/linux-loong64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" - integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== - -"@esbuild/linux-mips64el@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" - integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== - -"@esbuild/linux-ppc64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" - integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== - -"@esbuild/linux-riscv64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" - integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== - -"@esbuild/linux-s390x@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" - integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== - -"@esbuild/linux-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" - integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== - -"@esbuild/netbsd-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" - integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== - -"@esbuild/openbsd-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" - integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== - -"@esbuild/sunos-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" - integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== - -"@esbuild/win32-arm64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" - integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== - -"@esbuild/win32-ia32@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" - integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== - -"@esbuild/win32-x64@0.21.5": - version "0.21.5" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" - integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== - "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" @@ -673,7 +563,7 @@ jest-haste-map "^29.7.0" slash "^3.0.0" -"@jest/transform@^29.7.0": +"@jest/transform@^29.0.0", "@jest/transform@^29.7.0": version "29.7.0" resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== @@ -694,7 +584,7 @@ slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.6.3": +"@jest/types@^29.0.0", "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== @@ -727,7 +617,7 @@ "@jridgewell/source-map@^0.3.3": version "0.3.6" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz" integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== dependencies: "@jridgewell/gen-mapping" "^0.3.5" @@ -754,7 +644,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -772,86 +662,11 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@rollup/rollup-android-arm-eabi@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz#3d9fd50164b94964f5de68c3c4ce61933b3a338d" - integrity sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w== - -"@rollup/rollup-android-arm64@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz#e1a6d4bca2eb08c84fd996a4bf896ce4b6f4014c" - integrity sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw== - "@rollup/rollup-darwin-arm64@4.19.0": version "4.19.0" resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz" integrity sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA== -"@rollup/rollup-darwin-x64@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz#13fbdb15f58f090871b0ffff047ece06ad6ad74c" - integrity sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg== - -"@rollup/rollup-linux-arm-gnueabihf@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz#e9d9219ddf6f6e946e2ee322198af12466d2c868" - integrity sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw== - -"@rollup/rollup-linux-arm-musleabihf@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz#4ba804a00b5e793196a622f6977e05f23e01f59a" - integrity sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ== - -"@rollup/rollup-linux-arm64-gnu@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz#d871e3f41de759a6db27fc99235b782ba47c15cc" - integrity sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug== - -"@rollup/rollup-linux-arm64-musl@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz#6e63f7ad4cc51bd2c693a2826fd279de9eaa05b5" - integrity sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz#1540b284d91c440bc9fa7a1714cfb71a5597e94d" - integrity sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ== - -"@rollup/rollup-linux-riscv64-gnu@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz#70ae58103b5bc7ba2e2235738b51d97022c8ef92" - integrity sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg== - -"@rollup/rollup-linux-s390x-gnu@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz#579ca5f271421a961d3c73d221202c79e02ff03a" - integrity sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA== - -"@rollup/rollup-linux-x64-gnu@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz#f0282d761b8b4e7b92b236813475248e37231849" - integrity sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA== - -"@rollup/rollup-linux-x64-musl@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz#65da807ac66c505ad14b76f1e5976006cb67dd5f" - integrity sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A== - -"@rollup/rollup-win32-arm64-msvc@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz#1eed24b91f421c2eea8bb7ca8889ba0c867e1780" - integrity sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg== - -"@rollup/rollup-win32-ia32-msvc@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz#1ed93c9cdc84e185359797a686f4d1576afcea58" - integrity sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q== - -"@rollup/rollup-win32-x64-msvc@4.19.0": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz#baf9b65023ea2ecc5e6ec68f787a0fecfd8ee84c" - integrity sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" @@ -943,7 +758,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/node@*", "@types/node@^22.2.0": +"@types/node@*", "@types/node@^18.0.0 || >=20.0.0", "@types/node@^22.2.0": version "22.2.0" resolved "https://registry.npmjs.org/@types/node/-/node-22.2.0.tgz" integrity sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ== @@ -1002,7 +817,7 @@ natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.15.0": +"@typescript-eslint/parser@^7.0.0", "@typescript-eslint/parser@^7.15.0": version "7.17.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz" integrity sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A== @@ -1089,7 +904,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.2, acorn@^8.9.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.8.2, acorn@^8.9.0: version "8.12.1" resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -1197,7 +1012,7 @@ autoprefixer@^10.4.19: picocolors "^1.0.1" postcss-value-parser "^4.2.0" -babel-jest@^29.7.0: +babel-jest@^29.0.0, babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== @@ -1289,7 +1104,7 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.23.1, browserslist@^4.23.3: +browserslist@^4.23.1, browserslist@^4.23.3, "browserslist@>= 4.21.0": version "4.23.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz" integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== @@ -1423,19 +1238,19 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + commander@^2.20.0: version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^4.0.0: @@ -1485,20 +1300,13 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.5" resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== dependencies: ms "2.1.2" -debug@^4.3.3: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== - dependencies: - ms "2.1.2" - dedent@^1.0.0: version "1.5.3" resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz" @@ -1659,7 +1467,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.57.0: +"eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.56.0, eslint@^8.57.0, eslint@>=7: version "8.57.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -1788,7 +1596,7 @@ fast-glob@^3.2.9, fast-glob@^3.3.0: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -1885,7 +1693,7 @@ framer-motion@^11.3.19: fs-extra@^10.0.0: version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" @@ -1927,7 +1735,7 @@ get-stream@^6.0.0: resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -1941,6 +1749,13 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob@^10.3.10: version "10.4.5" resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" @@ -2402,7 +2217,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@^29.7.0: +jest-resolve@*, jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -2546,7 +2361,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.7.0: +jest@^29.0.0, jest@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== @@ -2613,7 +2428,7 @@ json5@^2.2.3: jsonfile@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" @@ -3029,7 +2844,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.23, postcss@^8.4.40: +postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.40, postcss@>=8.0.9: version "8.4.41" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz" integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== @@ -3075,7 +2890,7 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -react-dom@^18.3.1: +"react-dom@^16.8.0 || ^17.0.0 || ^18.0.0", react-dom@^18.0.0, react-dom@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -3093,7 +2908,7 @@ react-refresh@^0.14.2: resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz" integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== -react@^18.3.1: +"react@^16.8.0 || ^17.0.0 || ^18.0.0", react@^18.0.0, react@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== @@ -3201,7 +3016,12 @@ scheduler@^0.23.2: dependencies: loose-envify "^1.1.0" -semver@^6.3.0, semver@^6.3.1: +semver@^6.3.0: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -3248,18 +3068,18 @@ source-map-js@^1.2.0: resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -3421,15 +3241,15 @@ tailwindcss@^3.4.7: terser-brunch@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/terser-brunch/-/terser-brunch-4.1.0.tgz#b35e740b726205ecdd79ee24b700601766e9c199" + resolved "https://registry.npmjs.org/terser-brunch/-/terser-brunch-4.1.0.tgz" integrity sha512-B4I/x1ewiM2OPjlc8bKmCJZhlIeSwNanplmdm10S8CHv/rMrGRAenqLUbyTb+HkPEz/JOZ8m9ygBPqcKNxFZVA== dependencies: anymatch "^3.1.2" terser "^5.7.1" -terser@^5.7.1: +terser@^5.4.0, terser@^5.7.1: version "5.31.6" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" + resolved "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz" integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== dependencies: "@jridgewell/source-map" "^0.3.3" @@ -3492,10 +3312,10 @@ ts-interface-checker@^0.1.9: resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-jest@^29.2.3: - version "29.2.3" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz" - integrity sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ== +ts-jest@^29.2.4: + version "29.2.4" + resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz" + integrity sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw== dependencies: bs-logger "0.x" ejs "^3.1.10" @@ -3534,7 +3354,7 @@ type-fest@^0.21.3: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript@^5.5.4: +typescript@^5.5.4, typescript@>=4.2.0, "typescript@>=4.3 <6": version "5.5.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== @@ -3546,7 +3366,7 @@ undici-types@~6.13.0: universalify@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== update-browserslist-db@^1.1.0: @@ -3580,14 +3400,14 @@ v8-to-istanbul@^9.0.1: vite-plugin-compression@^0.5.1: version "0.5.1" - resolved "https://registry.yarnpkg.com/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz#a75b0d8f48357ebb377b65016da9f20885ef39b6" + resolved "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz" integrity sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg== dependencies: chalk "^4.1.2" debug "^4.3.3" fs-extra "^10.0.0" -vite@^5.4.0: +"vite@^4.2.0 || ^5.0.0", vite@^5.4.0, vite@>=2.0.0: version "5.4.0" resolved "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz" integrity sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg== From cc73e95fcd06570744bd678f913c706deb0bafab Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:12:05 +0900 Subject: [PATCH 02/11] =?UTF-8?q?fix:=20test=EB=A5=BC=20=EC=9C=84=ED=95=9C?= =?UTF-8?q?=20=EC=9E=84=EC=8B=9C=20=EB=B3=80=EA=B2=BD=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/jobs/FindingGame/FindingGameWork.tsx | 2 +- Caecae/src/shared/Hyundux/Store.tsx | 110 ++++++++++-------- 2 files changed, 61 insertions(+), 51 deletions(-) diff --git a/Caecae/src/jobs/FindingGame/FindingGameWork.tsx b/Caecae/src/jobs/FindingGame/FindingGameWork.tsx index 2fdc60b3..cb9c083a 100644 --- a/Caecae/src/jobs/FindingGame/FindingGameWork.tsx +++ b/Caecae/src/jobs/FindingGame/FindingGameWork.tsx @@ -19,7 +19,7 @@ import { GetFindGameHintDTO } from "../../stories/FindGame/getFindGameHint"; const WORK_NAME = "FindingGame"; // state type -interface FindingGamePayLoad { +export interface FindingGamePayLoad { imageURL: ""; gameType: "PIXEL" | "BADGE"; gameStatus: "Gaming" | "DoneSuccess" | "DoneFail"; diff --git a/Caecae/src/shared/Hyundux/Store.tsx b/Caecae/src/shared/Hyundux/Store.tsx index 20c6cc5f..2875ec36 100644 --- a/Caecae/src/shared/Hyundux/Store.tsx +++ b/Caecae/src/shared/Hyundux/Store.tsx @@ -18,59 +18,69 @@ interface Store { subscribeList: Map(state: State) => void>; } -const store: Store = { - states: [], - reducers: [], - subscribeList: new Map(), - dispatch: async function (action) { - if (isAction(action)) { - const reducer = this.reducers.filter( - (reducer) => reducer.type == action.type - )[0].reducer; - const { removed, newArray } = removeFirst( - this.states, - (state) => state.type == action.type - ); - const newState = await reducer(removed, action); - // 여기서 모든것을 바로 state를 적용하는것이 아니라 이게 다른 state도 propagation하는지도 확인해야함 - this.states = [...newArray, newState]; - this.publish(removed, newState); - } else if (isDoAction(action)) { - const { removed, newArray } = removeFirst( +export function createStore(): Store { + return { + states: [], + reducers: [], + subscribeList: new Map(), + dispatch: async function (action) { + if (isAction(action)) { + const reducer = this.reducers.filter( + (reducer) => reducer.type == action.type + )[0].reducer; + + const { removed, newArray } = removeFirst( + this.states, + // eslint-disable-next-line + // @ts-ignore + // eslint-disable-next-line + (state) => (state as State).type == action.type + ); + const newState = await reducer(removed, action); + + // 여기서 모든것을 바로 state를 적용하는것이 아니라 이게 다른 state도 propagation하는지도 확인해야함 + this.states = [...newArray, newState]; + this.publish(removed, newState); + } + // else if (isDoAction(action)) { + // const { removed, newArray } = removeFirst( + // this.states, + // (state) => state.type == action.type + // ); + // const newState = action.doing(removed); + // this.states = [...newArray, newState]; + // this.publish(removed, newState); + // } + }, + publish: function (oldState, state) { + const publishedCallBack = this.subscribeList.get(state.type); + if (publishedCallBack !== undefined && !areEqual(oldState, state)) { + publishedCallBack(state); + } + }, + subscribe: function ( + state: State, + reducer: Reducer | null = null, + cb: (state: State) => void + ) { + this.states = replaceFirst( this.states, - (state) => state.type == action.type - ); - const newState = action.doing(removed); - this.states = [...newArray, newState]; - this.publish(removed, newState); - } - }, - publish: function (oldState, state) { - const publishedCallBack = this.subscribeList.get(state.type); - if (publishedCallBack !== undefined && !areEqual(oldState, state)) { - publishedCallBack(state); - } - }, - subscribe: function ( - state: State, - reducer: Reducer | null = null, - cb: (state: State) => void - ) { - this.states = replaceFirst( - this.states, - state, - (element) => element.type == state.type - ); - if (reducer != null) { - this.reducers = replaceFirst( - this.reducers, - reducer as Reducer, + state, (element) => element.type == state.type ); - } - this.subscribeList.set(state.type, cb as (state: State) => void); - }, -}; + if (reducer != null) { + this.reducers = replaceFirst( + this.reducers, + reducer as Reducer, + (element) => element.type == state.type + ); + } + this.subscribeList.set(state.type, cb as (state: State) => void); + }, + }; +} + +const store = createStore(); function isAction(action: unknown): action is Action { return (action as Action).actionName !== undefined; From 3facc2cd91cbfcf8218613fa464dab58e4f5fe9f Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:37:19 +0900 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20hyundux=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=A5=BC=20=EA=B4=80=EB=A6=AC=ED=95=A0=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20Test=20module=20=EC=83=9D=EC=84=B1=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/shared/Hyundux-test/Tester.tsx | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Caecae/src/shared/Hyundux-test/Tester.tsx diff --git a/Caecae/src/shared/Hyundux-test/Tester.tsx b/Caecae/src/shared/Hyundux-test/Tester.tsx new file mode 100644 index 00000000..f8fe3c3b --- /dev/null +++ b/Caecae/src/shared/Hyundux-test/Tester.tsx @@ -0,0 +1,62 @@ +import State, { createState } from "../Hyundux/State"; +import Reducer from "../Hyundux/Reducer"; +import { createStore, Store } from "../Hyundux/Store"; +import { Action } from "../Hyundux/Actions"; + +class HyunduxTest { + store: Store | null = null; + currentState: State | null = null; + currentAction: Action | null = null; + resultState: State | null = null; + + constructor(initState: State, reducer: Reducer) { + this.store = createStore(); + this.currentState = initState; + if (this.store !== null) { + this.store.subscribe(initState, reducer, (newState) => { + this.resultState = newState; + }); + } + } + + makeThenPayload(payLoad: object) { + return { ...this.currentState.payload, ...payLoad }; + } + + given(givenPayload: T) { + if (this.store !== null && this.currentState !== null) { + this.currentState = createState(this.currentState.type, givenPayload); + } + return this; + } + + when(action: Action) { + this.currentAction = action; + return this; + } + + async then(expectedPayload: T, isTrue: boolean = true) { + if ( + this.currentAction != null && + this.store !== null && + this.currentState !== null + ) { + this.store.states = [this.currentState]; + await this.store?.dispatch(this.currentAction); + + if (this.resultState !== null) { + if (isTrue) { + expect(this.resultState?.payload).toEqual(expectedPayload); + } else { + expect(this.resultState?.payload).not.toEqual(expectedPayload); + } + } + } + } +} + +const createHyunduxTester = (initState: State, reducer: Reducer) => { + return new HyunduxTest(initState, reducer); +}; + +export default createHyunduxTester; From 644ccc8421d05aae9afdb0f832dea9ba8e533530 Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:37:38 +0900 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20Doaction=20=EC=82=AD=EC=A0=9C=20(C?= =?UTF-8?q?C-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/shared/Hyundux/Actions.tsx | 7 +--- Caecae/src/shared/Hyundux/Store.tsx | 51 +++++++++------------------ Caecae/src/shared/Hyundux/index.tsx | 4 +-- 3 files changed, 19 insertions(+), 43 deletions(-) diff --git a/Caecae/src/shared/Hyundux/Actions.tsx b/Caecae/src/shared/Hyundux/Actions.tsx index 24c69057..ff6adca1 100644 --- a/Caecae/src/shared/Hyundux/Actions.tsx +++ b/Caecae/src/shared/Hyundux/Actions.tsx @@ -1,12 +1,7 @@ -import State from "./State"; interface Action { type: string; actionName: string; payload?: object; } -interface DoAction { - type: string; - doing: (state: State) => State; -} -export type { Action, DoAction }; +export type { Action }; diff --git a/Caecae/src/shared/Hyundux/Store.tsx b/Caecae/src/shared/Hyundux/Store.tsx index 2875ec36..6fbaad97 100644 --- a/Caecae/src/shared/Hyundux/Store.tsx +++ b/Caecae/src/shared/Hyundux/Store.tsx @@ -1,4 +1,4 @@ -import { Action, DoAction } from "./Actions"; +import { Action } from "./Actions"; import State from "./State"; import Reducer from "./Reducer"; import removeFirst from "./Util/RemoveFirst"; @@ -13,7 +13,7 @@ interface Store { reducer: Reducer | null, cb: (state: State) => void ) => void; - dispatch: (action: Action | DoAction) => void; + dispatch: (action: Action) => void; publish: (oldState: State, state: State) => void; subscribeList: Map(state: State) => void>; } @@ -24,33 +24,22 @@ export function createStore(): Store { reducers: [], subscribeList: new Map(), dispatch: async function (action) { - if (isAction(action)) { - const reducer = this.reducers.filter( - (reducer) => reducer.type == action.type - )[0].reducer; + const reducer = this.reducers.filter( + (reducer) => reducer.type == action.type + )[0].reducer; - const { removed, newArray } = removeFirst( - this.states, - // eslint-disable-next-line - // @ts-ignore - // eslint-disable-next-line - (state) => (state as State).type == action.type - ); - const newState = await reducer(removed, action); + const { removed, newArray } = removeFirst( + this.states, + // eslint-disable-next-line + // @ts-ignore + // eslint-disable-next-line + (state) => (state as State).type == action.type + ); + const newState = await reducer(removed, action); - // 여기서 모든것을 바로 state를 적용하는것이 아니라 이게 다른 state도 propagation하는지도 확인해야함 - this.states = [...newArray, newState]; - this.publish(removed, newState); - } - // else if (isDoAction(action)) { - // const { removed, newArray } = removeFirst( - // this.states, - // (state) => state.type == action.type - // ); - // const newState = action.doing(removed); - // this.states = [...newArray, newState]; - // this.publish(removed, newState); - // } + // 여기서 모든것을 바로 state를 적용하는것이 아니라 이게 다른 state도 propagation하는지도 확인해야함 + this.states = [...newArray, newState]; + this.publish(removed, newState); }, publish: function (oldState, state) { const publishedCallBack = this.subscribeList.get(state.type); @@ -82,13 +71,5 @@ export function createStore(): Store { const store = createStore(); -function isAction(action: unknown): action is Action { - return (action as Action).actionName !== undefined; -} - -function isDoAction(action: unknown): action is DoAction { - return (action as DoAction).doing !== undefined; -} - export type { Store }; export default store; diff --git a/Caecae/src/shared/Hyundux/index.tsx b/Caecae/src/shared/Hyundux/index.tsx index 7938e78d..2172c4f1 100644 --- a/Caecae/src/shared/Hyundux/index.tsx +++ b/Caecae/src/shared/Hyundux/index.tsx @@ -1,7 +1,7 @@ import Reducer from "./Reducer"; import State, { createState } from "./State"; import store from "./Store"; -import { Action, DoAction } from "./Actions"; +import { Action } from "./Actions"; import useDo from "./Hooks/useDo"; import useExistState from "./Hooks/useExistState"; import useWork from "./Hooks/useWork"; @@ -19,4 +19,4 @@ export { replaceFirst, makePayLoad, }; -export type { Reducer, State, Action, DoAction }; +export type { Reducer, State, Action }; From bf4cc54efb0ca5d71e3e0f001acc7566bed0e933 Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:37:58 +0900 Subject: [PATCH 05/11] =?UTF-8?q?chore:=20test=20=EA=B8=B0=EB=B3=B8=20cove?= =?UTF-8?q?rage=EB=B3=B4=EC=9D=B4=EA=B2=8C=20=EB=B3=80=EA=B2=BD=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Caecae/package.json b/Caecae/package.json index 96042a68..598160f4 100644 --- a/Caecae/package.json +++ b/Caecae/package.json @@ -8,7 +8,7 @@ "build": "tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "test": "jest --silent --noStackTrace" + "test": "jest --coverage" }, "dependencies": { "autoprefixer": "^10.4.19", From fb0d5a004ace6d408a4d6167dacb114a8ba1642b Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 11:38:12 +0900 Subject: [PATCH 06/11] =?UTF-8?q?test:=20=EC=9E=84=EC=8B=9C=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EC=9E=91=EC=84=B1=20?= =?UTF-8?q?(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/__tests__/FindGameTest/FindGameTest.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Caecae/__tests__/FindGameTest/FindGameTest.ts diff --git a/Caecae/__tests__/FindGameTest/FindGameTest.ts b/Caecae/__tests__/FindGameTest/FindGameTest.ts new file mode 100644 index 00000000..d295e38a --- /dev/null +++ b/Caecae/__tests__/FindGameTest/FindGameTest.ts @@ -0,0 +1,27 @@ +import { act } from "react"; +import { + initFindingGameState, + action, + findingGameReducer, +} from "../../src/jobs/FindingGame/FindingGameWork"; +import { Action } from "../../src/shared/Hyundux" +import createHynduxTester from "../../src/shared/Hyundux-test/Tester"; + +const tester = createHynduxTester(initFindingGameState, findingGameReducer); + +test("changShowingAnswer__action_index_1__result_1_true", () => { + const givenData = initFindingGameState.payload; + const whenData: Action = action.changeShowingAnswer(1); + const thenData = tester.makeThenPayload({ answerIndex: 1 }) + + tester.given(givenData).when(whenData).then(thenData, true); +}); + +test("changShowingAnswer__action_index_2__result_1_false", () => { + const givenData = initFindingGameState.payload; + const whenData: Action = action.changeShowingAnswer(2); + const thenData = tester.makeThenPayload({ answerIndex: 1 }) + + tester.given(givenData).when(whenData).then(thenData, false); +}); + From 7351e7832216006b9c9a1fd75f1778590e3e9643 Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 17:55:17 +0900 Subject: [PATCH 07/11] [Test] FindingGame Click Action test (CC-178) --- Caecae/__tests__/FindGameTest/FindGameTest.ts | 126 +++++++++++++++++- 1 file changed, 123 insertions(+), 3 deletions(-) diff --git a/Caecae/__tests__/FindGameTest/FindGameTest.ts b/Caecae/__tests__/FindGameTest/FindGameTest.ts index d295e38a..641edad9 100644 --- a/Caecae/__tests__/FindGameTest/FindGameTest.ts +++ b/Caecae/__tests__/FindGameTest/FindGameTest.ts @@ -1,4 +1,3 @@ -import { act } from "react"; import { initFindingGameState, action, @@ -9,7 +8,7 @@ import createHynduxTester from "../../src/shared/Hyundux-test/Tester"; const tester = createHynduxTester(initFindingGameState, findingGameReducer); -test("changShowingAnswer__action_index_1__result_1_true", () => { +test("결과보여지는 것들의 인덱스변경_입력값:1 -> 결과값 1 (옮은 테스트)", () => { const givenData = initFindingGameState.payload; const whenData: Action = action.changeShowingAnswer(1); const thenData = tester.makeThenPayload({ answerIndex: 1 }) @@ -17,7 +16,7 @@ test("changShowingAnswer__action_index_1__result_1_true", () => { tester.given(givenData).when(whenData).then(thenData, true); }); -test("changShowingAnswer__action_index_2__result_1_false", () => { +test("결과보여지는 것들의 인덱스변경_입력값:2 -> 결과값 1 (잘못된 테스트)", () => { const givenData = initFindingGameState.payload; const whenData: Action = action.changeShowingAnswer(2); const thenData = tester.makeThenPayload({ answerIndex: 1 }) @@ -25,3 +24,124 @@ test("changShowingAnswer__action_index_2__result_1_false", () => { tester.given(givenData).when(whenData).then(thenData, false); }); +test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 틀린답 {x: 0.7, y: 0.1}] -> 결과값 answers.length == 1, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { + const givenData = initFindingGameState.payload; + const whenData: Action = action.click({ request: { + answerList: [ + { positionX: 0.5, positionY: 0.5 } + ] + }, response: { + responseCode: 1000, + message: "success", + data: { + ticketIryd: "1212", + startTime: "asdsad", + correctAnswerList: [ + { + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + } + ] + } + }}) + + const thenData = tester.makeThenPayload({ showingAnswers: [{ + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + }] }) + + tester.given(givenData).when(whenData).then(thenData, true); +}); + +test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}] -> 결과값 answers.length == 2, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { + const givenData = initFindingGameState.payload; + const whenData: Action = action.click({ request: { + answerList: [ + { positionX: 0.5, positionY: 0.5 }, + ] + }, response: { + responseCode: 1000, + message: "success", + data: { + ticketIryd: "1212", + startTime: "asdsad", + correctAnswerList: [ + { + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + } + ] + } + }}) + + const thenData = tester.makeThenPayload({ showingAnswers: [{ + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + }]}) + + tester.given(givenData).when(whenData).then(thenData, true); +}); + +test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 맞은답 {x: 0.7, y: 0.1}] -> 결과값 answers.length == 2, answers = [answer{ x: 0.5. y: 0.5 }, {x: 0.7, y: 0.1}] (잘못된 테스트)", () => { + console.log("gameStatuse가 바뀌어야함") + console.log("tickerID도 바뀌어야함 바뀌어야함") + const givenData = initFindingGameState.payload; + const whenData: Action = action.click({ request: { + answerList: [ + { positionX: 0.5, positionY: 0.5 }, + { positionX: 0.7, positionY: 0.1 }, + ] + }, response: { + responseCode: 1000, + message: "success", + data: { + ticketIryd: "1212", + startTime: "asdsad", + correctAnswerList: [ + { + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + }, + { + positionX: 0.7, + positionY: 0.1, + descriptionImageUrl: "", + title: "", + content: "" + } + ] + } + }}) + + const thenData = tester.makeThenPayload({ showingAnswers: [{ + positionX: 0.5, + positionY: 0.5, + descriptionImageUrl: "", + title: "", + content: "" + }, + { + positionX: 0.7, + positionY: 0.1, + descriptionImageUrl: "", + title: "", + content: "" + }]}) + + tester.given(givenData).when(whenData).then(thenData, false); +}); From ee61ef7d0eff53ef258912186a2a6af3aefff388 Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 17:55:52 +0900 Subject: [PATCH 08/11] =?UTF-8?q?[fix]=20npm=20scripts=EC=9D=98=20test=20?= =?UTF-8?q?=EC=99=80=20test=20--coverage=EB=A1=9C=20=EB=B6=84=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Caecae/package.json b/Caecae/package.json index 598160f4..05dfa91a 100644 --- a/Caecae/package.json +++ b/Caecae/package.json @@ -8,7 +8,8 @@ "build": "tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "test": "jest --coverage" + "test --coverage": "jest --coverage", + "test": "jest" }, "dependencies": { "autoprefixer": "^10.4.19", From 403bf05f2245c1ce8ea126431ff4b67c91dbedd7 Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 17:57:03 +0900 Subject: [PATCH 09/11] =?UTF-8?q?feat:=20saga=20test=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/__tests__/FindGameTest/FindGameTest.ts | 18 +++---- .../src/shared/Hyundux-saga-test/SagaTest.ts | 53 +++++++++++++++++++ 2 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 Caecae/src/shared/Hyundux-saga-test/SagaTest.ts diff --git a/Caecae/__tests__/FindGameTest/FindGameTest.ts b/Caecae/__tests__/FindGameTest/FindGameTest.ts index 641edad9..161656f4 100644 --- a/Caecae/__tests__/FindGameTest/FindGameTest.ts +++ b/Caecae/__tests__/FindGameTest/FindGameTest.ts @@ -24,11 +24,11 @@ test("결과보여지는 것들의 인덱스변경_입력값:2 -> 결과값 1 ( tester.given(givenData).when(whenData).then(thenData, false); }); -test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 틀린답 {x: 0.7, y: 0.1}] -> 결과값 answers.length == 1, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { +test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}] -> 결과값 answers.length == 1, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { const givenData = initFindingGameState.payload; const whenData: Action = action.click({ request: { answerList: [ - { positionX: 0.5, positionY: 0.5 } + { positionX: 0.5, positionY: 0.5 }, ] }, response: { responseCode: 1000, @@ -54,16 +54,17 @@ test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 틀린답 {x: 0.7, y: 0.1}] - descriptionImageUrl: "", title: "", content: "" - }] }) + }]}) tester.given(givenData).when(whenData).then(thenData, true); }); -test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}] -> 결과값 answers.length == 2, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { +test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 틀린답 {x: 0.7, y: 0.1}] -> 결과값 answers.length == 1, answers = [answer{ x: 0.5. y: 0.5 }] (옳은 테스트)", () => { const givenData = initFindingGameState.payload; const whenData: Action = action.click({ request: { answerList: [ { positionX: 0.5, positionY: 0.5 }, + { positionX: 0.7, positionY: 0.1 } ] }, response: { responseCode: 1000, @@ -89,7 +90,7 @@ test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}] -> 결과값 answers.length = descriptionImageUrl: "", title: "", content: "" - }]}) + }] }) tester.given(givenData).when(whenData).then(thenData, true); }); @@ -134,13 +135,6 @@ test("클릭 이벤트:입력값 [{x: 0.5 y: 0.5}, 맞은답 {x: 0.7, y: 0.1}] - descriptionImageUrl: "", title: "", content: "" - }, - { - positionX: 0.7, - positionY: 0.1, - descriptionImageUrl: "", - title: "", - content: "" }]}) tester.given(givenData).when(whenData).then(thenData, false); diff --git a/Caecae/src/shared/Hyundux-saga-test/SagaTest.ts b/Caecae/src/shared/Hyundux-saga-test/SagaTest.ts new file mode 100644 index 00000000..8a8bfd38 --- /dev/null +++ b/Caecae/src/shared/Hyundux-saga-test/SagaTest.ts @@ -0,0 +1,53 @@ +import { Saga, SagaAction} from "../Hyundux-saga/Saga" +import { Story } from "../Hyundux-saga/Story"; +import { HyunduxTest } from "../Hyundux-test/Tester"; +import State, { createState } from "../Hyundux/State"; + +type MockStory = (request: object) => Promise; + + +export class SagaTest { + saga: Saga; + currentState: State + currentAction: SagaAction + currentStory: Story + currentParameter: object + constructor(tester: HyunduxTest) { + this.saga = new Saga(tester.store) + this.currentState = this.saga.store.states[0] as State + } + + given(givenPayload: T) { + if (this.saga !== null) { + this.currentState = createState(this.currentState.type, givenPayload); + } + return this; + } + + when(action: SagaAction, story: Story, parameter: object) { + this.currentAction = action + this.currentStory = story + this.currentParameter = parameter + + return this + } + + async then(expectedPayload: T, isTrue: boolean = true){ + await this.saga.run(this.currentAction, this.currentStory, this.currentParameter) + const result = this.saga.store.states[0] + if(isTrue){ + expect(result.payload).toEqual(expectedPayload); + } + else { + expect(result.payload).not.toEqual(expectedPayload); + } + } + + sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } +} + +export const createSagaTester = (tester :HyunduxTest) => { + return new SagaTest(tester) +} From 79115c8bbd23671b00d5e32406b921475ac3f25e Mon Sep 17 00:00:00 2001 From: pccommen Date: Fri, 23 Aug 2024 18:03:58 +0900 Subject: [PATCH 10/11] a --- Caecae/src/pages/Admin/AdminPage.tsx | 2 +- Caecae/src/shared/Hyundux-saga/Saga.tsx | 7 ++++--- Caecae/src/shared/Hyundux-saga/useSaga.tsx | 2 +- Caecae/src/shared/Hyundux-test/Tester.tsx | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Caecae/src/pages/Admin/AdminPage.tsx b/Caecae/src/pages/Admin/AdminPage.tsx index 50a05fab..f1330d49 100644 --- a/Caecae/src/pages/Admin/AdminPage.tsx +++ b/Caecae/src/pages/Admin/AdminPage.tsx @@ -418,7 +418,7 @@ async function imageToURL(data: Blob, isQuestion = false) { }; const response = await await fetch( - "http://43.201.185.99:8080/api/admin/s3", + "http://43.201.185.99:80/api/admin/s3", requestOptions ); const result = (await response.json()) as { diff --git a/Caecae/src/shared/Hyundux-saga/Saga.tsx b/Caecae/src/shared/Hyundux-saga/Saga.tsx index 6ed3fdb5..be0b354b 100644 --- a/Caecae/src/shared/Hyundux-saga/Saga.tsx +++ b/Caecae/src/shared/Hyundux-saga/Saga.tsx @@ -2,9 +2,9 @@ import { Action } from "../Hyundux/Actions"; import store, { Store } from "../Hyundux/Store"; import { createStory, Story } from "./Story"; -export type SagaAction = (payLoad: SagaActionPayload) => Action; +type SagaAction = (payLoad: SagaActionPayload) => Action; -export type SagaActionPayload = { response?: object; request?: object }; +type SagaActionPayload = { response?: object; request?: object }; class Saga { store: Store | null = null; @@ -28,4 +28,5 @@ class Saga { const saga = new Saga(store); -export default saga; +export type { SagaAction, SagaActionPayload }; +export { saga, Saga }; diff --git a/Caecae/src/shared/Hyundux-saga/useSaga.tsx b/Caecae/src/shared/Hyundux-saga/useSaga.tsx index 3ca3651c..74973d98 100644 --- a/Caecae/src/shared/Hyundux-saga/useSaga.tsx +++ b/Caecae/src/shared/Hyundux-saga/useSaga.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { Story } from "./Story"; -import saga, { SagaAction } from "./Saga"; +import { saga, SagaAction } from "./Saga"; type SagaStatus = "isLoading" | "isSuccess" | "isError"; diff --git a/Caecae/src/shared/Hyundux-test/Tester.tsx b/Caecae/src/shared/Hyundux-test/Tester.tsx index f8fe3c3b..61dc101a 100644 --- a/Caecae/src/shared/Hyundux-test/Tester.tsx +++ b/Caecae/src/shared/Hyundux-test/Tester.tsx @@ -3,7 +3,7 @@ import Reducer from "../Hyundux/Reducer"; import { createStore, Store } from "../Hyundux/Store"; import { Action } from "../Hyundux/Actions"; -class HyunduxTest { +export class HyunduxTest { store: Store | null = null; currentState: State | null = null; currentAction: Action | null = null; @@ -24,6 +24,7 @@ class HyunduxTest { } given(givenPayload: T) { + this.store.states = [createState(this.currentState.type, givenPayload)]; if (this.store !== null && this.currentState !== null) { this.currentState = createState(this.currentState.type, givenPayload); } From f6b562811843cdb63993af203a660aff642ca565 Mon Sep 17 00:00:00 2001 From: pccommen Date: Mon, 26 Aug 2024 02:22:04 +0900 Subject: [PATCH 11/11] =?UTF-8?q?fix:=20build=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0=20(CC-178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FindingGame/FindingGame.tsx | 22 ++++++------- .../src/components/RacingGame/RacingGame.tsx | 14 ++++----- Caecae/src/index.tsx | 14 ++++----- .../pages/FindingGame/Enter/EnterContent.tsx | 4 +-- Caecae/src/shared/Hyundux-saga/index.tsx | 2 +- .../Hyundux/Example_Counter/ConuntUI.tsx | 6 ++-- .../Hyundux/Example_Counter/CountDo.tsx | 31 ------------------- 7 files changed, 31 insertions(+), 62 deletions(-) delete mode 100644 Caecae/src/shared/Hyundux/Example_Counter/CountDo.tsx diff --git a/Caecae/src/components/FindingGame/FindingGame.tsx b/Caecae/src/components/FindingGame/FindingGame.tsx index d8825b7a..14ad9ef7 100644 --- a/Caecae/src/components/FindingGame/FindingGame.tsx +++ b/Caecae/src/components/FindingGame/FindingGame.tsx @@ -1,25 +1,25 @@ -import PictureGameBoard from "../common/PictureGameBoard/index.tsx"; +import PictureGameBoard from "../common/PictureGameBoard/index"; import { action, genrateFindGameAnswerCheckBodyParameter, initFindingGameState, -} from "../../jobs/FindingGame/FindingGameWork.tsx"; +} from "../../jobs/FindingGame/FindingGameWork"; import { useEffect, useRef } from "react"; -import LottieContainer from "../common/LottieContainer/index.tsx"; +import LottieContainer from "../common/LottieContainer/index"; import correctLottie from "@assets/animationCorrect.json"; import wrongLottie from "@assets/animationIncorrect.json"; import { store, useExistState } from "../../shared/Hyundux"; -import HintSpot from "./Hint/HintSpot.tsx"; -import SmileBadge from "../common/SmileBadge/index.tsx"; -import { createStory } from "../../shared/Hyundux-saga/Story.tsx"; -import useSaga from "../../shared/Hyundux-saga/useSaga.tsx"; -import { getFindGameStory } from "../../stories/FindGame/getFindingGame.tsx"; -import { getFindGameAnswerStory } from "../../stories/FindGame/getFindGameIsAnswer.tsx"; -import { getFindGameHintStory } from "../../stories/FindGame/getFindGameHint.tsx"; +import HintSpot from "./Hint/HintSpot"; +import SmileBadge from "../common/SmileBadge/index"; +import { createStory } from "../../shared/Hyundux-saga/Story"; +import useSaga from "../../shared/Hyundux-saga/useSaga"; +import { getFindGameStory } from "../../stories/FindGame/getFindingGame"; +import { getFindGameAnswerStory } from "../../stories/FindGame/getFindGameIsAnswer"; +import { getFindGameHintStory } from "../../stories/FindGame/getFindGameHint"; const FindingGame = () => { const state = useExistState(initFindingGameState); - const timerId = useRef(null); + const timerId = useRef(null); const [status, teller] = useSaga(); const pictureWidth = useRef(0); const pictureHeight = useRef(0); diff --git a/Caecae/src/components/RacingGame/RacingGame.tsx b/Caecae/src/components/RacingGame/RacingGame.tsx index 3ec8d589..867cc990 100644 --- a/Caecae/src/components/RacingGame/RacingGame.tsx +++ b/Caecae/src/components/RacingGame/RacingGame.tsx @@ -7,12 +7,12 @@ import rearBackground from "@assets/rearBackground.svg"; import { action, initRacingGameState, -} from "../../jobs/RacingGame/RacingGameWork.tsx"; -import { store, useExistState } from "../../shared/Hyundux/index.tsx"; -import Link from "../../shared/Hyunouter/Link.tsx"; -import getRacingGameTopRate from "../../stories/getRacingGameTopRate.tsx"; -import { useDebounce } from "../../hooks/index.tsx"; -import useAudio from "../../hooks/useAudio.tsx"; +} from "../../jobs/RacingGame/RacingGameWork"; +import { store, useExistState } from "../../shared/Hyundux/index"; +import Link from "../../shared/Hyunouter/Link"; +import getRacingGameTopRate from "../../stories/getRacingGameTopRate"; +import { useDebounce } from "../../hooks/index"; +import useAudio from "../../hooks/useAudio"; const RacingGame: React.FC = () => { const lottieRef = useRef(null); @@ -39,7 +39,7 @@ const RacingGame: React.FC = () => { const frontAnimationControls = useAnimation(); const rearAnimationControls = useAnimation(); - const endGameTimeoutRef = useRef(null); + const endGameTimeoutRef = useRef(null); /** 이동한 km를 구하는 함수 */ const calculateDistance = (x: number) => { diff --git a/Caecae/src/index.tsx b/Caecae/src/index.tsx index 3ed5ef86..af7a3072 100644 --- a/Caecae/src/index.tsx +++ b/Caecae/src/index.tsx @@ -1,12 +1,12 @@ import ReactDOM from "react-dom/client"; import "./index.css"; -import { Router, Routes, Route } from "./shared/Hyunouter/index.tsx"; -import EventInfoLandingPage from "./pages/EventInfoLanding/EventInfoLandingPage.tsx"; -import FindingGameLandingPage from "./pages/FindingGameLanding/FindingGameLandingPage.tsx"; -import RacingGameLandingPage from "./pages/RacingGameLanding/RacingGameLandingPage.tsx"; -import FindingGamePage from "./pages/FindingGame/FindingGamePage.tsx"; -import RacingGamePage from "./pages/RacingGame/RacingGamePage.tsx"; -import AdminPage from "./pages/Admin/AdminPage.tsx"; +import { Router, Routes, Route } from "./shared/Hyunouter/index"; +import EventInfoLandingPage from "./pages/EventInfoLanding/EventInfoLandingPage"; +import FindingGameLandingPage from "./pages/FindingGameLanding/FindingGameLandingPage"; +import RacingGameLandingPage from "./pages/RacingGameLanding/RacingGameLandingPage"; +import FindingGamePage from "./pages/FindingGame/FindingGamePage"; +import RacingGamePage from "./pages/RacingGame/RacingGamePage"; +import AdminPage from "./pages/Admin/AdminPage"; // 임시 React component const App = () => { diff --git a/Caecae/src/pages/FindingGame/Enter/EnterContent.tsx b/Caecae/src/pages/FindingGame/Enter/EnterContent.tsx index e1eefe27..caf09b0e 100644 --- a/Caecae/src/pages/FindingGame/Enter/EnterContent.tsx +++ b/Caecae/src/pages/FindingGame/Enter/EnterContent.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; -import SmileBadge from "../../../components/common/SmileBadge/SmileBadge.tsx"; +import SmileBadge from "../../../components/common/SmileBadge/SmileBadge"; import { store } from "../../../shared/Hyundux"; -import { action } from "../../../jobs/Overlay/OverlayWork.tsx"; +import { action } from "../../../jobs/Overlay/OverlayWork"; const EnterContent = () => { const [timeLeft, setTimeLeft] = useState(3 * 60); // 3분을 초 단위로 변환 diff --git a/Caecae/src/shared/Hyundux-saga/index.tsx b/Caecae/src/shared/Hyundux-saga/index.tsx index bd303342..882a8858 100644 --- a/Caecae/src/shared/Hyundux-saga/index.tsx +++ b/Caecae/src/shared/Hyundux-saga/index.tsx @@ -1,4 +1,4 @@ -import saga from "./Saga"; +import { saga } from "./Saga"; import { Story, RunStory, createStory } from "./Story"; import useSaga from "./useSaga"; diff --git a/Caecae/src/shared/Hyundux/Example_Counter/ConuntUI.tsx b/Caecae/src/shared/Hyundux/Example_Counter/ConuntUI.tsx index 09ef2e1c..0be70201 100644 --- a/Caecae/src/shared/Hyundux/Example_Counter/ConuntUI.tsx +++ b/Caecae/src/shared/Hyundux/Example_Counter/ConuntUI.tsx @@ -1,6 +1,6 @@ -import useWork from "../Hooks/useWork.tsx"; -import { action, initCountState, countReducer } from "./CountWork.tsx"; -import store from "../Store.tsx"; +import useWork from "../Hooks/useWork"; +import { action, initCountState, countReducer } from "./CountWork"; +import store from "../Store"; const Counter = () => { const [state, dispatch] = useWork(initCountState, countReducer); diff --git a/Caecae/src/shared/Hyundux/Example_Counter/CountDo.tsx b/Caecae/src/shared/Hyundux/Example_Counter/CountDo.tsx deleted file mode 100644 index d2debbaa..00000000 --- a/Caecae/src/shared/Hyundux/Example_Counter/CountDo.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { createState } from "../State"; -import { DoAction } from "../Actions"; -import State from "../State"; -import { makePayLoad } from "../Util/StoreUtil"; - -const Do_NAME = "Count"; - -// state type -interface CountPayLoad { - count: number; - text: string; -} - -const initCountState = createState(Do_NAME, { - count: 0, - text: "helloWorld", -}); - -// actions -const doAction = { - countUp: (): DoAction => { - return { - type: Do_NAME, - doing: (state: State): State => { - return makePayLoad(state, { count: state.payload.count + 1 }); - }, - }; - }, -}; - -export { doAction, initCountState };