From 19b2ac85856b69be17a88ba2378499e488b10d38 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Mon, 13 Nov 2023 23:48:26 +0900 Subject: [PATCH 01/26] =?UTF-8?q?swagger=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/musicspot/package-lock.json | 63 +++++++++++++++++++++++++++++++--- BE/musicspot/package.json | 1 + BE/musicspot/src/main.ts | 9 +++++ 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/BE/musicspot/package-lock.json b/BE/musicspot/package-lock.json index abc4578..9f9c6bf 100644 --- a/BE/musicspot/package-lock.json +++ b/BE/musicspot/package-lock.json @@ -12,6 +12,7 @@ "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", "@nestjs/platform-express": "^10.0.0", + "@nestjs/swagger": "^7.1.15", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1" }, @@ -1645,6 +1646,25 @@ } } }, + "node_modules/@nestjs/mapped-types": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-2.0.3.tgz", + "integrity": "sha512-40Zdqg98lqoF0+7ThWIZFStxgzisK6GG22+1ABO4kZiGF/Tu2FE+DYLw+Q9D94vcFWizJ+MSjNN4ns9r6hIGxw==", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "class-transformer": "^0.4.0 || ^0.5.0", + "class-validator": "^0.13.0 || ^0.14.0", + "reflect-metadata": "^0.1.12" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, "node_modules/@nestjs/platform-express": { "version": "10.2.8", "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.2.8.tgz", @@ -1681,6 +1701,37 @@ "typescript": ">=4.8.2" } }, + "node_modules/@nestjs/swagger": { + "version": "7.1.15", + "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.1.15.tgz", + "integrity": "sha512-ZaAO90R9MQXk4iLQLijIH6jrsllkUSYoh0Su6DECGgu8Y4Q/9LfdESwsZ9nmzr/48aLOu+wrv+cdI5Wr6fLKJw==", + "dependencies": { + "@nestjs/mapped-types": "2.0.3", + "js-yaml": "4.1.0", + "lodash": "4.17.21", + "path-to-regexp": "3.2.0", + "swagger-ui-dist": "5.9.1" + }, + "peerDependencies": { + "@fastify/static": "^6.0.0", + "@nestjs/common": "^9.0.0 || ^10.0.0", + "@nestjs/core": "^9.0.0 || ^10.0.0", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12" + }, + "peerDependenciesMeta": { + "@fastify/static": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, "node_modules/@nestjs/testing": { "version": "10.2.8", "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-10.2.8.tgz", @@ -2626,8 +2677,7 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-flatten": { "version": "1.1.1", @@ -6005,7 +6055,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -6152,8 +6201,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.memoize": { "version": "4.1.2", @@ -7907,6 +7955,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swagger-ui-dist": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.9.1.tgz", + "integrity": "sha512-5zAx+hUwJb9T3EAntc7TqYkV716CMqG6sZpNlAAMOMWkNXRYxGkN8ADIvD55dQZ10LxN90ZM/TQmN7y1gpICnw==" + }, "node_modules/symbol-observable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", diff --git a/BE/musicspot/package.json b/BE/musicspot/package.json index da0cc85..6a18d43 100644 --- a/BE/musicspot/package.json +++ b/BE/musicspot/package.json @@ -23,6 +23,7 @@ "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", "@nestjs/platform-express": "^10.0.0", + "@nestjs/swagger": "^7.1.15", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1" }, diff --git a/BE/musicspot/src/main.ts b/BE/musicspot/src/main.ts index 13cad38..e7a67ae 100644 --- a/BE/musicspot/src/main.ts +++ b/BE/musicspot/src/main.ts @@ -1,8 +1,17 @@ import { NestFactory } from '@nestjs/core'; +import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); + const config = new DocumentBuilder() + .setTitle('Cats example') // 문서의 제목 + .setDescription('The cats API description') // 문서의 간단한 설명 + .setVersion('1.0') // API의 버전(업데이트 버전) + .addTag('cats') + .build(); + const document = SwaggerModule.createDocument(app, config); + SwaggerModule.setup('api', app, document); await app.listen(3000); } bootstrap(); From 7e94dc5d96766823076ab089d36e273ba2e711cc Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 15 Nov 2023 22:44:47 +0900 Subject: [PATCH 02/26] =?UTF-8?q?:sparkles:=20MongoDB=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MongoDB 설정입니다. --- BE/musicspot/package-lock.json | 2300 ++++++++++++++++++++++++++++++-- BE/musicspot/package.json | 3 + BE/musicspot/src/app.module.ts | 8 +- BE/musicspot/src/main.ts | 2 +- 4 files changed, 2171 insertions(+), 142 deletions(-) diff --git a/BE/musicspot/package-lock.json b/BE/musicspot/package-lock.json index 9f9c6bf..9d980c4 100644 --- a/BE/musicspot/package-lock.json +++ b/BE/musicspot/package-lock.json @@ -11,8 +11,11 @@ "dependencies": { "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", + "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "gitmoji-cli": "^9.0.0", + "mongoose": "^8.0.0", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1" }, @@ -1524,6 +1527,17 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@ljharb/through": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.11.tgz", + "integrity": "sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/@lukeed/csprng": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", @@ -1532,6 +1546,14 @@ "node": ">=8" } }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@nestjs/cli": { "version": "10.2.1", "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-10.2.1.tgz", @@ -1665,6 +1687,18 @@ } } }, + "node_modules/@nestjs/mongoose": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@nestjs/mongoose/-/mongoose-10.0.2.tgz", + "integrity": "sha512-ITHh075DynjPIaKeJh6WkarS21WXYslu4nrLkNPbWaCP6JfxVAOftaA2X5tPSiiE/gNJWgs+QFWsfCFZUUenow==", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0", + "mongoose": "^6.0.2 || ^7.0.0 || ^8.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.0.0" + } + }, "node_modules/@nestjs/platform-express": { "version": "10.2.8", "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.2.8.tgz", @@ -1841,12 +1875,60 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz", + "integrity": "sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==", + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "node_modules/@sindresorhus/is": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -1865,6 +1947,22 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -2014,6 +2112,11 @@ "@types/node": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" + }, "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", @@ -2070,7 +2173,6 @@ "version": "20.9.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", - "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -2139,6 +2241,20 @@ "@types/superagent": "*" } }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "node_modules/@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "dependencies": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, "node_modules/@types/yargs": { "version": "17.0.31", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.31.tgz", @@ -2558,11 +2674,21 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -2578,7 +2704,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, "dependencies": { "ajv": "^8.0.0" }, @@ -2591,6 +2716,14 @@ } } }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dependencies": { + "string-width": "^4.1.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -2604,7 +2737,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -2619,7 +2751,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, "engines": { "node": ">=10" }, @@ -2631,7 +2762,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2705,12 +2835,32 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "node_modules/atomically": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-2.0.2.tgz", + "integrity": "sha512-Xfmb4q5QV7uqTlVdMSTtO5eF4DCHfNOdaPyKlbFShkzeNP+3lj3yjjcbdjSmEY4+pDBKJ9g26aP+ImTe88UHoQ==", + "dependencies": { + "stubborn-fs": "^1.2.5", + "when-exit": "^2.0.0" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -2837,7 +2987,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -2853,6 +3002,14 @@ } ] }, + "node_modules/basic-ftp": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz", + "integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -2875,7 +3032,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -2886,7 +3042,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2932,6 +3087,133 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/boxen": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", + "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.1", + "chalk": "^5.2.0", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.1.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/camelcase": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", + "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/boxen/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -3019,11 +3301,18 @@ "node-int64": "^0.4.0" } }, + "node_modules/bson": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", + "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", + "engines": { + "node": ">=16.20.1" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -3082,6 +3371,31 @@ "node": ">= 0.8" } }, + "node_modules/cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "engines": { + "node": ">=14.16" + } + }, + "node_modules/cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "dependencies": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + } + }, "node_modules/call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -3160,8 +3474,7 @@ "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "node_modules/chokidar": { "version": "3.5.3", @@ -3220,11 +3533,21 @@ "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, "dependencies": { "restore-cursor": "^3.1.0" }, @@ -3236,7 +3559,6 @@ "version": "2.9.1", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", - "dev": true, "engines": { "node": ">=6" }, @@ -3303,7 +3625,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, "engines": { "node": ">=0.8" } @@ -3403,46 +3724,130 @@ "typedarray": "^0.0.6" } }, - "node_modules/consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "node_modules/conf": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/conf/-/conf-12.0.0.tgz", + "integrity": "sha512-fIWyWUXrJ45cHCIQX+Ck1hrZDIf/9DR0P0Zewn3uNht28hbt5OfGUq8rRWsxi96pZWPyBEd0eY9ama01JTaknA==", "dependencies": { - "safe-buffer": "5.2.1" + "ajv": "^8.12.0", + "ajv-formats": "^2.1.1", + "atomically": "^2.0.2", + "debounce-fn": "^5.1.2", + "dot-prop": "^8.0.2", + "env-paths": "^3.0.0", + "json-schema-typed": "^8.0.1", + "semver": "^7.5.4", + "uint8array-extras": "^0.3.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "node_modules/configstore": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", + "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", + "dependencies": { + "dot-prop": "^6.0.1", + "graceful-fs": "^4.2.6", + "unique-string": "^3.0.0", + "write-file-atomic": "^3.0.3", + "xdg-basedir": "^5.0.1" + }, "engines": { - "node": ">= 0.6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/yeoman/configstore?sponsor=1" } }, - "node_modules/cookie-signature": { - "version": "1.0.6", + "node_modules/configstore/node_modules/dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/configstore/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/configstore/node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, @@ -3526,7 +3931,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3536,11 +3940,68 @@ "node": ">= 8" } }, + "node_modules/crypto-random-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", + "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", + "dependencies": { + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/crypto-random-string/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/debounce-fn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-5.1.2.tgz", + "integrity": "sha512-Sr4SdOZ4vw6eQDvPYNxHogvrxmCIld/VenC5JbNrFwMiwd7lY/Z18ZFfo+EWNG4DD9nFlAujWAo/wGuOPHmy5A==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debounce-fn/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/debug": { "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" }, @@ -3553,6 +4014,31 @@ } } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -3567,6 +4053,14 @@ } } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3736,7 +4230,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, "dependencies": { "clone": "^1.0.2" }, @@ -3744,6 +4237,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "engines": { + "node": ">=10" + } + }, "node_modules/define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -3769,6 +4270,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3856,11 +4370,35 @@ "node": ">=6.0.0" } }, + "node_modules/dot-prop": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", + "integrity": "sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==", + "dependencies": { + "type-fest": "^3.8.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dot-prop/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ee-first": { "version": "1.1.1", @@ -3888,8 +4426,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -3921,6 +4458,17 @@ "node": ">=10.13.0" } }, + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -3945,6 +4493,17 @@ "node": ">=6" } }, + "node_modules/escape-goat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3962,6 +4521,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/eslint": { "version": "8.53.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", @@ -4141,7 +4729,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -4178,7 +4765,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -4187,7 +4773,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -4363,7 +4948,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, "dependencies": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -4376,8 +4960,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { "version": "1.3.0", @@ -4436,6 +5019,28 @@ "bser": "2.1.1" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -4643,6 +5248,25 @@ "node": ">= 6" } }, + "node_modules/form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "engines": { + "node": ">= 14.17" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/formidable": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", @@ -4722,6 +5346,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/fuse.js": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.6.2.tgz", + "integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==", + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4767,7 +5399,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, "engines": { "node": ">=10" }, @@ -4775,43 +5406,606 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, + "node_modules/get-uri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.0", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 14" } }, - "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==", - "dev": true, + "node_modules/get-uri/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dependencies": { - "is-glob": "^4.0.1" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">= 6" + "node": ">=6 <7 || >=8" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "node_modules/get-uri/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/get-uri/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/gitmoji-cli": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/gitmoji-cli/-/gitmoji-cli-9.0.0.tgz", + "integrity": "sha512-yXVPbLHzC85da8tOq/h+WKrmtLQu/HgvS+nxp6rknTvVdW6tYIQqFDDJFeUy4MWLvPqsGCGnkF9PtI6PftMVIA==", + "funding": [ + { + "type": "Github Sponsors", + "url": "https://github.com/sponsors/carloscuesta" + }, + { + "type": "Paypal", + "url": "https://paypal.me/carloscuesta" + } + ], + "dependencies": { + "chalk": "^5.3.0", + "conf": "12.0.0", + "execa": "^8.0.1", + "fuse.js": "6.6.2", + "inquirer": "^9.2.11", + "inquirer-autocomplete-prompt": "^3.0.1", + "meow": "^12.1.1", + "node-fetch": "^3.3.2", + "ora": "^7.0.1", + "path-exists": "^5.0.0", + "proxy-agent": "^6.3.1", + "update-notifier": "^7.0.0", + "validator": "^13.11.0" + }, + "bin": { + "gitmoji": "lib/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/gitmoji-cli/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/gitmoji-cli/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/gitmoji-cli/node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/gitmoji-cli/node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/gitmoji-cli/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, + "node_modules/gitmoji-cli/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/gitmoji-cli/node_modules/figures": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", + "dependencies": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/figures/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer": { + "version": "9.2.12", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.12.tgz", + "integrity": "sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==", + "dependencies": { + "@ljharb/through": "^2.3.11", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^5.0.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-3.0.1.tgz", + "integrity": "sha512-DQBXwX2fVQPVUzu4v4lGgtNgyjcX2+rTyphb2MeSOQh3xUayKAfHAF4y0KgsMi06m6ZiR3xIOdzMZMfQgX2m9w==", + "dependencies": { + "ansi-escapes": "^6.0.0", + "figures": "^5.0.0", + "picocolors": "^1.0.0", + "run-async": "^2.4.1", + "rxjs": "^7.5.6" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "inquirer": "^9.1.0" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer-autocomplete-prompt/node_modules/ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dependencies": { + "type-fest": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer/node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer/node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/gitmoji-cli/node_modules/inquirer/node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/gitmoji-cli/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/gitmoji-cli/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/gitmoji-cli/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-7.0.1.tgz", + "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.9.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.3.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "string-width": "^6.1.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/string-width": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", + "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^10.2.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/gitmoji-cli/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/gitmoji-cli/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/gitmoji-cli/node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/gitmoji-cli/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gitmoji-cli/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "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==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, @@ -4839,6 +6033,20 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globals": { "version": "13.23.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", @@ -4885,11 +6093,34 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/got": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -4973,19 +6204,60 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" }, "engines": { - "node": ">= 0.8" + "node": ">= 14" } }, "node_modules/human-signals": { @@ -5012,7 +6284,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -5053,6 +6324,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "engines": { + "node": ">=8" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -5076,7 +6355,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, "engines": { "node": ">=0.8.19" } @@ -5096,6 +6374,14 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "engines": { + "node": ">=10" + } + }, "node_modules/inquirer": { "version": "8.2.6", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", @@ -5131,6 +6417,11 @@ "node": ">= 0.10" } }, + "node_modules/ip": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==" + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -5197,7 +6488,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -5223,6 +6513,20 @@ "node": ">=0.10.0" } }, + "node_modules/is-in-ci": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-0.1.0.tgz", + "integrity": "sha512-d9PXLEY0v1iJ64xLiQMJ51J128EYHAaOR4yZqQi8aHGfw6KgifM3/Viw1oZZ1GCVmb3gBuyhLyHj0HgR2DhSXQ==", + "bin": { + "is-in-ci": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-inside-container": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", @@ -5241,15 +6545,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/is-npm": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", + "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -5259,11 +6588,18 @@ "node": ">=0.12.0" } }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -5280,11 +6616,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "engines": { "node": ">=10" }, @@ -5327,8 +6667,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -6077,8 +7416,7 @@ "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -6089,8 +7427,12 @@ "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/json-schema-typed": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.1.tgz", + "integrity": "sha512-XQmWYj2Sm4kn4WeTYvmpKEbyPsL7nBsb647c7pMe6l02/yx2+Jfc4dT6UZkEXnIUb5LhD55r2HPsJ1milQ4rDg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -6128,11 +7470,18 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/kareem": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, "dependencies": { "json-buffer": "3.0.1" } @@ -6146,6 +7495,20 @@ "node": ">=6" } }, + "node_modules/latest-version": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", + "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", + "dependencies": { + "package-json": "^8.1.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -6219,7 +7582,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -6231,6 +7593,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -6314,6 +7687,22 @@ "node": ">= 4.0.0" } }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + }, + "node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "engines": { + "node": ">=16.10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -6322,8 +7711,7 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -6389,11 +7777,21 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "engines": { "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6434,11 +7832,140 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mongodb": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz", + "integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^6.2.0", + "mongodb-connection-string-url": "^2.6.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongoose": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.0.0.tgz", + "integrity": "sha512-PzwkLgm1Jhj0NQdgGfnFsu0QP9V1sBFgbavEgh/IPAUzKAagzvEhuaBuAQOQGjczVWnpIU9tBqyd02cOTgsPlA==", + "dependencies": { + "bson": "^6.2.0", + "kareem": "2.5.1", + "mongodb": "6.2.0", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "16.0.1" + }, + "engines": { + "node": ">=16.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mongoose/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, "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/multer": { "version": "1.4.4-lts.1", @@ -6483,12 +8010,38 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", "dev": true }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-emoji": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", @@ -6538,6 +8091,17 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", + "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6590,7 +8154,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -6679,11 +8242,18 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "engines": { + "node": ">=12.20" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6723,6 +8293,54 @@ "node": ">=6" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", + "integrity": "sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==", + "dependencies": { + "degenerator": "^5.0.0", + "ip": "^1.1.8", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/package-json": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz", + "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==", + "dependencies": { + "got": "^12.1.0", + "registry-auth-token": "^5.0.1", + "registry-url": "^6.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6783,7 +8401,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -6839,8 +8456,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -7016,6 +8632,11 @@ "node": ">= 6" } }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -7028,6 +8649,37 @@ "node": ">= 0.10" } }, + "node_modules/proxy-agent": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "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/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -7042,11 +8694,24 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } }, + "node_modules/pupa": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", + "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", + "dependencies": { + "escape-goat": "^4.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pure-rand": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", @@ -7097,6 +8762,17 @@ } ] }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -7128,6 +8804,33 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -7182,6 +8885,31 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" }, + "node_modules/registry-auth-token": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", + "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==", + "dependencies": { + "@pnpm/npm-conf": "^2.1.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", @@ -7204,7 +8932,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -7226,6 +8953,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" + }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -7265,11 +8997,24 @@ "node": ">=10" } }, + "node_modules/responselike": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", + "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "dependencies": { + "lowercase-keys": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -7281,8 +9026,7 @@ "node_modules/restore-cursor/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/reusify": { "version": "1.0.4", @@ -7382,7 +9126,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -7495,7 +9238,6 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -7506,11 +9248,24 @@ "node": ">=10" } }, + "node_modules/semver-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz", + "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -7521,8 +9276,7 @@ "node_modules/semver/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/send": { "version": "0.18.0", @@ -7611,7 +9365,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -7623,7 +9376,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -7678,11 +9430,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sift": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, "engines": { "node": ">=14" }, @@ -7705,6 +9461,46 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks/node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -7733,6 +9529,14 @@ "node": ">=0.10.0" } }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7768,6 +9572,66 @@ "node": ">= 0.8" } }, + "node_modules/stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", + "dependencies": { + "bl": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stdin-discarder/node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/stdin-discarder/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/stdin-discarder/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -7806,7 +9670,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7835,7 +9698,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7886,6 +9748,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stubborn-fs": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-1.2.5.tgz", + "integrity": "sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==" + }, "node_modules/superagent": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", @@ -8143,7 +10010,6 @@ "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, "dependencies": { "os-tmpdir": "~1.0.2" }, @@ -8410,6 +10276,14 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, "node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -8434,11 +10308,35 @@ "node": ">=8" } }, + "node_modules/uint8array-extras": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-0.3.0.tgz", + "integrity": "sha512-erJsJwQ0tKdwuqI0359U8ijkFmfiTcq25JvvzRVc1VP+2son1NJRXhxcAKJmAW3ajM8JSGAfsAXye8g4s+znxA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/unique-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", + "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "dependencies": { + "crypto-random-string": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/universalify": { "version": "2.0.1", @@ -8496,11 +10394,46 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/update-notifier": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-7.0.0.tgz", + "integrity": "sha512-Hv25Bh+eAbOLlsjJreVPOs4vd51rrtCrmhyOJtbpAojro34jS4KQaEp4/EvlHJX7jSO42VvEFpkastVyXyIsdQ==", + "dependencies": { + "boxen": "^7.1.1", + "chalk": "^5.3.0", + "configstore": "^6.0.0", + "import-lazy": "^4.0.0", + "is-in-ci": "^0.1.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^6.0.0", + "latest-version": "^7.0.0", + "pupa": "^3.1.0", + "semver": "^7.5.4", + "semver-diff": "^4.0.0", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -8538,6 +10471,14 @@ "node": ">=10.12.0" } }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -8572,11 +10513,18 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, "dependencies": { "defaults": "^1.0.3" } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -8678,11 +10626,15 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/when-exit": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/when-exit/-/when-exit-2.1.1.tgz", + "integrity": "sha512-XLipGldz/UcleuGaoQjbYuWwD+ICRnzIjlldtwTaTWr7aZz8yQW49rXk6MHQnh+KxOiWiJpM1vIyaxprOnlW4g==" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -8693,6 +10645,66 @@ "node": ">= 8" } }, + "node_modules/widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dependencies": { + "string-width": "^5.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/widest-line/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/widest-line/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/windows-release": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-4.0.0.tgz", @@ -8765,7 +10777,6 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -8818,6 +10829,17 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/BE/musicspot/package.json b/BE/musicspot/package.json index 6a18d43..5f1f421 100644 --- a/BE/musicspot/package.json +++ b/BE/musicspot/package.json @@ -22,8 +22,11 @@ "dependencies": { "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", + "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "gitmoji-cli": "^9.0.0", + "mongoose": "^8.0.0", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1" }, diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index 8662803..4897fe0 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -1,9 +1,13 @@ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; - +import { MongooseModule } from '@nestjs/mongoose'; +import { JournalsModule } from './journals/journals.module'; @Module({ - imports: [], + imports: [ + MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), + JournalsModule, + ], controllers: [AppController], providers: [AppService], }) diff --git a/BE/musicspot/src/main.ts b/BE/musicspot/src/main.ts index e7a67ae..2602352 100644 --- a/BE/musicspot/src/main.ts +++ b/BE/musicspot/src/main.ts @@ -8,7 +8,7 @@ async function bootstrap() { .setTitle('Cats example') // 문서의 제목 .setDescription('The cats API description') // 문서의 간단한 설명 .setVersion('1.0') // API의 버전(업데이트 버전) - .addTag('cats') + .addTag('Music Spot') .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); From 3111b16bd1df3b862e765cefed71a1068fe8a772 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 01:45:36 +0900 Subject: [PATCH 03/26] =?UTF-8?q?:memo:=20Dependency=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit class-transformer, class-validator, uuid 추가 --- BE/musicspot/package-lock.json | 42 +++++++++++++++++++++++++++++++++- BE/musicspot/package.json | 5 +++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/BE/musicspot/package-lock.json b/BE/musicspot/package-lock.json index 9d980c4..0421604 100644 --- a/BE/musicspot/package-lock.json +++ b/BE/musicspot/package-lock.json @@ -14,10 +14,13 @@ "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", "gitmoji-cli": "^9.0.0", "mongoose": "^8.0.0", "reflect-metadata": "^0.1.13", - "rxjs": "^7.8.1" + "rxjs": "^7.8.1", + "uuid": "^9.0.1" }, "devDependencies": { "@nestjs/cli": "^10.0.0", @@ -2241,6 +2244,11 @@ "@types/superagent": "*" } }, + "node_modules/@types/validator": { + "version": "13.11.6", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.6.tgz", + "integrity": "sha512-HUgHujPhKuNzgNXBRZKYexwoG+gHKU+tnfPqjWXFghZAnn73JElicMkuSKJyLGr9JgyA8IgK7fj88IyA9rwYeQ==" + }, "node_modules/@types/webidl-conversions": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", @@ -3533,6 +3541,21 @@ "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, + "node_modules/class-transformer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" + }, + "node_modules/class-validator": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "dependencies": { + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", + "validator": "^13.7.0" + } + }, "node_modules/cli-boxes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", @@ -7531,6 +7554,11 @@ "node": ">= 0.8.0" } }, + "node_modules/libphonenumber-js": { + "version": "1.10.49", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.49.tgz", + "integrity": "sha512-gvLtyC3tIuqfPzjvYLH9BmVdqzGDiSi4VjtWe2fAgSdBf0yt8yPmbNnRIHNbR5IdtVkm0ayGuzwQKTWmU0hdjQ==" + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -10451,6 +10479,18 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", diff --git a/BE/musicspot/package.json b/BE/musicspot/package.json index 5f1f421..7027140 100644 --- a/BE/musicspot/package.json +++ b/BE/musicspot/package.json @@ -25,10 +25,13 @@ "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", "gitmoji-cli": "^9.0.0", "mongoose": "^8.0.0", "reflect-metadata": "^0.1.13", - "rxjs": "^7.8.1" + "rxjs": "^7.8.1", + "uuid": "^9.0.1" }, "devDependencies": { "@nestjs/cli": "^10.0.0", From 9efb3e6ba9bde39014a558e1bcd66f2420abdb22 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 02:36:49 +0900 Subject: [PATCH 04/26] =?UTF-8?q?:sparkles:=20=EA=B2=80=EC=A6=9D=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=B4=ED=94=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 검증 파이프 추가 --- BE/musicspot/src/main.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BE/musicspot/src/main.ts b/BE/musicspot/src/main.ts index 2602352..7e08a6d 100644 --- a/BE/musicspot/src/main.ts +++ b/BE/musicspot/src/main.ts @@ -1,7 +1,7 @@ import { NestFactory } from '@nestjs/core'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { AppModule } from './app.module'; - +import { ValidationPipe } from '@nestjs/common'; async function bootstrap() { const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() @@ -12,6 +12,13 @@ async function bootstrap() { .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + }), + ); await app.listen(3000); } bootstrap(); From fe460570a465f56c879a9d36316411d77e98ff7c Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 02:37:31 +0900 Subject: [PATCH 05/26] =?UTF-8?q?:art:=20=EC=9E=A1=EB=8B=A4=ED=95=9C=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 테스트 및 의미없는 부분 수정 --- BE/musicspot/src/app.controller.spec.ts | 6 +----- BE/musicspot/src/app.module.ts | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/BE/musicspot/src/app.controller.spec.ts b/BE/musicspot/src/app.controller.spec.ts index d22f389..76be546 100644 --- a/BE/musicspot/src/app.controller.spec.ts +++ b/BE/musicspot/src/app.controller.spec.ts @@ -14,9 +14,5 @@ describe('AppController', () => { appController = app.get(AppController); }); - describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); - }); - }); + describe('test', () => {}); }); diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index 4897fe0..74eed9b 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -3,6 +3,8 @@ import { AppController } from './app.controller'; import { AppService } from './app.service'; import { MongooseModule } from '@nestjs/mongoose'; import { JournalsModule } from './journals/journals.module'; +import { JournalsController } from './journals/journals.controller'; +import { JournalsService } from './journals/journals.service'; @Module({ imports: [ MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), From 6f6bee6a621bd2775881250870a94905d3e6f2b7 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 02:39:39 +0900 Subject: [PATCH 06/26] =?UTF-8?q?:sparkles:=20Journal=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit journal 시작 시 새로운 journal을 db에 추가하고 추가된 journal을 클라이언트로 응답 --- .../src/journals/dto/journalStart.dto.ts | 24 +++++++++++++++++++ .../src/journals/journals.controller.spec.ts | 18 ++++++++++++++ .../src/journals/journals.controller.ts | 12 ++++++++++ BE/musicspot/src/journals/journals.module.ts | 14 +++++++++++ BE/musicspot/src/journals/journals.schema.ts | 18 ++++++++++++++ .../src/journals/journals.service.spec.ts | 18 ++++++++++++++ BE/musicspot/src/journals/journals.service.ts | 22 +++++++++++++++++ 7 files changed, 126 insertions(+) create mode 100644 BE/musicspot/src/journals/dto/journalStart.dto.ts create mode 100644 BE/musicspot/src/journals/journals.controller.spec.ts create mode 100644 BE/musicspot/src/journals/journals.controller.ts create mode 100644 BE/musicspot/src/journals/journals.module.ts create mode 100644 BE/musicspot/src/journals/journals.schema.ts create mode 100644 BE/musicspot/src/journals/journals.service.spec.ts create mode 100644 BE/musicspot/src/journals/journals.service.ts diff --git a/BE/musicspot/src/journals/dto/journalStart.dto.ts b/BE/musicspot/src/journals/dto/journalStart.dto.ts new file mode 100644 index 0000000..b14bd21 --- /dev/null +++ b/BE/musicspot/src/journals/dto/journalStart.dto.ts @@ -0,0 +1,24 @@ +import { + ArrayMaxSize, + ArrayMinSize, + IsArray, + IsNumber, + IsString, +} from 'class-validator'; + +export class StartJournalDTO { + @IsString() + readonly title: string; + + @IsArray() + @ArrayMaxSize(2, { message: 'coordinate has only 2' }) + @ArrayMinSize(2, { message: 'coordinate has only 2' }) + @IsNumber({}, { each: true }) + readonly coordinate: number[]; + + @IsString() + readonly timestamp: string; + + @IsString() + readonly email: string; +} diff --git a/BE/musicspot/src/journals/journals.controller.spec.ts b/BE/musicspot/src/journals/journals.controller.spec.ts new file mode 100644 index 0000000..d7c02ac --- /dev/null +++ b/BE/musicspot/src/journals/journals.controller.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { JournalsController } from './journals.controller'; + +describe('JournalsController', () => { + let controller: JournalsController; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [JournalsController], + }).compile(); + + controller = module.get(JournalsController); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/BE/musicspot/src/journals/journals.controller.ts b/BE/musicspot/src/journals/journals.controller.ts new file mode 100644 index 0000000..6e4f5ed --- /dev/null +++ b/BE/musicspot/src/journals/journals.controller.ts @@ -0,0 +1,12 @@ +import { Controller, Post, Body } from '@nestjs/common'; +import { JournalsService } from './journals.service'; +import { StartJournalDTO } from './dto/journalStart.dto'; +@Controller('journals') +export class JournalsController { + constructor(private journalsService: JournalsService) {} + + @Post() + async create(@Body() startJournalDTO: StartJournalDTO) { + return await this.journalsService.create(startJournalDTO); + } +} diff --git a/BE/musicspot/src/journals/journals.module.ts b/BE/musicspot/src/journals/journals.module.ts new file mode 100644 index 0000000..8aeb7e7 --- /dev/null +++ b/BE/musicspot/src/journals/journals.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { JournalsController } from './journals.controller'; +import { JournalsService } from './journals.service'; +import { MongooseModule } from '@nestjs/mongoose'; +import { JournalSchema, Journal } from './journals.schema'; + +@Module({ + imports: [ + MongooseModule.forFeature([{ name: Journal.name, schema: JournalSchema }]), + ], + controllers: [JournalsController], + providers: [JournalsService], +}) +export class JournalsModule {} diff --git a/BE/musicspot/src/journals/journals.schema.ts b/BE/musicspot/src/journals/journals.schema.ts new file mode 100644 index 0000000..c192c9e --- /dev/null +++ b/BE/musicspot/src/journals/journals.schema.ts @@ -0,0 +1,18 @@ +import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; +import { HydratedDocument } from 'mongoose'; + +export type JournalDocument = HydratedDocument; + +@Schema() +export class Journal { + @Prop() + title: string; + + @Prop() + spots: string[]; + + @Prop({ type: [[Number]] }) + coordinates: number[][]; +} + +export const JournalSchema = SchemaFactory.createForClass(Journal); diff --git a/BE/musicspot/src/journals/journals.service.spec.ts b/BE/musicspot/src/journals/journals.service.spec.ts new file mode 100644 index 0000000..bb014d1 --- /dev/null +++ b/BE/musicspot/src/journals/journals.service.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { JournalsService } from './journals.service'; + +describe('JournalsService', () => { + let service: JournalsService; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + providers: [JournalsService], + }).compile(); + + service = module.get(JournalsService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); +}); diff --git a/BE/musicspot/src/journals/journals.service.ts b/BE/musicspot/src/journals/journals.service.ts new file mode 100644 index 0000000..fb502da --- /dev/null +++ b/BE/musicspot/src/journals/journals.service.ts @@ -0,0 +1,22 @@ +import { Model } from 'mongoose'; +import { InjectModel } from '@nestjs/mongoose'; +import { Injectable } from '@nestjs/common'; +import { StartJournalDTO } from './dto/journalStart.dto'; +import { Journal } from './journals.schema'; + +@Injectable() +export class JournalsService { + constructor( + @InjectModel(Journal.name) private journalModel: Model, + ) {} + + async create(startJournalDTO: StartJournalDTO): Promise { + const journalData = { + ...startJournalDTO, + spots: [], + coordinates: [startJournalDTO.coordinate], + }; + const createdJournal = new this.journalModel(journalData); + return createdJournal.save(); + } +} From c383546ee784724fdcf2b4b4d3454bf089c51554 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 02:54:52 +0900 Subject: [PATCH 07/26] test --- BE/musicspot/src/test.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 BE/musicspot/src/test.ts diff --git a/BE/musicspot/src/test.ts b/BE/musicspot/src/test.ts new file mode 100644 index 0000000..f0edc12 --- /dev/null +++ b/BE/musicspot/src/test.ts @@ -0,0 +1 @@ +asdasd; From 1c884b30a1061e8143a2e63d9435c9efbfc25077 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 02:55:31 +0900 Subject: [PATCH 08/26] =?UTF-8?q?test=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/musicspot/src/test.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 BE/musicspot/src/test.ts diff --git a/BE/musicspot/src/test.ts b/BE/musicspot/src/test.ts deleted file mode 100644 index f0edc12..0000000 --- a/BE/musicspot/src/test.ts +++ /dev/null @@ -1 +0,0 @@ -asdasd; From 6dcc572bc9a2c71127cd680d11b56bb735599091 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 18:00:51 +0900 Subject: [PATCH 09/26] =?UTF-8?q?:sparkles:=20Person=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Person 관련 module, service, controller, schema 추가 --- BE/musicspot/src/person/person.controller.ts | 4 ++++ BE/musicspot/src/person/person.module.ts | 10 ++++++++++ BE/musicspot/src/person/person.schema.ts | 18 ++++++++++++++++++ BE/musicspot/src/person/person.service.ts | 17 +++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 BE/musicspot/src/person/person.controller.ts create mode 100644 BE/musicspot/src/person/person.module.ts create mode 100644 BE/musicspot/src/person/person.schema.ts create mode 100644 BE/musicspot/src/person/person.service.ts diff --git a/BE/musicspot/src/person/person.controller.ts b/BE/musicspot/src/person/person.controller.ts new file mode 100644 index 0000000..d69737f --- /dev/null +++ b/BE/musicspot/src/person/person.controller.ts @@ -0,0 +1,4 @@ +import { Controller } from '@nestjs/common'; + +@Controller('person') +export class PersonController {} diff --git a/BE/musicspot/src/person/person.module.ts b/BE/musicspot/src/person/person.module.ts new file mode 100644 index 0000000..1e99d97 --- /dev/null +++ b/BE/musicspot/src/person/person.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { PersonController } from './person.controller'; +import { PersonService } from './person.service'; + +@Module({ + controllers: [PersonController], + providers: [PersonService], + exports: [PersonService], +}) +export class PersonModule {} diff --git a/BE/musicspot/src/person/person.schema.ts b/BE/musicspot/src/person/person.schema.ts new file mode 100644 index 0000000..980834d --- /dev/null +++ b/BE/musicspot/src/person/person.schema.ts @@ -0,0 +1,18 @@ +import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; +import { Collection, HydratedDocument } from 'mongoose'; + +export type PersonDocument = HydratedDocument; + +@Schema({ collection: 'person' }) +export class Person { + @Prop() + email: string; + + @Prop() + nickname: string; + + @Prop() + journals: string[]; +} + +export const PersonSchema = SchemaFactory.createForClass(Person); diff --git a/BE/musicspot/src/person/person.service.ts b/BE/musicspot/src/person/person.service.ts new file mode 100644 index 0000000..db29236 --- /dev/null +++ b/BE/musicspot/src/person/person.service.ts @@ -0,0 +1,17 @@ +import { Injectable } from '@nestjs/common'; +import { Model } from 'mongoose'; +import { InjectModel } from '@nestjs/mongoose'; +import { Person } from './person.schema'; +@Injectable() +export class PersonService { + constructor(@InjectModel(Person.name) private personModel: Model) {} + async appendJournalIdToPerson( + personEmail: string, + journalId: Object, + ): Promise { + return this.personModel.updateOne( + { email: personEmail }, + { $push: { journals: journalId } }, + ); + } +} From 3418eba316b70cba3667f6bdfaf57f01509bfac2 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 18:01:55 +0900 Subject: [PATCH 10/26] =?UTF-8?q?:test=5Ftube:=20Person=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PersonService 테스트 입니다. --- .../src/person/person.controller.spec.ts | 18 +++++++++ .../src/person/person.service.spec.ts | 40 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 BE/musicspot/src/person/person.controller.spec.ts create mode 100644 BE/musicspot/src/person/person.service.spec.ts diff --git a/BE/musicspot/src/person/person.controller.spec.ts b/BE/musicspot/src/person/person.controller.spec.ts new file mode 100644 index 0000000..88a0586 --- /dev/null +++ b/BE/musicspot/src/person/person.controller.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PersonController } from './person.controller'; + +describe('PersonController', () => { + let controller: PersonController; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [PersonController], + }).compile(); + + controller = module.get(PersonController); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/BE/musicspot/src/person/person.service.spec.ts b/BE/musicspot/src/person/person.service.spec.ts new file mode 100644 index 0000000..59ea10b --- /dev/null +++ b/BE/musicspot/src/person/person.service.spec.ts @@ -0,0 +1,40 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PersonService } from './person.service'; +import { getModelToken } from '@nestjs/mongoose'; +import { Person, PersonSchema } from './person.schema'; +import mongoose from 'mongoose'; + +describe('PersonService', () => { + let service: PersonService; + let personModel; + beforeEach(async () => { + mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); + personModel = mongoose.model(Person.name, PersonSchema); + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PersonService, + { + provide: getModelToken(Person.name), + useValue: personModel, + }, + ], + }).compile(); + + service = module.get(PersonService); + }); + + it('journal id 삽입 테스트', async () => { + const data = new Object(await personModel.find({ email: 'test' }))[0]; + + const pervLength = data.journals.length; + await service.appendJournalIdToPerson('test', '2'); + + const nextData = new Object(await personModel.find({ email: 'test' }))[0]; + const nextLength = nextData.journals.length; + expect(nextLength).toEqual(pervLength + 1); + }); + + afterAll(async () => { + mongoose.connection.close(); + }); +}); From 725c30228ef69dddaa7b87c89c019c98d601976b Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 18:03:57 +0900 Subject: [PATCH 11/26] =?UTF-8?q?:sparkles:=20Journal=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EB=94=94=20=EC=B6=94=EA=B0=80=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 여정 시작 시 journal id를 유저에 추가하는 기능 구현 --- BE/musicspot/src/journals/journals.service.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BE/musicspot/src/journals/journals.service.ts b/BE/musicspot/src/journals/journals.service.ts index fb502da..da2f112 100644 --- a/BE/musicspot/src/journals/journals.service.ts +++ b/BE/musicspot/src/journals/journals.service.ts @@ -3,11 +3,13 @@ import { InjectModel } from '@nestjs/mongoose'; import { Injectable } from '@nestjs/common'; import { StartJournalDTO } from './dto/journalStart.dto'; import { Journal } from './journals.schema'; +import { PersonService } from '../person/person.service'; @Injectable() export class JournalsService { constructor( @InjectModel(Journal.name) private journalModel: Model, + private personService: PersonService, ) {} async create(startJournalDTO: StartJournalDTO): Promise { @@ -17,6 +19,12 @@ export class JournalsService { coordinates: [startJournalDTO.coordinate], }; const createdJournal = new this.journalModel(journalData); - return createdJournal.save(); + const returnData = await createdJournal.save(); + const journalId = returnData._id; + this.personService.appendJournalIdToPerson( + startJournalDTO.email, + journalId, + ); + return returnData; } } From 94583b1ccdfa20b2eefbec1929bdd9ec5cc1f3ad Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 18:04:40 +0900 Subject: [PATCH 12/26] =?UTF-8?q?:test=5Ftube:=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9E=90=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90=20journal=20id?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=ED=95=98=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사용자 데이터에 journal id 추가하는 기능 테스트 --- BE/musicspot/src/journals/journals.schema.ts | 2 +- .../src/journals/journals.service.spec.ts | 51 +++++++++++++++++-- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/BE/musicspot/src/journals/journals.schema.ts b/BE/musicspot/src/journals/journals.schema.ts index c192c9e..2ed82c8 100644 --- a/BE/musicspot/src/journals/journals.schema.ts +++ b/BE/musicspot/src/journals/journals.schema.ts @@ -3,7 +3,7 @@ import { HydratedDocument } from 'mongoose'; export type JournalDocument = HydratedDocument; -@Schema() +@Schema({ collection: 'journals' }) export class Journal { @Prop() title: string; diff --git a/BE/musicspot/src/journals/journals.service.spec.ts b/BE/musicspot/src/journals/journals.service.spec.ts index bb014d1..ca104b8 100644 --- a/BE/musicspot/src/journals/journals.service.spec.ts +++ b/BE/musicspot/src/journals/journals.service.spec.ts @@ -1,18 +1,61 @@ import { Test, TestingModule } from '@nestjs/testing'; import { JournalsService } from './journals.service'; +import mongoose, { mongo } from 'mongoose'; +import { Person, PersonSchema } from '../person/person.schema'; +import { Journal, JournalSchema } from './journals.schema'; +import { getModelToken } from '@nestjs/mongoose'; +import { StartJournalDTO } from './dto/journalStart.dto'; +import { PersonService } from '../person/person.service'; describe('JournalsService', () => { let service: JournalsService; - + let personModel; + let journalModel; beforeEach(async () => { + mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); + personModel = mongoose.model(Person.name, PersonSchema); + journalModel = mongoose.model(Journal.name, JournalSchema); + const module: TestingModule = await Test.createTestingModule({ - providers: [JournalsService], + providers: [ + JournalsService, + PersonService, + { + provide: getModelToken(Journal.name), + useValue: journalModel, + }, + { + provide: getModelToken(Person.name), + useValue: personModel, + }, + ], }).compile(); service = module.get(JournalsService); }); - it('should be defined', () => { - expect(service).toBeDefined(); + it('journal 시작 테스트', async () => { + const insertData: StartJournalDTO = { + title: 'test2', + coordinate: [100, 100], + timestamp: 'time test code', + email: 'test', + }; + const dataLength = (await journalModel.find().exec()).length; + const journalLength = (await personModel.find({ email: 'test' }).exec())[0] + .journals.length; + + await service.create(insertData); + const nextDataLength = (await journalModel.find().exec()).length; + const nextJournalLength = ( + await personModel.find({ email: 'test' }).exec() + )[0].journals.length; + + expect(dataLength + 1).toEqual(nextDataLength); + expect(journalLength + 1).toEqual(nextJournalLength); + }); + + afterAll(async () => { + mongoose.connection.close(); }); }); From 5a1bf8ecc197a4fbfc8696f6ac5f8eb3eb47fc3f Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 18:05:38 +0900 Subject: [PATCH 13/26] =?UTF-8?q?:art:=20=EC=9D=98=EC=A1=B4=EC=84=B1=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=EC=9E=91?= =?UTF-8?q?=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit import에 personService를 추가해서 의존성 주입 --- BE/musicspot/src/app.module.ts | 2 ++ BE/musicspot/src/journals/journals.module.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index 74eed9b..b6b0153 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -5,10 +5,12 @@ import { MongooseModule } from '@nestjs/mongoose'; import { JournalsModule } from './journals/journals.module'; import { JournalsController } from './journals/journals.controller'; import { JournalsService } from './journals/journals.service'; +import { PersonModule } from './person/person.module'; @Module({ imports: [ MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), JournalsModule, + PersonModule, ], controllers: [AppController], providers: [AppService], diff --git a/BE/musicspot/src/journals/journals.module.ts b/BE/musicspot/src/journals/journals.module.ts index 8aeb7e7..0e18e13 100644 --- a/BE/musicspot/src/journals/journals.module.ts +++ b/BE/musicspot/src/journals/journals.module.ts @@ -3,12 +3,14 @@ import { JournalsController } from './journals.controller'; import { JournalsService } from './journals.service'; import { MongooseModule } from '@nestjs/mongoose'; import { JournalSchema, Journal } from './journals.schema'; +import { PersonService } from 'src/person/person.service'; @Module({ imports: [ MongooseModule.forFeature([{ name: Journal.name, schema: JournalSchema }]), + PersonService, ], controllers: [JournalsController], - providers: [JournalsService], + providers: [JournalsService, PersonService], }) export class JournalsModule {} From 358e5d15a29ceb449d18b0a169ce3f9d6ee73813 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Thu, 16 Nov 2023 22:21:19 +0900 Subject: [PATCH 14/26] =?UTF-8?q?:bug:=20Import=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Person Model이 제대로 주입되지 않는 상황 수정 --- BE/musicspot/src/journals/journals.controller.ts | 12 ++++++++++++ BE/musicspot/src/journals/journals.module.ts | 7 +++++-- BE/musicspot/src/journals/journals.service.ts | 2 ++ BE/musicspot/src/person/person.module.ts | 8 ++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/BE/musicspot/src/journals/journals.controller.ts b/BE/musicspot/src/journals/journals.controller.ts index 6e4f5ed..1c7ace1 100644 --- a/BE/musicspot/src/journals/journals.controller.ts +++ b/BE/musicspot/src/journals/journals.controller.ts @@ -1,10 +1,22 @@ import { Controller, Post, Body } from '@nestjs/common'; import { JournalsService } from './journals.service'; import { StartJournalDTO } from './dto/journalStart.dto'; +import { ApiCreatedResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { Journal } from './journals.schema'; @Controller('journals') +@ApiTags('journal 관련 API') export class JournalsController { constructor(private journalsService: JournalsService) {} + @ApiOperation({ + summary: '여정 시작을 눌렀을 시 실행되는 API', + description: + 'request로 여정 제목, 위치좌표(number[], 2개), 시작 시간, 유저 이메일을 필요합니다.', + }) + @ApiCreatedResponse({ + description: '생성된 여정 데이터를 반환', + type: Journal, + }) @Post() async create(@Body() startJournalDTO: StartJournalDTO) { return await this.journalsService.create(startJournalDTO); diff --git a/BE/musicspot/src/journals/journals.module.ts b/BE/musicspot/src/journals/journals.module.ts index 0e18e13..2a5459a 100644 --- a/BE/musicspot/src/journals/journals.module.ts +++ b/BE/musicspot/src/journals/journals.module.ts @@ -3,12 +3,15 @@ import { JournalsController } from './journals.controller'; import { JournalsService } from './journals.service'; import { MongooseModule } from '@nestjs/mongoose'; import { JournalSchema, Journal } from './journals.schema'; -import { PersonService } from 'src/person/person.service'; +import { PersonService } from '../person/person.service'; +import { Person, PersonSchema } from 'src/person/person.schema'; +import { PersonModule } from '../person/person.module'; @Module({ imports: [ MongooseModule.forFeature([{ name: Journal.name, schema: JournalSchema }]), - PersonService, + MongooseModule.forFeature([{ name: Person.name, schema: PersonSchema }]), + PersonModule, ], controllers: [JournalsController], providers: [JournalsService, PersonService], diff --git a/BE/musicspot/src/journals/journals.service.ts b/BE/musicspot/src/journals/journals.service.ts index da2f112..8b20da5 100644 --- a/BE/musicspot/src/journals/journals.service.ts +++ b/BE/musicspot/src/journals/journals.service.ts @@ -4,11 +4,13 @@ import { Injectable } from '@nestjs/common'; import { StartJournalDTO } from './dto/journalStart.dto'; import { Journal } from './journals.schema'; import { PersonService } from '../person/person.service'; +import { Person } from 'src/person/person.schema'; @Injectable() export class JournalsService { constructor( @InjectModel(Journal.name) private journalModel: Model, + @InjectModel(Person.name) private personModel: Model, private personService: PersonService, ) {} diff --git a/BE/musicspot/src/person/person.module.ts b/BE/musicspot/src/person/person.module.ts index 1e99d97..04422a9 100644 --- a/BE/musicspot/src/person/person.module.ts +++ b/BE/musicspot/src/person/person.module.ts @@ -1,10 +1,14 @@ import { Module } from '@nestjs/common'; import { PersonController } from './person.controller'; import { PersonService } from './person.service'; - +import { Person, PersonSchema } from './person.schema'; +import { MongooseModule } from '@nestjs/mongoose'; @Module({ + imports: [ + MongooseModule.forFeature([{ name: Person.name, schema: PersonSchema }]), + ], controllers: [PersonController], providers: [PersonService], - exports: [PersonService], + exports: [PersonModule], }) export class PersonModule {} From 0653d0298b8d9c8f4b6d5ee840561786695835b7 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Fri, 17 Nov 2023 01:22:31 +0900 Subject: [PATCH 15/26] =?UTF-8?q?:sparkles:=20Spot=20=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spot 저장 구현 --- BE/musicspot/src/app.module.ts | 2 ++ BE/musicspot/src/spots/dto/recordSpot.dto.ts | 20 ++++++++++++++++++++ BE/musicspot/src/spots/spots.controller.ts | 14 ++++++++++++++ BE/musicspot/src/spots/spots.module.ts | 13 +++++++++++++ BE/musicspot/src/spots/spots.schema.ts | 18 ++++++++++++++++++ BE/musicspot/src/spots/spots.service.ts | 15 +++++++++++++++ 6 files changed, 82 insertions(+) create mode 100644 BE/musicspot/src/spots/dto/recordSpot.dto.ts create mode 100644 BE/musicspot/src/spots/spots.controller.ts create mode 100644 BE/musicspot/src/spots/spots.module.ts create mode 100644 BE/musicspot/src/spots/spots.schema.ts create mode 100644 BE/musicspot/src/spots/spots.service.ts diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index b6b0153..400aac0 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -6,11 +6,13 @@ import { JournalsModule } from './journals/journals.module'; import { JournalsController } from './journals/journals.controller'; import { JournalsService } from './journals/journals.service'; import { PersonModule } from './person/person.module'; +import { SpotsModule } from './spots/spots.module'; @Module({ imports: [ MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), JournalsModule, PersonModule, + SpotsModule, ], controllers: [AppController], providers: [AppService], diff --git a/BE/musicspot/src/spots/dto/recordSpot.dto.ts b/BE/musicspot/src/spots/dto/recordSpot.dto.ts new file mode 100644 index 0000000..f327aad --- /dev/null +++ b/BE/musicspot/src/spots/dto/recordSpot.dto.ts @@ -0,0 +1,20 @@ +import { + ArrayMaxSize, + ArrayMinSize, + IsArray, + IsNumber, + IsString, +} from 'class-validator'; + +export class RecordSpotDTO { + @IsString() + readonly journalId: string; + @IsArray() + @ArrayMaxSize(2, { message: 'coordinate has only 2' }) + @ArrayMinSize(2, { message: 'coordinate has only 2' }) + @IsNumber({}, { each: true }) + readonly coordinate: number[]; + + @IsString() + readonly timestamp: string; +} diff --git a/BE/musicspot/src/spots/spots.controller.ts b/BE/musicspot/src/spots/spots.controller.ts new file mode 100644 index 0000000..2350984 --- /dev/null +++ b/BE/musicspot/src/spots/spots.controller.ts @@ -0,0 +1,14 @@ +import { Controller, Post, Body } from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; +import { RecordSpotDTO } from './dto/recordSpot.dto'; +import { SpotsService } from './spots.service'; + +@Controller('spots') +@ApiTags('spot 관련 API') +export class SpotsController { + constructor(private spotService: SpotsService) {} + @Post() + async create(@Body() recordSpotDTO: RecordSpotDTO) { + return await this.spotService.create(recordSpotDTO); + } +} diff --git a/BE/musicspot/src/spots/spots.module.ts b/BE/musicspot/src/spots/spots.module.ts new file mode 100644 index 0000000..416a58d --- /dev/null +++ b/BE/musicspot/src/spots/spots.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { SpotsController } from './spots.controller'; +import { SpotsService } from './spots.service'; +import { MongooseModule } from '@nestjs/mongoose'; +import { Spot, SpotSchema } from './spots.schema'; +@Module({ + imports: [ + MongooseModule.forFeature([{ name: Spot.name, schema: SpotSchema }]), + ], + controllers: [SpotsController], + providers: [SpotsService], +}) +export class SpotsModule {} diff --git a/BE/musicspot/src/spots/spots.schema.ts b/BE/musicspot/src/spots/spots.schema.ts new file mode 100644 index 0000000..97e9e5f --- /dev/null +++ b/BE/musicspot/src/spots/spots.schema.ts @@ -0,0 +1,18 @@ +import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; +import { HydratedDocument } from 'mongoose'; + +export type SpotDocument = HydratedDocument; + +@Schema({ collection: 'spots' }) +export class Spot { + @Prop() + journalId: string; + + @Prop({ type: [Number] }) + coordinate: number[]; + + @Prop({ type: String }) + timestamp: string; +} + +export const SpotSchema = SchemaFactory.createForClass(Spot); diff --git a/BE/musicspot/src/spots/spots.service.ts b/BE/musicspot/src/spots/spots.service.ts new file mode 100644 index 0000000..063987e --- /dev/null +++ b/BE/musicspot/src/spots/spots.service.ts @@ -0,0 +1,15 @@ +import { Model } from 'mongoose'; +import { Injectable } from '@nestjs/common'; + +import { InjectModel } from '@nestjs/mongoose'; +import { Spot } from './spots.schema'; +import { RecordSpotDTO } from './dto/recordSpot.dto'; + +@Injectable() +export class SpotsService { + constructor(@InjectModel(Spot.name) private spotModel: Model) {} + + async create(recordSpotDTO: RecordSpotDTO): Promise { + return new this.spotModel(recordSpotDTO).save(); + } +} From 9df9e87617e5189972d74eb6c69be0b65377d9a9 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Fri, 17 Nov 2023 01:22:52 +0900 Subject: [PATCH 16/26] =?UTF-8?q?:test=5Ftube:=20Spot=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spot 저장 테스트 구현 --- .../src/spots/spots.controller.spec.ts | 18 ++++++++ BE/musicspot/src/spots/spots.service.spec.ts | 43 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 BE/musicspot/src/spots/spots.controller.spec.ts create mode 100644 BE/musicspot/src/spots/spots.service.spec.ts diff --git a/BE/musicspot/src/spots/spots.controller.spec.ts b/BE/musicspot/src/spots/spots.controller.spec.ts new file mode 100644 index 0000000..7536095 --- /dev/null +++ b/BE/musicspot/src/spots/spots.controller.spec.ts @@ -0,0 +1,18 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { SpotsController } from './spots.controller'; + +describe('SpotsController', () => { + let controller: SpotsController; + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [SpotsController], + }).compile(); + + controller = module.get(SpotsController); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/BE/musicspot/src/spots/spots.service.spec.ts b/BE/musicspot/src/spots/spots.service.spec.ts new file mode 100644 index 0000000..be4caa6 --- /dev/null +++ b/BE/musicspot/src/spots/spots.service.spec.ts @@ -0,0 +1,43 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { SpotsService } from './spots.service'; +import mongoose from 'mongoose'; +import { Spot, SpotSchema } from './spots.schema'; +import { getModelToken } from '@nestjs/mongoose'; + +describe('SpotsService', () => { + let service: SpotsService; + let spotModel; + beforeEach(async () => { + mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); + spotModel = mongoose.model(Spot.name, SpotSchema); + const module: TestingModule = await Test.createTestingModule({ + providers: [ + SpotsService, + { + provide: getModelToken(Spot.name), + useValue: spotModel, + }, + ], + }).compile(); + + service = module.get(SpotsService); + }); + + it('spot 삽입 테스트', async () => { + console.log(await spotModel.find().exec()); + const prevData = (await spotModel.find().exec()).length; + const data = { + journalId: '65560b729f8c1cbb025ab722', + coordinate: [10, 10], + timestamp: '1시5분', + }; + await service.create(data); + console.log(prevData); + const nextData = (await spotModel.find().exec()).length; + expect(prevData + 1).toEqual(nextData); + }); + + afterAll(() => { + mongoose.connection.close(); + }); +}); From c156b0255954023aef091d6a10f26b248b4992f0 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Mon, 20 Nov 2023 22:44:50 +0900 Subject: [PATCH 17/26] :art: Rename modules journals->journey person->user --- BE/musicspot/src/app.module.ts | 11 ++-- BE/musicspot/src/journals/journals.module.ts | 19 ------ .../src/journals/journals.service.spec.ts | 61 ------------------- BE/musicspot/src/journals/journals.service.ts | 32 ---------- .../dto/journeyStart.dto.ts} | 2 +- .../journey.controller.spec.ts} | 10 +-- .../journey.controller.ts} | 20 +++--- BE/musicspot/src/journey/journey.module.ts | 19 ++++++ .../journey.schema.ts} | 8 +-- .../src/journey/journey.service.spec.ts | 61 +++++++++++++++++++ BE/musicspot/src/journey/journey.service.ts | 29 +++++++++ BE/musicspot/src/main.ts | 2 +- BE/musicspot/src/person/person.controller.ts | 4 -- BE/musicspot/src/person/person.module.ts | 14 ----- BE/musicspot/src/person/person.schema.ts | 18 ------ .../src/person/person.service.spec.ts | 40 ------------ BE/musicspot/src/person/person.service.ts | 17 ------ .../user.controller.spec.ts} | 10 +-- BE/musicspot/src/user/user.controller.ts | 4 ++ BE/musicspot/src/user/user.module.ts | 14 +++++ BE/musicspot/src/user/user.schema.ts | 18 ++++++ BE/musicspot/src/user/user.service.spec.ts | 40 ++++++++++++ BE/musicspot/src/user/user.service.ts | 17 ++++++ 23 files changed, 233 insertions(+), 237 deletions(-) delete mode 100644 BE/musicspot/src/journals/journals.module.ts delete mode 100644 BE/musicspot/src/journals/journals.service.spec.ts delete mode 100644 BE/musicspot/src/journals/journals.service.ts rename BE/musicspot/src/{journals/dto/journalStart.dto.ts => journey/dto/journeyStart.dto.ts} (93%) rename BE/musicspot/src/{journals/journals.controller.spec.ts => journey/journey.controller.spec.ts} (51%) rename BE/musicspot/src/{journals/journals.controller.ts => journey/journey.controller.ts} (50%) create mode 100644 BE/musicspot/src/journey/journey.module.ts rename BE/musicspot/src/{journals/journals.schema.ts => journey/journey.schema.ts} (55%) create mode 100644 BE/musicspot/src/journey/journey.service.spec.ts create mode 100644 BE/musicspot/src/journey/journey.service.ts delete mode 100644 BE/musicspot/src/person/person.controller.ts delete mode 100644 BE/musicspot/src/person/person.module.ts delete mode 100644 BE/musicspot/src/person/person.schema.ts delete mode 100644 BE/musicspot/src/person/person.service.spec.ts delete mode 100644 BE/musicspot/src/person/person.service.ts rename BE/musicspot/src/{person/person.controller.spec.ts => user/user.controller.spec.ts} (52%) create mode 100644 BE/musicspot/src/user/user.controller.ts create mode 100644 BE/musicspot/src/user/user.module.ts create mode 100644 BE/musicspot/src/user/user.schema.ts create mode 100644 BE/musicspot/src/user/user.service.spec.ts create mode 100644 BE/musicspot/src/user/user.service.ts diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index b6b0153..cd3b162 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -2,15 +2,14 @@ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { MongooseModule } from '@nestjs/mongoose'; -import { JournalsModule } from './journals/journals.module'; -import { JournalsController } from './journals/journals.controller'; -import { JournalsService } from './journals/journals.service'; -import { PersonModule } from './person/person.module'; +import { JourneyModule } from './journey/journey.module'; + +import { UserModule } from './user/user.module'; @Module({ imports: [ MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), - JournalsModule, - PersonModule, + JourneyModule, + UserModule, ], controllers: [AppController], providers: [AppService], diff --git a/BE/musicspot/src/journals/journals.module.ts b/BE/musicspot/src/journals/journals.module.ts deleted file mode 100644 index 2a5459a..0000000 --- a/BE/musicspot/src/journals/journals.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Module } from '@nestjs/common'; -import { JournalsController } from './journals.controller'; -import { JournalsService } from './journals.service'; -import { MongooseModule } from '@nestjs/mongoose'; -import { JournalSchema, Journal } from './journals.schema'; -import { PersonService } from '../person/person.service'; -import { Person, PersonSchema } from 'src/person/person.schema'; -import { PersonModule } from '../person/person.module'; - -@Module({ - imports: [ - MongooseModule.forFeature([{ name: Journal.name, schema: JournalSchema }]), - MongooseModule.forFeature([{ name: Person.name, schema: PersonSchema }]), - PersonModule, - ], - controllers: [JournalsController], - providers: [JournalsService, PersonService], -}) -export class JournalsModule {} diff --git a/BE/musicspot/src/journals/journals.service.spec.ts b/BE/musicspot/src/journals/journals.service.spec.ts deleted file mode 100644 index ca104b8..0000000 --- a/BE/musicspot/src/journals/journals.service.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { JournalsService } from './journals.service'; -import mongoose, { mongo } from 'mongoose'; -import { Person, PersonSchema } from '../person/person.schema'; -import { Journal, JournalSchema } from './journals.schema'; -import { getModelToken } from '@nestjs/mongoose'; -import { StartJournalDTO } from './dto/journalStart.dto'; -import { PersonService } from '../person/person.service'; - -describe('JournalsService', () => { - let service: JournalsService; - let personModel; - let journalModel; - beforeEach(async () => { - mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); - personModel = mongoose.model(Person.name, PersonSchema); - journalModel = mongoose.model(Journal.name, JournalSchema); - - const module: TestingModule = await Test.createTestingModule({ - providers: [ - JournalsService, - PersonService, - { - provide: getModelToken(Journal.name), - useValue: journalModel, - }, - { - provide: getModelToken(Person.name), - useValue: personModel, - }, - ], - }).compile(); - - service = module.get(JournalsService); - }); - - it('journal 시작 테스트', async () => { - const insertData: StartJournalDTO = { - title: 'test2', - coordinate: [100, 100], - timestamp: 'time test code', - email: 'test', - }; - const dataLength = (await journalModel.find().exec()).length; - const journalLength = (await personModel.find({ email: 'test' }).exec())[0] - .journals.length; - - await service.create(insertData); - const nextDataLength = (await journalModel.find().exec()).length; - const nextJournalLength = ( - await personModel.find({ email: 'test' }).exec() - )[0].journals.length; - - expect(dataLength + 1).toEqual(nextDataLength); - expect(journalLength + 1).toEqual(nextJournalLength); - }); - - afterAll(async () => { - mongoose.connection.close(); - }); -}); diff --git a/BE/musicspot/src/journals/journals.service.ts b/BE/musicspot/src/journals/journals.service.ts deleted file mode 100644 index 8b20da5..0000000 --- a/BE/musicspot/src/journals/journals.service.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Model } from 'mongoose'; -import { InjectModel } from '@nestjs/mongoose'; -import { Injectable } from '@nestjs/common'; -import { StartJournalDTO } from './dto/journalStart.dto'; -import { Journal } from './journals.schema'; -import { PersonService } from '../person/person.service'; -import { Person } from 'src/person/person.schema'; - -@Injectable() -export class JournalsService { - constructor( - @InjectModel(Journal.name) private journalModel: Model, - @InjectModel(Person.name) private personModel: Model, - private personService: PersonService, - ) {} - - async create(startJournalDTO: StartJournalDTO): Promise { - const journalData = { - ...startJournalDTO, - spots: [], - coordinates: [startJournalDTO.coordinate], - }; - const createdJournal = new this.journalModel(journalData); - const returnData = await createdJournal.save(); - const journalId = returnData._id; - this.personService.appendJournalIdToPerson( - startJournalDTO.email, - journalId, - ); - return returnData; - } -} diff --git a/BE/musicspot/src/journals/dto/journalStart.dto.ts b/BE/musicspot/src/journey/dto/journeyStart.dto.ts similarity index 93% rename from BE/musicspot/src/journals/dto/journalStart.dto.ts rename to BE/musicspot/src/journey/dto/journeyStart.dto.ts index b14bd21..7443c3d 100644 --- a/BE/musicspot/src/journals/dto/journalStart.dto.ts +++ b/BE/musicspot/src/journey/dto/journeyStart.dto.ts @@ -6,7 +6,7 @@ import { IsString, } from 'class-validator'; -export class StartJournalDTO { +export class StartJourneyDTO { @IsString() readonly title: string; diff --git a/BE/musicspot/src/journals/journals.controller.spec.ts b/BE/musicspot/src/journey/journey.controller.spec.ts similarity index 51% rename from BE/musicspot/src/journals/journals.controller.spec.ts rename to BE/musicspot/src/journey/journey.controller.spec.ts index d7c02ac..f4a3838 100644 --- a/BE/musicspot/src/journals/journals.controller.spec.ts +++ b/BE/musicspot/src/journey/journey.controller.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { JournalsController } from './journals.controller'; +import { JourneyController } from './journey.controller'; -describe('JournalsController', () => { - let controller: JournalsController; +describe('JourneyController', () => { + let controller: JourneyController; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - controllers: [JournalsController], + controllers: [JourneyController], }).compile(); - controller = module.get(JournalsController); + controller = module.get(JourneyController); }); it('should be defined', () => { diff --git a/BE/musicspot/src/journals/journals.controller.ts b/BE/musicspot/src/journey/journey.controller.ts similarity index 50% rename from BE/musicspot/src/journals/journals.controller.ts rename to BE/musicspot/src/journey/journey.controller.ts index 1c7ace1..ec7f399 100644 --- a/BE/musicspot/src/journals/journals.controller.ts +++ b/BE/musicspot/src/journey/journey.controller.ts @@ -1,12 +1,12 @@ import { Controller, Post, Body } from '@nestjs/common'; -import { JournalsService } from './journals.service'; -import { StartJournalDTO } from './dto/journalStart.dto'; +import { JourneyService } from './journey.service'; +import { StartJourneyDTO } from './dto/journeyStart.dto'; import { ApiCreatedResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; -import { Journal } from './journals.schema'; -@Controller('journals') -@ApiTags('journal 관련 API') -export class JournalsController { - constructor(private journalsService: JournalsService) {} +import { Journey } from './journey.schema'; +@Controller('journey') +@ApiTags('journey 관련 API') +export class JourneyController { + constructor(private journeyService: JourneyService) {} @ApiOperation({ summary: '여정 시작을 눌렀을 시 실행되는 API', @@ -15,10 +15,10 @@ export class JournalsController { }) @ApiCreatedResponse({ description: '생성된 여정 데이터를 반환', - type: Journal, + type: Journey, }) @Post() - async create(@Body() startJournalDTO: StartJournalDTO) { - return await this.journalsService.create(startJournalDTO); + async create(@Body() startJourneyDTO: StartJourneyDTO) { + return await this.journeyService.create(startJourneyDTO); } } diff --git a/BE/musicspot/src/journey/journey.module.ts b/BE/musicspot/src/journey/journey.module.ts new file mode 100644 index 0000000..860ed97 --- /dev/null +++ b/BE/musicspot/src/journey/journey.module.ts @@ -0,0 +1,19 @@ +import { Module } from '@nestjs/common'; +import { JourneyController } from './journey.controller'; +import { JourneyService } from './journey.service'; +import { MongooseModule } from '@nestjs/mongoose'; +import { JourneySchema, Journey } from './journey.schema'; +import { UserService } from '../user/user.service'; +import { User, UserSchema } from 'src/user/user.schema'; +import { UserModule } from '../user/user.module'; + +@Module({ + imports: [ + MongooseModule.forFeature([{ name: Journey.name, schema: JourneySchema }]), + MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]), + UserModule, + ], + controllers: [JourneyController], + providers: [JourneyService, UserService], +}) +export class JourneyModule {} diff --git a/BE/musicspot/src/journals/journals.schema.ts b/BE/musicspot/src/journey/journey.schema.ts similarity index 55% rename from BE/musicspot/src/journals/journals.schema.ts rename to BE/musicspot/src/journey/journey.schema.ts index 2ed82c8..18dc4ad 100644 --- a/BE/musicspot/src/journals/journals.schema.ts +++ b/BE/musicspot/src/journey/journey.schema.ts @@ -1,10 +1,10 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { HydratedDocument } from 'mongoose'; -export type JournalDocument = HydratedDocument; +export type JourneyDocument = HydratedDocument; -@Schema({ collection: 'journals' }) -export class Journal { +@Schema({ collection: 'journey' }) +export class Journey { @Prop() title: string; @@ -15,4 +15,4 @@ export class Journal { coordinates: number[][]; } -export const JournalSchema = SchemaFactory.createForClass(Journal); +export const JourneySchema = SchemaFactory.createForClass(Journey); diff --git a/BE/musicspot/src/journey/journey.service.spec.ts b/BE/musicspot/src/journey/journey.service.spec.ts new file mode 100644 index 0000000..e977809 --- /dev/null +++ b/BE/musicspot/src/journey/journey.service.spec.ts @@ -0,0 +1,61 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { JourneyService } from './journey.service'; +import mongoose from 'mongoose'; +import { User, UserSchema } from '../user/user.schema'; +import { Journey, JourneySchema } from './journey.schema'; +import { getModelToken } from '@nestjs/mongoose'; +import { StartJourneyDTO } from './dto/journeyStart.dto'; +import { UserService } from '../user/user.service'; + +describe('JourneysService', () => { + let service: JourneyService; + let userModel; + let journeyModel; + beforeEach(async () => { + mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); + userModel = mongoose.model(User.name, UserSchema); + journeyModel = mongoose.model(Journey.name, JourneySchema); + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + JourneyService, + UserService, + { + provide: getModelToken(Journey.name), + useValue: journeyModel, + }, + { + provide: getModelToken(User.name), + useValue: userModel, + }, + ], + }).compile(); + + service = module.get(JourneyService); + }); + + it('journey 시작 테스트', async () => { + const insertData: StartJourneyDTO = { + title: 'test2', + coordinate: [100, 100], + timestamp: 'time test code', + email: 'test', + }; + const dataLength = (await journeyModel.find().exec()).length; + const journeyLength = (await userModel.find({ email: 'test' }).exec())[0] + .journeys.length; + + await service.create(insertData); + const nextDataLength = (await journeyModel.find().exec()).length; + const nextJourneyLength = ( + await userModel.find({ email: 'test' }).exec() + )[0].journeys.length; + + expect(dataLength + 1).toEqual(nextDataLength); + expect(journeyLength + 1).toEqual(nextJourneyLength); + }); + + afterAll(async () => { + mongoose.connection.close(); + }); +}); diff --git a/BE/musicspot/src/journey/journey.service.ts b/BE/musicspot/src/journey/journey.service.ts new file mode 100644 index 0000000..10bd4e2 --- /dev/null +++ b/BE/musicspot/src/journey/journey.service.ts @@ -0,0 +1,29 @@ +import { Model } from 'mongoose'; +import { InjectModel } from '@nestjs/mongoose'; +import { Injectable } from '@nestjs/common'; +import { StartJourneyDTO } from './dto/journeyStart.dto'; +import { Journey } from './journey.schema'; +import { UserService } from '../user/user.service'; +import { User } from 'src/user/user.schema'; + +@Injectable() +export class JourneyService { + constructor( + @InjectModel(Journey.name) private journeyModel: Model, + @InjectModel(User.name) private personModel: Model, + private userService: UserService, + ) {} + + async create(startJourneyDTO: StartJourneyDTO): Promise { + const journeyData = { + ...startJourneyDTO, + spots: [], + coordinates: [startJourneyDTO.coordinate], + }; + const createdJourney = new this.journeyModel(journeyData); + const returnData = await createdJourney.save(); + const journeyId = returnData._id; + this.userService.appendJourneyIdToUser(startJourneyDTO.email, journeyId); + return returnData; + } +} diff --git a/BE/musicspot/src/main.ts b/BE/musicspot/src/main.ts index 7e08a6d..801071b 100644 --- a/BE/musicspot/src/main.ts +++ b/BE/musicspot/src/main.ts @@ -6,7 +6,7 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() .setTitle('Cats example') // 문서의 제목 - .setDescription('The cats API description') // 문서의 간단한 설명 + .setDescription('iOS01 Music Spot App API') // 문서의 간단한 설명 .setVersion('1.0') // API의 버전(업데이트 버전) .addTag('Music Spot') .build(); diff --git a/BE/musicspot/src/person/person.controller.ts b/BE/musicspot/src/person/person.controller.ts deleted file mode 100644 index d69737f..0000000 --- a/BE/musicspot/src/person/person.controller.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Controller } from '@nestjs/common'; - -@Controller('person') -export class PersonController {} diff --git a/BE/musicspot/src/person/person.module.ts b/BE/musicspot/src/person/person.module.ts deleted file mode 100644 index 04422a9..0000000 --- a/BE/musicspot/src/person/person.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Module } from '@nestjs/common'; -import { PersonController } from './person.controller'; -import { PersonService } from './person.service'; -import { Person, PersonSchema } from './person.schema'; -import { MongooseModule } from '@nestjs/mongoose'; -@Module({ - imports: [ - MongooseModule.forFeature([{ name: Person.name, schema: PersonSchema }]), - ], - controllers: [PersonController], - providers: [PersonService], - exports: [PersonModule], -}) -export class PersonModule {} diff --git a/BE/musicspot/src/person/person.schema.ts b/BE/musicspot/src/person/person.schema.ts deleted file mode 100644 index 980834d..0000000 --- a/BE/musicspot/src/person/person.schema.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; -import { Collection, HydratedDocument } from 'mongoose'; - -export type PersonDocument = HydratedDocument; - -@Schema({ collection: 'person' }) -export class Person { - @Prop() - email: string; - - @Prop() - nickname: string; - - @Prop() - journals: string[]; -} - -export const PersonSchema = SchemaFactory.createForClass(Person); diff --git a/BE/musicspot/src/person/person.service.spec.ts b/BE/musicspot/src/person/person.service.spec.ts deleted file mode 100644 index 59ea10b..0000000 --- a/BE/musicspot/src/person/person.service.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { PersonService } from './person.service'; -import { getModelToken } from '@nestjs/mongoose'; -import { Person, PersonSchema } from './person.schema'; -import mongoose from 'mongoose'; - -describe('PersonService', () => { - let service: PersonService; - let personModel; - beforeEach(async () => { - mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); - personModel = mongoose.model(Person.name, PersonSchema); - const module: TestingModule = await Test.createTestingModule({ - providers: [ - PersonService, - { - provide: getModelToken(Person.name), - useValue: personModel, - }, - ], - }).compile(); - - service = module.get(PersonService); - }); - - it('journal id 삽입 테스트', async () => { - const data = new Object(await personModel.find({ email: 'test' }))[0]; - - const pervLength = data.journals.length; - await service.appendJournalIdToPerson('test', '2'); - - const nextData = new Object(await personModel.find({ email: 'test' }))[0]; - const nextLength = nextData.journals.length; - expect(nextLength).toEqual(pervLength + 1); - }); - - afterAll(async () => { - mongoose.connection.close(); - }); -}); diff --git a/BE/musicspot/src/person/person.service.ts b/BE/musicspot/src/person/person.service.ts deleted file mode 100644 index db29236..0000000 --- a/BE/musicspot/src/person/person.service.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable } from '@nestjs/common'; -import { Model } from 'mongoose'; -import { InjectModel } from '@nestjs/mongoose'; -import { Person } from './person.schema'; -@Injectable() -export class PersonService { - constructor(@InjectModel(Person.name) private personModel: Model) {} - async appendJournalIdToPerson( - personEmail: string, - journalId: Object, - ): Promise { - return this.personModel.updateOne( - { email: personEmail }, - { $push: { journals: journalId } }, - ); - } -} diff --git a/BE/musicspot/src/person/person.controller.spec.ts b/BE/musicspot/src/user/user.controller.spec.ts similarity index 52% rename from BE/musicspot/src/person/person.controller.spec.ts rename to BE/musicspot/src/user/user.controller.spec.ts index 88a0586..7057a1a 100644 --- a/BE/musicspot/src/person/person.controller.spec.ts +++ b/BE/musicspot/src/user/user.controller.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { PersonController } from './person.controller'; +import { UserController } from './user.controller'; -describe('PersonController', () => { - let controller: PersonController; +describe('UserController', () => { + let controller: UserController; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - controllers: [PersonController], + controllers: [UserController], }).compile(); - controller = module.get(PersonController); + controller = module.get(UserController); }); it('should be defined', () => { diff --git a/BE/musicspot/src/user/user.controller.ts b/BE/musicspot/src/user/user.controller.ts new file mode 100644 index 0000000..ad8c2a6 --- /dev/null +++ b/BE/musicspot/src/user/user.controller.ts @@ -0,0 +1,4 @@ +import { Controller } from '@nestjs/common'; + +@Controller('user') +export class UserController {} diff --git a/BE/musicspot/src/user/user.module.ts b/BE/musicspot/src/user/user.module.ts new file mode 100644 index 0000000..f45685a --- /dev/null +++ b/BE/musicspot/src/user/user.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { UserController } from './user.controller'; +import { UserService } from './user.service'; +import { User, UserSchema } from './user.schema'; +import { MongooseModule } from '@nestjs/mongoose'; +@Module({ + imports: [ + MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]), + ], + controllers: [UserController], + providers: [UserService], + exports: [UserModule], +}) +export class UserModule {} diff --git a/BE/musicspot/src/user/user.schema.ts b/BE/musicspot/src/user/user.schema.ts new file mode 100644 index 0000000..f1f450a --- /dev/null +++ b/BE/musicspot/src/user/user.schema.ts @@ -0,0 +1,18 @@ +import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; +import { HydratedDocument } from 'mongoose'; + +export type UserDocument = HydratedDocument; + +@Schema({ collection: 'user' }) +export class User { + @Prop() + email: string; + + @Prop() + nickname: string; + + @Prop() + journeys: string[]; +} + +export const UserSchema = SchemaFactory.createForClass(User); diff --git a/BE/musicspot/src/user/user.service.spec.ts b/BE/musicspot/src/user/user.service.spec.ts new file mode 100644 index 0000000..5806e97 --- /dev/null +++ b/BE/musicspot/src/user/user.service.spec.ts @@ -0,0 +1,40 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { UserService } from './user.service'; +import { getModelToken } from '@nestjs/mongoose'; +import { User, UserSchema } from './user.schema'; +import mongoose from 'mongoose'; + +describe('UserService', () => { + let service: UserService; + let userModel; + beforeEach(async () => { + mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); + userModel = mongoose.model(User.name, UserSchema); + const module: TestingModule = await Test.createTestingModule({ + providers: [ + UserService, + { + provide: getModelToken(User.name), + useValue: userModel, + }, + ], + }).compile(); + + service = module.get(UserService); + }); + + it('journey id 삽입 테스트', async () => { + const data = new Object(await userModel.find({ email: 'test' }))[0]; + + const pervLength = data.journeys.length; + await service.appendJourneyIdToUser('test', '2'); + + const nextData = new Object(await userModel.find({ email: 'test' }))[0]; + const nextLength = nextData.journeys.length; + expect(nextLength).toEqual(pervLength + 1); + }); + + afterAll(async () => { + mongoose.connection.close(); + }); +}); diff --git a/BE/musicspot/src/user/user.service.ts b/BE/musicspot/src/user/user.service.ts new file mode 100644 index 0000000..9bae340 --- /dev/null +++ b/BE/musicspot/src/user/user.service.ts @@ -0,0 +1,17 @@ +import { Injectable } from '@nestjs/common'; +import { Model } from 'mongoose'; +import { InjectModel } from '@nestjs/mongoose'; +import { User } from './user.schema'; +@Injectable() +export class UserService { + constructor(@InjectModel(User.name) private userModel: Model) {} + async appendJourneyIdToUser( + userEmail: string, + journeyId: object, + ): Promise { + return this.userModel.updateOne( + { email: userEmail }, + { $push: { journeys: journeyId } }, + ); + } +} From a966f2ca9e1993e2fc20e82c16f1a5692539c055 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Mon, 20 Nov 2023 23:58:47 +0900 Subject: [PATCH 18/26] :art: Rename spot module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spots->spot 으로 모듈이름 변경 --- BE/musicspot/src/app.module.ts | 4 ++-- .../src/{spots => spot}/dto/recordSpot.dto.ts | 2 +- .../spot.controller.spec.ts} | 10 +++++----- .../spot.controller.ts} | 8 ++++---- BE/musicspot/src/spot/spot.module.ts | 17 +++++++++++++++++ .../spots.schema.ts => spot/spot.schema.ts} | 2 +- .../spot.service.spec.ts} | 12 ++++++------ BE/musicspot/src/spots/spots.module.ts | 13 ------------- BE/musicspot/src/spots/spots.service.ts | 15 --------------- 9 files changed, 36 insertions(+), 47 deletions(-) rename BE/musicspot/src/{spots => spot}/dto/recordSpot.dto.ts (92%) rename BE/musicspot/src/{spots/spots.controller.spec.ts => spot/spot.controller.spec.ts} (53%) rename BE/musicspot/src/{spots/spots.controller.ts => spot/spot.controller.ts} (67%) create mode 100644 BE/musicspot/src/spot/spot.module.ts rename BE/musicspot/src/{spots/spots.schema.ts => spot/spot.schema.ts} (91%) rename BE/musicspot/src/{spots/spots.service.spec.ts => spot/spot.service.spec.ts} (81%) delete mode 100644 BE/musicspot/src/spots/spots.module.ts delete mode 100644 BE/musicspot/src/spots/spots.service.ts diff --git a/BE/musicspot/src/app.module.ts b/BE/musicspot/src/app.module.ts index e9c63fd..878488a 100644 --- a/BE/musicspot/src/app.module.ts +++ b/BE/musicspot/src/app.module.ts @@ -4,13 +4,13 @@ import { AppService } from './app.service'; import { MongooseModule } from '@nestjs/mongoose'; import { JourneyModule } from './journey/journey.module'; import { UserModule } from './user/user.module'; -import { SpotsModule } from './spots/spots.module'; +import { SpotModule } from './spot/spot.module'; @Module({ imports: [ MongooseModule.forRoot('mongodb://192.168.174.128:27017/musicspotDB'), JourneyModule, UserModule, - SpotsModule, + SpotModule, ], controllers: [AppController], providers: [AppService], diff --git a/BE/musicspot/src/spots/dto/recordSpot.dto.ts b/BE/musicspot/src/spot/dto/recordSpot.dto.ts similarity index 92% rename from BE/musicspot/src/spots/dto/recordSpot.dto.ts rename to BE/musicspot/src/spot/dto/recordSpot.dto.ts index f327aad..6a5ee8e 100644 --- a/BE/musicspot/src/spots/dto/recordSpot.dto.ts +++ b/BE/musicspot/src/spot/dto/recordSpot.dto.ts @@ -8,7 +8,7 @@ import { export class RecordSpotDTO { @IsString() - readonly journalId: string; + readonly journeyId: string; @IsArray() @ArrayMaxSize(2, { message: 'coordinate has only 2' }) @ArrayMinSize(2, { message: 'coordinate has only 2' }) diff --git a/BE/musicspot/src/spots/spots.controller.spec.ts b/BE/musicspot/src/spot/spot.controller.spec.ts similarity index 53% rename from BE/musicspot/src/spots/spots.controller.spec.ts rename to BE/musicspot/src/spot/spot.controller.spec.ts index 7536095..088e5a0 100644 --- a/BE/musicspot/src/spots/spots.controller.spec.ts +++ b/BE/musicspot/src/spot/spot.controller.spec.ts @@ -1,15 +1,15 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { SpotsController } from './spots.controller'; +import { SpotController } from './spot.controller'; -describe('SpotsController', () => { - let controller: SpotsController; +describe('SpotController', () => { + let controller: SpotController; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - controllers: [SpotsController], + controllers: [SpotController], }).compile(); - controller = module.get(SpotsController); + controller = module.get(SpotController); }); it('should be defined', () => { diff --git a/BE/musicspot/src/spots/spots.controller.ts b/BE/musicspot/src/spot/spot.controller.ts similarity index 67% rename from BE/musicspot/src/spots/spots.controller.ts rename to BE/musicspot/src/spot/spot.controller.ts index 2350984..1aca629 100644 --- a/BE/musicspot/src/spots/spots.controller.ts +++ b/BE/musicspot/src/spot/spot.controller.ts @@ -1,12 +1,12 @@ import { Controller, Post, Body } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { RecordSpotDTO } from './dto/recordSpot.dto'; -import { SpotsService } from './spots.service'; +import { SpotService } from './spot.service'; -@Controller('spots') +@Controller('spot') @ApiTags('spot 관련 API') -export class SpotsController { - constructor(private spotService: SpotsService) {} +export class SpotController { + constructor(private spotService: SpotService) {} @Post() async create(@Body() recordSpotDTO: RecordSpotDTO) { return await this.spotService.create(recordSpotDTO); diff --git a/BE/musicspot/src/spot/spot.module.ts b/BE/musicspot/src/spot/spot.module.ts new file mode 100644 index 0000000..28e69e4 --- /dev/null +++ b/BE/musicspot/src/spot/spot.module.ts @@ -0,0 +1,17 @@ +import { Module } from '@nestjs/common'; +import { SpotController } from './spot.controller'; +import { SpotService } from './spot.service'; +import { MongooseModule } from '@nestjs/mongoose'; +import { Spot, SpotSchema } from './spot.schema'; +import { Journey, JourneySchema } from 'src/journey/journey.schema'; +@Module({ + imports: [ + MongooseModule.forFeature([ + { name: Spot.name, schema: SpotSchema }, + { name: Journey.name, schema: JourneySchema }, + ]), + ], + controllers: [SpotController], + providers: [SpotService], +}) +export class SpotModule {} diff --git a/BE/musicspot/src/spots/spots.schema.ts b/BE/musicspot/src/spot/spot.schema.ts similarity index 91% rename from BE/musicspot/src/spots/spots.schema.ts rename to BE/musicspot/src/spot/spot.schema.ts index 97e9e5f..5c2a57d 100644 --- a/BE/musicspot/src/spots/spots.schema.ts +++ b/BE/musicspot/src/spot/spot.schema.ts @@ -3,7 +3,7 @@ import { HydratedDocument } from 'mongoose'; export type SpotDocument = HydratedDocument; -@Schema({ collection: 'spots' }) +@Schema({ collection: 'spot' }) export class Spot { @Prop() journalId: string; diff --git a/BE/musicspot/src/spots/spots.service.spec.ts b/BE/musicspot/src/spot/spot.service.spec.ts similarity index 81% rename from BE/musicspot/src/spots/spots.service.spec.ts rename to BE/musicspot/src/spot/spot.service.spec.ts index be4caa6..509b456 100644 --- a/BE/musicspot/src/spots/spots.service.spec.ts +++ b/BE/musicspot/src/spot/spot.service.spec.ts @@ -1,18 +1,18 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { SpotsService } from './spots.service'; +import { SpotService } from './spot.service'; import mongoose from 'mongoose'; -import { Spot, SpotSchema } from './spots.schema'; +import { Spot, SpotSchema } from './spot.schema'; import { getModelToken } from '@nestjs/mongoose'; -describe('SpotsService', () => { - let service: SpotsService; +describe('SpotService', () => { + let service: SpotService; let spotModel; beforeEach(async () => { mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); spotModel = mongoose.model(Spot.name, SpotSchema); const module: TestingModule = await Test.createTestingModule({ providers: [ - SpotsService, + SpotService, { provide: getModelToken(Spot.name), useValue: spotModel, @@ -20,7 +20,7 @@ describe('SpotsService', () => { ], }).compile(); - service = module.get(SpotsService); + service = module.get(SpotService); }); it('spot 삽입 테스트', async () => { diff --git a/BE/musicspot/src/spots/spots.module.ts b/BE/musicspot/src/spots/spots.module.ts deleted file mode 100644 index 416a58d..0000000 --- a/BE/musicspot/src/spots/spots.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common'; -import { SpotsController } from './spots.controller'; -import { SpotsService } from './spots.service'; -import { MongooseModule } from '@nestjs/mongoose'; -import { Spot, SpotSchema } from './spots.schema'; -@Module({ - imports: [ - MongooseModule.forFeature([{ name: Spot.name, schema: SpotSchema }]), - ], - controllers: [SpotsController], - providers: [SpotsService], -}) -export class SpotsModule {} diff --git a/BE/musicspot/src/spots/spots.service.ts b/BE/musicspot/src/spots/spots.service.ts deleted file mode 100644 index 063987e..0000000 --- a/BE/musicspot/src/spots/spots.service.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Model } from 'mongoose'; -import { Injectable } from '@nestjs/common'; - -import { InjectModel } from '@nestjs/mongoose'; -import { Spot } from './spots.schema'; -import { RecordSpotDTO } from './dto/recordSpot.dto'; - -@Injectable() -export class SpotsService { - constructor(@InjectModel(Spot.name) private spotModel: Model) {} - - async create(recordSpotDTO: RecordSpotDTO): Promise { - return new this.spotModel(recordSpotDTO).save(); - } -} From f5b3f8277036e20cc990b3c6410b2bd0aca9f3c3 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Tue, 21 Nov 2023 00:00:22 +0900 Subject: [PATCH 19/26] =?UTF-8?q?:sparkles:=20Spot=20=EC=83=9D=EC=84=B1=20?= =?UTF-8?q?=EB=B0=8F=20spot=20id=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spot 생성하면 해당 journey에 spot id 추가 --- BE/musicspot/src/spot/spot.service.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 BE/musicspot/src/spot/spot.service.ts diff --git a/BE/musicspot/src/spot/spot.service.ts b/BE/musicspot/src/spot/spot.service.ts new file mode 100644 index 0000000..d80747d --- /dev/null +++ b/BE/musicspot/src/spot/spot.service.ts @@ -0,0 +1,25 @@ +import { Model } from 'mongoose'; +import { Injectable } from '@nestjs/common'; + +import { InjectModel } from '@nestjs/mongoose'; +import { Spot } from './spot.schema'; +import { RecordSpotDTO } from './dto/recordSpot.dto'; +import { Journey } from 'src/journey/journey.schema'; + +@Injectable() +export class SpotService { + constructor( + @InjectModel(Spot.name) private spotModel: Model, + @InjectModel(Journey.name) private journeyModel: Model, + ) {} + + async create(recordSpotDTO: RecordSpotDTO): Promise { + const createdSpotData = await new this.spotModel(recordSpotDTO).save(); + const spotId = createdSpotData._id; + await this.journeyModel.updateOne( + { _id: recordSpotDTO.journeyId }, + { $push: { spots: spotId } }, + ); + return createdSpotData; + } +} From 421e067bebd39d28f5cef9df9d396a8c4db0ae8d Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 03:55:02 +0900 Subject: [PATCH 20/26] =?UTF-8?q?:sparkles:=20Object=20storage=20dependenc?= =?UTF-8?q?y=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit object storaghe dependency 추가 --- BE/musicspot/package-lock.json | 133 +++++++++++++++++++++++++++++---- BE/musicspot/package.json | 2 + 2 files changed, 121 insertions(+), 14 deletions(-) diff --git a/BE/musicspot/package-lock.json b/BE/musicspot/package-lock.json index 0421604..5279142 100644 --- a/BE/musicspot/package-lock.json +++ b/BE/musicspot/package-lock.json @@ -14,6 +14,8 @@ "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "@types/multer": "^1.4.10", + "aws-sdk": "^2.348.0", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "gitmoji-cli": "^9.0.0", @@ -2035,7 +2037,6 @@ "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", - "dev": true, "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -2045,7 +2046,6 @@ "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, "dependencies": { "@types/node": "*" } @@ -2086,7 +2086,6 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dev": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -2098,7 +2097,6 @@ "version": "4.17.41", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", - "dev": true, "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -2123,8 +2121,7 @@ "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -2169,8 +2166,15 @@ "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" + }, + "node_modules/@types/multer": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.10.tgz", + "integrity": "sha512-6l9mYMhUe8wbnz/67YIjc7ZJyQNZoKq7fRXVf7nMdgWgalD0KyzJ2ywI7hoATUSXSbTu9q2HBiEwzy0tNN1v2w==", + "dependencies": { + "@types/express": "*" + } }, "node_modules/@types/node": { "version": "20.9.0", @@ -2183,14 +2187,12 @@ "node_modules/@types/qs": { "version": "6.9.10", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz", - "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==", - "dev": true + "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/semver": { "version": "7.5.5", @@ -2202,7 +2204,6 @@ "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", - "dev": true, "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -2212,7 +2213,6 @@ "version": "1.15.5", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", - "dev": true, "dependencies": { "@types/http-errors": "*", "@types/mime": "*", @@ -2869,6 +2869,58 @@ "when-exit": "^2.0.0" } }, + "node_modules/aws-sdk": { + "version": "2.348.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.348.0.tgz", + "integrity": "sha512-TfguapuOAwk7EG8zhYJPjkCaF4tyGjfgcXLkYbWbuS4O6E8pn0x2K5Yt1KXwLiWxG0fzKCLiiaNA5H7bKAP4YQ==", + "dependencies": { + "buffer": "4.9.1", + "events": "1.1.1", + "ieee754": "1.1.8", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.1.0", + "xml2js": "0.4.19" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/aws-sdk/node_modules/buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha512-DNK4ruAqtyHaN8Zne7PkBTO+dD1Lr0YfTduMqlIyjvQIoztBkUxrvL+hKeLW8NXFKHOq/2upkxuoS9znQ9bW9A==", + "deprecated": "This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/aws-sdk/node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/aws-sdk/node_modules/ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha512-/aoyv2Nt7mGLnCAWzE0C1WH9Xd8ZsqR0f4Pjwxputi1JNm01+InyAYQotF4N+ulEIjbEsJo22NOHr+U/XEZ1Pw==" + }, + "node_modules/aws-sdk/node_modules/uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -7407,6 +7459,14 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8770,6 +8830,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -9213,6 +9282,11 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" + }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", @@ -10466,6 +10540,20 @@ "punycode": "^2.1.0" } }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -10880,6 +10968,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "node_modules/xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/BE/musicspot/package.json b/BE/musicspot/package.json index 7027140..0f6e83f 100644 --- a/BE/musicspot/package.json +++ b/BE/musicspot/package.json @@ -25,6 +25,8 @@ "@nestjs/mongoose": "^10.0.2", "@nestjs/platform-express": "^10.0.0", "@nestjs/swagger": "^7.1.15", + "@types/multer": "^1.4.10", + "aws-sdk": "^2.348.0", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "gitmoji-cli": "^9.0.0", From 270312cad17c324c5bb95d73947173696a9b09cf Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 03:56:41 +0900 Subject: [PATCH 21/26] :recycle: Change schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 스키마 변경과 변경에 따른 DTO, 컨트롤러 수정 --- BE/musicspot/src/spot/dto/recordSpot.dto.ts | 2 ++ BE/musicspot/src/spot/spot.controller.ts | 10 ++++++++-- BE/musicspot/src/spot/spot.schema.ts | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/BE/musicspot/src/spot/dto/recordSpot.dto.ts b/BE/musicspot/src/spot/dto/recordSpot.dto.ts index 6a5ee8e..2f09882 100644 --- a/BE/musicspot/src/spot/dto/recordSpot.dto.ts +++ b/BE/musicspot/src/spot/dto/recordSpot.dto.ts @@ -17,4 +17,6 @@ export class RecordSpotDTO { @IsString() readonly timestamp: string; + + readonly photoData: Buffer; } diff --git a/BE/musicspot/src/spot/spot.controller.ts b/BE/musicspot/src/spot/spot.controller.ts index 1aca629..eec3f63 100644 --- a/BE/musicspot/src/spot/spot.controller.ts +++ b/BE/musicspot/src/spot/spot.controller.ts @@ -1,8 +1,14 @@ -import { Controller, Post, Body } from '@nestjs/common'; +import { + Controller, + Post, + Body, + UseInterceptors, + UploadedFile, +} from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { RecordSpotDTO } from './dto/recordSpot.dto'; import { SpotService } from './spot.service'; - +import { FileInterceptor } from '@nestjs/platform-express'; @Controller('spot') @ApiTags('spot 관련 API') export class SpotController { diff --git a/BE/musicspot/src/spot/spot.schema.ts b/BE/musicspot/src/spot/spot.schema.ts index 5c2a57d..a5ee952 100644 --- a/BE/musicspot/src/spot/spot.schema.ts +++ b/BE/musicspot/src/spot/spot.schema.ts @@ -6,13 +6,16 @@ export type SpotDocument = HydratedDocument; @Schema({ collection: 'spot' }) export class Spot { @Prop() - journalId: string; + journeyId: string; @Prop({ type: [Number] }) coordinate: number[]; @Prop({ type: String }) timestamp: string; + + @Prop({ type: String }) + photoUrl: string; } export const SpotSchema = SchemaFactory.createForClass(Spot); From 0ebf228b511f40d70e470088a055c461c4a0876b Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 03:57:27 +0900 Subject: [PATCH 22/26] =?UTF-8?q?:package:=20Create=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit create 메서드 내부 로직을 모듈화 --- BE/musicspot/src/spot/spot.service.ts | 36 ++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/BE/musicspot/src/spot/spot.service.ts b/BE/musicspot/src/spot/spot.service.ts index d80747d..6df3ce3 100644 --- a/BE/musicspot/src/spot/spot.service.ts +++ b/BE/musicspot/src/spot/spot.service.ts @@ -4,7 +4,13 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Spot } from './spot.schema'; import { RecordSpotDTO } from './dto/recordSpot.dto'; -import { Journey } from 'src/journey/journey.schema'; +import { Journey } from '../journey/journey.schema'; +import * as AWS from 'aws-sdk'; +import fs from 'fs'; +const endpoint = 'https://kr.object.ncloudstorage.com'; +const region = 'kr-standard'; +const access_key = '194C0D972294FBAFCE35'; +const secret_key = '1F6B29EFE66643E13693CE8D23AFD8897D8A1951'; @Injectable() export class SpotService { @@ -12,14 +18,36 @@ export class SpotService { @InjectModel(Spot.name) private spotModel: Model, @InjectModel(Journey.name) private journeyModel: Model, ) {} + async uploadPhotoToStorage(photoData: Buffer): Promise { + const S3 = new AWS.S3({ + endpoint, + region, + credentials: { + accessKeyId: access_key, + secretAccessKey: secret_key, + }, + }); + const key = `${Date.now()}`; + const result = await S3.putObject({ + Bucket: 'music-spot-storage', + Key: key, + Body: photoData, + }).promise(); + console.log(result); - async create(recordSpotDTO: RecordSpotDTO): Promise { - const createdSpotData = await new this.spotModel(recordSpotDTO).save(); + return `https://kr.object.ncloudstorage.com/music-spot-storage/${key}`; + } + async insertToSpot(spotData) { + const createdSpotData = await new this.spotModel(spotData).save(); const spotId = createdSpotData._id; await this.journeyModel.updateOne( - { _id: recordSpotDTO.journeyId }, + { _id: spotData.journeyId }, { $push: { spots: spotId } }, ); return createdSpotData; } + async create(recordSpotDto: RecordSpotDTO) { + const photoUrl = await this.uploadPhotoToStorage(recordSpotDto.photoData); + return await this.insertToSpot({ ...recordSpotDto, photoUrl }); + } } From ba6b1490f73f52944fac6ddb432aa9e7ddedc2ad Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 03:58:13 +0900 Subject: [PATCH 23/26] =?UTF-8?q?:test=5Ftube:=20SpotService=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spotService 테스트 코드 추가 --- BE/musicspot/src/spot/spot.service.spec.ts | 29 ++++++++++++++------- BE/musicspot/src/spot/test/test.png | Bin 0 -> 2607 bytes 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 BE/musicspot/src/spot/test/test.png diff --git a/BE/musicspot/src/spot/spot.service.spec.ts b/BE/musicspot/src/spot/spot.service.spec.ts index 509b456..3851cf1 100644 --- a/BE/musicspot/src/spot/spot.service.spec.ts +++ b/BE/musicspot/src/spot/spot.service.spec.ts @@ -1,15 +1,21 @@ +import * as fs from 'fs'; +import * as path from 'path'; import { Test, TestingModule } from '@nestjs/testing'; import { SpotService } from './spot.service'; import mongoose from 'mongoose'; import { Spot, SpotSchema } from './spot.schema'; import { getModelToken } from '@nestjs/mongoose'; +import { Journey, JourneySchema } from '../journey/journey.schema'; +import { ConfigBase } from 'aws-sdk/lib/config'; describe('SpotService', () => { let service: SpotService; let spotModel; - beforeEach(async () => { + let journeyModel; + beforeAll(async () => { mongoose.connect('mongodb://192.168.174.128:27017/musicspotDB'); spotModel = mongoose.model(Spot.name, SpotSchema); + journeyModel = mongoose.model(Journey.name, JourneySchema); const module: TestingModule = await Test.createTestingModule({ providers: [ SpotService, @@ -17,6 +23,7 @@ describe('SpotService', () => { provide: getModelToken(Spot.name), useValue: spotModel, }, + { provide: getModelToken(Journey.name), useValue: journeyModel }, ], }).compile(); @@ -24,17 +31,21 @@ describe('SpotService', () => { }); it('spot 삽입 테스트', async () => { - console.log(await spotModel.find().exec()); - const prevData = (await spotModel.find().exec()).length; + const imagePath = path.join(__dirname, 'test/test.png'); + + // 이미지 파일 동기적으로 읽기 + const imageBuffer = fs.readFileSync(imagePath); + + const journeyId = '655b6d6bfd9f60fc689789a6'; const data = { - journalId: '65560b729f8c1cbb025ab722', + journeyId, coordinate: [10, 10], - timestamp: '1시5분', + timestamp: '1시50분', + photo: imageBuffer, }; - await service.create(data); - console.log(prevData); - const nextData = (await spotModel.find().exec()).length; - expect(prevData + 1).toEqual(nextData); + const photoUrl = await service.uploadPhotoToStorage(data.photo); + const createdSpotData = await service.insertToSpot({ ...data, photoUrl }); + expect(createdSpotData.journeyId).toEqual(journeyId); }); afterAll(() => { diff --git a/BE/musicspot/src/spot/test/test.png b/BE/musicspot/src/spot/test/test.png new file mode 100644 index 0000000000000000000000000000000000000000..faf1b773314de4a0db36952bac9d15074b0b7f2d GIT binary patch literal 2607 zcmV+~3efe5P)=jY+! z;Z;>s_V)I(v$NXT+UDlw(b3Uyad5}S$6j7tlarE|n3y&;HDzUFjEsyyK|muTAwxq# zGcz$vOiH4np)D;d)=81h000ScNkl+hXD%5QZxeqcMr6YCUVWt$qJDTw-)h zID~#getXk0Hs{CW}M*NYIpUWEAdBE+v3p)(C;^VP7Q zYq*-v25o(CxFK|f@4i5{+i$(l2n#!U=P=Y;Re9qV}}bVbU=()qY_ zOc*n~$b#-J*7m#D?IXD)T!r=U{y~N-hfn2>F#aMzZM<9o`E=KijtB>r#6j~t6p{4c z$m}>F9PA0Pu`N}igq)pN9S4MiGa-)ga;4<#pdITI9vb4yM986Y!Z>M;@5&e~J0)Cw zIv;<$DEX}CJ8BVzPVJ{k5t(*G*bkcRpbw>_-vQxZ(|8Ach?0}FRkbA?2Cf1am;y3v zmvGWz1LmS6Y>{w$Y-@?U`D+Pt&5W<6>fXv#Q-4G6a1%$apJ>l3pGg=VQCpPqipZ=NA zhXB?_OE~ejk7m+m;B(X0~kveV=PU`8nI$KLj|GH_Q`HV zi4CE*b0(Q87NwMg15AJn@!gp4jEgXxm=YpuLe_|?yp)O%Srb+?qJj`z6S78B#BK`0 z3qnH0Hbw;@B42oy$|uSR5rs1kDFPcg;TM*Ov?xV%DkVfSsVGZ6#gGz){^u@a3Z(Ny zDIv}#WQ_3lPAc!FA|b+{`yt6h zSR_P|=T=FQ{}u_6y8B$o20#cne(kR$6AXcHj=7V{VpD-|gq%?D7XsnN$IU@-CBkZ= zK!|!6$_64&IK$mZSvTc3^znqKyn`DIKl7t)X!e5}X zpyKA-vY!!Se1VW`9xHx*9#NLug{85B~1E@?0OJPKd zNtkJReaPkY=WxOSTnXpX@U98>CFK?`&P?)I(uh(15n=vCZ9;=>l3XIAOb85VqTs5$ z8A6i(i~E>S{?x%gaj#$UK9hYfw-xyEXWu>|@5>}G$UJaCO_|Va-+E3sk!Bz7gv!6o z?aXIZo{xU-&*$?#mHgUmw3!tyM?S;B{eU@0jcJR4k6d8XZpupD}q3C*S!wFuwHuC$3s zege=rVT*0ZT9I6eD@7-nx%8fJFjJ00N@-TgbMy!vWS{N*I8@tGdd&1Et0cU+J&|nY z=G>OH=nt=MOZaIG<>T%gm0vrG5V0Fs%!|$pKFtRW2G1nH6Q~%nd=A)w`^o~x~w=p5qGS8jpMTxr`PZJFfBg{0>Fr8s)`0(mb$n?~50kWeF`j=v&GYYx!oJ-^zpw2- z*qexbf9XX_`22f>aSueuK5xSblxG6%)ki(O0G+qMeP%{H+9f&nWR%J9OF{xqPWb$1 z*AUMUf#(nL&Y+-YNby=z@Ht?-XSrp?Kc4A4egZ#_k2K@PXW1$U@l>p(@$-M0KJR72A}xzOdy@O>2GO3r>yewP7pRmMW`WKTX|4> zaqUY~KGCjzDWj6`!|knVm9@B1lLSAhl*BDkYOcU_S7o*B>YN6_E9uD>hj=(FFCezni9 zC-m>yyn>wE_vEw7&^QVxp}$pmh_ckYAz^RlXY>}xmYVDcd*41<8-SI86OKLHc1qQW z3kyQUd5cR<)1 zoLX!~N_Lveb_0aj=C`(7V_;=s>J#<`(^iaXR4kI&E+LCkRkaY@iIQ)#IMgj+ww<9_ z$3dz#A+$o6<%^pej%md{nf3^K?~{fYQxckn+078L3CBcP7SLLhkck66M}*9*9)Oja zfr<#(TYJE=91$`tkIurJgd8g_+BTFsLgqWBE*g?G-?W~8D9a@w({fP{lHo0ub^N<1 z$Arx4j2NWVSz?+H@-uQ`U5au}$n+j>h#@7-3n)6r>or4|X*D{rXHFqE4@D{a&C^AC zO{xPmMVRR$J}8=$Iun zPI%Y*Y_;C@ Date: Wed, 22 Nov 2023 22:37:27 +0900 Subject: [PATCH 24/26] =?UTF-8?q?:sparkles:=20swagger=20api=20=EC=84=A4?= =?UTF-8?q?=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/musicspot/src/spot/spot.controller.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/BE/musicspot/src/spot/spot.controller.ts b/BE/musicspot/src/spot/spot.controller.ts index eec3f63..d5487e3 100644 --- a/BE/musicspot/src/spot/spot.controller.ts +++ b/BE/musicspot/src/spot/spot.controller.ts @@ -5,14 +5,25 @@ import { UseInterceptors, UploadedFile, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiCreatedResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { RecordSpotDTO } from './dto/recordSpot.dto'; import { SpotService } from './spot.service'; import { FileInterceptor } from '@nestjs/platform-express'; +import { Spot } from './spot.schema'; @Controller('spot') @ApiTags('spot 관련 API') export class SpotController { constructor(private spotService: SpotService) {} + + @ApiOperation({ + summary: 'spot 기록 시 실행되는 API', + description: + 'request로 여정 ID(string), 위치좌표([number, number]), timestamp(string), 유저 이메일(string)을 필요합니다.', + }) + @ApiCreatedResponse({ + description: '생성된 spot 데이터를 반환', + type: Spot, + }) @Post() async create(@Body() recordSpotDTO: RecordSpotDTO) { return await this.spotService.create(recordSpotDTO); From c40dc7b43c2e8cd83033d37a204c61e0006917b2 Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 22:37:48 +0900 Subject: [PATCH 25/26] =?UTF-8?q?:recycle:=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=95=88=20?= =?UTF-8?q?=EA=B0=95=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/musicspot/src/spot/spot.service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BE/musicspot/src/spot/spot.service.ts b/BE/musicspot/src/spot/spot.service.ts index 6df3ce3..d74d766 100644 --- a/BE/musicspot/src/spot/spot.service.ts +++ b/BE/musicspot/src/spot/spot.service.ts @@ -6,12 +6,11 @@ import { Spot } from './spot.schema'; import { RecordSpotDTO } from './dto/recordSpot.dto'; import { Journey } from '../journey/journey.schema'; import * as AWS from 'aws-sdk'; -import fs from 'fs'; -const endpoint = 'https://kr.object.ncloudstorage.com'; -const region = 'kr-standard'; -const access_key = '194C0D972294FBAFCE35'; -const secret_key = '1F6B29EFE66643E13693CE8D23AFD8897D8A1951'; +const endpoint = process.env.NCLOUD_ENDPOINT; +const region = process.env.NCLOUD_REGION; +const access_key = process.env.NCLOUD_ACCESS_KEY; +const secret_key = process.env.NCLOUD_SECRET_KEY; @Injectable() export class SpotService { constructor( From a5a6b153303aa41a93bca9306117d1255021554d Mon Sep 17 00:00:00 2001 From: twoo1999 Date: Wed, 22 Nov 2023 22:55:29 +0900 Subject: [PATCH 26/26] =?UTF-8?q?:recycle:=20Storage=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=20=EC=8B=9C=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/musicspot/src/spot/spot.service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BE/musicspot/src/spot/spot.service.ts b/BE/musicspot/src/spot/spot.service.ts index d74d766..2b99558 100644 --- a/BE/musicspot/src/spot/spot.service.ts +++ b/BE/musicspot/src/spot/spot.service.ts @@ -9,8 +9,10 @@ import * as AWS from 'aws-sdk'; const endpoint = process.env.NCLOUD_ENDPOINT; const region = process.env.NCLOUD_REGION; -const access_key = process.env.NCLOUD_ACCESS_KEY; -const secret_key = process.env.NCLOUD_SECRET_KEY; +const accessKey = process.env.NCLOUD_ACCESS_KEY; +const secretKey = process.env.NCLOUD_SECRET_KEY; +const bucketName = process.env.BUCKET_NAME; + @Injectable() export class SpotService { constructor( @@ -22,19 +24,17 @@ export class SpotService { endpoint, region, credentials: { - accessKeyId: access_key, - secretAccessKey: secret_key, + accessKeyId: accessKey, + secretAccessKey: secretKey, }, }); const key = `${Date.now()}`; const result = await S3.putObject({ - Bucket: 'music-spot-storage', + Bucket: bucketName, Key: key, Body: photoData, }).promise(); - console.log(result); - - return `https://kr.object.ncloudstorage.com/music-spot-storage/${key}`; + return `${endpoint}/${bucketName}/${key}`; } async insertToSpot(spotData) { const createdSpotData = await new this.spotModel(spotData).save();