From 6560220d35b024733324cf42cefe056e7e3816cd Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:09:07 +0900 Subject: [PATCH 01/31] =?UTF-8?q?axios,qs,vuetify=E9=96=A2=E9=80=A3,sass?= =?UTF-8?q?=E3=81=AE=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA=E3=82=92?= =?UTF-8?q?=E5=85=A5=E3=82=8C=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - axiosは通信処理 - qsはオブジェクトをクエリパラメータに変換したりするため。types/qsはTypeScriptで扱いやすくするため - vuetifyはデザインのためでviteで使いたいのでそれのライブラリも入れた - sassはSCSSで書きたいので --- web/frontend/package-lock.json | 624 +++++++++++++++++++++++++++++++-- web/frontend/package.json | 8 +- 2 files changed, 596 insertions(+), 36 deletions(-) diff --git a/web/frontend/package-lock.json b/web/frontend/package-lock.json index a8a80f90..f6e8b9b0 100644 --- a/web/frontend/package-lock.json +++ b/web/frontend/package-lock.json @@ -8,11 +8,17 @@ "name": "frontend", "version": "0.0.0", "dependencies": { - "vue": "^3.3.4" + "@types/qs": "^6.9.8", + "axios": "^1.5.1", + "qs": "^6.11.2", + "vite-plugin-vuetify": "^1.0.2", + "vue": "^3.3.4", + "vuetify": "^3.3.20" }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", "@vue/test-utils": "^2.4.1", + "sass": "^1.69.0", "typescript": "^5.0.2", "vite": "^4.4.5", "vitest": "^0.34.6", @@ -37,7 +43,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -53,7 +58,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -69,7 +73,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -85,7 +88,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -101,7 +103,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -117,7 +118,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -133,7 +133,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -149,7 +148,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -165,7 +163,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -181,7 +178,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -197,7 +193,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -213,7 +208,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -229,7 +223,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -245,7 +238,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -261,7 +253,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -277,7 +268,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -293,7 +283,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -309,7 +298,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -325,7 +313,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -341,7 +328,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -357,7 +343,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -373,7 +358,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -430,7 +414,12 @@ "version": "20.8.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", "integrity": "sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==", - "dev": true + "devOptional": true + }, + "node_modules/@types/qs": { + "version": "6.9.8", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", + "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==" }, "node_modules/@vitejs/plugin-vue": { "version": "4.3.4", @@ -695,6 +684,19 @@ "@vue/language-core": "1.8.13" } }, + "node_modules/@vuetify/loader-shared": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuetify/loader-shared/-/loader-shared-1.7.1.tgz", + "integrity": "sha512-kLUvuAed6RCvkeeTNJzuy14pqnkur8lTuner7v7pNE/kVhPR97TuyXwBSBMR1cJeiLiOfu6SF5XlCYbXByEx1g==", + "dependencies": { + "find-cache-dir": "^3.3.2", + "upath": "^2.0.1" + }, + "peerDependencies": { + "vue": "^3.0.0", + "vuetify": "^3.0.0-beta.4" + } + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -734,6 +736,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "devOptional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -743,12 +758,36 @@ "node": "*" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "devOptional": true, + "engines": { + "node": ">=8" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -758,6 +797,18 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "devOptional": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -767,6 +818,18 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/chai": { "version": "4.3.10", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", @@ -797,6 +860,44 @@ "node": "*" } }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -806,6 +907,11 @@ "node": ">=14" } }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -831,7 +937,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -856,6 +961,14 @@ "node": ">=6" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -902,7 +1015,6 @@ "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -940,6 +1052,78 @@ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "devOptional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -950,7 +1134,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -960,6 +1143,11 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -969,6 +1157,20 @@ "node": "*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -988,6 +1190,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "devOptional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/glob/node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -1000,6 +1214,36 @@ "node": ">=10" } }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1009,6 +1253,12 @@ "he": "bin/he" } }, + "node_modules/immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "devOptional": true + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1031,6 +1281,48 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "devOptional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "devOptional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "devOptional": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/js-beautify": { "version": "1.14.9", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.9.tgz", @@ -1069,6 +1361,17 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -1101,6 +1404,47 @@ "node": ">=12" } }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", @@ -1131,8 +1475,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/muggle-string": { "version": "0.3.1", @@ -1172,6 +1515,23 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1196,6 +1556,47 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", @@ -1216,6 +1617,29 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "devOptional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -1228,9 +1652,9 @@ } }, "node_modules/postcss": { - "version": "8.4.30", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.30.tgz", - "integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -1274,17 +1698,47 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "devOptional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/rollup": { "version": "3.29.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.2.tgz", "integrity": "sha512-CJouHoZ27v6siztc21eEQGo0kIcE5D1gVPA571ez0mMYb25LGYGKnVNXpEj5MGlepmDWGXNjDB5q7uNiPHC11A==", - "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -1296,6 +1750,23 @@ "fsevents": "~2.3.2" } }, + "node_modules/sass": { + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.0.tgz", + "integrity": "sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ==", + "devOptional": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -1311,6 +1782,19 @@ "node": ">=10" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -1373,6 +1857,18 @@ "node": ">=14.0.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "devOptional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -1386,7 +1882,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1401,11 +1897,19 @@ "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==", "dev": true }, + "node_modules/upath": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", + "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, "node_modules/vite": { "version": "4.4.9", "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", - "dev": true, "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", @@ -1479,6 +1983,23 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-vuetify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/vite-plugin-vuetify/-/vite-plugin-vuetify-1.0.2.tgz", + "integrity": "sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw==", + "dependencies": { + "@vuetify/loader-shared": "^1.7.1", + "debug": "^4.3.3", + "upath": "^2.0.1" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "vite": "^2.7.0 || ^3.0.0 || ^4.0.0", + "vuetify": "^3.0.0-beta.4" + } + }, "node_modules/vitest": { "version": "0.34.6", "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", @@ -1601,6 +2122,39 @@ "typescript": "*" } }, + "node_modules/vuetify": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.3.20.tgz", + "integrity": "sha512-7z3rv1j94WXO1y9CYQXygtCuct0bJNPao0T5no95c++atvPf5+WfgvnYK+XrMyjq4Y0xe6z5mhJfv9taeVelpQ==", + "engines": { + "node": "^12.20 || >=14.13" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/johnleider" + }, + "peerDependencies": { + "typescript": ">=4.7", + "vite-plugin-vuetify": "^1.0.0-alpha.12", + "vue": "^3.2.0", + "vue-i18n": "^9.0.0", + "webpack-plugin-vuetify": "^2.0.0-alpha.11" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vite-plugin-vuetify": { + "optional": true + }, + "vue-i18n": { + "optional": true + }, + "webpack-plugin-vuetify": { + "optional": true + } + } + }, "node_modules/why-is-node-running": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", diff --git a/web/frontend/package.json b/web/frontend/package.json index b93e2776..5686dce1 100644 --- a/web/frontend/package.json +++ b/web/frontend/package.json @@ -10,11 +10,17 @@ "test": "vitest" }, "dependencies": { - "vue": "^3.3.4" + "@types/qs": "^6.9.8", + "axios": "^1.5.1", + "qs": "^6.11.2", + "vite-plugin-vuetify": "^1.0.2", + "vue": "^3.3.4", + "vuetify": "^3.3.20" }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", "@vue/test-utils": "^2.4.1", + "sass": "^1.69.0", "typescript": "^5.0.2", "vite": "^4.4.5", "vitest": "^0.34.6", From 724c8563219be355c61ba8d1412ab049c31fac4f Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:10:46 +0900 Subject: [PATCH 02/31] =?UTF-8?q?vuetify=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E6=9B=B8=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://vuetifyjs.com/en/getting-started/installation/#existing-projects - https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin --- web/frontend/plugins/vuetify.ts | 11 +++++++++++ web/frontend/vite.config.ts | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 web/frontend/plugins/vuetify.ts diff --git a/web/frontend/plugins/vuetify.ts b/web/frontend/plugins/vuetify.ts new file mode 100644 index 00000000..132f0619 --- /dev/null +++ b/web/frontend/plugins/vuetify.ts @@ -0,0 +1,11 @@ +import "vuetify/styles"; +import { createVuetify } from "vuetify"; +import * as components from "vuetify/components"; +import * as directives from "vuetify/directives"; + +const vuetify = createVuetify({ + components, + directives, +}); + +export default vuetify; diff --git a/web/frontend/vite.config.ts b/web/frontend/vite.config.ts index 3e715dbe..8264d129 100644 --- a/web/frontend/vite.config.ts +++ b/web/frontend/vite.config.ts @@ -1,10 +1,14 @@ import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; +import vuetify from "vite-plugin-vuetify"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [ + vue(), + vuetify({ autoImport: true }), + ], server: { host: true, }, From dd9bcdf06ba4817700fc5fb580240299fee126d6 Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:12:30 +0900 Subject: [PATCH 03/31] =?UTF-8?q?=E9=96=8B=E7=99=BA=E4=B8=AD=E3=81=AF?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E3=81=AEAPI=E3=81=AB?= =?UTF-8?q?=E3=81=A4=E3=81=AA=E3=81=8E=E3=81=BE=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .gitignoreに本番環境のenvは入れないように除外しとく --- web/frontend/.env.development | 2 ++ web/frontend/.gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 web/frontend/.env.development diff --git a/web/frontend/.env.development b/web/frontend/.env.development new file mode 100644 index 00000000..291f36b0 --- /dev/null +++ b/web/frontend/.env.development @@ -0,0 +1,2 @@ +VUE_APP_API_BASE_URL='http://localhost:3000/v1' + diff --git a/web/frontend/.gitignore b/web/frontend/.gitignore index a547bf36..d26fbf55 100644 --- a/web/frontend/.gitignore +++ b/web/frontend/.gitignore @@ -12,6 +12,7 @@ dist dist-ssr *.local +.env.production # Editor directories and files .vscode/* !.vscode/extensions.json From fb0cfdfc2e68fc4fd0b7643d791d150657b490ec Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:12:55 +0900 Subject: [PATCH 04/31] =?UTF-8?q?AxiosInstance=20=E3=81=AE=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=82=92=E6=9B=B8=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 基本的なことだけ --- .../src/features/starrykids/client/AxiosClient.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 web/frontend/src/features/starrykids/client/AxiosClient.ts diff --git a/web/frontend/src/features/starrykids/client/AxiosClient.ts b/web/frontend/src/features/starrykids/client/AxiosClient.ts new file mode 100644 index 00000000..6c8d369b --- /dev/null +++ b/web/frontend/src/features/starrykids/client/AxiosClient.ts @@ -0,0 +1,10 @@ +import axios, { AxiosInstance } from "axios"; + +const axiosClient: AxiosInstance = axios.create({ + baseURL: process.env.VUE_APP_API_BASE_URL, + headers: { + "Content-type": "application/json", + }, +}); + +export default axiosClient; From e3f249624067c76ded947bba859ca2a743ab2e3a Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:13:39 +0900 Subject: [PATCH 05/31] =?UTF-8?q?Model=E3=82=92=E6=9B=B8=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit リクエストするときとレスポンスを扱うときは型で扱ったほうが使いやすいので --- .../src/features/starrykids/model/TextToMoons.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 web/frontend/src/features/starrykids/model/TextToMoons.ts diff --git a/web/frontend/src/features/starrykids/model/TextToMoons.ts b/web/frontend/src/features/starrykids/model/TextToMoons.ts new file mode 100644 index 00000000..48bfc554 --- /dev/null +++ b/web/frontend/src/features/starrykids/model/TextToMoons.ts @@ -0,0 +1,10 @@ +export type TextToMoonsRequest = { + text: string; + size?: number; +}; + +export type TextToMoonsResponse = { + text: string; + size: number; + response: string[]; +}; From 53bfb61d8cf52adbea2ea59700eb4bddc54bcc26 Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:14:12 +0900 Subject: [PATCH 06/31] =?UTF-8?q?=E5=AE=9F=E9=9A=9B=E3=81=AB=E9=80=9A?= =?UTF-8?q?=E4=BF=A1=E3=81=99=E3=82=8BRepository=E3=82=92=E6=9B=B8?= =?UTF-8?q?=E3=81=84=E3=81=A6=E3=81=BF=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit が、エラー処理などは適当なので後で修正が必要 --- .../repository/TextToMoonsRepository.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 web/frontend/src/features/starrykids/repository/TextToMoonsRepository.ts diff --git a/web/frontend/src/features/starrykids/repository/TextToMoonsRepository.ts b/web/frontend/src/features/starrykids/repository/TextToMoonsRepository.ts new file mode 100644 index 00000000..4e28a9ca --- /dev/null +++ b/web/frontend/src/features/starrykids/repository/TextToMoonsRepository.ts @@ -0,0 +1,28 @@ +import { TextToMoonsRequest, TextToMoonsResponse } from "../model/TextToMoons"; +import { AxiosInstance, isAxiosError } from "axios"; +import qs from "qs"; + +export interface TextToMoonsRepository { + getMoons(request: TextToMoonsRequest): Promise; +} + +export class TextToMoonsRepositoryImpl + implements TextToMoonsRepository +{ + constructor(private axiosClient: AxiosInstance) {} + private urlPath = "/text_to_moons"; + + async getMoons(request: TextToMoonsRequest): Promise { + const params = qs.stringify(request); + try { + const response = await this.axiosClient.get(`${this.urlPath}?${params}`); + return response.data; + } catch (error) { + // TODO: 後でエラーハンドリングをちゃんとする + if (isAxiosError(error)) { + throw new Error(error.response?.data); + } + throw new Error("Unknown error"); + } + } +} From 2770b0668cc1013460ec1541f58a340b3e07413c Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Sun, 8 Oct 2023 02:14:30 +0900 Subject: [PATCH 07/31] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92?= =?UTF-8?q?=E5=BC=95=E3=81=A3=E5=BC=B5=E3=81=A3=E3=81=A6=E3=81=8F=E3=82=8B?= =?UTF-8?q?Usecase=E3=82=92=E4=BD=9C=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../starrykids/usecase/TextToMoonsUsecase.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 web/frontend/src/features/starrykids/usecase/TextToMoonsUsecase.ts diff --git a/web/frontend/src/features/starrykids/usecase/TextToMoonsUsecase.ts b/web/frontend/src/features/starrykids/usecase/TextToMoonsUsecase.ts new file mode 100644 index 00000000..6fa986c4 --- /dev/null +++ b/web/frontend/src/features/starrykids/usecase/TextToMoonsUsecase.ts @@ -0,0 +1,14 @@ +import { TextToMoonsRepository } from "../repository/TextToMoonsRepository"; +import { TextToMoonsRequest, TextToMoonsResponse } from "../model/TextToMoons"; + +interface TextToMoonsUsecase { + getMoons(request: TextToMoonsRequest): Promise; +} + +export default class TextToMoonsUsecaseImpl implements TextToMoonsUsecase { + constructor(private repository: TextToMoonsRepository) {} + + async getMoons(request: TextToMoonsRequest): Promise { + return await this.repository.getMoons(request); + } +} From 0199686c5b7cfbd00aca9a1d33eb93b4dc6c102c Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Mon, 9 Oct 2023 03:10:47 +0900 Subject: [PATCH 08/31] =?UTF-8?q?env=E3=82=92=E8=AA=AD=E3=81=BF=E5=8F=96?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E5=A4=89=E6=95=B0=E3=81=AE=E9=A0=AD=E3=81=ABVITE=5F=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E3=81=88=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VITEを使うときはさらにimport.meta.env.VITE_XXXXXXで読み取る。 --- web/frontend/.env.development | 3 +-- web/frontend/src/features/starrykids/client/AxiosClient.ts | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/web/frontend/.env.development b/web/frontend/.env.development index 291f36b0..7fb56b05 100644 --- a/web/frontend/.env.development +++ b/web/frontend/.env.development @@ -1,2 +1 @@ -VUE_APP_API_BASE_URL='http://localhost:3000/v1' - +VITE_API_BASE_URL='http://localhost:3000/v1' diff --git a/web/frontend/src/features/starrykids/client/AxiosClient.ts b/web/frontend/src/features/starrykids/client/AxiosClient.ts index 6c8d369b..5c98ab5f 100644 --- a/web/frontend/src/features/starrykids/client/AxiosClient.ts +++ b/web/frontend/src/features/starrykids/client/AxiosClient.ts @@ -1,9 +1,14 @@ import axios, { AxiosInstance } from "axios"; +console.log("----"); +console.log(import.meta.env.VITE_API_BASE_URL); +console.log(import.meta.env.MODE); + const axiosClient: AxiosInstance = axios.create({ - baseURL: process.env.VUE_APP_API_BASE_URL, + baseURL: import.meta.env.VITE_API_BASE_URL, headers: { "Content-type": "application/json", + "Access-Control-Allow-Origin": "*", }, }); From 04324bc0f06381326d043f10c31b6d88b9d85640 Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Mon, 9 Oct 2023 03:17:43 +0900 Subject: [PATCH 09/31] =?UTF-8?q?CORS=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit じゃないとフロントからアクセスできない --- web/backend/Gemfile | 2 +- web/backend/Gemfile.lock | 3 +++ web/backend/config/initializers/cors.rb | 19 ++++++++++--------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/web/backend/Gemfile b/web/backend/Gemfile index b2d56ab2..f2552c76 100644 --- a/web/backend/Gemfile +++ b/web/backend/Gemfile @@ -41,7 +41,7 @@ gem 'bootsnap', require: false # gem "image_processing", "~> 1.2" # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible -# gem "rack-cors" +gem "rack-cors" group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem diff --git a/web/backend/Gemfile.lock b/web/backend/Gemfile.lock index ff99f0a4..d2baab49 100644 --- a/web/backend/Gemfile.lock +++ b/web/backend/Gemfile.lock @@ -151,6 +151,8 @@ GEM nio4r (~> 2.0) racc (1.7.1) rack (3.0.8) + rack-cors (2.0.1) + rack (>= 2.0.0) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -272,6 +274,7 @@ DEPENDENCIES mysql2 (~> 0.5) numo-narray puma (~> 6.4) + rack-cors rails (~> 7.1.0) rspec-rails rubocop diff --git a/web/backend/config/initializers/cors.rb b/web/backend/config/initializers/cors.rb index e5a82f16..e5978035 100644 --- a/web/backend/config/initializers/cors.rb +++ b/web/backend/config/initializers/cors.rb @@ -5,12 +5,13 @@ # Read more: https://github.com/cyu/rack-cors -# Rails.application.config.middleware.insert_before 0, Rack::Cors do -# allow do -# origins "example.com" -# -# resource "*", -# headers: :any, -# methods: [:get, :post, :put, :patch, :delete, :options, :head] -# end -# end +Rails.application.config.middleware.insert_before 0, Rack::Cors do + allow do + # TODO: 後で本番と開発で分岐する + origins "http://localhost:5173" + + resource "v1", + headers: :any, + methods: [:get, :post, :put, :patch, :delete, :options, :head] + end +end From dbea4e8c6d98371ddef383c783a55c037261ccc3 Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Mon, 9 Oct 2023 03:33:41 +0900 Subject: [PATCH 10/31] =?UTF-8?q?CORS=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/backend/Gemfile | 3 +-- web/backend/config/application.rb | 2 ++ web/backend/config/initializers/cors.rb | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/backend/Gemfile b/web/backend/Gemfile index f2552c76..c63c1582 100644 --- a/web/backend/Gemfile +++ b/web/backend/Gemfile @@ -41,8 +41,7 @@ gem 'bootsnap', require: false # gem "image_processing", "~> 1.2" # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible -gem "rack-cors" - +gem 'rack-cors' group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem 'debug', platforms: %i[mri mingw x64_mingw] diff --git a/web/backend/config/application.rb b/web/backend/config/application.rb index 9b10e824..e903da0d 100644 --- a/web/backend/config/application.rb +++ b/web/backend/config/application.rb @@ -23,6 +23,8 @@ class Application < Rails::Application routing_specs: false end + config.x.cors_allowed_origins = ENV.fetch('CORS_ALLOWED_ORIGINS', 'http://localhost:5173') + # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files diff --git a/web/backend/config/initializers/cors.rb b/web/backend/config/initializers/cors.rb index e5978035..6a1f3336 100644 --- a/web/backend/config/initializers/cors.rb +++ b/web/backend/config/initializers/cors.rb @@ -7,10 +7,9 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do allow do - # TODO: 後で本番と開発で分岐する - origins "http://localhost:5173" + origins Rails.application.config.x.cors_allowed_origins - resource "v1", + resource "*", headers: :any, methods: [:get, :post, :put, :patch, :delete, :options, :head] end From fad83f10beb30b0dee875f5880c9faaade335e8b Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Mon, 9 Oct 2023 03:34:01 +0900 Subject: [PATCH 11/31] =?UTF-8?q?waring=E3=81=8C=E5=87=BA=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/frontend/package-lock.json | 1 - web/frontend/tsconfig.json | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/web/frontend/package-lock.json b/web/frontend/package-lock.json index 20887514..b6f9e330 100644 --- a/web/frontend/package-lock.json +++ b/web/frontend/package-lock.json @@ -1910,7 +1910,6 @@ "version": "4.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", - "dev": true, "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", diff --git a/web/frontend/tsconfig.json b/web/frontend/tsconfig.json index f82888f3..2132d615 100644 --- a/web/frontend/tsconfig.json +++ b/web/frontend/tsconfig.json @@ -5,9 +5,7 @@ "module": "ESNext", "lib": ["ES2020", "DOM", "DOM.Iterable"], "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "node", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, From 80512d343d8cfc646ca57a9ebe73821873ebfc15 Mon Sep 17 00:00:00 2001 From: Tatsumi0000 Date: Mon, 9 Oct 2023 03:34:35 +0900 Subject: [PATCH 12/31] =?UTF-8?q?=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6?= =?UTF-8?q?=E3=81=AB=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=A8=E6=9C=88=E6=96=87=E5=AD=97=E3=82=92=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E6=9B=B8=E3=81=84?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/frontend/src/components/HelloWorld.vue | 19 ++++++++++++++++--- .../features/starrykids/client/AxiosClient.ts | 5 ----- .../repository/TextToMoonsRepository.ts | 13 +++++++------ .../starrykids/usecase/TextToMoonsUsecase.ts | 13 +++++++++---- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/web/frontend/src/components/HelloWorld.vue b/web/frontend/src/components/HelloWorld.vue index 7b25f3f2..fb33f212 100644 --- a/web/frontend/src/components/HelloWorld.vue +++ b/web/frontend/src/components/HelloWorld.vue @@ -1,9 +1,22 @@