From 673971e8f5b10e7aed295e3838f2049d368c2a2d Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 15 Jun 2023 00:43:21 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20WebUI=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + openapitools.json | 22 + package-lock.json | 3320 ++++++++++++++++++++++++++- package.json | 14 +- src/main/resources/openapi/api.yaml | 71 +- src/main/web/App.tsx | 72 +- src/main/web/atoms/Avatar.tsx | 8 + src/main/web/organisms/Post.tsx | 64 + src/main/web/organisms/PostForm.tsx | 38 + src/main/web/pages/TopPage.tsx | 56 + src/main/web/templates/MainPage.tsx | 20 + src/main/web/templates/Sidebar.tsx | 10 + 12 files changed, 3509 insertions(+), 187 deletions(-) create mode 100644 openapitools.json create mode 100644 src/main/web/atoms/Avatar.tsx create mode 100644 src/main/web/organisms/Post.tsx create mode 100644 src/main/web/organisms/PostForm.tsx create mode 100644 src/main/web/pages/TopPage.tsx create mode 100644 src/main/web/templates/MainPage.tsx create mode 100644 src/main/web/templates/Sidebar.tsx diff --git a/.gitignore b/.gitignore index 635e4370..a9f19f80 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ out/ *.db /src/main/resources/static/ /node_modules/ +/src/main/web/generated/ diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 00000000..a43405c3 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,22 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "6.6.0", + "generators": { + "v3.0": { + "generatorName": "typescript-fetch", + "output": "src/main/web/generated", + "glob": "src/main/resources/openapi/api.yaml", + "additionalProperties": { + "modelPropertyNaming": "camelCase", + "supportsES6": true, + "withInterfaces": true, + "typescriptThreePlus": true, + "useSingleRequestParameter": false, + "prependFormOrBodyParameters": true + } + } + } + } +} diff --git a/package-lock.json b/package-lock.json index e39e60cc..819519ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,14 @@ "name": "hideout", "version": "1.0.0", "dependencies": { - "solid-js": "^1.7.3" + "@solid-primitives/storage": "^1.3.11", + "@solidjs/router": "^0.8.2", + "@suid/icons-material": "^0.6.3", + "@suid/material": "^0.12.3", + "solid-js": "^1.7.6" }, "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.6.0", "@suid/vite-plugin": "^0.1.3", "typescript": "^5.0.4", "vite": "^4.2.1", @@ -451,6 +456,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", + "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -906,6 +923,478 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nestjs/axios": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.0.8.tgz", + "integrity": "sha512-oJyfR9/h9tVk776il0829xyj3b2e81yTu6HjPraxynwNtMNGqZBHHmAQL24yMB3tVbBM0RvG3eUXH8+pRCGwlg==", + "dev": true, + "dependencies": { + "axios": "0.27.2" + }, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", + "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", + "dev": true, + "peer": true, + "dependencies": { + "axios": "0.27.2", + "iterare": "1.2.1", + "tslib": "2.4.0", + "uuid": "8.3.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "cache-manager": "*", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "cache-manager": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/common/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true, + "peer": true + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/@nuxtjs/opencollective/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@nuxtjs/opencollective/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.6.0.tgz", + "integrity": "sha512-M/aOpR7G+Y1nMf+ofuar8pGszajgfhs1aSPSijkcr2tHTxKAI3sA3YYcOGbszxaNRKFyvOcDq+KP9pcJvKoCHg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "0.0.8", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", + "@nuxtjs/opencollective": "0.3.2", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.1.6", + "inquirer": "8.2.5", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.0", + "tslib": "2.0.3" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/common": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", + "dev": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.5.0", + "uid": "2.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "cache-manager": "<=5", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "cache-manager": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/common/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/core": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.5.0", + "uid": "2.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^9.0.0", + "@nestjs/microservices": "^9.0.0", + "@nestjs/platform-express": "^9.0.0", + "@nestjs/websockets": "^9.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/core/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/@openapitools/openapi-generator-cli/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@solid-primitives/storage": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@solid-primitives/storage/-/storage-1.3.11.tgz", + "integrity": "sha512-PpQWR3TaTxHIJFbI9ZssYTM4Aa67g1vJIgps4TPhcXzHqqomrPAIveFC2FG7SDQoi9YQia8FVBjigELziJpfIg==", + "dependencies": { + "@solid-primitives/utils": "^6.2.0" + }, + "peerDependencies": { + "solid-js": "^1.6.12" + } + }, + "node_modules/@solid-primitives/utils": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@solid-primitives/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-T62WlLwKkbmicsw/xpwMQyv9MmZRSaVyutXfS5icc9v0cb8qGMUxRxr5LVvZHYQCZ9DEFboZB0r711xsbVBbeA==", + "peerDependencies": { + "solid-js": "^1.6.12" + } + }, + "node_modules/@solidjs/router": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@solidjs/router/-/router-0.8.2.tgz", + "integrity": "sha512-gUKW+LZqxtX6y/Aw6JKyy4gQ9E7dLqp513oB9pSYJR1HM5c56Pf7eijzyXX+b3WuXig18Cxqah4tMtF0YGu80w==", + "peerDependencies": { + "solid-js": "^1.5.3" + } + }, + "node_modules/@suid/base": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@suid/base/-/base-0.8.2.tgz", + "integrity": "sha512-saue6/ss0ylDMz2mOK6kKvxBqkt5wCNTOutsQ6oi+zeeKXp+0SRpfhqmhhBWZw9s00eq+qE17G4ln2yvZ7d9ug==", + "dependencies": { + "@popperjs/core": "^2.11.7", + "@suid/css": "0.3.1", + "@suid/system": "0.10.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/css": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@suid/css/-/css-0.3.1.tgz", + "integrity": "sha512-OXUgCwKvMy6rIu+tcRybKxFzCBbwaEXG30MmCV26uzwhTxYcmSXU4tdiTenpAD7w1VS0Xysw0pf+tGtzKIMX8g==" + }, + "node_modules/@suid/icons-material": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@suid/icons-material/-/icons-material-0.6.3.tgz", + "integrity": "sha512-FunY1jtCdXpBr9hL0CCvJB+dthyYumjqvpj+w/Oln/qfxOsWnjH/QFsqEYaCVJSyFWhchSdBJXCGEsb/fEsFRw==", + "dependencies": { + "@suid/material": "0.12.3" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/material": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@suid/material/-/material-0.12.3.tgz", + "integrity": "sha512-Kcq+HNO6U0rBLfhHRHwsKSQckDqN6Z5qguQWBCn11VlgOWrurG+0ZJVVYi47nTt71w2eb4eyQBneveEO4EdeYQ==", + "dependencies": { + "@suid/base": "0.8.2", + "@suid/css": "0.3.1", + "@suid/system": "0.10.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/styled-engine": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@suid/styled-engine/-/styled-engine-0.5.2.tgz", + "integrity": "sha512-PVUrs3K0iaXNy2wwiFr9MSGv4Kkvq0HPI6kFdHTwY44u0zZiTqBeZe9dTmmTjfxmiJj0AofzUqU7+HqasDALvw==", + "dependencies": { + "@suid/css": "0.3.1", + "@suid/utils": "0.7.2" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/system": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@suid/system/-/system-0.10.2.tgz", + "integrity": "sha512-af7LJDS6Z7EM1x9FludSQDjATxsxtC6sYwpYrjuH+bIkArAKkHYNGc2dDl9SCJ1fOeEIiIKMiWbPnMQ1Pobznw==", + "dependencies": { + "@suid/css": "0.3.1", + "@suid/styled-engine": "0.5.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1", + "csstype": "^3.1.2" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/types": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@suid/types/-/types-0.5.1.tgz", + "integrity": "sha512-5Cg/n5Z6veyMdkVXlK32xX+uBawaVeLbnqRhJl/zU5uSWuC5hP7g08Rm3FJ7pH48nvDMlwx7CsIDUWRnGYczag==", + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, + "node_modules/@suid/utils": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@suid/utils/-/utils-0.7.2.tgz", + "integrity": "sha512-NVOYWEGFnY2TaVuY/5F+HxtTE4G6HYfag1+/XMEkyYrZlTjrubDQ2GnWW0NIcKnreO0Fq+vxineBWA76HVNHcw==", + "dependencies": { + "@suid/types": "0.5.1" + }, + "peerDependencies": { + "solid-js": "^1.7.5" + } + }, "node_modules/@suid/vite-plugin": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@suid/vite-plugin/-/vite-plugin-0.1.3.tgz", @@ -964,6 +1453,30 @@ "@babel/types": "^7.3.0" } }, + "node_modules/ansi-escapes": { + "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" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "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" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -976,6 +1489,22 @@ "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/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/babel-plugin-jsx-dom-expressions": { "version": "0.36.9", "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.36.9.tgz", @@ -1016,6 +1545,53 @@ "@babel/core": "^7.0.0" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "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", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "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", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -1044,6 +1620,30 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "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", + "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.1.13" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001478", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", @@ -1078,6 +1678,73 @@ "node": ">=4" } }, + "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 + }, + "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" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/clone": { + "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" + } + }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1093,6 +1760,182 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/concurrently/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/concurrently/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "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==", + "dev": true + }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -1104,6 +1947,22 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1121,12 +1980,48 @@ } } }, + "node_modules/defaults": { + "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" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.361", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.361.tgz", "integrity": "sha512-VocVwjPp05HUXzf3xmL0boRn5b0iyqC7amtDww84Jb1QJNPBc7F69gJyEeXRoriLBC4a5pSyckdllrXAg4mmRA==", "dev": true }, + "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 + }, "node_modules/esbuild": { "version": "0.17.16", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", @@ -1182,6 +2077,95 @@ "node": ">=0.8.0" } }, + "node_modules/external-editor": { + "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", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", @@ -1196,12 +2180,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -1211,6 +2189,35 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -1220,17 +2227,11 @@ "node": ">=4" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } + "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 }, "node_modules/has-flag": { "version": "3.0.0", @@ -1247,16 +2248,178 @@ "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", "dev": true }, - "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "dependencies": { - "has": "^1.0.3" + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "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", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/inquirer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-fullwidth-code-point": { + "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" + } + }, + "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-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" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-what": { @@ -1271,6 +2434,15 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1301,6 +2473,110 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/log-symbols": { + "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" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -1325,12 +2601,60 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "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 }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -1349,16 +2673,171 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "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" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "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/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "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==", + "dev": true, + "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/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "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/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", "dev": true }, "node_modules/picocolors": { @@ -1368,9 +2847,9 @@ "dev": true }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "dev": true, "funding": [ { @@ -1380,10 +2859,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -1391,27 +2874,58 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "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==", "dev": true, "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, - "bin": { - "resolve": "bin/resolve" + "engines": { + "node": ">= 6" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/rollup": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", - "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", + "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -1424,6 +2938,56 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-async": { + "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" + } + }, + "node_modules/rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1441,10 +3005,16 @@ "node": ">=10" } }, + "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 + }, "node_modules/solid-js": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.3.tgz", - "integrity": "sha512-4hwaF/zV/xbNeBBIYDyu3dcReOZBECbO//mrra6GqOrKy4Soyo+fnKjpZSa0nODm6j1aL0iQRh/7ofYowH+jzw==", + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.6.tgz", + "integrity": "sha512-DXVOTjUh/bIAhE0fIqu3ezGLyQaez7v8EOw3uPLIi87DmLjg+hsuCAgKyNIZ+o4jUetOk3ZORccvJmE1yZUk8g==", "dependencies": { "csstype": "^3.1.0", "seroval": "^0.5.0" @@ -1473,6 +3043,47 @@ "node": ">=0.10.0" } }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "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", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "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" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1485,16 +3096,22 @@ "node": ">=4" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "os-tmpdir": "~1.0.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.6.0" } }, "node_modules/to-fast-properties": { @@ -1506,6 +3123,39 @@ "node": ">=4" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "dev": true + }, + "node_modules/type-fest": { + "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" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", @@ -1519,6 +3169,27 @@ "node": ">=12.20" } }, + "node_modules/uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "dev": true, + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", @@ -1545,6 +3216,22 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/validate-html-nesting": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.1.tgz", @@ -1552,15 +3239,14 @@ "dev": true }, "node_modules/vite": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", - "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "dependencies": { "esbuild": "^0.17.5", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.18.0" + "postcss": "^8.4.23", + "rollup": "^3.21.0" }, "bin": { "vite": "bin/vite.js" @@ -1633,11 +3319,128 @@ } } }, + "node_modules/wcwidth": { + "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/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } } }, "dependencies": { @@ -1954,6 +3757,15 @@ "@babel/plugin-transform-typescript": "^7.21.3" } }, + "@babel/runtime": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", + "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.11" + } + }, "@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -2195,6 +4007,321 @@ } } }, + "@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true + }, + "@nestjs/axios": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-0.0.8.tgz", + "integrity": "sha512-oJyfR9/h9tVk776il0829xyj3b2e81yTu6HjPraxynwNtMNGqZBHHmAQL24yMB3tVbBM0RvG3eUXH8+pRCGwlg==", + "dev": true, + "requires": { + "axios": "0.27.2" + } + }, + "@nestjs/common": { + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.7.tgz", + "integrity": "sha512-m/YsbcBal+gA5CFrDpqXqsSfylo+DIQrkFY3qhVIltsYRfu8ct8J9pqsTO6OPf3mvqdOpFGrV5sBjoyAzOBvsw==", + "dev": true, + "peer": true, + "requires": { + "axios": "0.27.2", + "iterare": "1.2.1", + "tslib": "2.4.0", + "uuid": "8.3.2" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true, + "peer": true + } + } + }, + "@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@openapitools/openapi-generator-cli": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.6.0.tgz", + "integrity": "sha512-M/aOpR7G+Y1nMf+ofuar8pGszajgfhs1aSPSijkcr2tHTxKAI3sA3YYcOGbszxaNRKFyvOcDq+KP9pcJvKoCHg==", + "dev": true, + "requires": { + "@nestjs/axios": "0.0.8", + "@nestjs/common": "9.3.11", + "@nestjs/core": "9.3.11", + "@nuxtjs/opencollective": "0.3.2", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.1.6", + "inquirer": "8.2.5", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.0", + "tslib": "2.0.3" + }, + "dependencies": { + "@nestjs/common": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.3.11.tgz", + "integrity": "sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==", + "dev": true, + "requires": { + "iterare": "1.2.1", + "tslib": "2.5.0", + "uid": "2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + } + } + }, + "@nestjs/core": { + "version": "9.3.11", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.3.11.tgz", + "integrity": "sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==", + "dev": true, + "requires": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.5.0", + "uid": "2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + } + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" + }, + "@solid-primitives/storage": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@solid-primitives/storage/-/storage-1.3.11.tgz", + "integrity": "sha512-PpQWR3TaTxHIJFbI9ZssYTM4Aa67g1vJIgps4TPhcXzHqqomrPAIveFC2FG7SDQoi9YQia8FVBjigELziJpfIg==", + "requires": { + "@solid-primitives/utils": "^6.2.0" + } + }, + "@solid-primitives/utils": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@solid-primitives/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-T62WlLwKkbmicsw/xpwMQyv9MmZRSaVyutXfS5icc9v0cb8qGMUxRxr5LVvZHYQCZ9DEFboZB0r711xsbVBbeA==", + "requires": {} + }, + "@solidjs/router": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@solidjs/router/-/router-0.8.2.tgz", + "integrity": "sha512-gUKW+LZqxtX6y/Aw6JKyy4gQ9E7dLqp513oB9pSYJR1HM5c56Pf7eijzyXX+b3WuXig18Cxqah4tMtF0YGu80w==", + "requires": {} + }, + "@suid/base": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@suid/base/-/base-0.8.2.tgz", + "integrity": "sha512-saue6/ss0ylDMz2mOK6kKvxBqkt5wCNTOutsQ6oi+zeeKXp+0SRpfhqmhhBWZw9s00eq+qE17G4ln2yvZ7d9ug==", + "requires": { + "@popperjs/core": "^2.11.7", + "@suid/css": "0.3.1", + "@suid/system": "0.10.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1" + } + }, + "@suid/css": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@suid/css/-/css-0.3.1.tgz", + "integrity": "sha512-OXUgCwKvMy6rIu+tcRybKxFzCBbwaEXG30MmCV26uzwhTxYcmSXU4tdiTenpAD7w1VS0Xysw0pf+tGtzKIMX8g==" + }, + "@suid/icons-material": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@suid/icons-material/-/icons-material-0.6.3.tgz", + "integrity": "sha512-FunY1jtCdXpBr9hL0CCvJB+dthyYumjqvpj+w/Oln/qfxOsWnjH/QFsqEYaCVJSyFWhchSdBJXCGEsb/fEsFRw==", + "requires": { + "@suid/material": "0.12.3" + } + }, + "@suid/material": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@suid/material/-/material-0.12.3.tgz", + "integrity": "sha512-Kcq+HNO6U0rBLfhHRHwsKSQckDqN6Z5qguQWBCn11VlgOWrurG+0ZJVVYi47nTt71w2eb4eyQBneveEO4EdeYQ==", + "requires": { + "@suid/base": "0.8.2", + "@suid/css": "0.3.1", + "@suid/system": "0.10.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1" + } + }, + "@suid/styled-engine": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@suid/styled-engine/-/styled-engine-0.5.2.tgz", + "integrity": "sha512-PVUrs3K0iaXNy2wwiFr9MSGv4Kkvq0HPI6kFdHTwY44u0zZiTqBeZe9dTmmTjfxmiJj0AofzUqU7+HqasDALvw==", + "requires": { + "@suid/css": "0.3.1", + "@suid/utils": "0.7.2" + } + }, + "@suid/system": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@suid/system/-/system-0.10.2.tgz", + "integrity": "sha512-af7LJDS6Z7EM1x9FludSQDjATxsxtC6sYwpYrjuH+bIkArAKkHYNGc2dDl9SCJ1fOeEIiIKMiWbPnMQ1Pobznw==", + "requires": { + "@suid/css": "0.3.1", + "@suid/styled-engine": "0.5.2", + "@suid/types": "0.5.1", + "@suid/utils": "0.7.2", + "clsx": "^1.2.1", + "csstype": "^3.1.2" + } + }, + "@suid/types": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@suid/types/-/types-0.5.1.tgz", + "integrity": "sha512-5Cg/n5Z6veyMdkVXlK32xX+uBawaVeLbnqRhJl/zU5uSWuC5hP7g08Rm3FJ7pH48nvDMlwx7CsIDUWRnGYczag==", + "requires": {} + }, + "@suid/utils": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@suid/utils/-/utils-0.7.2.tgz", + "integrity": "sha512-NVOYWEGFnY2TaVuY/5F+HxtTE4G6HYfag1+/XMEkyYrZlTjrubDQ2GnWW0NIcKnreO0Fq+vxineBWA76HVNHcw==", + "requires": { + "@suid/types": "0.5.1" + } + }, "@suid/vite-plugin": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@suid/vite-plugin/-/vite-plugin-0.1.3.tgz", @@ -2250,6 +4377,21 @@ "@babel/types": "^7.3.0" } }, + "ansi-escapes": { + "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, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2259,6 +4401,22 @@ "color-convert": "^1.9.0" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "babel-plugin-jsx-dom-expressions": { "version": "0.36.9", "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.36.9.tgz", @@ -2292,6 +4450,39 @@ "babel-plugin-jsx-dom-expressions": "^0.36.9" } }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -2304,6 +4495,16 @@ "update-browserslist-db": "^1.0.10" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "caniuse-lite": { "version": "1.0.30001478", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", @@ -2321,6 +4522,55 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "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, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "dev": true + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true + }, + "clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==" + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2336,6 +4586,141 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true + }, + "compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, + "console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "requires": { + "easy-table": "1.1.0" + } + }, "convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -2347,6 +4732,15 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2356,12 +4750,42 @@ "ms": "2.1.2" } }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, + "easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "requires": { + "wcwidth": ">=1.0.1" + } + }, "electron-to-chromium": { "version": "1.4.361", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.361.tgz", "integrity": "sha512-VocVwjPp05HUXzf3xmL0boRn5b0iyqC7amtDww84Jb1QJNPBc7F69gJyEeXRoriLBC4a5pSyckdllrXAg4mmRA==", "dev": true }, + "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 + }, "esbuild": { "version": "0.17.16", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", @@ -2404,6 +4828,66 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, "fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", @@ -2411,32 +4895,43 @@ "dev": true, "optional": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } + "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 }, "has-flag": { "version": "3.0.0", @@ -2450,21 +4945,141 @@ "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", "dev": true }, - "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "has": "^1.0.3" + "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-fullwidth-code-point": { + "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 + }, + "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 + }, + "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 + }, "is-what": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.8.tgz", "integrity": "sha512-yq8gMao5upkPoGEU9LsB2P+K3Kt8Q3fQFCGyNCWOAnJAMzEXVV9drYb0TXr42TTliLLhKIBvulgAXgtLLnwzGA==", "dev": true }, + "iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2483,6 +5098,83 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "log-symbols": { + "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, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -2501,28 +5193,171 @@ "is-what": "^4.1.8" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "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 }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true }, + "node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", "dev": true }, "picocolors": { @@ -2532,36 +5367,99 @@ "dev": true }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "dev": true, "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "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, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" } }, "rollup": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", - "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", + "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", "dev": true, "requires": { "fsevents": "~2.3.2" } }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -2573,10 +5471,16 @@ "resolved": "https://registry.npmjs.org/seroval/-/seroval-0.5.1.tgz", "integrity": "sha512-ZfhQVB59hmIauJG5Ydynupy8KHyr5imGNtdDhbZG68Ufh1Ynkv9KOYOAABf71oVbQxJ8VkWnMHAjEHE7fWkH5g==" }, + "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 + }, "solid-js": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.3.tgz", - "integrity": "sha512-4hwaF/zV/xbNeBBIYDyu3dcReOZBECbO//mrra6GqOrKy4Soyo+fnKjpZSa0nODm6j1aL0iQRh/7ofYowH+jzw==", + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.7.6.tgz", + "integrity": "sha512-DXVOTjUh/bIAhE0fIqu3ezGLyQaez7v8EOw3uPLIi87DmLjg+hsuCAgKyNIZ+o4jUetOk3ZORccvJmE1yZUk8g==", "requires": { "csstype": "^3.1.0", "seroval": "^0.5.0" @@ -2599,6 +5503,41 @@ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true }, + "spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "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, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -2608,24 +5547,72 @@ "has-flag": "^3.0.0" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "dev": true + }, + "type-fest": { + "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 + }, "typescript": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true }, + "uid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.1.tgz", + "integrity": "sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==", + "dev": true, + "requires": { + "@lukeed/csprng": "^1.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "update-browserslist-db": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", @@ -2636,6 +5623,19 @@ "picocolors": "^1.0.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "peer": true + }, "validate-html-nesting": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.1.tgz", @@ -2643,16 +5643,15 @@ "dev": true }, "vite": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", - "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.9.tgz", + "integrity": "sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==", "dev": true, "requires": { "esbuild": "^0.17.5", "fsevents": "~2.3.2", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.18.0" + "postcss": "^8.4.23", + "rollup": "^3.21.0" } }, "vite-plugin-solid": { @@ -2677,11 +5676,106 @@ "dev": true, "requires": {} }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true } } } diff --git a/package.json b/package.json index 17809bc2..0ce430cc 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,24 @@ "name": "hideout", "version": "1.0.0", "dependencies": { - "solid-js": "^1.7.3" + "@solid-primitives/storage": "^1.3.11", + "@solidjs/router": "^0.8.2", + "@suid/icons-material": "^0.6.3", + "@suid/material": "^0.12.3", + "solid-js": "^1.7.6" }, "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.6.0", + "@suid/vite-plugin": "^0.1.3", "typescript": "^5.0.4", "vite": "^4.2.1", - "vite-plugin-solid": "^2.7.0", - "@suid/vite-plugin": "^0.1.3" + "vite-plugin-solid": "^2.7.0" }, "scripts": { "start": "vite", "dev": "vite", "build": "vite build", - "serve": "vite preview" + "serve": "vite preview", + "gen-api": "openapi-generator-cli generate" } } diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index 5ff2768a..edd40bd5 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -20,7 +20,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Post" + $ref: "#/components/schemas/PostResponse" 401: $ref: "#/components/responses/Unauthorized" 403: @@ -37,7 +37,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Post" + $ref: "#/components/schemas/PostRequest" responses: 200: description: 成功 @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Post" + $ref: "#/components/schemas/PostResponse" 401: $ref: "#/components/responses/Unauthorized" 403: @@ -90,7 +90,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/Post" + $ref: "#/components/schemas/PostResponse" 401: $ref: "#/components/responses/Unauthorized" 403: @@ -114,7 +114,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Post" + $ref: "#/components/schemas/PostResponse" 401: $ref: "#/components/responses/Unauthorized" 403: @@ -137,7 +137,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/UserResponse" post: summary: ユーザーを作成する @@ -181,7 +181,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/UserResponse" 404: $ref: "#/components/responses/NotFound" @@ -198,7 +198,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/UserResponse" post: summary: ユーザーをフォローする security: @@ -228,7 +228,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/UserResponse" components: responses: @@ -261,8 +261,22 @@ components: type: string schemas: - User: + Visibility: + type: string + enum: + - public + - unlisted + - followers + - direct + UserResponse: type: object + required: + - id + - name + - domain + - screenName + - description + - createdAt properties: id: type: number @@ -277,14 +291,24 @@ components: type: string description: type: string + nullable: true url: type: string readOnly: true createdAt: type: number readOnly: true - Post: + PostResponse: type: object + required: + - id + - userId + - text + - createdAt + - visibility + - url + - sensitive + - apId properties: id: type: integer @@ -303,12 +327,7 @@ components: format: int64 readOnly: true visibility: - type: string - enum: - - public - - unlisted - - followers - - direct + $ref: "#/components/schemas/Visibility" url: type: string format: uri @@ -328,6 +347,24 @@ components: format: url readOnly: true + PostRequest: + type: object + properties: + overview: + type: string + text: + type: string + visibility: + $ref: "#/components/schemas/Visibility" + repostId: + type: integer + format: int64 + replyId: + type: integer + format: int64 + sensitive: + type: boolean + securitySchemes: BearerAuth: diff --git a/src/main/web/App.tsx b/src/main/web/App.tsx index 0da03fa6..5f95a4dc 100644 --- a/src/main/web/App.tsx +++ b/src/main/web/App.tsx @@ -1,58 +1,24 @@ -import {Component, createSignal} from "solid-js"; +import {Component} from "solid-js"; +import {Route, Router, Routes} from "@solidjs/router"; +import {TopPage} from "./pages/TopPage"; +import {createTheme, CssBaseline, ThemeProvider, useMediaQuery} from "@suid/material"; export const App: Component = () => { + const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); - const fn = (form: HTMLButtonElement) => { - console.log(form) - } - - const [username, setUsername] = createSignal("") - const [password, setPassword] = createSignal("") - + const theme = createTheme({ + palette: { + mode: prefersDarkMode() ? 'dark' : 'light', + } + }) return ( -
res.json()) - // .then(res => fetch("/auth-check", { - // method: "GET", - // headers: { - // 'Authorization': 'Bearer ' + res.token - // } - // })) - // .then(res => res.json()) - .then(res => { - console.log(res.token); - fetch("/refresh-token", { - method: "POST", - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({refreshToken: res.refreshToken}), - }).then(res=> res.json()).then(res => console.log(res.token)) - }) - } - - }> - setUsername(e.currentTarget.value)}/> - setPassword(e.currentTarget.value)}/> - -
+ + + + + + + + ) -} - - -declare module 'solid-js' { - namespace JSX { - interface Directives { - fn: (form: HTMLFormElement) => void - } - } -} +} \ No newline at end of file diff --git a/src/main/web/atoms/Avatar.tsx b/src/main/web/atoms/Avatar.tsx new file mode 100644 index 00000000..76db2222 --- /dev/null +++ b/src/main/web/atoms/Avatar.tsx @@ -0,0 +1,8 @@ +import {Avatar as SuidAvatar} from "@suid/material"; +import {Component, JSXElement} from "solid-js"; + +export const Avatar: Component<{ src: string }> = (props): JSXElement => { + return ( + + ) +} \ No newline at end of file diff --git a/src/main/web/organisms/Post.tsx b/src/main/web/organisms/Post.tsx new file mode 100644 index 00000000..2d52add7 --- /dev/null +++ b/src/main/web/organisms/Post.tsx @@ -0,0 +1,64 @@ +import {Component, createSignal, Match, Switch} from "solid-js"; +import {PostResponse} from "../generated"; +import {Box, Card, CardActions, CardContent, CardHeader, IconButton, Menu, MenuItem, Typography} from "@suid/material"; +import {Avatar} from "../atoms/Avatar"; +import {Favorite, Home, Lock, Mail, MoreVert, Public, Reply, ScreenRotationAlt} from "@suid/icons-material"; + +export const Post: Component<{ post: PostResponse }> = (props) => { + const [anchorEl, setAnchorEl] = createSignal(null) + const open = () => Boolean(anchorEl()); + const handleClose = () => { + setAnchorEl(null); + } + + return ( + + } title={"test user"} subheader={"test@test"} + action={ { + setAnchorEl(event.currentTarget) + }}>aaa }/> + + + {props.post.text} + + + + + + + + + + + + + + {new Date(props.post.createdAt).toDateString()} + + }> + + + + + + + + + + + + + + + + + + + + + + + + ) +} \ No newline at end of file diff --git a/src/main/web/organisms/PostForm.tsx b/src/main/web/organisms/PostForm.tsx new file mode 100644 index 00000000..47f99603 --- /dev/null +++ b/src/main/web/organisms/PostForm.tsx @@ -0,0 +1,38 @@ +import {Component} from "solid-js"; +import {Button, IconButton, Paper, Stack, TextField, Typography} from "@suid/material"; +import {Avatar} from "../atoms/Avatar"; +import {AddPhotoAlternate, Poll, Public} from "@suid/icons-material"; + +export const PostForm: Component<{ label: string }> = (props) => { + return ( + + + + + + + + + + + + + + + + + + + + + aaa + + + + + + + ) +} \ No newline at end of file diff --git a/src/main/web/pages/TopPage.tsx b/src/main/web/pages/TopPage.tsx new file mode 100644 index 00000000..948a0e36 --- /dev/null +++ b/src/main/web/pages/TopPage.tsx @@ -0,0 +1,56 @@ +import {Component} from "solid-js"; +import {MainPage} from "../templates/MainPage"; +import {PostForm} from "../organisms/PostForm"; +import {Stack} from "@suid/material"; +import {Post} from "../organisms/Post"; +import {PostResponse} from "../generated"; + +export const TopPage: Component = () => { + return ( + + + + + + + + + + ) +} \ No newline at end of file diff --git a/src/main/web/templates/MainPage.tsx b/src/main/web/templates/MainPage.tsx new file mode 100644 index 00000000..a4c9b4d0 --- /dev/null +++ b/src/main/web/templates/MainPage.tsx @@ -0,0 +1,20 @@ +import {ParentComponent} from "solid-js"; +import {Grid} from "@suid/material"; +import {Sidebar} from "./Sidebar"; + +export const MainPage: ParentComponent = (props) => { + + return ( + + + + + + {props.children} + + + + + + ) +} \ No newline at end of file diff --git a/src/main/web/templates/Sidebar.tsx b/src/main/web/templates/Sidebar.tsx new file mode 100644 index 00000000..663d7c07 --- /dev/null +++ b/src/main/web/templates/Sidebar.tsx @@ -0,0 +1,10 @@ +import {Component} from "solid-js"; +import {Stack} from "@suid/material"; + +export const Sidebar: Component = () => { + return ( + + + + ) +} \ No newline at end of file From fdc6e1bae403ee7dbf65971871334f73735b363c Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 16 Jun 2023 10:12:39 +0900 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=E3=82=BF=E3=82=A4=E3=83=A0?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=B3=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/openapi/api.yaml | 1 + src/main/web/lib/ApiWrapper.ts | 16 +++++ src/main/web/model/PostDetails.ts | 5 ++ .../web/molecules/ShareScopeIndicator.tsx | 29 ++++++++ src/main/web/organisms/Post.tsx | 37 +++------- src/main/web/organisms/PostForm.tsx | 4 +- src/main/web/pages/TopPage.tsx | 70 +++++++------------ src/main/web/templates/PostList.tsx | 14 ++++ 8 files changed, 101 insertions(+), 75 deletions(-) create mode 100644 src/main/web/lib/ApiWrapper.ts create mode 100644 src/main/web/model/PostDetails.ts create mode 100644 src/main/web/molecules/ShareScopeIndicator.tsx create mode 100644 src/main/web/templates/PostList.tsx diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index edd40bd5..6e1c4382 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -276,6 +276,7 @@ components: - domain - screenName - description + - url - createdAt properties: id: diff --git a/src/main/web/lib/ApiWrapper.ts b/src/main/web/lib/ApiWrapper.ts new file mode 100644 index 00000000..2fbf3266 --- /dev/null +++ b/src/main/web/lib/ApiWrapper.ts @@ -0,0 +1,16 @@ +import {DefaultApiInterface} from "../generated"; + +export class ApiWrapper { + api: DefaultApiInterface; + + constructor(initApi: DefaultApiInterface) { + this.api = initApi; + console.log(this.api); + console.log(this.postsGet()); + } + + postsGet = async () => this.api.postsGet() + + usersUserNameGet = async (userName: string) => this.api.usersUserNameGet(userName); + +} diff --git a/src/main/web/model/PostDetails.ts b/src/main/web/model/PostDetails.ts new file mode 100644 index 00000000..1aa7250c --- /dev/null +++ b/src/main/web/model/PostDetails.ts @@ -0,0 +1,5 @@ +import {PostResponse, UserResponse} from "../generated"; + +export type PostDetails = PostResponse & { + user: UserResponse +} diff --git a/src/main/web/molecules/ShareScopeIndicator.tsx b/src/main/web/molecules/ShareScopeIndicator.tsx new file mode 100644 index 00000000..7d5ccc7c --- /dev/null +++ b/src/main/web/molecules/ShareScopeIndicator.tsx @@ -0,0 +1,29 @@ +import {Component, Match, Switch} from "solid-js"; +import {Home, Lock, Mail, Public} from "@suid/icons-material"; +import {IconButton} from "@suid/material"; +import {Visibility} from "../generated"; + +export const ShareScopeIndicator: Component<{ visibility: Visibility }> = (props) => { + return }> + + + + + + + + + + + + + + + + + + + + + +} diff --git a/src/main/web/organisms/Post.tsx b/src/main/web/organisms/Post.tsx index 2d52add7..9e9253dc 100644 --- a/src/main/web/organisms/Post.tsx +++ b/src/main/web/organisms/Post.tsx @@ -1,10 +1,11 @@ -import {Component, createSignal, Match, Switch} from "solid-js"; -import {PostResponse} from "../generated"; +import {Component, createSignal} from "solid-js"; import {Box, Card, CardActions, CardContent, CardHeader, IconButton, Menu, MenuItem, Typography} from "@suid/material"; import {Avatar} from "../atoms/Avatar"; -import {Favorite, Home, Lock, Mail, MoreVert, Public, Reply, ScreenRotationAlt} from "@suid/icons-material"; +import {Favorite, MoreVert, Reply, ScreenRotationAlt} from "@suid/icons-material"; +import {PostDetails} from "../model/PostDetails"; +import {ShareScopeIndicator} from "../molecules/ShareScopeIndicator"; -export const Post: Component<{ post: PostResponse }> = (props) => { +export const Post: Component<{ post: PostDetails }> = (props) => { const [anchorEl, setAnchorEl] = createSignal(null) const open = () => Boolean(anchorEl()); const handleClose = () => { @@ -13,7 +14,8 @@ export const Post: Component<{ post: PostResponse }> = (props) => { return ( - } title={"test user"} subheader={"test@test"} + } title={props.post.user.screenName} + subheader={`${props.post.user.name}@${props.post.user.domain}`} action={ { setAnchorEl(event.currentTarget) }}> = (props) => { {new Date(props.post.createdAt).toDateString()} - }> - - - - - - - - - - - - - - - - - - - - - + ) -} \ No newline at end of file +} diff --git a/src/main/web/organisms/PostForm.tsx b/src/main/web/organisms/PostForm.tsx index 47f99603..4a89fa80 100644 --- a/src/main/web/organisms/PostForm.tsx +++ b/src/main/web/organisms/PostForm.tsx @@ -5,7 +5,7 @@ import {AddPhotoAlternate, Poll, Public} from "@suid/icons-material"; export const PostForm: Component<{ label: string }> = (props) => { return ( - + @@ -35,4 +35,4 @@ export const PostForm: Component<{ label: string }> = (props) => { ) -} \ No newline at end of file +} diff --git a/src/main/web/pages/TopPage.tsx b/src/main/web/pages/TopPage.tsx index 948a0e36..451000cd 100644 --- a/src/main/web/pages/TopPage.tsx +++ b/src/main/web/pages/TopPage.tsx @@ -1,56 +1,36 @@ -import {Component} from "solid-js"; +import {Component, createResource} from "solid-js"; import {MainPage} from "../templates/MainPage"; import {PostForm} from "../organisms/PostForm"; import {Stack} from "@suid/material"; -import {Post} from "../organisms/Post"; -import {PostResponse} from "../generated"; +import {DefaultApi} from "../generated"; +import {PostDetails} from "../model/PostDetails"; +import {PostList} from "../templates/PostList"; +import {ApiWrapper} from "../lib/ApiWrapper"; + export const TopPage: Component = () => { + const api = new ApiWrapper(new DefaultApi()) + const [posts] = createResource(api.postsGet); + return ( - + - - - - + { + return { + ...value, + user: { + id: 1234, + createdAt: Date.now(), + domain: "test-hideout.usbharu.dev", + name: "test", + url: "https://test-hideout.usbharu.dev", + screenName: "test", + description: "" + } + } as PostDetails + }) ?? []}/> ) -} \ No newline at end of file +} diff --git a/src/main/web/templates/PostList.tsx b/src/main/web/templates/PostList.tsx new file mode 100644 index 00000000..2b9d0dad --- /dev/null +++ b/src/main/web/templates/PostList.tsx @@ -0,0 +1,14 @@ +import {Component, For} from "solid-js"; +import {CircularProgress} from "@suid/material"; +import {Post} from "../organisms/Post"; +import {PostDetails} from "../model/PostDetails"; + +export const PostList: Component<{ posts: PostDetails[] }> = (props) => { + return ( + }> + { + (item, index) => + } + + ) +} From 0dd7facbadbb6eb11e16b62a4773ba574dba88e9 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:15:40 +0900 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20API=E3=81=AE=E8=BF=94=E7=AD=94?= =?UTF-8?q?=E3=81=ABuser=E3=82=82=E5=90=AB=E3=82=81=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/model/hideout/dto/PostResponse.kt | 31 +++++++++ .../hideout/repository/PostRepositoryImpl.kt | 4 +- .../hideout/service/api/IPostApiService.kt | 10 +-- .../hideout/service/api/PostApiServiceImpl.kt | 65 ++++++++++++------- vite.config.ts | 5 +- 5 files changed, 82 insertions(+), 33 deletions(-) create mode 100644 src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt new file mode 100644 index 00000000..6be3ba4d --- /dev/null +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt @@ -0,0 +1,31 @@ +package dev.usbharu.hideout.domain.model.hideout.dto + +import dev.usbharu.hideout.domain.model.hideout.entity.Post +import dev.usbharu.hideout.domain.model.hideout.entity.User +import dev.usbharu.hideout.domain.model.hideout.entity.Visibility + +data class PostResponse( + val id: Long, + val user: UserResponse, + val overview: String? = null, + val text: String? = null, + val createdAt: Long, + val visibility: Visibility, + val url: String, + val sensitive: Boolean = false, +) { + companion object { + fun from(post: Post, user: User): PostResponse { + return PostResponse( + post.id, + UserResponse.from(user), + post.overview, + post.text, + post.createdAt, + post.visibility, + post.url, + post.sensitive + ) + } + } +} diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt b/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt index 6360e609..12156818 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt @@ -88,7 +88,9 @@ class PostRepositoryImpl(database: Database, private val idGenerateService: IdGe limit: Int?, userId: Long? ): List { - TODO("Not yet implemented") + return query { + Posts.select { Posts.visibility eq Visibility.PUBLIC.ordinal }.map { it.toPost() } + } } override suspend fun findByUserNameAndDomain( diff --git a/src/main/kotlin/dev/usbharu/hideout/service/api/IPostApiService.kt b/src/main/kotlin/dev/usbharu/hideout/service/api/IPostApiService.kt index eb7eb97a..6aa54403 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/api/IPostApiService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/api/IPostApiService.kt @@ -1,12 +1,12 @@ package dev.usbharu.hideout.service.api -import dev.usbharu.hideout.domain.model.hideout.entity.Post +import dev.usbharu.hideout.domain.model.hideout.dto.PostResponse import java.time.Instant @Suppress("LongParameterList") interface IPostApiService { - suspend fun createPost(postForm: dev.usbharu.hideout.domain.model.hideout.form.Post, userId: Long): Post - suspend fun getById(id: Long, userId: Long?): Post + suspend fun createPost(postForm: dev.usbharu.hideout.domain.model.hideout.form.Post, userId: Long): PostResponse + suspend fun getById(id: Long, userId: Long?): PostResponse suspend fun getAll( since: Instant? = null, until: Instant? = null, @@ -14,7 +14,7 @@ interface IPostApiService { maxId: Long? = null, limit: Int? = null, userId: Long? = null - ): List + ): List suspend fun getByUser( nameOrId: String, @@ -24,5 +24,5 @@ interface IPostApiService { maxId: Long? = null, limit: Int? = null, userId: Long? = null - ): List + ): List } diff --git a/src/main/kotlin/dev/usbharu/hideout/service/api/PostApiServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/api/PostApiServiceImpl.kt index 35e05585..b8957f87 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/api/PostApiServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/api/PostApiServiceImpl.kt @@ -2,11 +2,16 @@ package dev.usbharu.hideout.service.api import dev.usbharu.hideout.config.Config import dev.usbharu.hideout.domain.model.hideout.dto.PostCreateDto -import dev.usbharu.hideout.domain.model.hideout.entity.Post -import dev.usbharu.hideout.exception.PostNotFoundException -import dev.usbharu.hideout.repository.IPostRepository +import dev.usbharu.hideout.domain.model.hideout.dto.PostResponse +import dev.usbharu.hideout.repository.* import dev.usbharu.hideout.service.post.IPostService import dev.usbharu.hideout.util.AcctUtil +import kotlinx.coroutines.Dispatchers +import org.jetbrains.exposed.sql.and +import org.jetbrains.exposed.sql.innerJoin +import org.jetbrains.exposed.sql.select +import org.jetbrains.exposed.sql.selectAll +import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction import org.koin.core.annotation.Single import java.time.Instant import dev.usbharu.hideout.domain.model.hideout.form.Post as FormPost @@ -14,10 +19,11 @@ import dev.usbharu.hideout.domain.model.hideout.form.Post as FormPost @Single class PostApiServiceImpl( private val postService: IPostService, - private val postRepository: IPostRepository + private val postRepository: IPostRepository, + private val userRepository: IUserRepository ) : IPostApiService { - override suspend fun createPost(postForm: FormPost, userId: Long): Post { - return postService.createLocal( + override suspend fun createPost(postForm: FormPost, userId: Long): PostResponse { + val createdPost = postService.createLocal( PostCreateDto( text = postForm.text, overview = postForm.overview, @@ -27,11 +33,20 @@ class PostApiServiceImpl( userId = userId ) ) + val creator = userRepository.findById(userId) + return PostResponse.from(createdPost, creator!!) } - override suspend fun getById(id: Long, userId: Long?): Post { - return postRepository.findOneById(id, userId) - ?: throw PostNotFoundException("$id was not found or is not authorized.") + @Suppress("InjectDispatcher") + suspend fun query(block: suspend () -> T): T = + newSuspendedTransaction(Dispatchers.IO) { block() } + + override suspend fun getById(id: Long, userId: Long?): PostResponse { + val query = query { + Posts.innerJoin(Users, onColumn = { Posts.userId }, otherColumn = { Users.id }).select { Posts.id eq id } + .single() + } + return PostResponse.from(query.toPost(), query.toUser()) } override suspend fun getAll( @@ -41,7 +56,12 @@ class PostApiServiceImpl( maxId: Long?, limit: Int?, userId: Long? - ): List = postRepository.findAll(since, until, minId, maxId, limit, userId) + ): List { + return query { + Posts.innerJoin(Users, onColumn = { Posts.userId }, otherColumn = { id }).selectAll() + .map { PostResponse.from(it.toPost(), it.toUser()) } + } + } override suspend fun getByUser( nameOrId: String, @@ -51,23 +71,22 @@ class PostApiServiceImpl( maxId: Long?, limit: Int?, userId: Long? - ): List { + ): List { val idOrNull = nameOrId.toLongOrNull() return if (idOrNull == null) { val acct = AcctUtil.parse(nameOrId) - postRepository.findByUserNameAndDomain( - username = acct.username, - s = acct.domain - ?: Config.configData.domain, - since = since, - until = until, - minId = minId, - maxId = maxId, - limit = limit, - userId = userId - ) + query { + Posts.innerJoin(Users, onColumn = { Posts.userId }, otherColumn = { id }).select { + Users.name.eq(acct.username) + .and(Users.domain eq (acct.domain ?: Config.configData.domain)) + }.map { PostResponse.from(it.toPost(), it.toUser()) } + } } else { - postRepository.findByUserId(idOrNull, since, until, minId, maxId, limit, userId) + query { + Posts.innerJoin(Users, onColumn = { Posts.userId }, otherColumn = { id }).select { + Posts.userId eq idOrNull + }.map { PostResponse.from(it.toPost(), it.toUser()) } + } } } } diff --git a/vite.config.ts b/vite.config.ts index 3f3c0c58..e0e384eb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vite'; +import {defineConfig} from 'vite'; import solidPlugin from 'vite-plugin-solid'; import suidPlugin from "@suid/vite-plugin"; @@ -8,9 +8,6 @@ export default defineConfig({ port: 3000, proxy: { '/api': 'http://localhost:8080', - '/login': 'http://localhost:8080', - '/auth-check': 'http://localhost:8080', - '/refresh-token': 'http://localhost:8080', } }, root: './src/main/web', From 7caae2cbaa333f36f4e8ac200d1391ce2c6a62a9 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:04:21 +0900 Subject: [PATCH 4/8] =?UTF-8?q?feat:=20API=E3=81=AE=E3=83=A2=E3=83=87?= =?UTF-8?q?=E3=83=AB=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/openapi/api.yaml | 13 +++---------- src/main/web/model/PostDetails.ts | 5 ----- src/main/web/organisms/Post.tsx | 4 ++-- src/main/web/pages/TopPage.tsx | 16 +--------------- src/main/web/templates/PostList.tsx | 4 ++-- 5 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 src/main/web/model/PostDetails.ts diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index 6e1c4382..82f8f3e5 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -303,22 +303,19 @@ components: type: object required: - id - - userId + - user - text - createdAt - visibility - url - sensitive - - apId properties: id: type: integer format: int64 readOnly: true - userId: - type: integer - format: int64 - readOnly: true + user: + $ref: "#/components/schemas/UserResponse" overview: type: string text: @@ -343,10 +340,6 @@ components: readOnly: true sensitive: type: boolean - apId: - type: string - format: url - readOnly: true PostRequest: type: object diff --git a/src/main/web/model/PostDetails.ts b/src/main/web/model/PostDetails.ts deleted file mode 100644 index 1aa7250c..00000000 --- a/src/main/web/model/PostDetails.ts +++ /dev/null @@ -1,5 +0,0 @@ -import {PostResponse, UserResponse} from "../generated"; - -export type PostDetails = PostResponse & { - user: UserResponse -} diff --git a/src/main/web/organisms/Post.tsx b/src/main/web/organisms/Post.tsx index 9e9253dc..f3680354 100644 --- a/src/main/web/organisms/Post.tsx +++ b/src/main/web/organisms/Post.tsx @@ -2,10 +2,10 @@ import {Component, createSignal} from "solid-js"; import {Box, Card, CardActions, CardContent, CardHeader, IconButton, Menu, MenuItem, Typography} from "@suid/material"; import {Avatar} from "../atoms/Avatar"; import {Favorite, MoreVert, Reply, ScreenRotationAlt} from "@suid/icons-material"; -import {PostDetails} from "../model/PostDetails"; import {ShareScopeIndicator} from "../molecules/ShareScopeIndicator"; +import {PostResponse} from "../generated"; -export const Post: Component<{ post: PostDetails }> = (props) => { +export const Post: Component<{ post: PostResponse }> = (props) => { const [anchorEl, setAnchorEl] = createSignal(null) const open = () => Boolean(anchorEl()); const handleClose = () => { diff --git a/src/main/web/pages/TopPage.tsx b/src/main/web/pages/TopPage.tsx index 451000cd..95cf9983 100644 --- a/src/main/web/pages/TopPage.tsx +++ b/src/main/web/pages/TopPage.tsx @@ -3,7 +3,6 @@ import {MainPage} from "../templates/MainPage"; import {PostForm} from "../organisms/PostForm"; import {Stack} from "@suid/material"; import {DefaultApi} from "../generated"; -import {PostDetails} from "../model/PostDetails"; import {PostList} from "../templates/PostList"; import {ApiWrapper} from "../lib/ApiWrapper"; @@ -16,20 +15,7 @@ export const TopPage: Component = () => { - { - return { - ...value, - user: { - id: 1234, - createdAt: Date.now(), - domain: "test-hideout.usbharu.dev", - name: "test", - url: "https://test-hideout.usbharu.dev", - screenName: "test", - description: "" - } - } as PostDetails - }) ?? []}/> + ) diff --git a/src/main/web/templates/PostList.tsx b/src/main/web/templates/PostList.tsx index 2b9d0dad..f8f4fc1e 100644 --- a/src/main/web/templates/PostList.tsx +++ b/src/main/web/templates/PostList.tsx @@ -1,9 +1,9 @@ import {Component, For} from "solid-js"; import {CircularProgress} from "@suid/material"; import {Post} from "../organisms/Post"; -import {PostDetails} from "../model/PostDetails"; +import {PostResponse} from "../generated"; -export const PostList: Component<{ posts: PostDetails[] }> = (props) => { +export const PostList: Component<{ posts: PostResponse[] }> = (props) => { return ( }> { From cd442d7f51d9010fa9fb93e0494aca7af820fd8b Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Wed, 28 Jun 2023 18:36:38 +0900 Subject: [PATCH 5/8] =?UTF-8?q?feat:=20=E3=82=B5=E3=82=A4=E3=83=89?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=80=81=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + package-lock.json | 247 +++++++++++++++++++++++++++ package.json | 2 + src/main/web/App.tsx | 30 ++-- src/main/web/atoms/SidebarButton.tsx | 14 ++ src/main/web/lib/ApiProvider.tsx | 8 + src/main/web/organisms/PostForm.tsx | 11 +- src/main/web/pages/LoginPage.tsx | 39 +++++ src/main/web/pages/TopPage.tsx | 14 +- src/main/web/templates/MainPage.tsx | 10 +- src/main/web/templates/PostList.tsx | 2 +- src/main/web/templates/Sidebar.tsx | 15 +- vite.config.ts | 10 +- 13 files changed, 369 insertions(+), 34 deletions(-) create mode 100644 src/main/web/atoms/SidebarButton.tsx create mode 100644 src/main/web/lib/ApiProvider.tsx create mode 100644 src/main/web/pages/LoginPage.tsx diff --git a/.gitignore b/.gitignore index a9f19f80..2165d593 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ out/ /src/main/resources/static/ /node_modules/ /src/main/web/generated/ +/stats.html diff --git a/package-lock.json b/package-lock.json index 819519ab..61f7805b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "hideout", "version": "1.0.0", "dependencies": { + "@solid-primitives/context": "^0.2.1", "@solid-primitives/storage": "^1.3.11", "@solidjs/router": "^0.8.2", "@suid/icons-material": "^0.6.3", @@ -17,6 +18,7 @@ "devDependencies": { "@openapitools/openapi-generator-cli": "^2.6.0", "@suid/vite-plugin": "^0.1.3", + "rollup-plugin-visualizer": "^5.9.2", "typescript": "^5.0.4", "vite": "^4.2.1", "vite-plugin-solid": "^2.7.0" @@ -1273,6 +1275,14 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@solid-primitives/context": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@solid-primitives/context/-/context-0.2.1.tgz", + "integrity": "sha512-XIIwCOWpRKDersgkR9LNFXaJHIV8QlCFo/tq5bV0cAOZklcwOFcqi2bN+uWgEIQSWGjWXU2kc1H1/TzgYzVDlg==", + "peerDependencies": { + "solid-js": "^1.6.12" + } + }, "node_modules/@solid-primitives/storage": { "version": "1.3.11", "resolved": "https://registry.npmjs.org/@solid-primitives/storage/-/storage-1.3.11.tgz", @@ -1992,6 +2002,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2392,6 +2411,21 @@ "node": ">=8" } }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2434,6 +2468,18 @@ "url": "https://github.com/sponsors/mesqueeb" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/iterare": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", @@ -2723,6 +2769,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -2846,6 +2909,18 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/postcss": { "version": "8.4.24", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", @@ -2938,6 +3013,73 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-visualizer": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.9.2.tgz", + "integrity": "sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==", + "dev": true, + "dependencies": { + "open": "^8.4.0", + "picomatch": "^2.3.1", + "source-map": "^0.7.4", + "yargs": "^17.5.1" + }, + "bin": { + "rollup-plugin-visualizer": "dist/bin/cli.js" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "rollup": "2.x || 3.x" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -3034,6 +3176,15 @@ "solid-js": "^1.3" } }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -4227,6 +4378,12 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" }, + "@solid-primitives/context": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@solid-primitives/context/-/context-0.2.1.tgz", + "integrity": "sha512-XIIwCOWpRKDersgkR9LNFXaJHIV8QlCFo/tq5bV0cAOZklcwOFcqi2bN+uWgEIQSWGjWXU2kc1H1/TzgYzVDlg==", + "requires": {} + }, "@solid-primitives/storage": { "version": "1.3.11", "resolved": "https://registry.npmjs.org/@solid-primitives/storage/-/storage-1.3.11.tgz", @@ -4759,6 +4916,12 @@ "clone": "^1.0.2" } }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -5050,6 +5213,12 @@ } } }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -5074,6 +5243,15 @@ "integrity": "sha512-yq8gMao5upkPoGEU9LsB2P+K3Kt8Q3fQFCGyNCWOAnJAMzEXVV9drYb0TXr42TTliLLhKIBvulgAXgtLLnwzGA==", "dev": true }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, "iterare": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", @@ -5274,6 +5452,17 @@ "mimic-fn": "^2.1.0" } }, + "open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, "ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -5366,6 +5555,12 @@ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "postcss": { "version": "8.4.24", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", @@ -5425,6 +5620,52 @@ "fsevents": "~2.3.2" } }, + "rollup-plugin-visualizer": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.9.2.tgz", + "integrity": "sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==", + "dev": true, + "requires": { + "open": "^8.4.0", + "picomatch": "^2.3.1", + "source-map": "^0.7.4", + "yargs": "^17.5.1" + }, + "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -5497,6 +5738,12 @@ "@babel/types": "^7.21.2" } }, + "source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true + }, "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", diff --git a/package.json b/package.json index 0ce430cc..2425b705 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "hideout", "version": "1.0.0", "dependencies": { + "@solid-primitives/context": "^0.2.1", "@solid-primitives/storage": "^1.3.11", "@solidjs/router": "^0.8.2", "@suid/icons-material": "^0.6.3", @@ -11,6 +12,7 @@ "devDependencies": { "@openapitools/openapi-generator-cli": "^2.6.0", "@suid/vite-plugin": "^0.1.3", + "rollup-plugin-visualizer": "^5.9.2", "typescript": "^5.0.4", "vite": "^4.2.1", "vite-plugin-solid": "^2.7.0" diff --git a/src/main/web/App.tsx b/src/main/web/App.tsx index 5f95a4dc..7e925695 100644 --- a/src/main/web/App.tsx +++ b/src/main/web/App.tsx @@ -1,24 +1,32 @@ -import {Component} from "solid-js"; +import {Component, createSignal, lazy} from "solid-js"; import {Route, Router, Routes} from "@solidjs/router"; import {TopPage} from "./pages/TopPage"; import {createTheme, CssBaseline, ThemeProvider, useMediaQuery} from "@suid/material"; +import {createCookieStorage} from "@solid-primitives/storage"; +import {ApiProvider, useApi} from "./lib/ApiProvider"; +import {Configuration, DefaultApi} from "./generated"; +import {LoginPage} from "./pages/LoginPage"; export const App: Component = () => { const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); - + const [cookie,setCookie] = createCookieStorage() + const [api,setApi] = createSignal(new DefaultApi(new Configuration({basePath:window.location.origin+"/api/internal/v1/",apiKey:cookie.key as string}))) const theme = createTheme({ palette: { mode: prefersDarkMode() ? 'dark' : 'light', } }) return ( - - - - - - - - + + + + + + + + + + + ) -} \ No newline at end of file +} diff --git a/src/main/web/atoms/SidebarButton.tsx b/src/main/web/atoms/SidebarButton.tsx new file mode 100644 index 00000000..cfce597a --- /dev/null +++ b/src/main/web/atoms/SidebarButton.tsx @@ -0,0 +1,14 @@ +import {ParentComponent} from "solid-js"; +import {Button, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText} from "@suid/material"; +import {Link} from "@solidjs/router"; + +export const SidebarButton: ParentComponent<{ text: string,linkTo:string }> = (props) => { + return ( + + + {props.children} + + + + ) +} diff --git a/src/main/web/lib/ApiProvider.tsx b/src/main/web/lib/ApiProvider.tsx new file mode 100644 index 00000000..006f9897 --- /dev/null +++ b/src/main/web/lib/ApiProvider.tsx @@ -0,0 +1,8 @@ +import {createContextProvider} from "@solid-primitives/context"; +import {createSignal} from "solid-js"; +import {DefaultApi, DefaultApiInterface} from "../generated"; + +export const [ApiProvider,useApi] = createContextProvider((props:{api:DefaultApiInterface}) => { + const [api,setApi] = createSignal(props.api); + return api +},()=>new DefaultApi()); diff --git a/src/main/web/organisms/PostForm.tsx b/src/main/web/organisms/PostForm.tsx index 4a89fa80..3d11515a 100644 --- a/src/main/web/organisms/PostForm.tsx +++ b/src/main/web/organisms/PostForm.tsx @@ -1,15 +1,18 @@ -import {Component} from "solid-js"; +import {Component, createSignal} from "solid-js"; import {Button, IconButton, Paper, Stack, TextField, Typography} from "@suid/material"; import {Avatar} from "../atoms/Avatar"; import {AddPhotoAlternate, Poll, Public} from "@suid/icons-material"; +import {useApi} from "../lib/ApiProvider"; export const PostForm: Component<{ label: string }> = (props) => { + const [text, setText] = createSignal("") + const api = useApi() return ( - + setText(event.target.value)} fullWidth/> @@ -27,7 +30,9 @@ export const PostForm: Component<{ label: string }> = (props) => { aaa - diff --git a/src/main/web/pages/LoginPage.tsx b/src/main/web/pages/LoginPage.tsx new file mode 100644 index 00000000..d5ccc4f1 --- /dev/null +++ b/src/main/web/pages/LoginPage.tsx @@ -0,0 +1,39 @@ +import {Button, Card, CardContent, CardHeader, Modal, Stack, TextField} from "@suid/material"; +import {Component, createSignal} from "solid-js"; + +export const LoginPage:Component = () => { + const [username,setUsername] = createSignal("") + const [password,setPassword] = createSignal("") + + return ( + + + + + + + + setUsername(event.target.value)} + label="Username" + type="text" + autoComplete="username" + variant="standard" + /> + setPassword(event.target.value)} + label="Password" + type="password" + autoComplete="current-password" + variant="standard" + /> + + + + + + ) +} diff --git a/src/main/web/pages/TopPage.tsx b/src/main/web/pages/TopPage.tsx index 95cf9983..b62c2665 100644 --- a/src/main/web/pages/TopPage.tsx +++ b/src/main/web/pages/TopPage.tsx @@ -1,21 +1,23 @@ -import {Component, createResource} from "solid-js"; +import {Component} from "solid-js"; import {MainPage} from "../templates/MainPage"; import {PostForm} from "../organisms/PostForm"; import {Stack} from "@suid/material"; -import {DefaultApi} from "../generated"; +import {PostResponse} from "../generated"; import {PostList} from "../templates/PostList"; -import {ApiWrapper} from "../lib/ApiWrapper"; +import {useApi} from "../lib/ApiProvider"; +import {createStore} from "solid-js/store"; export const TopPage: Component = () => { - const api = new ApiWrapper(new DefaultApi()) - const [posts] = createResource(api.postsGet); + const api = useApi() + const [posts, setPosts] = createStore([]) + api().postsGet().then((res)=>setPosts(res)) return ( - + ) diff --git a/src/main/web/templates/MainPage.tsx b/src/main/web/templates/MainPage.tsx index a4c9b4d0..cf183a8e 100644 --- a/src/main/web/templates/MainPage.tsx +++ b/src/main/web/templates/MainPage.tsx @@ -1,20 +1,20 @@ -import {ParentComponent} from "solid-js"; +import {createSignal, ParentComponent} from "solid-js"; import {Grid} from "@suid/material"; import {Sidebar} from "./Sidebar"; export const MainPage: ParentComponent = (props) => { - return ( - + - + {props.children} + ) -} \ No newline at end of file +} diff --git a/src/main/web/templates/PostList.tsx b/src/main/web/templates/PostList.tsx index f8f4fc1e..82930d8e 100644 --- a/src/main/web/templates/PostList.tsx +++ b/src/main/web/templates/PostList.tsx @@ -3,7 +3,7 @@ import {CircularProgress} from "@suid/material"; import {Post} from "../organisms/Post"; import {PostResponse} from "../generated"; -export const PostList: Component<{ posts: PostResponse[] }> = (props) => { +export const PostList: Component<{ posts: PostResponse[] | undefined }> = (props) => { return ( }> { diff --git a/src/main/web/templates/Sidebar.tsx b/src/main/web/templates/Sidebar.tsx index 663d7c07..cf8d16de 100644 --- a/src/main/web/templates/Sidebar.tsx +++ b/src/main/web/templates/Sidebar.tsx @@ -1,10 +1,13 @@ import {Component} from "solid-js"; -import {Stack} from "@suid/material"; +import {Button, List, Stack} from "@suid/material"; +import {Home} from "@suid/icons-material"; +import {SidebarButton} from "../atoms/SidebarButton"; -export const Sidebar: Component = () => { +export const Sidebar: Component = (props) => { return ( - - - + + + + ) -} \ No newline at end of file +} diff --git a/vite.config.ts b/vite.config.ts index e0e384eb..bf6b9be6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,10 @@ -import {defineConfig} from 'vite'; +import {defineConfig, splitVendorChunkPlugin} from 'vite'; import solidPlugin from 'vite-plugin-solid'; import suidPlugin from "@suid/vite-plugin"; +import visualizer from "rollup-plugin-visualizer"; export default defineConfig({ - plugins: [solidPlugin(),suidPlugin()], + plugins: [solidPlugin(),suidPlugin(),splitVendorChunkPlugin()], server: { port: 3000, proxy: { @@ -14,5 +15,10 @@ export default defineConfig({ build: { target: 'esnext', outDir: '../resources/static', + rollupOptions:{ + plugins: [ + visualizer() + ] + } }, }); From b1d074703874c1b9652485ab5b93047f586db8d2 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:50:28 +0900 Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E6=88=90=E5=8A=9F=E6=99=82=E3=81=AB=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=83=B3=E3=82=92=E4=BF=9D=E5=AD=98=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 + .../kotlin/dev/usbharu/hideout/Application.kt | 1 + .../usbharu/hideout/plugins/Compression.kt | 19 ++++++ src/main/resources/openapi/api.yaml | 61 +++++++++++++++++++ src/main/web/App.tsx | 2 +- src/main/web/pages/LoginPage.tsx | 29 ++++++--- 6 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 src/main/kotlin/dev/usbharu/hideout/plugins/Compression.kt diff --git a/build.gradle.kts b/build.gradle.kts index a3b71261..91ca0a6a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -80,12 +80,14 @@ dependencies { implementation("org.xerial:sqlite-jdbc:3.40.1.0") implementation("io.ktor:ktor-server-websockets-jvm:$ktor_version") implementation("io.ktor:ktor-server-cio-jvm:$ktor_version") + implementation("io.ktor:ktor-server-compression:$ktor_version") implementation("ch.qos.logback:logback-classic:$logback_version") implementation("io.insert-koin:koin-core:$koin_version") implementation("io.insert-koin:koin-ktor:$koin_version") implementation("io.insert-koin:koin-logger-slf4j:$koin_version") implementation("io.insert-koin:koin-annotations:1.2.0") + implementation("io.ktor:ktor-server-compression-jvm:2.3.0") ksp("io.insert-koin:koin-ksp-compiler:1.2.0") diff --git a/src/main/kotlin/dev/usbharu/hideout/Application.kt b/src/main/kotlin/dev/usbharu/hideout/Application.kt index 5052c79c..4a6d4f68 100644 --- a/src/main/kotlin/dev/usbharu/hideout/Application.kt +++ b/src/main/kotlin/dev/usbharu/hideout/Application.kt @@ -95,6 +95,7 @@ fun Application.parent() { runBlocking { inject().value.init() } + configureCompression() configureHTTP() configureStaticRouting() configureMonitoring() diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Compression.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Compression.kt new file mode 100644 index 00000000..e13fa4c9 --- /dev/null +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Compression.kt @@ -0,0 +1,19 @@ +package dev.usbharu.hideout.plugins + +import io.ktor.http.* +import io.ktor.server.application.* +import io.ktor.server.plugins.compression.* + +fun Application.configureCompression() { + install(Compression) { + gzip { + matchContentType(ContentType.Application.JavaScript) + priority = 1.0 + } + deflate { + matchContentType(ContentType.Application.JavaScript) + priority = 10.0 + minimumSize(1024) // condition + } + } +} diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index 82f8f3e5..17efe775 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -230,6 +230,46 @@ paths: items: $ref: "#/components/schemas/UserResponse" + /login: + post: + summary: ログインする + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UserLogin" + responses: + 200: + description: ログイン成功 + content: + application/json: + schema: + $ref: "#/components/schemas/JwtToken" + + /refresh-token: + post: + summary: 期限切れトークンの再発行をする + responses: + 200: + description: トークンの再発行に成功 + content: + application/json: + schema: + $ref: "#/components/schemas/JwtToken" + + /auth-check: + get: + summary: 認証チェック + responses: + 200: + description: 認証に成功 + content: + text/plain: + schema: + type: string + + components: responses: Unauthorized: @@ -359,6 +399,27 @@ components: sensitive: type: boolean + JwtToken: + type: object + properties: + token: + type: string + refreshToken: + type: string + + RefreshToken: + type: object + properties: + refreshToken: + type: string + + UserLogin: + type: object + properties: + username: + type: string + password: + type: string securitySchemes: BearerAuth: diff --git a/src/main/web/App.tsx b/src/main/web/App.tsx index 7e925695..8114059a 100644 --- a/src/main/web/App.tsx +++ b/src/main/web/App.tsx @@ -10,7 +10,7 @@ import {LoginPage} from "./pages/LoginPage"; export const App: Component = () => { const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); const [cookie,setCookie] = createCookieStorage() - const [api,setApi] = createSignal(new DefaultApi(new Configuration({basePath:window.location.origin+"/api/internal/v1/",apiKey:cookie.key as string}))) + const [api,setApi] = createSignal(new DefaultApi(new Configuration({basePath:window.location.origin+"/api/internal/v1",apiKey:cookie.key as string}))) const theme = createTheme({ palette: { mode: prefersDarkMode() ? 'dark' : 'light', diff --git a/src/main/web/pages/LoginPage.tsx b/src/main/web/pages/LoginPage.tsx index d5ccc4f1..a2d1b1ff 100644 --- a/src/main/web/pages/LoginPage.tsx +++ b/src/main/web/pages/LoginPage.tsx @@ -1,9 +1,25 @@ import {Button, Card, CardContent, CardHeader, Modal, Stack, TextField} from "@suid/material"; import {Component, createSignal} from "solid-js"; +import {createCookieStorage} from "@solid-primitives/storage"; +import {useApi} from "../lib/ApiProvider"; -export const LoginPage:Component = () => { - const [username,setUsername] = createSignal("") - const [password,setPassword] = createSignal("") +export const LoginPage: Component = () => { + const [username, setUsername] = createSignal("") + const [password, setPassword] = createSignal("") + + const [cookie, setCookie] = createCookieStorage(); + + const api = useApi(); + + const onSubmit: () => void = () => { + api().loginPost({password: password(), username: username()}).then(value => { + setCookie("token", value.token); + setCookie("refresh-token", value.refreshToken) + }).catch(reason => { + console.log(reason); + setPassword("") + }) + } return ( @@ -15,7 +31,7 @@ export const LoginPage:Component = () => { setUsername(event.target.value)} + onChange={(event) => setUsername(event.target.value)} label="Username" type="text" autoComplete="username" @@ -23,14 +39,13 @@ export const LoginPage:Component = () => { /> setPassword(event.target.value)} + onChange={(event) => setPassword(event.target.value)} label="Password" type="password" autoComplete="current-password" variant="standard" /> - + From 3f3a5dccebea24b4ba55d098ee4624e1fc5ed7c6 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 6 Jul 2023 22:06:10 +0900 Subject: [PATCH 7/8] =?UTF-8?q?feat:=20=E6=8A=95=E7=A8=BF=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/dev/usbharu/hideout/Application.kt | 47 +++++++++--------- .../dev/usbharu/hideout/plugins/Routing.kt | 22 ++++++--- .../dev/usbharu/hideout/plugins/Security.kt | 43 ++-------------- .../hideout/routing/api/internal/v1/Auth.kt | 49 +++++++++++++++++++ src/main/resources/openapi/api.yaml | 1 + src/main/web/App.tsx | 20 ++++++-- src/main/web/pages/LoginPage.tsx | 4 ++ .../usbharu/hideout/plugins/SecurityKtTest.kt | 28 +++++------ .../routing/api/internal/v1/PostsTest.kt | 20 ++++---- .../routing/api/internal/v1/UsersTest.kt | 26 +++++----- 10 files changed, 151 insertions(+), 109 deletions(-) create mode 100644 src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt diff --git a/src/main/kotlin/dev/usbharu/hideout/Application.kt b/src/main/kotlin/dev/usbharu/hideout/Application.kt index 4a6d4f68..e94ec8a5 100644 --- a/src/main/kotlin/dev/usbharu/hideout/Application.kt +++ b/src/main/kotlin/dev/usbharu/hideout/Application.kt @@ -49,19 +49,19 @@ val Application.property: Application.(propertyName: String) -> String @Suppress("unused", "LongMethod") fun Application.parent() { Config.configData = ConfigData( - url = property("hideout.url"), - objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) - .setSerializationInclusion(JsonInclude.Include.NON_EMPTY) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + url = property("hideout.url"), + objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + .setSerializationInclusion(JsonInclude.Include.NON_EMPTY) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) ) val module = org.koin.dsl.module { single { Database.connect( - url = property("hideout.database.url"), - driver = property("hideout.database.driver"), - user = property("hideout.database.username"), - password = property("hideout.database.password") + url = property("hideout.database.url"), + driver = property("hideout.database.driver"), + user = property("hideout.database.username"), + password = property("hideout.database.password") ) } single { @@ -84,11 +84,11 @@ fun Application.parent() { single { TwitterSnowflakeIdGenerateService } single { JwkProviderBuilder(Config.configData.url).cached( - 10, - 24, - TimeUnit.HOURS + 10, + 24, + TimeUnit.HOURS ) - .rateLimited(10, 1, TimeUnit.MINUTES).build() + .rateLimited(10, 1, TimeUnit.MINUTES).build() } } configureKoin(module, HideoutModule().module) @@ -102,19 +102,20 @@ fun Application.parent() { configureSerialization() register(inject().value) configureSecurity( - inject().value, - inject().value, - inject().value, - inject().value, - inject().value, + inject().value, + inject().value ) configureRouting( - httpSignatureVerifyService = inject().value, - activityPubService = inject().value, - userService = inject().value, - activityPubUserService = inject().value, - postService = inject().value, - userApiService = inject().value, + httpSignatureVerifyService = inject().value, + activityPubService = inject().value, + userService = inject().value, + activityPubUserService = inject().value, + postService = inject().value, + userApiService = inject().value, + userAuthService = inject().value, + userRepository = inject().value, + jwtService = inject().value, + metaService = inject().value ) } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt index 5931ad53..b45fc1a7 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt @@ -1,8 +1,10 @@ package dev.usbharu.hideout.plugins +import dev.usbharu.hideout.repository.IUserRepository import dev.usbharu.hideout.routing.activitypub.inbox import dev.usbharu.hideout.routing.activitypub.outbox import dev.usbharu.hideout.routing.activitypub.usersAP +import dev.usbharu.hideout.routing.api.internal.v1.auth import dev.usbharu.hideout.routing.api.internal.v1.posts import dev.usbharu.hideout.routing.api.internal.v1.users import dev.usbharu.hideout.routing.wellknown.webfinger @@ -11,6 +13,9 @@ import dev.usbharu.hideout.service.activitypub.ActivityPubUserService import dev.usbharu.hideout.service.api.IPostApiService import dev.usbharu.hideout.service.api.IUserApiService import dev.usbharu.hideout.service.auth.HttpSignatureVerifyService +import dev.usbharu.hideout.service.auth.IJwtService +import dev.usbharu.hideout.service.core.IMetaService +import dev.usbharu.hideout.service.user.IUserAuthService import dev.usbharu.hideout.service.user.IUserService import io.ktor.server.application.* import io.ktor.server.plugins.autohead.* @@ -18,12 +23,16 @@ import io.ktor.server.routing.* @Suppress("LongParameterList") fun Application.configureRouting( - httpSignatureVerifyService: HttpSignatureVerifyService, - activityPubService: ActivityPubService, - userService: IUserService, - activityPubUserService: ActivityPubUserService, - postService: IPostApiService, - userApiService: IUserApiService + httpSignatureVerifyService: HttpSignatureVerifyService, + activityPubService: ActivityPubService, + userService: IUserService, + activityPubUserService: ActivityPubUserService, + postService: IPostApiService, + userApiService: IUserApiService, + userAuthService: IUserAuthService, + userRepository: IUserRepository, + jwtService: IJwtService, + metaService: IMetaService ) { install(AutoHeadResponse) routing { @@ -34,6 +43,7 @@ fun Application.configureRouting( route("/api/internal/v1") { posts(postService) users(userService, userApiService) + auth(userAuthService, userRepository, jwtService, metaService) } } } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt index a98eee18..2bba7f6c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt @@ -2,19 +2,12 @@ package dev.usbharu.hideout.plugins import com.auth0.jwk.JwkProvider import dev.usbharu.hideout.config.Config -import dev.usbharu.hideout.domain.model.hideout.form.RefreshToken -import dev.usbharu.hideout.domain.model.hideout.form.UserLogin -import dev.usbharu.hideout.exception.UserNotFoundException -import dev.usbharu.hideout.repository.IUserRepository -import dev.usbharu.hideout.service.auth.IJwtService import dev.usbharu.hideout.service.core.IMetaService -import dev.usbharu.hideout.service.user.IUserAuthService import dev.usbharu.hideout.util.JsonWebKeyUtil import io.ktor.http.* import io.ktor.server.application.* import io.ktor.server.auth.* import io.ktor.server.auth.jwt.* -import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.* @@ -22,11 +15,8 @@ const val TOKEN_AUTH = "jwt-auth" @Suppress("MagicNumber") fun Application.configureSecurity( - userAuthService: IUserAuthService, - metaService: IMetaService, - userRepository: IUserRepository, - jwtService: IJwtService, - jwkProvider: JwkProvider + jwkProvider: JwkProvider, + metaService: IMetaService ) { val issuer = Config.configData.url install(Authentication) { @@ -48,38 +38,13 @@ fun Application.configureSecurity( } routing { - post("/login") { - val loginUser = call.receive() - val check = userAuthService.verifyAccount(loginUser.username, loginUser.password) - if (check.not()) { - return@post call.respond(HttpStatusCode.Unauthorized) - } - - val user = userRepository.findByNameAndDomain(loginUser.username, Config.configData.domain) - ?: throw UserNotFoundException("${loginUser.username} was not found.") - - return@post call.respond(jwtService.createToken(user)) - } - - post("/refresh-token") { - val refreshToken = call.receive() - return@post call.respond(jwtService.refreshToken(refreshToken)) - } - get("/.well-known/jwks.json") { //language=JSON val jwt = metaService.getJwtMeta() call.respondText( - contentType = ContentType.Application.Json, - text = JsonWebKeyUtil.publicKeyToJwk(jwt.publicKey, jwt.kid.toString()) + contentType = ContentType.Application.Json, + text = JsonWebKeyUtil.publicKeyToJwk(jwt.publicKey, jwt.kid.toString()) ) } - authenticate(TOKEN_AUTH) { - get("/auth-check") { - val principal = call.principal() ?: throw IllegalStateException("no principal") - val username = principal.payload.getClaim("uid") - call.respondText("Hello $username") - } - } } } diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt new file mode 100644 index 00000000..8a1e344a --- /dev/null +++ b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt @@ -0,0 +1,49 @@ +package dev.usbharu.hideout.routing.api.internal.v1 + +import dev.usbharu.hideout.config.Config +import dev.usbharu.hideout.domain.model.hideout.form.RefreshToken +import dev.usbharu.hideout.domain.model.hideout.form.UserLogin +import dev.usbharu.hideout.exception.UserNotFoundException +import dev.usbharu.hideout.plugins.TOKEN_AUTH +import dev.usbharu.hideout.repository.IUserRepository +import dev.usbharu.hideout.service.auth.IJwtService +import dev.usbharu.hideout.service.core.IMetaService +import dev.usbharu.hideout.service.user.IUserAuthService +import dev.usbharu.hideout.util.JsonWebKeyUtil +import io.ktor.http.* +import io.ktor.server.application.* +import io.ktor.server.auth.* +import io.ktor.server.auth.jwt.* +import io.ktor.server.request.* +import io.ktor.server.response.* +import io.ktor.server.routing.* + +fun Route.auth(userAuthService: IUserAuthService, + userRepository: IUserRepository, + jwtService: IJwtService, + metaService: IMetaService) { + post("/login") { + val loginUser = call.receive() + val check = userAuthService.verifyAccount(loginUser.username, loginUser.password) + if (check.not()) { + return@post call.respond(HttpStatusCode.Unauthorized) + } + + val user = userRepository.findByNameAndDomain(loginUser.username, Config.configData.domain) + ?: throw UserNotFoundException("${loginUser.username} was not found.") + + return@post call.respond(jwtService.createToken(user)) + } + + post("/refresh-token") { + val refreshToken = call.receive() + return@post call.respond(jwtService.refreshToken(refreshToken)) + } + authenticate(TOKEN_AUTH) { + get("/auth-check") { + val principal = call.principal() ?: throw IllegalStateException("no principal") + val username = principal.payload.getClaim("uid") + call.respondText("Hello $username") + } + } +} diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index 17efe775..3cc79aab 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -425,3 +425,4 @@ components: BearerAuth: type: http scheme: bearer + bearerFormat: JWT diff --git a/src/main/web/App.tsx b/src/main/web/App.tsx index 8114059a..3a833754 100644 --- a/src/main/web/App.tsx +++ b/src/main/web/App.tsx @@ -1,16 +1,28 @@ -import {Component, createSignal, lazy} from "solid-js"; +import {Component, createEffect, createSignal} from "solid-js"; import {Route, Router, Routes} from "@solidjs/router"; import {TopPage} from "./pages/TopPage"; import {createTheme, CssBaseline, ThemeProvider, useMediaQuery} from "@suid/material"; import {createCookieStorage} from "@solid-primitives/storage"; -import {ApiProvider, useApi} from "./lib/ApiProvider"; +import {ApiProvider} from "./lib/ApiProvider"; import {Configuration, DefaultApi} from "./generated"; import {LoginPage} from "./pages/LoginPage"; export const App: Component = () => { const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); - const [cookie,setCookie] = createCookieStorage() - const [api,setApi] = createSignal(new DefaultApi(new Configuration({basePath:window.location.origin+"/api/internal/v1",apiKey:cookie.key as string}))) + const [cookie, setCookie] = createCookieStorage() + const [api, setApi] = createSignal(new DefaultApi(new Configuration({ + basePath: window.location.origin + "/api/internal/v1", + accessToken: cookie.token as string + }))) + + createEffect(() => { + setApi( + new DefaultApi(new Configuration({ + basePath: window.location.origin + "/api/internal/v1", + accessToken : cookie.token as string + }))) + }) + const theme = createTheme({ palette: { mode: prefersDarkMode() ? 'dark' : 'light', diff --git a/src/main/web/pages/LoginPage.tsx b/src/main/web/pages/LoginPage.tsx index a2d1b1ff..decb6990 100644 --- a/src/main/web/pages/LoginPage.tsx +++ b/src/main/web/pages/LoginPage.tsx @@ -2,6 +2,7 @@ import {Button, Card, CardContent, CardHeader, Modal, Stack, TextField} from "@s import {Component, createSignal} from "solid-js"; import {createCookieStorage} from "@solid-primitives/storage"; import {useApi} from "../lib/ApiProvider"; +import {useNavigate} from "@solidjs/router"; export const LoginPage: Component = () => { const [username, setUsername] = createSignal("") @@ -9,12 +10,15 @@ export const LoginPage: Component = () => { const [cookie, setCookie] = createCookieStorage(); + const navigator = useNavigate(); + const api = useApi(); const onSubmit: () => void = () => { api().loginPost({password: password(), username: username()}).then(value => { setCookie("token", value.token); setCookie("refresh-token", value.refreshToken) + navigator("/") }).catch(reason => { console.log(reason); setPassword("") diff --git a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt index 9da64ff0..113e9b38 100644 --- a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt @@ -70,7 +70,7 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(userAuthService, metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.post("/login") { @@ -97,7 +97,7 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(userAuthService, metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.post("/login") { contentType(ContentType.Application.Json) @@ -122,7 +122,7 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(userAuthService, metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.post("/login") { contentType(ContentType.Application.Json) @@ -140,7 +140,7 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) } client.get("/auth-check").apply { assertEquals(HttpStatusCode.Unauthorized, call.response.status) @@ -155,7 +155,7 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) } client.get("/auth-check") { header("Authorization", "Digest dsfjjhogalkjdfmlhaog") @@ -172,7 +172,7 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) } client.get("/auth-check") { header("Authorization", "") @@ -190,7 +190,7 @@ class SecurityKtTest { application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) } client.get("/auth-check") { header("Authorization", "Bearer ") @@ -248,7 +248,7 @@ class SecurityKtTest { val jwtService = mock() application { configureSerialization() - configureSecurity(mock(), metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.get("/auth-check") { @@ -308,7 +308,7 @@ class SecurityKtTest { val jwtService = mock() application { configureSerialization() - configureSecurity(mock(), metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -366,7 +366,7 @@ class SecurityKtTest { val jwtService = mock() application { configureSerialization() - configureSecurity(mock(), metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -424,7 +424,7 @@ class SecurityKtTest { val jwtService = mock() application { configureSerialization() - configureSecurity(mock(), metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -481,7 +481,7 @@ class SecurityKtTest { val jwtService = mock() application { configureSerialization() - configureSecurity(mock(), metaService, userRepository, jwtService, jwkProvider) + configureSecurity(jwkProvider) } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -501,7 +501,7 @@ class SecurityKtTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), jwtService, mock()) + configureSecurity(mock()) } client.post("/refresh-token") { header("Content-Type", "application/json") @@ -523,7 +523,7 @@ class SecurityKtTest { application { configureStatusPages() configureSerialization() - configureSecurity(mock(), mock(), mock(), jwtService, mock()) + configureSecurity(mock()) } client.post("/refresh-token") { header("Content-Type", "application/json") diff --git a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt index 0f2c1627..c9842020 100644 --- a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt @@ -64,7 +64,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -169,7 +169,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -323,7 +323,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -375,7 +375,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -427,7 +427,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -479,7 +479,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -511,7 +511,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -543,7 +543,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -575,7 +575,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) @@ -607,7 +607,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { posts(postService) diff --git a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt index ea9d703b..e49752d1 100644 --- a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt @@ -58,7 +58,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userService) @@ -96,7 +96,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(userService, mock()) @@ -127,7 +127,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(userService, mock()) @@ -162,7 +162,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -195,7 +195,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -228,7 +228,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -261,7 +261,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -306,7 +306,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -351,7 +351,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -396,7 +396,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -591,7 +591,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -636,7 +636,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -681,7 +681,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock(), mock(), mock(), mock(), mock()) + configureSecurity(mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) From 5c62b929b5106bb84883c58ffbbf3225670bebf3 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 30 Jul 2023 16:41:55 +0900 Subject: [PATCH 8/8] =?UTF-8?q?test:=20=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AE=E5=9E=8B=E3=81=8C=E8=90=BD=E3=81=A1=E3=81=A6=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/dev/usbharu/hideout/Application.kt | 48 ++-- .../usbharu/hideout/domain/model/ap/Note.kt | 2 + .../domain/model/ap/ObjectDeserializer.kt | 1 + .../domain/model/hideout/dto/PostResponse.kt | 16 +- .../domain/model/hideout/entity/User.kt | 4 +- .../dev/usbharu/hideout/plugins/Routing.kt | 22 +- .../dev/usbharu/hideout/plugins/Security.kt | 8 +- .../hideout/routing/api/internal/v1/Auth.kt | 13 +- .../hideout/routing/api/internal/v1/Users.kt | 16 +- .../kjob/exposed/ExposedJobRepository.kt | 1 + .../usbharu/hideout/plugins/SecurityKtTest.kt | 82 +++++-- .../routing/api/internal/v1/PostsTest.kt | 228 +++++++++++++----- .../routing/api/internal/v1/UsersTest.kt | 26 +- ...ActivityPubReceiveFollowServiceImplTest.kt | 23 +- 14 files changed, 327 insertions(+), 163 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/Application.kt b/src/main/kotlin/dev/usbharu/hideout/Application.kt index e94ec8a5..a80d3399 100644 --- a/src/main/kotlin/dev/usbharu/hideout/Application.kt +++ b/src/main/kotlin/dev/usbharu/hideout/Application.kt @@ -49,19 +49,19 @@ val Application.property: Application.(propertyName: String) -> String @Suppress("unused", "LongMethod") fun Application.parent() { Config.configData = ConfigData( - url = property("hideout.url"), - objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) - .setSerializationInclusion(JsonInclude.Include.NON_EMPTY) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + url = property("hideout.url"), + objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + .setSerializationInclusion(JsonInclude.Include.NON_EMPTY) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) ) val module = org.koin.dsl.module { single { Database.connect( - url = property("hideout.database.url"), - driver = property("hideout.database.driver"), - user = property("hideout.database.username"), - password = property("hideout.database.password") + url = property("hideout.database.url"), + driver = property("hideout.database.driver"), + user = property("hideout.database.username"), + password = property("hideout.database.password") ) } single { @@ -84,11 +84,11 @@ fun Application.parent() { single { TwitterSnowflakeIdGenerateService } single { JwkProviderBuilder(Config.configData.url).cached( - 10, - 24, - TimeUnit.HOURS + 10, + 24, + TimeUnit.HOURS ) - .rateLimited(10, 1, TimeUnit.MINUTES).build() + .rateLimited(10, 1, TimeUnit.MINUTES).build() } } configureKoin(module, HideoutModule().module) @@ -102,20 +102,20 @@ fun Application.parent() { configureSerialization() register(inject().value) configureSecurity( - inject().value, - inject().value + inject().value, + inject().value ) configureRouting( - httpSignatureVerifyService = inject().value, - activityPubService = inject().value, - userService = inject().value, - activityPubUserService = inject().value, - postService = inject().value, - userApiService = inject().value, - userAuthService = inject().value, - userRepository = inject().value, - jwtService = inject().value, - metaService = inject().value + httpSignatureVerifyService = inject().value, + activityPubService = inject().value, + userService = inject().value, + activityPubUserService = inject().value, + postService = inject().value, + userApiService = inject().value, + userAuthService = inject().value, + userRepository = inject().value, + jwtService = inject().value, + metaService = inject().value ) } diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Note.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Note.kt index 8425fc79..21c2f25c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Note.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Note.kt @@ -10,6 +10,8 @@ open class Note : Object { var inReplyTo: String? = null protected constructor() : super() + + @Suppress("LongParameterList") constructor( type: List = emptyList(), name: String, diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/ObjectDeserializer.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/ObjectDeserializer.kt index ba2f9868..6656ee14 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/ObjectDeserializer.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/ObjectDeserializer.kt @@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.JsonNode import dev.usbharu.hideout.service.activitypub.ExtendedActivityVocabulary class ObjectDeserializer : JsonDeserializer() { + @Suppress("LongMethod") override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): Object { requireNotNull(p) val treeNode: JsonNode = requireNotNull(p.codec?.readTree(p)) diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt index 6be3ba4d..c6845da9 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/dto/PostResponse.kt @@ -17,14 +17,14 @@ data class PostResponse( companion object { fun from(post: Post, user: User): PostResponse { return PostResponse( - post.id, - UserResponse.from(user), - post.overview, - post.text, - post.createdAt, - post.visibility, - post.url, - post.sensitive + id = post.id, + user = UserResponse.from(user), + overview = post.overview, + text = post.text, + createdAt = post.createdAt, + visibility = post.visibility, + url = post.url, + sensitive = post.sensitive ) } } diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/User.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/User.kt index 45af9cc2..6754df4f 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/User.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/User.kt @@ -18,7 +18,7 @@ data class User( ) { override fun toString(): String { return "User(id=$id, name='$name', domain='$domain', screenName='$screenName', description='$description'," + - " password=****, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey'," + - " privateKey=****, createdAt=$createdAt)" + " password=****, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey'," + + " privateKey=****, createdAt=$createdAt)" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt index b45fc1a7..501b4e43 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Routing.kt @@ -23,16 +23,16 @@ import io.ktor.server.routing.* @Suppress("LongParameterList") fun Application.configureRouting( - httpSignatureVerifyService: HttpSignatureVerifyService, - activityPubService: ActivityPubService, - userService: IUserService, - activityPubUserService: ActivityPubUserService, - postService: IPostApiService, - userApiService: IUserApiService, - userAuthService: IUserAuthService, - userRepository: IUserRepository, - jwtService: IJwtService, - metaService: IMetaService + httpSignatureVerifyService: HttpSignatureVerifyService, + activityPubService: ActivityPubService, + userService: IUserService, + activityPubUserService: ActivityPubUserService, + postService: IPostApiService, + userApiService: IUserApiService, + userAuthService: IUserAuthService, + userRepository: IUserRepository, + jwtService: IJwtService, + metaService: IMetaService ) { install(AutoHeadResponse) routing { @@ -43,7 +43,7 @@ fun Application.configureRouting( route("/api/internal/v1") { posts(postService) users(userService, userApiService) - auth(userAuthService, userRepository, jwtService, metaService) + auth(userAuthService, userRepository, jwtService) } } } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt index 2bba7f6c..84966882 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/Security.kt @@ -15,8 +15,8 @@ const val TOKEN_AUTH = "jwt-auth" @Suppress("MagicNumber") fun Application.configureSecurity( - jwkProvider: JwkProvider, - metaService: IMetaService + jwkProvider: JwkProvider, + metaService: IMetaService ) { val issuer = Config.configData.url install(Authentication) { @@ -42,8 +42,8 @@ fun Application.configureSecurity( //language=JSON val jwt = metaService.getJwtMeta() call.respondText( - contentType = ContentType.Application.Json, - text = JsonWebKeyUtil.publicKeyToJwk(jwt.publicKey, jwt.kid.toString()) + contentType = ContentType.Application.Json, + text = JsonWebKeyUtil.publicKeyToJwk(jwt.publicKey, jwt.kid.toString()) ) } } diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt index 8a1e344a..f185e832 100644 --- a/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt +++ b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Auth.kt @@ -7,9 +7,7 @@ import dev.usbharu.hideout.exception.UserNotFoundException import dev.usbharu.hideout.plugins.TOKEN_AUTH import dev.usbharu.hideout.repository.IUserRepository import dev.usbharu.hideout.service.auth.IJwtService -import dev.usbharu.hideout.service.core.IMetaService import dev.usbharu.hideout.service.user.IUserAuthService -import dev.usbharu.hideout.util.JsonWebKeyUtil import io.ktor.http.* import io.ktor.server.application.* import io.ktor.server.auth.* @@ -18,10 +16,11 @@ import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.* -fun Route.auth(userAuthService: IUserAuthService, - userRepository: IUserRepository, - jwtService: IJwtService, - metaService: IMetaService) { +fun Route.auth( + userAuthService: IUserAuthService, + userRepository: IUserRepository, + jwtService: IJwtService +) { post("/login") { val loginUser = call.receive() val check = userAuthService.verifyAccount(loginUser.username, loginUser.password) @@ -30,7 +29,7 @@ fun Route.auth(userAuthService: IUserAuthService, } val user = userRepository.findByNameAndDomain(loginUser.username, Config.configData.domain) - ?: throw UserNotFoundException("${loginUser.username} was not found.") + ?: throw UserNotFoundException("${loginUser.username} was not found.") return@post call.respond(jwtService.createToken(user)) } diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Users.kt b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Users.kt index 8609e439..24a45006 100644 --- a/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Users.kt +++ b/src/main/kotlin/dev/usbharu/hideout/routing/api/internal/v1/Users.kt @@ -42,11 +42,11 @@ fun Route.users(userService: IUserService, userApiService: IUserApiService) { authenticate(TOKEN_AUTH, optional = true) { get { val userParameter = ( - call.parameters["name"] - ?: throw ParameterNotExistException( - "Parameter(name='userName@domain') does not exist." - ) + call.parameters["name"] + ?: throw ParameterNotExistException( + "Parameter(name='userName@domain') does not exist." ) + ) if (userParameter.toLongOrNull() != null) { return@get call.respond(userApiService.findById(userParameter.toLong())) } else { @@ -92,11 +92,11 @@ fun Route.users(userService: IUserService, userApiService: IUserApiService) { route("/following") { get { val userParameter = ( - call.parameters["name"] - ?: throw ParameterNotExistException( - "Parameter(name='userName@domain') does not exist." - ) + call.parameters["name"] + ?: throw ParameterNotExistException( + "Parameter(name='userName@domain') does not exist." ) + ) if (userParameter.toLongOrNull() != null) { return@get call.respond(userApiService.findFollowings(userParameter.toLong())) } diff --git a/src/main/kotlin/dev/usbharu/kjob/exposed/ExposedJobRepository.kt b/src/main/kotlin/dev/usbharu/kjob/exposed/ExposedJobRepository.kt index f2cccc4d..c9ff10c5 100644 --- a/src/main/kotlin/dev/usbharu/kjob/exposed/ExposedJobRepository.kt +++ b/src/main/kotlin/dev/usbharu/kjob/exposed/ExposedJobRepository.kt @@ -73,6 +73,7 @@ class ExposedJobRepository( } } + @Suppress("SuspendFunWithFlowReturnType") override suspend fun findNext(names: Set, status: Set, limit: Int): Flow { return query { jobs.select( diff --git a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt index 113e9b38..8c1f4d13 100644 --- a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt @@ -15,6 +15,7 @@ import dev.usbharu.hideout.domain.model.hideout.form.RefreshToken import dev.usbharu.hideout.domain.model.hideout.form.UserLogin import dev.usbharu.hideout.exception.InvalidRefreshTokenException import dev.usbharu.hideout.repository.IUserRepository +import dev.usbharu.hideout.routing.api.internal.v1.auth import dev.usbharu.hideout.service.auth.IJwtService import dev.usbharu.hideout.service.core.IMetaService import dev.usbharu.hideout.service.user.IUserAuthService @@ -24,6 +25,7 @@ import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.server.config.* +import io.ktor.server.routing.* import io.ktor.server.testing.* import org.junit.jupiter.api.Test import org.mockito.ArgumentMatchers.anyString @@ -70,7 +72,10 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(userAuthService, userRepository, jwtService) + } } client.post("/login") { @@ -97,7 +102,10 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(userAuthService, userRepository, jwtService) + } } client.post("/login") { contentType(ContentType.Application.Json) @@ -122,7 +130,10 @@ class SecurityKtTest { val jwkProvider = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(userAuthService, userRepository, jwtService) + } } client.post("/login") { contentType(ContentType.Application.Json) @@ -140,7 +151,10 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check").apply { assertEquals(HttpStatusCode.Unauthorized, call.response.status) @@ -155,7 +169,10 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Digest dsfjjhogalkjdfmlhaog") @@ -172,7 +189,10 @@ class SecurityKtTest { Config.configData = ConfigData(url = "http://example.com", objectMapper = jacksonObjectMapper()) application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "") @@ -190,7 +210,10 @@ class SecurityKtTest { application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Bearer ") @@ -244,11 +267,12 @@ class SecurityKtTest { ) ) } - val userRepository = mock() - val jwtService = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { @@ -304,11 +328,12 @@ class SecurityKtTest { ) ) } - val userRepository = mock() - val jwtService = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -362,11 +387,12 @@ class SecurityKtTest { ) ) } - val userRepository = mock() - val jwtService = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -420,11 +446,12 @@ class SecurityKtTest { ) ) } - val userRepository = mock() - val jwtService = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -477,11 +504,12 @@ class SecurityKtTest { ) ) } - val userRepository = mock() - val jwtService = mock() application { configureSerialization() - configureSecurity(jwkProvider) + configureSecurity(jwkProvider, metaService) + routing { + auth(mock(), mock(), mock()) + } } client.get("/auth-check") { header("Authorization", "Bearer $token") @@ -501,7 +529,10 @@ class SecurityKtTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), jwtService) + } } client.post("/refresh-token") { header("Content-Type", "application/json") @@ -523,7 +554,10 @@ class SecurityKtTest { application { configureStatusPages() configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) + routing { + auth(mock(), mock(), jwtService) + } } client.post("/refresh-token") { header("Content-Type", "application/json") diff --git a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt index c9842020..bb057308 100644 --- a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/PostsTest.kt @@ -4,6 +4,8 @@ import com.auth0.jwt.interfaces.Claim import com.auth0.jwt.interfaces.Payload import com.fasterxml.jackson.module.kotlin.readValue import dev.usbharu.hideout.config.Config +import dev.usbharu.hideout.domain.model.hideout.dto.PostResponse +import dev.usbharu.hideout.domain.model.hideout.dto.UserResponse import dev.usbharu.hideout.domain.model.hideout.entity.Post import dev.usbharu.hideout.domain.model.hideout.entity.Visibility import dev.usbharu.hideout.plugins.TOKEN_AUTH @@ -32,18 +34,27 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 4321, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 4322, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -64,7 +75,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -89,27 +100,35 @@ class PostsTest { val payload = mock { on { getClaim(eq("uid")) } doReturn claim } - + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 4321, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 4322, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/2" ), - Post( + PostResponse( id = 1234567, - userId = 4333, + user = user, text = "Followers only", visibility = Visibility.FOLLOWERS, createdAt = Instant.now().toEpochMilli(), @@ -156,9 +175,18 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( - 12345, - 1234, + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) + val post = PostResponse( + id = 12345, + user = user, text = "aaa", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -169,7 +197,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -187,9 +215,17 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( + val post = PostResponse( 12345, - 1234, + UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), text = "aaa", visibility = Visibility.FOLLOWERS, createdAt = Instant.now().toEpochMilli(), @@ -242,14 +278,22 @@ class PostsTest { onBlocking { createPost(any(), any()) } doAnswer { val argument = it.getArgument(0) val userId = it.getArgument(1) - Post( - 123L, - userId, - null, - argument.text, - Instant.now().toEpochMilli(), - Visibility.PUBLIC, - "https://example.com" + PostResponse( + id = 123L, + user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), + overview = null, + text = argument.text, + createdAt = Instant.now().toEpochMilli(), + visibility = Visibility.PUBLIC, + url = "https://example.com" ) } } @@ -290,18 +334,27 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 1, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 1, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -323,7 +376,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -342,18 +395,27 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 1, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 1, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -375,7 +437,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -394,18 +456,27 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 1, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 1, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -427,7 +498,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -446,18 +517,27 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } + val user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ) val posts = listOf( - Post( + PostResponse( id = 12345, - userId = 1, + user = user, text = "test1", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1" ), - Post( + PostResponse( id = 123456, - userId = 1, + user = user, text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -479,7 +559,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -498,9 +578,17 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( + val post = PostResponse( id = 123456, - userId = 1, + user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -511,7 +599,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -530,9 +618,17 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( + val post = PostResponse( id = 123456, - userId = 1, + user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -543,7 +639,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -562,9 +658,17 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( + val post = PostResponse( id = 123456, - userId = 1, + user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -575,7 +679,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) @@ -594,9 +698,17 @@ class PostsTest { environment { config = ApplicationConfig("empty.conf") } - val post = Post( + val post = PostResponse( id = 123456, - userId = 1, + user = UserResponse( + id = 54321, + name = "user1", + domain = "example.com", + screenName = "user 1", + description = "Test user", + url = "https://example.com/users/54321", + createdAt = Instant.now().toEpochMilli() + ), text = "test2", visibility = Visibility.PUBLIC, createdAt = Instant.now().toEpochMilli(), @@ -607,7 +719,7 @@ class PostsTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { posts(postService) diff --git a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt index e49752d1..0f738579 100644 --- a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt @@ -58,7 +58,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userService) @@ -96,7 +96,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(userService, mock()) @@ -127,7 +127,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(userService, mock()) @@ -162,7 +162,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -195,7 +195,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -228,7 +228,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -261,7 +261,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -306,7 +306,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -351,7 +351,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -396,7 +396,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -591,7 +591,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -636,7 +636,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) @@ -681,7 +681,7 @@ class UsersTest { } application { configureSerialization() - configureSecurity(mock()) + configureSecurity(mock(), mock()) routing { route("/api/internal/v1") { users(mock(), userApiService) diff --git a/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubReceiveFollowServiceImplTest.kt b/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubReceiveFollowServiceImplTest.kt index 5d15c039..0d703801 100644 --- a/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubReceiveFollowServiceImplTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubReceiveFollowServiceImplTest.kt @@ -48,13 +48,21 @@ class ActivityPubReceiveFollowServiceImplTest { firstValue.invoke(scheduleContext, ReceiveFollowJob) val actor = scheduleContext.props.props[ReceiveFollowJob.actor.name] val targetActor = scheduleContext.props.props[ReceiveFollowJob.targetActor.name] - val follow = scheduleContext.props.props[ReceiveFollowJob.follow.name] + val follow = scheduleContext.props.props[ReceiveFollowJob.follow.name] as String assertEquals("https://follower.example.com", actor) assertEquals("https://example.com", targetActor) //language=JSON assertEquals( - """{"type":"Follow","name":"Follow","actor":"https://follower.example.com","object":"https://example.com","@context":null}""", - follow + Json.parseToJsonElement( + """{ + "type": "Follow", + "name": "Follow", + "actor": "https://follower.example.com", + "object": "https://example.com", + "@context": null +}""" + ), + Json.parseToJsonElement(follow) ) } } @@ -155,7 +163,14 @@ class ActivityPubReceiveFollowServiceImplTest { data = mapOf( ReceiveFollowJob.actor.name to "https://follower.example.com", ReceiveFollowJob.targetActor.name to "https://example.com", - ReceiveFollowJob.follow.name to """{"type":"Follow","name":"Follow","object":"https://example.com","actor":"https://follower.example.com","@context":null}""" + //language=JSON + ReceiveFollowJob.follow.name to """{ + "type": "Follow", + "name": "Follow", + "object": "https://example.com", + "actor": "https://follower.example.com", + "@context": null +}""" ), json = Json )