From 1ce1341001c1ca7f9f45bd76e4e6a4c7e71b739f Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Wed, 18 Oct 2023 22:20:31 +0700 Subject: [PATCH 01/45] feat: init web and db --- .gitignore | 14 +- apps/web/.eslintignore | 13 + apps/web/.eslintrc.cjs | 30 + apps/web/.prettierignore | 13 + apps/web/.prettierrc | 8 + apps/web/README.md | 38 + apps/web/package.json | 34 + apps/web/src/app.d.ts | 12 + apps/web/src/app.html | 12 + apps/web/src/index.test.ts | 7 + apps/web/src/lib/index.ts | 1 + apps/web/src/routes/+page.svelte | 2 + apps/web/static/favicon.png | Bin 0 -> 1571 bytes apps/web/svelte.config.js | 18 + apps/web/tsconfig.json | 17 + apps/web/vite.config.ts | 9 + docker-compose.yml | 2 +- package.json | 4 +- packages/database/package.json | 21 + .../20231018151215_init_db/migration.sql | 66 + .../prisma/migrations/migration_lock.toml | 3 + packages/database/prisma/schema.prisma | 87 + packages/database/src/index.ts | 3 + pnpm-lock.yaml | 1518 ++++++++++++++++- 24 files changed, 1892 insertions(+), 40 deletions(-) create mode 100644 apps/web/.eslintignore create mode 100644 apps/web/.eslintrc.cjs create mode 100644 apps/web/.prettierignore create mode 100644 apps/web/.prettierrc create mode 100644 apps/web/README.md create mode 100644 apps/web/package.json create mode 100644 apps/web/src/app.d.ts create mode 100644 apps/web/src/app.html create mode 100644 apps/web/src/index.test.ts create mode 100644 apps/web/src/lib/index.ts create mode 100644 apps/web/src/routes/+page.svelte create mode 100644 apps/web/static/favicon.png create mode 100644 apps/web/svelte.config.js create mode 100644 apps/web/tsconfig.json create mode 100644 apps/web/vite.config.ts create mode 100644 packages/database/package.json create mode 100644 packages/database/prisma/migrations/20231018151215_init_db/migration.sql create mode 100644 packages/database/prisma/migrations/migration_lock.toml create mode 100644 packages/database/prisma/schema.prisma create mode 100644 packages/database/src/index.ts diff --git a/.gitignore b/.gitignore index 676c88a..079e0d8 100644 --- a/.gitignore +++ b/.gitignore @@ -23,11 +23,15 @@ yarn-debug.log* yarn-error.log* .pnpm-debug.log* -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local +# Svelte +build +.svelte-kit +package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* # turbo .turbo diff --git a/apps/web/.eslintignore b/apps/web/.eslintignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/apps/web/.eslintignore @@ -0,0 +1,13 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/apps/web/.eslintrc.cjs b/apps/web/.eslintrc.cjs new file mode 100644 index 0000000..ebc1958 --- /dev/null +++ b/apps/web/.eslintrc.cjs @@ -0,0 +1,30 @@ +module.exports = { + root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:svelte/recommended', + 'prettier' + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'] + }, + env: { + browser: true, + es2017: true, + node: true + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ] +}; diff --git a/apps/web/.prettierignore b/apps/web/.prettierignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/apps/web/.prettierignore @@ -0,0 +1,13 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/apps/web/.prettierrc b/apps/web/.prettierrc new file mode 100644 index 0000000..8c3b625 --- /dev/null +++ b/apps/web/.prettierrc @@ -0,0 +1,8 @@ +{ + "useTabs": false, + "singleQuote": false, + "trailingComma": "all", + "printWidth": 80, + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/apps/web/README.md b/apps/web/README.md new file mode 100644 index 0000000..5c91169 --- /dev/null +++ b/apps/web/README.md @@ -0,0 +1,38 @@ +# create-svelte + +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 0000000..6f75bbc --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,34 @@ +{ + "name": "@waifu-bot/web", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test": "vitest", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@sveltejs/adapter-node": "1.3.1", + "@sveltejs/kit": "1.25.2", + "@typescript-eslint/eslint-plugin": "6.8.0", + "@typescript-eslint/parser": "6.8.0", + "eslint": "8.51.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-svelte": "2.34.0", + "prettier": "3.0.3", + "prettier-plugin-svelte": "3.0.3", + "prettier-plugin-tailwindcss": "0.5.6", + "svelte": "4.2.1", + "svelte-check": "3.5.2", + "tslib": "2.6.2", + "typescript": "5.2.2", + "vite": "4.4.11", + "vitest": "0.34.6" + }, + "type": "module" +} diff --git a/apps/web/src/app.d.ts b/apps/web/src/app.d.ts new file mode 100644 index 0000000..f59b884 --- /dev/null +++ b/apps/web/src/app.d.ts @@ -0,0 +1,12 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface Platform {} + } +} + +export {}; diff --git a/apps/web/src/app.html b/apps/web/src/app.html new file mode 100644 index 0000000..6769ed5 --- /dev/null +++ b/apps/web/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/apps/web/src/index.test.ts b/apps/web/src/index.test.ts new file mode 100644 index 0000000..e07cbbd --- /dev/null +++ b/apps/web/src/index.test.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/apps/web/src/lib/index.ts b/apps/web/src/lib/index.ts new file mode 100644 index 0000000..856f2b6 --- /dev/null +++ b/apps/web/src/lib/index.ts @@ -0,0 +1 @@ +// place files you want to import through the `$lib` alias in this folder. diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte new file mode 100644 index 0000000..5982b0a --- /dev/null +++ b/apps/web/src/routes/+page.svelte @@ -0,0 +1,2 @@ +

Welcome to SvelteKit

+

Visit kit.svelte.dev to read the documentation

diff --git a/apps/web/static/favicon.png b/apps/web/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 GIT binary patch literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH=0.10.0'} dev: true + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 + dev: true + /@babel/code-frame@7.22.13: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} @@ -409,6 +478,204 @@ packages: - utf-8-validate dev: false + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -446,6 +713,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@fastify/busboy@2.0.0: + resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} + engines: {node: '>=14'} + dev: true + /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} @@ -466,7 +738,44 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@leomotors/config@0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.4)(@types/node@18.18.5)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.5)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2): + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.27.8 + dev: true + + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.20 + dev: true + + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.20: + resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /@leomotors/config@0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.5)(@types/node@18.18.5)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.5)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2): resolution: {integrity: sha512-4vm4c+cgxoZUrZjo2yi4Ocw12xgFW9tab2JlLaLt3Wf6gvxlnJor3sRCbRk6xm1f7N5fbbgL6m8PjUdh67Snmw==} peerDependencies: '@trivago/prettier-plugin-sort-imports': ^4.1.1 @@ -501,7 +810,7 @@ packages: optional: true dependencies: '@trivago/prettier-plugin-sort-imports': 4.2.0(prettier@3.0.3) - '@types/eslint': 8.44.4 + '@types/eslint': 8.44.5 '@types/node': 18.18.5 '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) @@ -510,10 +819,10 @@ packages: eslint-config-prettier: 9.0.0(eslint@8.51.0) eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.51.0) - eslint-plugin-prettier: 5.0.1(@types/eslint@8.44.4)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) + eslint-plugin-prettier: 5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) eslint-plugin-sort-destructure-keys: 1.5.0(eslint@8.51.0) prettier: 3.0.3 - prettier-plugin-tailwindcss: 0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier@3.0.3) + prettier-plugin-tailwindcss: 0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier-plugin-svelte@3.0.3)(prettier@3.0.3) typescript: 5.2.2 dev: true @@ -556,6 +865,10 @@ packages: tslib: 2.6.2 dev: true + /@polka/url@1.0.0-next.23: + resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} + dev: true + /@prisma/client@5.4.2(prisma@5.4.2): resolution: {integrity: sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==} engines: {node: '>=16.13'} @@ -568,15 +881,78 @@ packages: dependencies: '@prisma/engines-version': 5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574 prisma: 5.4.2 - dev: true + dev: false /@prisma/engines-version@5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574: resolution: {integrity: sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==} - dev: true + dev: false /@prisma/engines@5.4.2: resolution: {integrity: sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==} requiresBuild: true + + /@rollup/plugin-commonjs@25.0.7(rollup@3.29.4): + resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.30.5 + rollup: 3.29.4 + dev: true + + /@rollup/plugin-json@6.0.1(rollup@3.29.4): + resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + rollup: 3.29.4 + dev: true + + /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.4 + rollup: 3.29.4 + dev: true + + /@rollup/pluginutils@5.0.5(rollup@3.29.4): + resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.3 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.29.4 dev: true /@rushstack/eslint-patch@1.5.1: @@ -601,6 +977,86 @@ packages: engines: {node: '>=v14.0.0', npm: '>=7.0.0'} dev: false + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + dev: true + + /@sveltejs/adapter-node@1.3.1(@sveltejs/kit@1.25.2): + resolution: {integrity: sha512-A0VgRQDCDPzdLNoiAbcOxGw4zT1Mc+n1LwT1OmO350R7WxrEqdMUChPPOd1iMfIDWlP4ie6E2d/WQf5es2d4Zw==} + peerDependencies: + '@sveltejs/kit': ^1.0.0 + dependencies: + '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) + '@rollup/plugin-json': 6.0.1(rollup@3.29.4) + '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) + '@sveltejs/kit': 1.25.2(svelte@4.2.1)(vite@4.4.11) + rollup: 3.29.4 + dev: true + + /@sveltejs/kit@1.25.2(svelte@4.2.1)(vite@4.4.11): + resolution: {integrity: sha512-USuuSpdAPFDiLi58N2Pwd/TG9bcUSPAlzE5iaAXaLyCTWa3l36HDKH6nV5NqBybwfeux1ZwgtIeITLZJDJ6HDg==} + engines: {node: ^16.14 || >=18} + hasBin: true + requiresBuild: true + peerDependencies: + svelte: ^3.54.0 || ^4.0.0-next.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.4.11) + '@types/cookie': 0.5.3 + cookie: 0.5.0 + devalue: 4.3.2 + esm-env: 1.0.0 + kleur: 4.1.5 + magic-string: 0.30.5 + mime: 3.0.0 + sade: 1.8.1 + set-cookie-parser: 2.6.0 + sirv: 2.0.3 + svelte: 4.2.1 + tiny-glob: 0.2.9 + undici: 5.25.4 + vite: 4.4.11(@types/node@18.18.5) + transitivePeerDependencies: + - supports-color + dev: true + + /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.4.11): + resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^2.2.0 + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.4.11) + debug: 4.3.4 + svelte: 4.2.1 + vite: 4.4.11(@types/node@18.18.5) + transitivePeerDependencies: + - supports-color + dev: true + + /@sveltejs/vite-plugin-svelte@2.4.6(svelte@4.2.1)(vite@4.4.11): + resolution: {integrity: sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.4.11) + debug: 4.3.4 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.5 + svelte: 4.2.1 + svelte-hmr: 0.15.3(svelte@4.2.1) + vite: 4.4.11(@types/node@18.18.5) + vitefu: 0.2.5(vite@4.4.11) + transitivePeerDependencies: + - supports-color + dev: true + /@trivago/prettier-plugin-sort-imports@4.2.0(prettier@3.0.3): resolution: {integrity: sha512-YBepjbt+ZNBVmN3ev1amQH3lWCmHyt5qTbLCp/syXJRu/Kw2koXh44qayB1gMRxcL/gV8egmjN5xWSrYyfUtyw==} peerDependencies: @@ -621,15 +1077,29 @@ packages: - supports-color dev: true - /@types/eslint@8.44.4: - resolution: {integrity: sha512-lOzjyfY/D9QR4hY9oblZ76B90MYTB3RrQ4z2vBIJKj9ROCRqdkYl2gSUx1x1a4IWPjKJZLL4Aw1Zfay7eMnmnA==} + /@types/chai-subset@1.3.4: + resolution: {integrity: sha512-CCWNXrJYSUIojZ1149ksLl3AN9cmZ5djf+yUoVVV+NuYrtydItQVlL2ZDqyC6M6O9LWRnVf8yYDxbXHO2TfQZg==} + dependencies: + '@types/chai': 4.3.9 + dev: true + + /@types/chai@4.3.9: + resolution: {integrity: sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==} + dev: true + + /@types/cookie@0.5.3: + resolution: {integrity: sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==} + dev: true + + /@types/eslint@8.44.5: + resolution: {integrity: sha512-Ol2eio8LtD/tGM4Ga7Jb83NuFwEv3NqvssSlifXL9xuFpSyQZw0ecmm2Kux6iU0KxQmp95hlPmGCzGJ0TCFeRA==} dependencies: - '@types/estree': 1.0.2 + '@types/estree': 1.0.3 '@types/json-schema': 7.0.13 dev: true - /@types/estree@1.0.2: - resolution: {integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==} + /@types/estree@1.0.3: + resolution: {integrity: sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==} dev: true /@types/json-schema@7.0.13: @@ -647,6 +1117,20 @@ packages: /@types/node@18.18.5: resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} + /@types/node@20.8.6: + resolution: {integrity: sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==} + dependencies: + undici-types: 5.25.3 + dev: true + + /@types/pug@2.0.7: + resolution: {integrity: sha512-I469DU0UXNC1aHepwirWhu9YKg5fkxohZD95Ey/5A7lovC+Siu+MCLffva87lnfThaOrw9Vb1DUN5t55oULAAw==} + dev: true + + /@types/resolve@1.20.2: + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true + /@types/semver@7.5.3: resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} dev: true @@ -792,6 +1276,44 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@vitest/expect@0.34.6: + resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} + dependencies: + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + chai: 4.3.10 + dev: true + + /@vitest/runner@0.34.6: + resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} + dependencies: + '@vitest/utils': 0.34.6 + p-limit: 4.0.0 + pathe: 1.1.1 + dev: true + + /@vitest/snapshot@0.34.6: + resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} + dependencies: + magic-string: 0.30.5 + pathe: 1.1.1 + pretty-format: 29.7.0 + dev: true + + /@vitest/spy@0.34.6: + resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} + dependencies: + tinyspy: 2.2.0 + dev: true + + /@vitest/utils@0.34.6: + resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} + dependencies: + diff-sequences: 29.6.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + dev: true + /@vladfrangu/async_event_emitter@2.2.2: resolution: {integrity: sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} @@ -809,6 +1331,11 @@ packages: acorn: 8.10.0 dev: true + /acorn-walk@8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} @@ -856,6 +1383,19 @@ packages: color-convert: 2.0.1 dev: true + /ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + /aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} dev: false @@ -955,6 +1495,10 @@ packages: is-shared-array-buffer: 1.0.2 dev: true + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + /ast-types-flow@0.0.7: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} dev: true @@ -1005,6 +1549,11 @@ packages: engines: {node: '>=0.6'} dev: true + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + /bplist-parser@0.2.0: resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} engines: {node: '>= 5.10.0'} @@ -1018,6 +1567,12 @@ packages: balanced-match: 1.0.2 concat-map: 0.0.1 + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -1025,10 +1580,19 @@ packages: fill-range: 7.0.1 dev: true + /buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + dev: true + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: false + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + /bundle-name@3.0.0: resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} engines: {node: '>=12'} @@ -1047,6 +1611,11 @@ packages: resolution: {integrity: sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ==} dev: false + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -1063,6 +1632,19 @@ packages: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: false + /chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1085,6 +1667,27 @@ packages: engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: false + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 + dev: true + + /chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -1102,6 +1705,16 @@ packages: - utf-8-validate dev: false + /code-red@1.0.4: + resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + '@types/estree': 1.0.3 + acorn: 8.10.0 + estree-walker: 3.0.3 + periscopic: 3.1.0 + dev: true + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1133,6 +1746,10 @@ packages: engines: {node: '>=16'} dev: false + /commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1150,6 +1767,11 @@ packages: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: false + /cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1159,6 +1781,20 @@ packages: which: 2.0.2 dev: true + /css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.0.2 + dev: true + + /cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + /damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true @@ -1185,10 +1821,22 @@ packages: dependencies: ms: 2.1.2 + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + /default-browser-id@3.0.0: resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} engines: {node: '>=12'} @@ -1247,11 +1895,25 @@ packages: engines: {node: '>=6'} dev: true + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} dev: false + /devalue@4.3.2: + resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} + dev: true + + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1467,6 +2129,40 @@ packages: is-symbol: 1.0.4 dev: true + /es6-promise@3.3.1: + resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} + dev: true + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -1634,7 +2330,7 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.4)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): + /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1648,7 +2344,7 @@ packages: eslint-config-prettier: optional: true dependencies: - '@types/eslint': 8.44.4 + '@types/eslint': 8.44.5 eslint: 8.51.0 eslint-config-prettier: 9.0.0(eslint@8.51.0) prettier: 3.0.3 @@ -1700,6 +2396,34 @@ packages: natural-compare-lite: 1.4.0 dev: true + /eslint-plugin-svelte@2.34.0(eslint@8.51.0)(svelte@4.2.1): + resolution: {integrity: sha512-4RYUgNai7wr0v+T/kljMiYSjC/oqwgq5i+cPppawryAayj4C7WK1ixFlWCGmNmBppnoKCl4iA4ZPzPtlHcb4CA==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0-0 + svelte: ^3.37.0 || ^4.0.0 + peerDependenciesMeta: + svelte: + optional: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@jridgewell/sourcemap-codec': 1.4.15 + debug: 4.3.4 + eslint: 8.51.0 + esutils: 2.0.3 + known-css-properties: 0.28.0 + postcss: 8.4.31 + postcss-load-config: 3.1.4(postcss@8.4.31) + postcss-safe-parser: 6.0.0(postcss@8.4.31) + postcss-selector-parser: 6.0.13 + semver: 7.5.4 + svelte: 4.2.1 + svelte-eslint-parser: 0.33.1(svelte@4.2.1) + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1759,6 +2483,10 @@ packages: - supports-color dev: true + /esm-env@1.0.0: + resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} + dev: true + /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1787,6 +2515,16 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.3 + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1928,6 +2666,14 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true @@ -1965,6 +2711,10 @@ packages: wide-align: 1.1.5 dev: false + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -2028,6 +2778,17 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -2047,6 +2808,10 @@ packages: define-properties: 1.2.0 dev: true + /globalyzer@0.1.0: + resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -2059,6 +2824,10 @@ packages: slash: 3.0.0 dev: true + /globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + /google-tts-api@2.0.2: resolution: {integrity: sha512-MkQYbBJEdom8hJpfEVDfD3tpBtkz0X59C+FNsoRhbnCiFjZRnzyurGQ5OrAr3xkigII56/jmk0JNwZsp450G+Q==} dependencies: @@ -2227,6 +2996,13 @@ packages: has-bigints: 1.0.2 dev: true + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -2235,6 +3011,13 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -2307,6 +3090,10 @@ packages: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} dev: true + /is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -2329,6 +3116,18 @@ packages: engines: {node: '>=8'} dev: true + /is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 1.0.3 + dev: true + + /is-reference@3.0.2: + resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + dependencies: + '@types/estree': 1.0.3 + dev: true + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -2459,6 +3258,10 @@ packages: minimist: 1.2.8 dev: true + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -2475,6 +3278,15 @@ packages: json-buffer: 3.0.1 dev: true + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: true + + /known-css-properties@0.28.0: + resolution: {integrity: sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==} + dev: true + /language-subtag-registry@0.3.22: resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} dev: true @@ -2493,6 +3305,20 @@ packages: type-check: 0.4.0 dev: true + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + + /locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2518,6 +3344,12 @@ packages: js-tokens: 4.0.0 dev: true + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -2528,6 +3360,20 @@ packages: resolution: {integrity: sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g==} dev: false + /magic-string@0.27.0: + resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -2535,6 +3381,10 @@ packages: semver: 6.3.1 dev: false + /mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + dev: true + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -2566,6 +3416,12 @@ packages: - utf-8-validate dev: false + /mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + dev: true + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -2576,11 +3432,23 @@ packages: engines: {node: '>=12'} dev: true + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -2605,11 +3473,37 @@ packages: yallist: 4.0.0 dev: false - /mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + /mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: false + + /mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + dependencies: + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.3.1 + dev: true + + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + + /mrmime@1.0.1: + resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} - hasBin: true - dev: false + dev: true /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -2618,6 +3512,12 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -2655,6 +3555,11 @@ packages: abbrev: 1.1.1 dev: false + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -2796,6 +3701,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -2842,6 +3754,22 @@ packages: engines: {node: '>=8'} dev: true + /pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + + /periscopic@3.1.0: + resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + dependencies: + '@types/estree': 1.0.3 + estree-walker: 3.0.3 + is-reference: 3.0.2 + dev: true + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true @@ -2851,6 +3779,14 @@ packages: engines: {node: '>=8.6'} dev: true + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.4.2 + pathe: 1.1.1 + dev: true + /play-audio@0.5.2: resolution: {integrity: sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==} dev: false @@ -2862,6 +3798,58 @@ packages: play-audio: 0.5.2 dev: false + /postcss-load-config@3.1.4(postcss@8.4.31): + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.4.31 + yaml: 1.10.2 + dev: true + + /postcss-safe-parser@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.3.3 + dependencies: + postcss: 8.4.31 + dev: true + + /postcss-scss@4.0.9(postcss@8.4.31): + resolution: {integrity: sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.4.29 + dependencies: + postcss: 8.4.31 + dev: true + + /postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2874,7 +3862,17 @@ packages: fast-diff: 1.3.0 dev: true - /prettier-plugin-tailwindcss@0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier@3.0.3): + /prettier-plugin-svelte@3.0.3(prettier@3.0.3)(svelte@4.2.1): + resolution: {integrity: sha512-dLhieh4obJEK1hnZ6koxF+tMUrZbV5YGvRpf2+OADyanjya5j0z1Llo8iGwiHmFWZVG/hLEw/AJD5chXd9r3XA==} + peerDependencies: + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 + dependencies: + prettier: 3.0.3 + svelte: 4.2.1 + dev: true + + /prettier-plugin-tailwindcss@0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier-plugin-svelte@3.0.3)(prettier@3.0.3): resolution: {integrity: sha512-2Xgb+GQlkPAUCFi3sV+NOYcSI5XgduvDBL2Zt/hwJudeKXkyvRS65c38SB0yb9UB40+1rL83I6m0RtlOQ8eHdg==} engines: {node: '>=14.21.3'} peerDependencies: @@ -2928,6 +3926,7 @@ packages: dependencies: '@trivago/prettier-plugin-sort-imports': 4.2.0(prettier@3.0.3) prettier: 3.0.3 + prettier-plugin-svelte: 3.0.3(prettier@3.0.3)(svelte@4.2.1) dev: true /prettier@3.0.3: @@ -2936,6 +3935,15 @@ packages: hasBin: true dev: true + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + /prism-media@1.3.5(@discordjs/opus@0.9.0)(ffmpeg-static@5.2.0): resolution: {integrity: sha512-IQdl0Q01m4LrkN1EGIE9lphov5Hy7WWlH6ulf5QdGePLlPas9p2mhgddTEHrlaXYjjFToM1/rWuwF37VF4taaA==} peerDependencies: @@ -2964,7 +3972,6 @@ packages: requiresBuild: true dependencies: '@prisma/engines': 5.4.2 - dev: true /progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} @@ -2992,6 +3999,10 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true + /react-is@18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -3001,6 +4012,13 @@ packages: util-deprecate: 1.0.2 dev: false + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + /reflect.getprototypeof@1.0.4: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} @@ -3067,12 +4085,27 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rimraf@2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: true + /run-applescript@5.0.0: resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} engines: {node: '>=12'} @@ -3086,6 +4119,13 @@ packages: queue-microtask: 1.2.3 dev: true + /sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: true + /safe-array-concat@1.0.1: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} @@ -3108,6 +4148,15 @@ packages: is-regex: 1.1.4 dev: true + /sander@0.5.1: + resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} + dependencies: + es6-promise: 3.3.1 + graceful-fs: 4.2.11 + mkdirp: 0.5.6 + rimraf: 2.7.1 + dev: true + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -3123,6 +4172,10 @@ packages: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: false + /set-cookie-parser@2.6.0: + resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + dev: true + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -3152,9 +4205,22 @@ packages: object-inspect: 1.12.3 dev: true + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + /sirv@2.0.3: + resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.23 + mrmime: 1.0.1 + totalist: 3.0.1 + dev: true + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -3167,11 +4233,34 @@ packages: node-gyp-build: 4.6.1 dev: false + /sorcery@0.11.0: + resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} + hasBin: true + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + buffer-crc32: 0.2.13 + minimist: 1.2.8 + sander: 0.5.1 + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} dev: true + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} + dev: true + /streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -3269,11 +4358,24 @@ packages: engines: {node: '>=12'} dev: true + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} dev: true + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + dependencies: + acorn: 8.10.0 + dev: true + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -3293,6 +4395,126 @@ packages: engines: {node: '>= 0.4'} dev: true + /svelte-check@3.5.2(postcss@8.4.31)(svelte@4.2.1): + resolution: {integrity: sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==} + hasBin: true + peerDependencies: + svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 + dependencies: + '@jridgewell/trace-mapping': 0.3.20 + chokidar: 3.5.3 + fast-glob: 3.3.1 + import-fresh: 3.3.0 + picocolors: 1.0.0 + sade: 1.8.1 + svelte: 4.2.1 + svelte-preprocess: 5.0.4(postcss@8.4.31)(svelte@4.2.1)(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - postcss + - postcss-load-config + - pug + - sass + - stylus + - sugarss + dev: true + + /svelte-eslint-parser@0.33.1(svelte@4.2.1): + resolution: {integrity: sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + svelte: ^3.37.0 || ^4.0.0 + peerDependenciesMeta: + svelte: + optional: true + dependencies: + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + postcss: 8.4.31 + postcss-scss: 4.0.9(postcss@8.4.31) + svelte: 4.2.1 + dev: true + + /svelte-hmr@0.15.3(svelte@4.2.1): + resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==} + engines: {node: ^12.20 || ^14.13.1 || >= 16} + peerDependencies: + svelte: ^3.19.0 || ^4.0.0 + dependencies: + svelte: 4.2.1 + dev: true + + /svelte-preprocess@5.0.4(postcss@8.4.31)(svelte@4.2.1)(typescript@5.2.2): + resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} + engines: {node: '>= 14.10.0'} + requiresBuild: true + peerDependencies: + '@babel/core': ^7.10.2 + coffeescript: ^2.5.1 + less: ^3.11.3 || ^4.0.0 + postcss: ^7 || ^8 + postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 + pug: ^3.0.0 + sass: ^1.26.8 + stylus: ^0.55.0 + sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 + svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 + typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0' + peerDependenciesMeta: + '@babel/core': + optional: true + coffeescript: + optional: true + less: + optional: true + postcss: + optional: true + postcss-load-config: + optional: true + pug: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + typescript: + optional: true + dependencies: + '@types/pug': 2.0.7 + detect-indent: 6.1.0 + magic-string: 0.27.0 + postcss: 8.4.31 + sorcery: 0.11.0 + strip-indent: 3.0.0 + svelte: 4.2.1 + typescript: 5.2.2 + dev: true + + /svelte@4.2.1: + resolution: {integrity: sha512-LpLqY2Jr7cRxkrTc796/AaaoMLF/1ax7cto8Ot76wrvKQhrPmZ0JgajiWPmg9mTSDqO16SSLiD17r9MsvAPTmw==} + engines: {node: '>=16'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.20 + acorn: 8.10.0 + aria-query: 5.3.0 + axobject-query: 3.2.1 + code-red: 1.0.4 + css-tree: 2.3.1 + estree-walker: 3.0.3 + is-reference: 3.0.2 + locate-character: 3.0.0 + magic-string: 0.30.5 + periscopic: 3.1.0 + dev: true + /synckit@0.8.5: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} @@ -3322,6 +4544,27 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /tiny-glob@0.2.9: + resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + dev: true + + /tinybench@2.5.1: + resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} + dev: true + + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} + engines: {node: '>=14.0.0'} + dev: true + /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} @@ -3339,6 +4582,11 @@ packages: is-number: 7.0.0 dev: true + /totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + dev: true + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false @@ -3435,6 +4683,11 @@ packages: prelude-ls: 1.2.1 dev: true + /type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + dev: true + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -3488,6 +4741,10 @@ packages: hasBin: true dev: true + /ufo@1.3.1: + resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} + dev: true + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -3497,6 +4754,10 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /undici-types@5.25.3: + resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} + dev: true + /undici@5.22.1: resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} engines: {node: '>=14.0'} @@ -3504,6 +4765,13 @@ packages: busboy: 1.6.0 dev: false + /undici@5.25.4: + resolution: {integrity: sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.0.0 + dev: true + /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} @@ -3517,13 +4785,182 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: false /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true dev: false + /vite-node@0.34.6(@types/node@20.8.6): + resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.4.2 + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 4.4.11(@types/node@20.8.6) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite@4.4.11(@types/node@18.18.5): + resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 18.18.5 + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vite@4.4.11(@types/node@20.8.6): + resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.8.6 + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitefu@0.2.5(vite@4.4.11): + resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 4.4.11(@types/node@18.18.5) + dev: true + + /vitest@0.34.6: + resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.9 + '@types/chai-subset': 1.3.4 + '@types/node': 20.8.6 + '@vitest/expect': 0.34.6 + '@vitest/runner': 0.34.6 + '@vitest/snapshot': 0.34.6 + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.10 + debug: 4.3.4 + local-pkg: 0.4.3 + magic-string: 0.30.5 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.4.3 + strip-literal: 1.3.0 + tinybench: 2.5.1 + tinypool: 0.7.0 + vite: 4.4.11(@types/node@20.8.6) + vite-node: 0.34.6(@types/node@20.8.6) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false @@ -3591,6 +5028,15 @@ packages: isexe: 2.0.0 dev: true + /why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + /wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: @@ -3629,11 +5075,21 @@ packages: /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + /yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true + /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: false From 28bdc138994a86c8bcc4104f09a48d933485223e Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:05:59 +0700 Subject: [PATCH 02/45] feat!: node 20 --- .nvmrc | 2 +- Dockerfile | 4 +- apps/bot/.gitignore | 106 ---------- apps/bot/package.json | 2 +- apps/web/package.json | 4 +- package.json | 8 +- pnpm-lock.yaml | 471 +++++++++++++++--------------------------- 7 files changed, 173 insertions(+), 424 deletions(-) delete mode 100644 apps/bot/.gitignore diff --git a/.nvmrc b/.nvmrc index a77793e..209e3ef 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/hydrogen +20 diff --git a/Dockerfile b/Dockerfile index 50be0f0..4a209bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # ? Builder: Build dependencies like @discordjs/opus and everything # ? ------------------------- -FROM node:18-alpine as builder +FROM node:20-alpine as builder WORKDIR /app @@ -20,7 +20,7 @@ RUN pnpm build # ? Runner: Copy stuff from builder to save spaces from added apk packages # ? ------------------------- -FROM node:18-alpine as runner +FROM node:20-alpine as runner WORKDIR /app diff --git a/apps/bot/.gitignore b/apps/bot/.gitignore deleted file mode 100644 index 46ee47f..0000000 --- a/apps/bot/.gitignore +++ /dev/null @@ -1,106 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -*.png diff --git a/apps/bot/package.json b/apps/bot/package.json index f85dd0c..5a83b5b 100644 --- a/apps/bot/package.json +++ b/apps/bot/package.json @@ -12,7 +12,7 @@ "lint": "eslint src" }, "devDependencies": { - "@types/uuid": "9.0.5", + "@types/uuid": "9.0.6", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", "@waifu-bot/config": "workspace:0.0.0", diff --git a/apps/web/package.json b/apps/web/package.json index 6f75bbc..56766a3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@sveltejs/adapter-node": "1.3.1", - "@sveltejs/kit": "1.25.2", + "@sveltejs/kit": "1.26.0", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", "eslint": "8.51.0", @@ -27,7 +27,7 @@ "svelte-check": "3.5.2", "tslib": "2.6.2", "typescript": "5.2.2", - "vite": "4.4.11", + "vite": "4.5.0", "vitest": "0.34.6" }, "type": "module" diff --git a/package.json b/package.json index 9d32722..031ae09 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,12 @@ "devDependencies": { "@leomotors/config": "0.11.0", "@trivago/prettier-plugin-sort-imports": "4.2.0", - "@types/eslint": "8.44.5", - "@types/node": "18.18.5", + "@types/eslint": "8.44.6", + "@types/node": "20.8.7", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", "eslint": "8.51.0", - "eslint-config-next": "13.5.5", + "eslint-config-next": "13.5.6", "eslint-config-prettier": "9.0.0", "eslint-plugin-import": "2.28.1", "eslint-plugin-jsx-a11y": "6.7.1", @@ -38,7 +38,7 @@ "typescript": "5.2.2" }, "engines": { - "node": "^18.12.0", + "node": "^20", "pnpm": "^8" }, "packageManager": "pnpm@8.9.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eeae1f7..695b9c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,16 +10,16 @@ importers: devDependencies: '@leomotors/config': specifier: 0.11.0 - version: 0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.5)(@types/node@18.18.5)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.5)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2) + version: 0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.6)(@types/node@20.8.7)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.6)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2) '@trivago/prettier-plugin-sort-imports': specifier: 4.2.0 version: 4.2.0(prettier@3.0.3) '@types/eslint': - specifier: 8.44.5 - version: 8.44.5 + specifier: 8.44.6 + version: 8.44.6 '@types/node': - specifier: 18.18.5 - version: 18.18.5 + specifier: 20.8.7 + version: 20.8.7 '@typescript-eslint/eslint-plugin': specifier: 6.8.0 version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) @@ -30,8 +30,8 @@ importers: specifier: 8.51.0 version: 8.51.0 eslint-config-next: - specifier: 13.5.5 - version: 13.5.5(eslint@8.51.0)(typescript@5.2.2) + specifier: 13.5.6 + version: 13.5.6(eslint@8.51.0)(typescript@5.2.2) eslint-config-prettier: specifier: 9.0.0 version: 9.0.0(eslint@8.51.0) @@ -43,7 +43,7 @@ importers: version: 6.7.1(eslint@8.51.0) eslint-plugin-prettier: specifier: 5.0.1 - version: 5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) + version: 5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) eslint-plugin-sort-destructure-keys: specifier: 1.5.0 version: 1.5.0(eslint@8.51.0) @@ -106,8 +106,8 @@ importers: version: 3.22.4 devDependencies: '@types/uuid': - specifier: 9.0.5 - version: 9.0.5 + specifier: 9.0.6 + version: 9.0.6 '@typescript-eslint/eslint-plugin': specifier: 6.8.0 version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) @@ -125,10 +125,10 @@ importers: devDependencies: '@sveltejs/adapter-node': specifier: 1.3.1 - version: 1.3.1(@sveltejs/kit@1.25.2) + version: 1.3.1(@sveltejs/kit@1.26.0) '@sveltejs/kit': - specifier: 1.25.2 - version: 1.25.2(svelte@4.2.1)(vite@4.4.11) + specifier: 1.26.0 + version: 1.26.0(svelte@4.2.1)(vite@4.5.0) '@typescript-eslint/eslint-plugin': specifier: 6.8.0 version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) @@ -166,8 +166,8 @@ importers: specifier: 5.2.2 version: 5.2.2 vite: - specifier: 4.4.11 - version: 4.4.11(@types/node@18.18.5) + specifier: 4.5.0 + version: 4.5.0(@types/node@20.8.7) vitest: specifier: 0.34.6 version: 0.34.6 @@ -218,7 +218,7 @@ packages: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.13 + '@babel/highlight': 7.22.20 chalk: 2.4.2 dev: true @@ -231,31 +231,31 @@ packages: source-map: 0.5.7 dev: true - /@babel/helper-environment-visitor@7.22.5: - resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-function-name@7.22.5: - resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.22.15 + '@babel/types': 7.23.0 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.23.0 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.15 + '@babel/types': 7.23.0 dev: true /@babel/helper-string-parser@7.22.5: @@ -263,30 +263,30 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-identifier@7.22.15: - resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} dev: true - /@babel/highlight@7.22.13: - resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} + /@babel/highlight@7.22.20: + resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/parser@7.22.16: - resolution: {integrity: sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==} + /@babel/parser@7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.17.0 dev: true - /@babel/runtime@7.22.15: - resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} + /@babel/runtime@7.23.2: + resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 @@ -297,8 +297,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 - '@babel/parser': 7.22.16 - '@babel/types': 7.22.15 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 dev: true /@babel/traverse@7.17.3: @@ -307,11 +307,11 @@ packages: dependencies: '@babel/code-frame': 7.22.13 '@babel/generator': 7.17.7 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.16 + '@babel/parser': 7.23.0 '@babel/types': 7.17.0 debug: 4.3.4 globals: 11.12.0 @@ -323,16 +323,16 @@ packages: resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 dev: true - /@babel/types@7.22.15: - resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} + /@babel/types@7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.15 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 dev: true @@ -344,7 +344,7 @@ packages: cocoa-discord: 3.1.0 discord.js: 14.13.0 microsoft-cognitiveservices-speech-sdk: 1.32.0 - play-dl: 1.9.6 + play-dl: 1.9.7 tslib: 2.6.2 uuid: 9.0.1 transitivePeerDependencies: @@ -373,7 +373,7 @@ packages: dependencies: '@discordjs/formatters': 0.3.2 '@discordjs/util': 1.0.1 - '@sapphire/shapeshift': 3.9.2 + '@sapphire/shapeshift': 3.9.3 discord-api-types: 0.37.50 fast-deep-equal: 3.1.3 ts-mixer: 6.0.3 @@ -432,7 +432,7 @@ packages: '@sapphire/snowflake': 3.5.1 '@vladfrangu/async_event_emitter': 2.2.2 discord-api-types: 0.37.50 - magic-bytes.js: 1.0.15 + magic-bytes.js: 1.5.0 tslib: 2.6.2 undici: 5.22.1 dev: false @@ -446,11 +446,11 @@ packages: resolution: {integrity: sha512-ToGCvHD1cBscuW3p+C7zOF5+L7MJmU4GjdOARfNk9mkHyFFZq4grK+Sxr3QXKbp27DtfDBc9uqD4GUOYgxngfA==} engines: {node: '>=16.9.0'} dependencies: - '@types/ws': 8.5.5 - discord-api-types: 0.37.56 + '@types/ws': 8.5.8 + discord-api-types: 0.37.60 prism-media: 1.3.5(@discordjs/opus@0.9.0)(ffmpeg-static@5.2.0) tslib: 2.6.2 - ws: 8.14.0 + ws: 8.14.2 transitivePeerDependencies: - '@discordjs/opus' - bufferutil @@ -468,11 +468,11 @@ packages: '@discordjs/rest': 2.0.1 '@discordjs/util': 1.0.1 '@sapphire/async-queue': 1.5.0 - '@types/ws': 8.5.5 + '@types/ws': 8.5.8 '@vladfrangu/async_event_emitter': 2.2.2 discord-api-types: 0.37.50 tslib: 2.6.2 - ws: 8.14.0 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -775,7 +775,7 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@leomotors/config@0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.5)(@types/node@18.18.5)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.5)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2): + /@leomotors/config@0.11.0(@trivago/prettier-plugin-sort-imports@4.2.0)(@types/eslint@8.44.6)(@types/node@20.8.7)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint-config-next@13.5.6)(eslint-config-prettier@9.0.0)(eslint-plugin-import@2.28.1)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-prettier@5.0.1)(eslint-plugin-sort-destructure-keys@1.5.0)(eslint@8.51.0)(prettier-plugin-tailwindcss@0.5.6)(prettier@3.0.3)(typescript@5.2.2): resolution: {integrity: sha512-4vm4c+cgxoZUrZjo2yi4Ocw12xgFW9tab2JlLaLt3Wf6gvxlnJor3sRCbRk6xm1f7N5fbbgL6m8PjUdh67Snmw==} peerDependencies: '@trivago/prettier-plugin-sort-imports': ^4.1.1 @@ -810,24 +810,24 @@ packages: optional: true dependencies: '@trivago/prettier-plugin-sort-imports': 4.2.0(prettier@3.0.3) - '@types/eslint': 8.44.5 - '@types/node': 18.18.5 + '@types/eslint': 8.44.6 + '@types/node': 20.8.7 '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) eslint: 8.51.0 - eslint-config-next: 13.5.5(eslint@8.51.0)(typescript@5.2.2) + eslint-config-next: 13.5.6(eslint@8.51.0)(typescript@5.2.2) eslint-config-prettier: 9.0.0(eslint@8.51.0) eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.51.0) - eslint-plugin-prettier: 5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) + eslint-plugin-prettier: 5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) eslint-plugin-sort-destructure-keys: 1.5.0(eslint@8.51.0) prettier: 3.0.3 prettier-plugin-tailwindcss: 0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier-plugin-svelte@3.0.3)(prettier@3.0.3) typescript: 5.2.2 dev: true - /@next/eslint-plugin-next@13.5.5: - resolution: {integrity: sha512-S/32s4S+SCOpW58lHKdmILAAPRdnsSei7Y3L1oZSoe5Eh0QSlzbG1nYyIpnpwWgz3T7qe3imdq7cJ6Hf29epRA==} + /@next/eslint-plugin-next@13.5.6: + resolution: {integrity: sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==} dependencies: glob: 7.1.7 dev: true @@ -936,7 +936,7 @@ packages: deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 - resolve: 1.22.4 + resolve: 1.22.8 rollup: 3.29.4 dev: true @@ -964,8 +964,8 @@ packages: engines: {node: '>=v14.0.0', npm: '>=7.0.0'} dev: false - /@sapphire/shapeshift@3.9.2: - resolution: {integrity: sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==} + /@sapphire/shapeshift@3.9.3: + resolution: {integrity: sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} dependencies: fast-deep-equal: 3.1.3 @@ -981,7 +981,7 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sveltejs/adapter-node@1.3.1(@sveltejs/kit@1.25.2): + /@sveltejs/adapter-node@1.3.1(@sveltejs/kit@1.26.0): resolution: {integrity: sha512-A0VgRQDCDPzdLNoiAbcOxGw4zT1Mc+n1LwT1OmO350R7WxrEqdMUChPPOd1iMfIDWlP4ie6E2d/WQf5es2d4Zw==} peerDependencies: '@sveltejs/kit': ^1.0.0 @@ -989,12 +989,12 @@ packages: '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) '@rollup/plugin-json': 6.0.1(rollup@3.29.4) '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) - '@sveltejs/kit': 1.25.2(svelte@4.2.1)(vite@4.4.11) + '@sveltejs/kit': 1.26.0(svelte@4.2.1)(vite@4.5.0) rollup: 3.29.4 dev: true - /@sveltejs/kit@1.25.2(svelte@4.2.1)(vite@4.4.11): - resolution: {integrity: sha512-USuuSpdAPFDiLi58N2Pwd/TG9bcUSPAlzE5iaAXaLyCTWa3l36HDKH6nV5NqBybwfeux1ZwgtIeITLZJDJ6HDg==} + /@sveltejs/kit@1.26.0(svelte@4.2.1)(vite@4.5.0): + resolution: {integrity: sha512-CV/AlTziC05yrz7UjVqEd0pH6+2dnrbmcnHGr2d3jXtmOgzNnlDkXtX8g3BfJ6nntsPD+0jtS2PzhvRHblRz4A==} engines: {node: ^16.14 || >=18} hasBin: true requiresBuild: true @@ -1002,26 +1002,26 @@ packages: svelte: ^3.54.0 || ^4.0.0-next.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.4.11) + '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.5.0) '@types/cookie': 0.5.3 cookie: 0.5.0 devalue: 4.3.2 esm-env: 1.0.0 kleur: 4.1.5 magic-string: 0.30.5 - mime: 3.0.0 + mrmime: 1.0.1 sade: 1.8.1 set-cookie-parser: 2.6.0 sirv: 2.0.3 svelte: 4.2.1 tiny-glob: 0.2.9 - undici: 5.25.4 - vite: 4.4.11(@types/node@18.18.5) + undici: 5.26.3 + vite: 4.5.0(@types/node@20.8.7) transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.4.11): + /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.5.0): resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==} engines: {node: ^14.18.0 || >= 16} peerDependencies: @@ -1029,30 +1029,30 @@ packages: svelte: ^3.54.0 || ^4.0.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.4.11) + '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.5.0) debug: 4.3.4 svelte: 4.2.1 - vite: 4.4.11(@types/node@18.18.5) + vite: 4.5.0(@types/node@20.8.7) transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@2.4.6(svelte@4.2.1)(vite@4.4.11): + /@sveltejs/vite-plugin-svelte@2.4.6(svelte@4.2.1)(vite@4.5.0): resolution: {integrity: sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.4.11) + '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.1)(vite@4.5.0) debug: 4.3.4 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 svelte: 4.2.1 svelte-hmr: 0.15.3(svelte@4.2.1) - vite: 4.4.11(@types/node@18.18.5) - vitefu: 0.2.5(vite@4.4.11) + vite: 4.5.0(@types/node@20.8.7) + vitefu: 0.2.5(vite@4.5.0) transitivePeerDependencies: - supports-color dev: true @@ -1067,7 +1067,7 @@ packages: optional: true dependencies: '@babel/generator': 7.17.7 - '@babel/parser': 7.22.16 + '@babel/parser': 7.23.0 '@babel/traverse': 7.17.3 '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 @@ -1091,19 +1091,19 @@ packages: resolution: {integrity: sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==} dev: true - /@types/eslint@8.44.5: - resolution: {integrity: sha512-Ol2eio8LtD/tGM4Ga7Jb83NuFwEv3NqvssSlifXL9xuFpSyQZw0ecmm2Kux6iU0KxQmp95hlPmGCzGJ0TCFeRA==} + /@types/eslint@8.44.6: + resolution: {integrity: sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==} dependencies: '@types/estree': 1.0.3 - '@types/json-schema': 7.0.13 + '@types/json-schema': 7.0.14 dev: true /@types/estree@1.0.3: resolution: {integrity: sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==} dev: true - /@types/json-schema@7.0.13: - resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} + /@types/json-schema@7.0.14: + resolution: {integrity: sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==} dev: true /@types/json5@0.0.29: @@ -1114,35 +1114,31 @@ packages: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node@18.18.5: - resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} - - /@types/node@20.8.6: - resolution: {integrity: sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==} + /@types/node@20.8.7: + resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==} dependencies: undici-types: 5.25.3 - dev: true - /@types/pug@2.0.7: - resolution: {integrity: sha512-I469DU0UXNC1aHepwirWhu9YKg5fkxohZD95Ey/5A7lovC+Siu+MCLffva87lnfThaOrw9Vb1DUN5t55oULAAw==} + /@types/pug@2.0.8: + resolution: {integrity: sha512-QzhsZ1dMGyJbn/D9V80zp4GIA4J4rfAjCCxc3MP+new0E8dyVdSkR735Lx+n3LIaHNFcjHL5+TbziccuT+fdoQ==} dev: true /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true - /@types/semver@7.5.3: - resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} + /@types/semver@7.5.4: + resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} dev: true - /@types/uuid@9.0.5: - resolution: {integrity: sha512-xfHdwa1FMJ082prjSJpoEI57GZITiQz10r3vEJCHa2khEFQjKy91aWKz6+zybzssCvXUwE1LQWgWVwZ4nYUvHQ==} + /@types/uuid@9.0.6: + resolution: {integrity: sha512-BT2Krtx4xaO6iwzwMFUYvWBWkV2pr37zD68Vmp1CDV196MzczBRxuEpD6Pr395HAgebC/co7hOphs53r8V7jew==} dev: true - /@types/ws@8.5.5: - resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} + /@types/ws@8.5.8: + resolution: {integrity: sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==} dependencies: - '@types/node': 18.18.5 + '@types/node': 20.8.7 dev: false /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): @@ -1256,8 +1252,8 @@ packages: eslint: ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.3 + '@types/json-schema': 7.0.14 + '@types/semver': 7.5.4 '@typescript-eslint/scope-manager': 6.8.0 '@typescript-eslint/types': 6.8.0 '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) @@ -1430,8 +1426,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 get-intrinsic: 1.2.1 is-string: 1.0.7 dev: true @@ -1446,8 +1442,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 get-intrinsic: 1.2.1 dev: true @@ -1457,8 +1453,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 dev: true @@ -1467,8 +1463,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 dev: true @@ -1488,8 +1484,8 @@ packages: dependencies: array-buffer-byte-length: 1.0.0 call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 get-intrinsic: 1.2.1 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 @@ -1514,15 +1510,15 @@ packages: engines: {node: '>= 0.4'} dev: true - /axe-core@4.8.0: - resolution: {integrity: sha512-ZtlVZobOeDQhb/y2lMK6mznDw7TJHDNcKx5/bbBkFvArIQ5CVFhSI6hWWQnMx9I8cNmNmZ30wpDyOC2E2nvgbQ==} + /axe-core@4.8.2: + resolution: {integrity: sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==} engines: {node: '>=4'} dev: true /axios@0.21.4: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} dependencies: - follow-redirects: 1.15.2 + follow-redirects: 1.15.3 transitivePeerDependencies: - debug dev: false @@ -1619,7 +1615,7 @@ packages: /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.1 dev: true @@ -1869,14 +1865,6 @@ packages: engines: {node: '>=12'} dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - dev: true - /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -1925,10 +1913,6 @@ packages: resolution: {integrity: sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==} dev: false - /discord-api-types@0.37.56: - resolution: {integrity: sha512-Ih3wj0ZTaQxaJRqUEXHMIXfXB86bwMGC0wc2nNsyCJqeo3lC4qnxXtFIsC+IGI46+dSIinuayCAZ6sLEEM02Bw==} - dev: false - /discord-api-types@0.37.60: resolution: {integrity: sha512-5BELXTsv7becqVHrD81nZrqT4oEyXXWBwbsO/kwDDu6X3u19VV1tYDB5I5vaVAK+c1chcDeheI9zACBLm41LiQ==} dev: false @@ -1944,13 +1928,13 @@ packages: '@discordjs/util': 1.0.1 '@discordjs/ws': 1.0.1 '@sapphire/snowflake': 3.5.1 - '@types/ws': 8.5.5 + '@types/ws': 8.5.8 discord-api-types: 0.37.50 fast-deep-equal: 3.1.3 lodash.snakecase: 4.1.1 tslib: 2.6.2 undici: 5.22.1 - ws: 8.14.0 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -1996,51 +1980,6 @@ packages: engines: {node: '>=6'} dev: false - /es-abstract@1.22.1: - resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} - engines: {node: '>= 0.4'} - dependencies: - array-buffer-byte-length: 1.0.0 - arraybuffer.prototype.slice: 1.0.2 - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.12 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.7 - typed-array-buffer: 1.0.0 - typed-array-byte-length: 1.0.0 - typed-array-byte-offset: 1.0.0 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.11 - dev: true - /es-abstract@1.22.2: resolution: {integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==} engines: {node: '>= 0.4'} @@ -2110,14 +2049,14 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 - has: 1.0.3 + has: 1.0.4 has-tostringtag: 1.0.0 dev: true /es-shim-unscopables@1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: - has: 1.0.3 + has: 1.0.4 dev: true /es-to-primitive@1.2.1: @@ -2173,8 +2112,8 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next@13.5.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-kQr/eevFyzeVt0yCKTchQp3MTIx8ZmBsAKLW+7bzmAXHcf2vvxIqAt2N/afb9SZpuXXhSb/8yrKQGVUVpYmafQ==} + /eslint-config-next@13.5.6(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-o8pQsUHTo9aHqJ2YiZDym5gQAMRf7O2HndHo/JZeY7TDD+W4hk6Ma8Vw54RHiBeb7OWWO5dPirQB+Is/aVQ7Kg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -2182,7 +2121,7 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.5.5 + '@next/eslint-plugin-next': 13.5.6 '@rushstack/eslint-patch': 1.5.1 '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) eslint: 8.51.0 @@ -2212,7 +2151,7 @@ packages: dependencies: debug: 3.2.7 is-core-module: 2.13.0 - resolve: 1.22.4 + resolve: 1.22.8 transitivePeerDependencies: - supports-color dev: true @@ -2290,7 +2229,7 @@ packages: eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) - has: 1.0.3 + has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 @@ -2311,17 +2250,17 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.22.15 + '@babel/runtime': 7.23.2 aria-query: 5.3.0 array-includes: 3.1.7 array.prototype.flatmap: 1.3.2 ast-types-flow: 0.0.7 - axe-core: 4.8.0 + axe-core: 4.8.2 axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 eslint: 8.51.0 - has: 1.0.3 + has: 1.0.4 jsx-ast-utils: 3.3.5 language-tags: 1.0.5 minimatch: 3.1.2 @@ -2330,7 +2269,7 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): + /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2344,7 +2283,7 @@ packages: eslint-config-prettier: optional: true dependencies: - '@types/eslint': 8.44.5 + '@types/eslint': 8.44.6 eslint: 8.51.0 eslint-config-prettier: 9.0.0(eslint@8.51.0) prettier: 3.0.3 @@ -2640,8 +2579,8 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /follow-redirects@1.15.2: - resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + /follow-redirects@1.15.3: + resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -2674,10 +2613,6 @@ packages: dev: true optional: true - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: true @@ -2687,8 +2622,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 functions-have-names: 1.2.3 dev: true @@ -2718,8 +2653,8 @@ packages: /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: - function-bind: 1.1.1 - has: 1.0.3 + function-bind: 1.1.2 + has: 1.0.4 has-proto: 1.0.1 has-symbols: 1.0.3 dev: true @@ -2805,7 +2740,7 @@ packages: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /globalyzer@0.1.0: @@ -2891,13 +2826,6 @@ packages: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} dev: false - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - /has@1.0.4: resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} @@ -2971,7 +2899,7 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 - has: 1.0.3 + has: 1.0.4 side-channel: 1.0.4 dev: true @@ -3026,7 +2954,7 @@ packages: /is-core-module@2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: - has: 1.0.3 + has: 1.0.4 dev: true /is-date-object@1.0.5: @@ -3356,8 +3284,8 @@ packages: dependencies: yallist: 4.0.0 - /magic-bytes.js@1.0.15: - resolution: {integrity: sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g==} + /magic-bytes.js@1.5.0: + resolution: {integrity: sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==} dev: false /magic-string@0.27.0: @@ -3416,12 +3344,6 @@ packages: - utf-8-validate dev: false - /mime@3.0.0: - resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} - engines: {node: '>=10.0.0'} - hasBin: true - dev: true - /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -3587,10 +3509,6 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - dev: true - /object-inspect@1.13.0: resolution: {integrity: sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==} dev: true @@ -3605,7 +3523,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true @@ -3615,8 +3533,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: true /object.fromentries@2.0.7: @@ -3624,16 +3542,16 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: true /object.groupby@1.0.1: resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 get-intrinsic: 1.2.1 dev: true @@ -3649,8 +3567,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: true /once@1.4.0: @@ -3791,8 +3709,8 @@ packages: resolution: {integrity: sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==} dev: false - /play-dl@1.9.6: - resolution: {integrity: sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==} + /play-dl@1.9.7: + resolution: {integrity: sha512-KpgerWxUCY4s9Mhze2qdqPhiqd8Ve6HufpH9mBH3FN+vux55qSh6WJKDabfie8IBHN7lnrAlYcT/UdGax58c2A==} engines: {node: '>=16.0.0'} dependencies: play-audio: 0.5.2 @@ -4035,15 +3953,6 @@ packages: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} dev: true - /regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - dev: true - /regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} @@ -4062,8 +3971,8 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true - /resolve@1.22.4: - resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: is-core-module: 2.13.0 @@ -4202,7 +4111,7 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + object-inspect: 1.13.0 dev: true /siginfo@2.0.0: @@ -4289,15 +4198,6 @@ packages: side-channel: 1.0.4 dev: true - /string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - dev: true - /string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} @@ -4307,14 +4207,6 @@ packages: es-abstract: 1.22.2 dev: true - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - dev: true - /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: @@ -4327,8 +4219,8 @@ packages: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 + define-properties: 1.2.1 + es-abstract: 1.22.2 dev: true /string_decoder@1.3.0: @@ -4486,7 +4378,7 @@ packages: typescript: optional: true dependencies: - '@types/pug': 2.0.7 + '@types/pug': 2.0.8 detect-indent: 6.1.0 magic-string: 0.27.0 postcss: 8.4.31 @@ -4756,7 +4648,6 @@ packages: /undici-types@5.25.3: resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} - dev: true /undici@5.22.1: resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} @@ -4765,8 +4656,8 @@ packages: busboy: 1.6.0 dev: false - /undici@5.25.4: - resolution: {integrity: sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==} + /undici@5.26.3: + resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==} engines: {node: '>=14.0'} dependencies: '@fastify/busboy': 2.0.0 @@ -4791,7 +4682,7 @@ packages: hasBin: true dev: false - /vite-node@0.34.6(@types/node@20.8.6): + /vite-node@0.34.6(@types/node@20.8.7): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4801,7 +4692,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.6) + vite: 4.5.0(@types/node@20.8.7) transitivePeerDependencies: - '@types/node' - less @@ -4813,44 +4704,8 @@ packages: - terser dev: true - /vite@4.4.11(@types/node@18.18.5): - resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.18.5 - esbuild: 0.18.20 - postcss: 8.4.31 - rollup: 3.29.4 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /vite@4.4.11(@types/node@20.8.6): - resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} + /vite@4.5.0(@types/node@20.8.7): + resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -4877,7 +4732,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.6 + '@types/node': 20.8.7 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -4885,7 +4740,7 @@ packages: fsevents: 2.3.3 dev: true - /vitefu@0.2.5(vite@4.4.11): + /vitefu@0.2.5(vite@4.5.0): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 @@ -4893,7 +4748,7 @@ packages: vite: optional: true dependencies: - vite: 4.4.11(@types/node@18.18.5) + vite: 4.5.0(@types/node@20.8.7) dev: true /vitest@0.34.6: @@ -4929,7 +4784,7 @@ packages: dependencies: '@types/chai': 4.3.9 '@types/chai-subset': 1.3.4 - '@types/node': 20.8.6 + '@types/node': 20.8.7 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -4948,8 +4803,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.4.11(@types/node@20.8.6) - vite-node: 0.34.6(@types/node@20.8.6) + vite: 4.5.0(@types/node@20.8.7) + vite-node: 0.34.6(@types/node@20.8.7) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -5059,8 +4914,8 @@ packages: optional: true dev: false - /ws@8.14.0: - resolution: {integrity: sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg==} + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 From a61982ae7cfe638116a1e5014a603654e963963f Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Thu, 19 Oct 2023 21:24:10 +0700 Subject: [PATCH 03/45] feat: basic webhook --- .env.example | 17 +- .npmrc | 1 + apps/README.md | 3 +- apps/bot/.env.example | 10 - apps/bot/package.json | 5 +- apps/bot/src/activity.ts | 93 +++ apps/bot/src/app.ts | 35 + apps/bot/src/bot.ts | 24 +- apps/bot/src/environment.ts | 4 - apps/web/package.json | 72 +- apps/web/postcss.config.js | 6 + apps/web/src/app.scss | 3 + apps/web/src/routes/+layout.svelte | 9 + apps/web/src/routes/+page.server.ts | 16 + apps/web/src/routes/+page.svelte | 8 +- apps/web/src/routes/api/activity/+server.ts | 20 + apps/web/src/routes/login/+page.svelte | 0 apps/web/tailwind.config.js | 8 + apps/web/vite.config.ts | 22 +- package.json | 13 +- packages/README.md | 3 +- packages/auth/package.json | 21 + packages/auth/src/environment.ts | 7 + packages/auth/src/index.ts | 1 + packages/auth/tsconfig.json | 9 + packages/constants/package.json | 1 + packages/constants/src/index.ts | 5 + packages/database/package.json | 5 + .../migration.sql | 12 + packages/database/prisma/schema.prisma | 14 +- packages/database/prisma/seed.ts | 79 ++ packages/database/tsconfig.json | 10 + pnpm-lock.yaml | 733 +++++++++++++++++- 33 files changed, 1143 insertions(+), 126 deletions(-) delete mode 100644 apps/bot/.env.example create mode 100644 apps/bot/src/activity.ts create mode 100644 apps/bot/src/app.ts create mode 100644 apps/web/postcss.config.js create mode 100644 apps/web/src/app.scss create mode 100644 apps/web/src/routes/+layout.svelte create mode 100644 apps/web/src/routes/+page.server.ts create mode 100644 apps/web/src/routes/api/activity/+server.ts create mode 100644 apps/web/src/routes/login/+page.svelte create mode 100644 apps/web/tailwind.config.js create mode 100644 packages/auth/package.json create mode 100644 packages/auth/src/environment.ts create mode 100644 packages/auth/src/index.ts create mode 100644 packages/auth/tsconfig.json rename packages/database/prisma/migrations/{20231018151215_init_db => 20231019082022_init_db}/migration.sql (82%) create mode 100644 packages/database/prisma/seed.ts create mode 100644 packages/database/tsconfig.json diff --git a/.env.example b/.env.example index b1aa72f..5f37834 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,17 @@ -# TODO +# Discord Bot +DISCORD_TOKEN= +ENVIRONMENT=PRODUCTION +DEV_GUILD_ID= + +TENOR_APIKEY= +GOLDEN_FRAME_ENDPOINT= +GOLDEN_FRAME_APIKEY= + +SPEECH_KEY= +SPEECH_REGION= + +# Internal Auth +INTERNAL_SECRET= + +# Database DATABASE_URL="postgresql://username:password@localhost:5432/waifubot" diff --git a/.npmrc b/.npmrc index e0fc7d7..865b43e 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ engine-strict=true ignore-workspace-root-check=true save-exact=true +public-hoist-pattern[]=*prisma* diff --git a/apps/README.md b/apps/README.md index 7ee2215..11a76be 100644 --- a/apps/README.md +++ b/apps/README.md @@ -1,5 +1,4 @@ # apps - bot -> Discord Bot -- client -> Website Frontend for Users to edit their playlist -- server -> Backend Server with Database +- web -> Website for admin management and for user to do some stuff diff --git a/apps/bot/.env.example b/apps/bot/.env.example deleted file mode 100644 index bb5a9d9..0000000 --- a/apps/bot/.env.example +++ /dev/null @@ -1,10 +0,0 @@ -DISCORD_TOKEN= -ENVIRONMENT=PRODUCTION -DEV_GUILD_ID= - -TENOR_APIKEY= -GOLDEN_FRAME_ENDPOINT= -GOLDEN_FRAME_APIKEY= - -SPEECH_KEY= -SPEECH_REGION= diff --git a/apps/bot/package.json b/apps/bot/package.json index 5a83b5b..21978c7 100644 --- a/apps/bot/package.json +++ b/apps/bot/package.json @@ -7,7 +7,7 @@ "build": "tsc", "clean": "rimraf dist/*", "cb": "pnpm clean && pnpm build", - "start": "node dist/bot.js", + "start": "node dist/app.js", "format": "eslint src --fix", "lint": "eslint src" }, @@ -22,11 +22,12 @@ "@cocoa-discord/music-module": "1.1.0", "@discordjs/opus": "0.9.0", "@discordjs/voice": "0.16.0", + "@waifu-bot/auth": "workspace:0.0.0", "@waifu-bot/constants": "workspace:0.0.0", "chalk": "5.3.0", "cocoa-discord": "3.1.0", "discord.js": "14.13.0", - "dotenv": "16.3.1", + "fastify": "4.24.3", "ffmpeg-static": "5.2.0", "google-tts-api": "2.0.2", "sodium-native": "4.0.4", diff --git a/apps/bot/src/activity.ts b/apps/bot/src/activity.ts new file mode 100644 index 0000000..cae9300 --- /dev/null +++ b/apps/bot/src/activity.ts @@ -0,0 +1,93 @@ +import { authEnv } from "@waifu-bot/auth"; +import { localWebUrl } from "@waifu-bot/constants"; + +import { Cocoa, LogStatus } from "cocoa-discord"; + +import { ActivityOptions, ActivityType, Client } from "discord.js"; + +export class ActivityManager { + constructor(readonly client: Client) { + if (client.isReady()) { + this.load(); + } else { + (client as Client).once("ready", () => { + this.load(); + }); + } + } + + activities: ActivityOptions[] = []; + currentActivity: ActivityOptions | null = null; + interval: NodeJS.Timeout | null = null; + + async load() { + const res = await fetch(localWebUrl + "/api/activity", { + headers: { + Authorization: authEnv.INTERNAL_SECRET, + }, + }); + + if (!res.ok) { + throw new Error("Failed to fetch activity"); + } + + const obj = (await res.json()) as ActivityOptions[]; + + obj.forEach((o) => { + if (o.type) + o.type = ActivityType[o.type as unknown as keyof typeof ActivityType]; + }); + + this.activities = obj; + + Cocoa.log( + `[ActivityManager] Successfully loaded ${this.activities.length} activities`, + LogStatus.Success, + ); + + if ( + !this.activities.find((act) => act.name === this.currentActivity?.name) + ) { + this.setInterval(); + } + } + + setInterval() { + if (this.interval) { + clearInterval(this.interval); + } + + this.interval = setInterval( + () => { + this.setActivity(); + }, + 1000 * 60 * 5, + ); + this.setActivity(); + } + + async setActivity() { + if (!this.client.isReady()) { + Cocoa.log( + "Attempt to set activity when client not ready", + LogStatus.Warning, + ); + return; + } + + if (this.activities.length === 0) { + Cocoa.log("No activities loaded", LogStatus.Warning); + return; + } + + const activity = + this.activities[Math.floor(Math.random() * this.activities.length)]!; + + // @ts-expect-error it should not error as we have typeguard checked but it is + this.client.user.setActivity({ + name: activity.name, + type: activity.type, + url: activity.url ?? undefined, + }); + } +} diff --git a/apps/bot/src/app.ts b/apps/bot/src/app.ts new file mode 100644 index 0000000..f22ade7 --- /dev/null +++ b/apps/bot/src/app.ts @@ -0,0 +1,35 @@ +import { authEnv } from "@waifu-bot/auth"; +import { botWebhookPort } from "@waifu-bot/constants"; + +import chalk from "chalk"; +import Fastify from "fastify"; + +import { activityManager } from "./bot.js"; + +const fastify = Fastify(); + +// Declare a route +fastify.post("/webhook/activity", async (request, reply) => { + const authorization = request.headers.authorization; + + if (authorization !== authEnv.INTERNAL_SECRET) { + reply.status(401); + return "Unauthorized"; + } + + await activityManager.load(); + return "Success"; +}); + +// Run the server! +try { + await fastify.listen({ port: botWebhookPort }); +} catch (err) { + fastify.log.error(err); + process.exit(1); +} + +process.on("SIGINT", async () => { + console.log(chalk.yellow("Terminating Waifu Bot Webhook Client...")); + await fastify.close(); +}); diff --git a/apps/bot/src/bot.ts b/apps/bot/src/bot.ts index dc30aee..f850546 100644 --- a/apps/bot/src/bot.ts +++ b/apps/bot/src/bot.ts @@ -1,13 +1,6 @@ import { AppVersion, ShortNameJA } from "@waifu-bot/constants"; -import { - ActivityGroupLoader, - ActivityManager, - Cocoa, - ConsoleManager, - LogStatus, - checkLogin, -} from "cocoa-discord"; +import { Cocoa, ConsoleManager, LogStatus, checkLogin } from "cocoa-discord"; import { MessageCenter } from "cocoa-discord/message"; import { SlashCenter } from "cocoa-discord/slash"; import { CocoaIntent } from "cocoa-discord/template"; @@ -18,6 +11,7 @@ import { Client } from "discord.js"; import chalk from "chalk"; +import { ActivityManager } from "./activity.js"; import { Main as MainMessage } from "./commands/main.message.js"; import { Main as MainSlash } from "./commands/main.slash.js"; import { Music } from "./commands/music.slash.js"; @@ -66,12 +60,7 @@ scenter.on("interaction", (name, ctx) => { ); }); -const activityLoader = new ActivityGroupLoader("data/activities.json"); -const activityManager = new ActivityManager( - activityLoader, - client, - 5 * 60 * 1000, -); +export const activityManager = new ActivityManager(client); client.on("ready", (cli) => { console.log( @@ -82,14 +71,13 @@ client.on("ready", (cli) => { ), ); scenter.syncCommands(); - activityManager.nextActivity(); }); -new ConsoleManager().useLogout(client).useReload(activityLoader); +new ConsoleManager().useLogout(client); checkLogin(client, environment.DISCORD_TOKEN); -process.on("SIGINT", () => { +process.on("SIGINT", async () => { console.log(chalk.yellow("Terminating Waifu Bot...")); - client.destroy(); + await client.destroy(); }); diff --git a/apps/bot/src/environment.ts b/apps/bot/src/environment.ts index 2a4b215..d019167 100644 --- a/apps/bot/src/environment.ts +++ b/apps/bot/src/environment.ts @@ -1,9 +1,5 @@ -import { config } from "dotenv"; import { z } from "zod"; -config(); -config({ path: "../../.env" }); - const baseEnvSchema = z.object({ DISCORD_TOKEN: z.string().min(10), diff --git a/apps/web/package.json b/apps/web/package.json index 56766a3..a0eff58 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,34 +1,42 @@ { - "name": "@waifu-bot/web", - "version": "0.0.0", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "test": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@sveltejs/adapter-node": "1.3.1", - "@sveltejs/kit": "1.26.0", - "@typescript-eslint/eslint-plugin": "6.8.0", - "@typescript-eslint/parser": "6.8.0", - "eslint": "8.51.0", - "eslint-config-prettier": "9.0.0", - "eslint-plugin-svelte": "2.34.0", - "prettier": "3.0.3", - "prettier-plugin-svelte": "3.0.3", - "prettier-plugin-tailwindcss": "0.5.6", - "svelte": "4.2.1", - "svelte-check": "3.5.2", - "tslib": "2.6.2", - "typescript": "5.2.2", - "vite": "4.5.0", - "vitest": "0.34.6" - }, - "type": "module" + "name": "@waifu-bot/web", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite dev --port 7100", + "build": "vite build", + "preview": "vite preview", + "start": "PORT=7100 node build/index.js", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test": "vitest", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@sveltejs/adapter-node": "1.3.1", + "@sveltejs/kit": "1.26.0", + "@typescript-eslint/eslint-plugin": "6.8.0", + "@typescript-eslint/parser": "6.8.0", + "autoprefixer": "10.4.16", + "eslint": "8.51.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-svelte": "2.34.0", + "prettier": "3.0.3", + "prettier-plugin-svelte": "3.0.3", + "prettier-plugin-tailwindcss": "0.5.6", + "sass": "1.69.4", + "svelte": "4.2.1", + "svelte-check": "3.5.2", + "tailwindcss": "3.3.3", + "tslib": "2.6.2", + "typescript": "5.2.2", + "vite": "4.5.0", + "vitest": "0.34.6" + }, + "dependencies": { + "@waifu-bot/auth": "workspace:0.0.0", + "@waifu-bot/database": "workspace:0.0.0" + } } diff --git a/apps/web/postcss.config.js b/apps/web/postcss.config.js new file mode 100644 index 0000000..2aa7205 --- /dev/null +++ b/apps/web/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/apps/web/src/app.scss b/apps/web/src/app.scss new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/apps/web/src/app.scss @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/apps/web/src/routes/+layout.svelte b/apps/web/src/routes/+layout.svelte new file mode 100644 index 0000000..48ede17 --- /dev/null +++ b/apps/web/src/routes/+layout.svelte @@ -0,0 +1,9 @@ + + + + Waifu Bot + + + diff --git a/apps/web/src/routes/+page.server.ts b/apps/web/src/routes/+page.server.ts new file mode 100644 index 0000000..9cb74b6 --- /dev/null +++ b/apps/web/src/routes/+page.server.ts @@ -0,0 +1,16 @@ +import { prisma } from "@waifu-bot/database"; +import type { PageServerLoad } from "./$types"; + +export const load = (async () => { + const config = await prisma.configuration.findUniqueOrThrow({ + where: { id: 0 }, + }); + + const waifu = await prisma.waifu.findUniqueOrThrow({ + where: { + id: config.currentWaifuId, + }, + }); + + return waifu; +}) satisfies PageServerLoad; diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte index 5982b0a..ef7aed5 100644 --- a/apps/web/src/routes/+page.svelte +++ b/apps/web/src/routes/+page.svelte @@ -1,2 +1,8 @@ + +

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

+

Current waifu is {data.nameEn}

diff --git a/apps/web/src/routes/api/activity/+server.ts b/apps/web/src/routes/api/activity/+server.ts new file mode 100644 index 0000000..42246ec --- /dev/null +++ b/apps/web/src/routes/api/activity/+server.ts @@ -0,0 +1,20 @@ +import { error, json, type RequestHandler } from "@sveltejs/kit"; + +import { authEnv } from "@waifu-bot/auth"; +import { prisma } from "@waifu-bot/database"; + +export const GET = (async ({ request }) => { + const authorization = request.headers.get("Authorization"); + + if (authorization !== authEnv.INTERNAL_SECRET) { + throw error(401, "Unauthorized"); + } + + const activity = await prisma.activity.findMany({ + where: { + enabled: true, + }, + }); + + return json(activity); +}) satisfies RequestHandler; diff --git a/apps/web/src/routes/login/+page.svelte b/apps/web/src/routes/login/+page.svelte new file mode 100644 index 0000000..e69de29 diff --git a/apps/web/tailwind.config.js b/apps/web/tailwind.config.js new file mode 100644 index 0000000..70644f7 --- /dev/null +++ b/apps/web/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import("tailwindcss").Config} */ +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + theme: { + extend: {}, + }, + plugins: [], +}; diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 37b6a84..4c6c519 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -1,9 +1,19 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vitest/config'; +import { sveltekit } from "@sveltejs/kit/vite"; +import { defineConfig } from "vitest/config"; + +const externalPackages = ["@waifu-bot/auth", "@waifu-bot/database"]; export default defineConfig({ - plugins: [sveltekit()], - test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } + plugins: [sveltekit()], + test: { + include: ["src/**/*.{test,spec}.{js,ts}"], + }, + build: { + rollupOptions: { + external: externalPackages, + }, + }, + ssr: { + external: externalPackages, + }, }); diff --git a/package.json b/package.json index 031ae09..671762b 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ "scripts": { "clean": "rm -rf node_modules {apps,packages}/**/*/{.turbo,build,dist,node_modules,.next}", "build": "FORCE_COLOR=2 turbo run build", - "dev": "FORCE_COLOR=2 turbo run dev", + "dev": "dotenv -v FORCE_COLOR=2 turbo run dev", "lint": "FORCE_COLOR=2 turbo run lint", "format": "FORCE_COLOR=2 turbo run format", - "start": "FORCE_COLOR=2 turbo run start", - "start:bot": "FORCE_COLOR=2 turbo run --filter=\"@waifu-bot/bot\" start", + "start": "dotenv -v FORCE_COLOR=2 turbo run start", + "start:bot": "dotenv -v FORCE_COLOR=2 turbo run --filter=\"@waifu-bot/bot\" start", "test": "FORCE_COLOR=2 turbo run test" }, "devDependencies": { @@ -34,12 +34,15 @@ "eslint-plugin-sort-destructure-keys": "1.5.0", "prettier": "3.0.3", "prettier-plugin-tailwindcss": "0.5.6", - "turbo": "1.10.15", "typescript": "5.2.2" }, "engines": { "node": "^20", "pnpm": "^8" }, - "packageManager": "pnpm@8.9.2" + "packageManager": "pnpm@8.9.2", + "dependencies": { + "dotenv-cli": "7.3.0", + "turbo": "1.10.15" + } } diff --git a/packages/README.md b/packages/README.md index c417142..172a2c4 100644 --- a/packages/README.md +++ b/packages/README.md @@ -1,5 +1,6 @@ # packages +- auth -> Everything about auth, both internet and external - config -> Shared ESLint, Prettier and tsconfig - constants -> App Constants, ex: Version -- graphql -> GraphQL Codegen +- database -> Everything about database diff --git a/packages/auth/package.json b/packages/auth/package.json new file mode 100644 index 0000000..5b4dd2c --- /dev/null +++ b/packages/auth/package.json @@ -0,0 +1,21 @@ +{ + "name": "@waifu-bot/auth", + "version": "0.0.0", + "private": true, + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "dev": "tsc --watch --preserveWatchOutput", + "lint": "eslint src", + "format": "eslint src --fix" + }, + "devDependencies": { + "@waifu-bot/config": "workspace:0.0.0", + "typescript": "5.2.2" + }, + "dependencies": { + "zod": "3.22.4" + } +} diff --git a/packages/auth/src/environment.ts b/packages/auth/src/environment.ts new file mode 100644 index 0000000..9810c1a --- /dev/null +++ b/packages/auth/src/environment.ts @@ -0,0 +1,7 @@ +import { z } from "zod"; + +const authEnvSchema = z.object({ + INTERNAL_SECRET: z.string().min(10), +}); + +export const authEnv = authEnvSchema.parse(process.env); diff --git a/packages/auth/src/index.ts b/packages/auth/src/index.ts new file mode 100644 index 0000000..37fd7c4 --- /dev/null +++ b/packages/auth/src/index.ts @@ -0,0 +1 @@ +export { authEnv } from "./environment.js"; diff --git a/packages/auth/tsconfig.json b/packages/auth/tsconfig.json new file mode 100644 index 0000000..397bb24 --- /dev/null +++ b/packages/auth/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@waifu-bot/config/tsconfig-app.json", + "compilerOptions": { + "outDir": "./dist", + "declaration": true, + "incremental": false, + "module": "NodeNext" + } +} diff --git a/packages/constants/package.json b/packages/constants/package.json index bd82e25..0aee6c7 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -7,6 +7,7 @@ "types": "dist/index.d.ts", "scripts": { "build": "tsc", + "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint src", "format": "eslint src --fix" }, diff --git a/packages/constants/src/index.ts b/packages/constants/src/index.ts index 081f604..f641a98 100644 --- a/packages/constants/src/index.ts +++ b/packages/constants/src/index.ts @@ -12,3 +12,8 @@ export const FooterText = "……曲、つくらなくちゃ"; export const EmbedColor = 0x0a0fac; export const YoutubeURLPrefix = "https://www.youtube.com/watch?v="; + +export const localWebPort = 7100; +export const localWebUrl = `http://localhost:${localWebPort}`; +export const botWebhookPort = 7101; +export const botWebhookUrl = `http://localhost:${botWebhookPort}`; diff --git a/packages/database/package.json b/packages/database/package.json index e5ccdd2..5445473 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -7,12 +7,17 @@ "types": "dist/index.d.ts", "scripts": { "build": "tsc", + "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint src", "format": "eslint src --fix" }, + "prisma": { + "seed": "tsx prisma/seed.ts" + }, "devDependencies": { "@waifu-bot/config": "workspace:0.0.0", "prisma": "5.4.2", + "tsx": "3.14.0", "typescript": "5.2.2" }, "dependencies": { diff --git a/packages/database/prisma/migrations/20231018151215_init_db/migration.sql b/packages/database/prisma/migrations/20231019082022_init_db/migration.sql similarity index 82% rename from packages/database/prisma/migrations/20231018151215_init_db/migration.sql rename to packages/database/prisma/migrations/20231019082022_init_db/migration.sql index f9c463c..0912c5d 100644 --- a/packages/database/prisma/migrations/20231018151215_init_db/migration.sql +++ b/packages/database/prisma/migrations/20231019082022_init_db/migration.sql @@ -53,14 +53,26 @@ CREATE TABLE "activity" ( "enabled" BOOLEAN NOT NULL DEFAULT true ); +-- CreateTable +CREATE TABLE "configuration" ( + "id" INTEGER NOT NULL DEFAULT 0, + "current_waifu_id" TEXT NOT NULL +); + -- CreateIndex CREATE UNIQUE INDEX "simp_interval_id_key" ON "simp_interval"("id"); -- CreateIndex CREATE UNIQUE INDEX "activity_id_key" ON "activity"("id"); +-- CreateIndex +CREATE UNIQUE INDEX "configuration_id_key" ON "configuration"("id"); + -- AddForeignKey ALTER TABLE "waifu" ADD CONSTRAINT "waifu_created_by_user_id_fkey" FOREIGN KEY ("created_by_user_id") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "simp_interval" ADD CONSTRAINT "simp_interval_waifu_id_fkey" FOREIGN KEY ("waifu_id") REFERENCES "waifu"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "configuration" ADD CONSTRAINT "configuration_current_waifu_id_fkey" FOREIGN KEY ("current_waifu_id") REFERENCES "waifu"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index 92e9dde..91f71e2 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -47,8 +47,9 @@ model Waifu { simpInterval SimpInterval[] - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + Configuration Configuration[] @@map("waifu") } @@ -85,3 +86,12 @@ model Activity { @@map("activity") } + +model Configuration { + id Int @unique @default(0) + + currentWaifu Waifu @relation(fields: [currentWaifuId], references: [id]) + currentWaifuId String @map("current_waifu_id") + + @@map("configuration") +} diff --git a/packages/database/prisma/seed.ts b/packages/database/prisma/seed.ts new file mode 100644 index 0000000..00ec5ad --- /dev/null +++ b/packages/database/prisma/seed.ts @@ -0,0 +1,79 @@ +import { ActivityType, PrismaClient, UserRole } from "@prisma/client"; + +const prisma = new PrismaClient(); + +await prisma.user.create({ + data: { + id: "143649805250461696", + name: "leomotors", + avatarUrl: + "https://cdn.discordapp.com/avatars/143649805250461696/a_5b8933c0cb2d730dc228160de172719a.gif?size=4096", + role: UserRole.ADMIN, + }, +}); + +const waifu = await prisma.waifu.create({ + data: { + nameEn: "Yoisaki Kanade", + nameJa: "宵崎奏", + shortNameEn: "Kanade", + shortNameJa: "奏", + footerText: "……曲、つくらなくちゃ", + color: "#0a0fac", + + imageUrl: "https://senddude.leomotors.me/files/waifu/kanade-pfp.png", + bannerUrl: "https://senddude.leomotors.me/files/waifu/kanade-banner.png", + + createdBy: { + connect: { + id: "143649805250461696", + }, + }, + }, +}); + +await prisma.configuration.create({ + data: { + currentWaifu: { + connect: { + id: waifu.id, + }, + }, + }, +}); + +const activity = { + LISTENING: [ + "Sannin de iru jikan", + "Yukitoki", + "il vento d'oro", + "Honey Jet Coaster", + "Daydream café", + "Can You Feel My Heart", + "Bury the Light", + "Seisyun Complex", + "Don't Fight The Music", + "INTERNET OVERDOSE", + ], + STREAMING: [ + { + name: "cunny", + url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ", + }, + ], +} as const; + +await prisma.activity.createMany({ + data: activity.LISTENING.map((name) => ({ + name, + type: ActivityType.Listening, + })), +}); + +await prisma.activity.createMany({ + data: activity.STREAMING.map((obj) => ({ + name: obj.name, + type: ActivityType.Streaming, + url: obj.url, + })), +}); diff --git a/packages/database/tsconfig.json b/packages/database/tsconfig.json new file mode 100644 index 0000000..40d703a --- /dev/null +++ b/packages/database/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@waifu-bot/config/tsconfig-app.json", + "compilerOptions": { + "outDir": "./dist", + "declaration": true, + "incremental": false, + "module": "NodeNext" + }, + "exclude": ["prisma", "dist"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 695b9c3..3ae6a10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,13 @@ settings: importers: .: + dependencies: + dotenv-cli: + specifier: 7.3.0 + version: 7.3.0 + turbo: + specifier: 1.10.15 + version: 1.10.15 devDependencies: '@leomotors/config': specifier: 0.11.0 @@ -53,9 +60,6 @@ importers: prettier-plugin-tailwindcss: specifier: 0.5.6 version: 0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier-plugin-svelte@3.0.3)(prettier@3.0.3) - turbo: - specifier: 1.10.15 - version: 1.10.15 typescript: specifier: 5.2.2 version: 5.2.2 @@ -71,6 +75,9 @@ importers: '@discordjs/voice': specifier: 0.16.0 version: 0.16.0(@discordjs/opus@0.9.0)(ffmpeg-static@5.2.0) + '@waifu-bot/auth': + specifier: workspace:0.0.0 + version: link:../../packages/auth '@waifu-bot/constants': specifier: workspace:0.0.0 version: link:../../packages/constants @@ -83,9 +90,9 @@ importers: discord.js: specifier: 14.13.0 version: 14.13.0 - dotenv: - specifier: 16.3.1 - version: 16.3.1 + fastify: + specifier: 4.24.3 + version: 4.24.3 ffmpeg-static: specifier: 5.2.0 version: 5.2.0 @@ -122,6 +129,13 @@ importers: version: 5.2.2 apps/web: + dependencies: + '@waifu-bot/auth': + specifier: workspace:0.0.0 + version: link:../../packages/auth + '@waifu-bot/database': + specifier: workspace:0.0.0 + version: link:../../packages/database devDependencies: '@sveltejs/adapter-node': specifier: 1.3.1 @@ -135,6 +149,9 @@ importers: '@typescript-eslint/parser': specifier: 6.8.0 version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) + autoprefixer: + specifier: 10.4.16 + version: 10.4.16(postcss@8.4.31) eslint: specifier: 8.51.0 version: 8.51.0 @@ -153,12 +170,18 @@ importers: prettier-plugin-tailwindcss: specifier: 0.5.6 version: 0.5.6(@trivago/prettier-plugin-sort-imports@4.2.0)(prettier-plugin-svelte@3.0.3)(prettier@3.0.3) + sass: + specifier: 1.69.4 + version: 1.69.4 svelte: specifier: 4.2.1 version: 4.2.1 svelte-check: specifier: 3.5.2 - version: 3.5.2(postcss@8.4.31)(svelte@4.2.1) + version: 3.5.2(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1) + tailwindcss: + specifier: 3.3.3 + version: 3.3.3 tslib: specifier: 2.6.2 version: 2.6.2 @@ -167,10 +190,23 @@ importers: version: 5.2.2 vite: specifier: 4.5.0 - version: 4.5.0(@types/node@20.8.7) + version: 4.5.0(@types/node@20.8.7)(sass@1.69.4) vitest: specifier: 0.34.6 - version: 0.34.6 + version: 0.34.6(sass@1.69.4) + + packages/auth: + dependencies: + zod: + specifier: 3.22.4 + version: 3.22.4 + devDependencies: + '@waifu-bot/config': + specifier: workspace:0.0.0 + version: link:../config + typescript: + specifier: 5.2.2 + version: 5.2.2 packages/config: {} @@ -195,6 +231,9 @@ importers: prisma: specifier: 5.4.2 version: 5.4.2 + tsx: + specifier: 3.14.0 + version: 3.14.0 typescript: specifier: 5.2.2 version: 5.2.2 @@ -206,6 +245,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: true + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -713,11 +757,33 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@fastify/ajv-compiler@3.5.0: + resolution: {integrity: sha512-ebbEtlI7dxXF5ziNdr05mOY8NnDiPB1XvAlLHctRt/Rc+C3LCOVW5imUVX+mhvUhnNzmPBHewUkOFgGlCxgdAA==} + dependencies: + ajv: 8.12.0 + ajv-formats: 2.1.1(ajv@8.12.0) + fast-uri: 2.2.0 + dev: false + /@fastify/busboy@2.0.0: resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} engines: {node: '>=14'} dev: true + /@fastify/deepmerge@1.3.0: + resolution: {integrity: sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A==} + dev: false + + /@fastify/error@3.4.0: + resolution: {integrity: sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ==} + dev: false + + /@fastify/fast-json-stringify-compiler@4.3.0: + resolution: {integrity: sha512-aZAXGYo6m22Fk1zZzEUKBvut/CIIQe/BapEORnxiD5Qr0kPHqqI69NtEMCme74h+at72sPhbkb4ZrLd1W3KRLA==} + dependencies: + fast-json-stringify: 5.8.0 + dev: false + /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} @@ -1016,7 +1082,7 @@ packages: svelte: 4.2.1 tiny-glob: 0.2.9 undici: 5.26.3 - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) transitivePeerDependencies: - supports-color dev: true @@ -1032,7 +1098,7 @@ packages: '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.1)(vite@4.5.0) debug: 4.3.4 svelte: 4.2.1 - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) transitivePeerDependencies: - supports-color dev: true @@ -1051,7 +1117,7 @@ packages: magic-string: 0.30.5 svelte: 4.2.1 svelte-hmr: 0.15.3(svelte@4.2.1) - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) vitefu: 0.2.5(vite@4.5.0) transitivePeerDependencies: - supports-color @@ -1319,6 +1385,17 @@ packages: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: false + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: false + + /abstract-logging@2.0.1: + resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} + dev: false + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1352,6 +1429,17 @@ packages: - supports-color dev: false + /ajv-formats@2.1.1(ajv@8.12.0): + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.12.0 + dev: false + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -1361,6 +1449,15 @@ packages: uri-js: 4.4.1 dev: true + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: false + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1384,6 +1481,10 @@ packages: engines: {node: '>=10'} dev: true + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1396,6 +1497,10 @@ packages: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} dev: false + /archy@1.0.0: + resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} + dev: false + /are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} @@ -1404,6 +1509,10 @@ packages: readable-stream: 3.6.2 dev: false + /arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + dev: true + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -1505,11 +1614,42 @@ packages: has-symbols: 1.0.3 dev: true + /atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + dev: false + + /autoprefixer@10.4.16(postcss@8.4.31): + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.1 + caniuse-lite: 1.0.30001551 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: true + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} dev: true + /avvio@8.2.1: + resolution: {integrity: sha512-TAlMYvOuwGyLK3PfBb5WKBXZmXz2fVCgv23d6zZFdle/q3gPjmxBaeuC0pY0Dzs5PWMSgfqqEZkrye19GlDTgw==} + dependencies: + archy: 1.0.0 + debug: 4.3.4 + fastq: 1.15.0 + transitivePeerDependencies: + - supports-color + dev: false + /axe-core@4.8.2: resolution: {integrity: sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==} engines: {node: '>=4'} @@ -1532,6 +1672,10 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: false + /bent@7.3.12: resolution: {integrity: sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==} dependencies: @@ -1576,12 +1720,29 @@ packages: fill-range: 7.0.1 dev: true + /browserslist@4.22.1: + resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001551 + electron-to-chromium: 1.4.559 + node-releases: 2.0.13 + update-browserslist-db: 1.0.13(browserslist@4.22.1) + dev: true + /buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + /buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 dev: false /builtin-modules@3.3.0: @@ -1624,6 +1785,15 @@ packages: engines: {node: '>=6'} dev: true + /camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: true + + /caniuse-lite@1.0.30001551: + resolution: {integrity: sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==} + dev: true + /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: false @@ -1742,6 +1912,11 @@ packages: engines: {node: '>=16'} dev: false + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true @@ -1766,7 +1941,6 @@ packages: /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} - dev: true /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} @@ -1775,7 +1949,6 @@ packages: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true /css-tree@2.3.1: resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} @@ -1897,6 +2070,10 @@ packages: resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} dev: true + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: true + /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1940,6 +2117,10 @@ packages: - utf-8-validate dev: false + /dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dev: true + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} @@ -1954,11 +2135,30 @@ packages: esutils: 2.0.3 dev: true + /dotenv-cli@7.3.0: + resolution: {integrity: sha512-314CA4TyK34YEJ6ntBf80eUY+t1XaFLyem1k9P0sX1gn30qThZ5qZr/ZwE318gEnzyYP9yj9HJk6SqwE0upkfw==} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dotenv: 16.3.1 + dotenv-expand: 10.0.0 + minimist: 1.2.8 + dev: false + + /dotenv-expand@10.0.0: + resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} + engines: {node: '>=12'} + dev: false + /dotenv@16.3.1: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} dev: false + /electron-to-chromium@1.4.559: + resolution: {integrity: sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==} + dev: true + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false @@ -2102,6 +2302,11 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -2469,6 +2674,16 @@ packages: engines: {node: '>=0.10.0'} dev: true + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: false + + /events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + dev: false + /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -2499,6 +2714,14 @@ packages: strip-final-newline: 3.0.0 dev: true + /fast-content-type-parse@1.1.0: + resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==} + dev: false + + /fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + dev: false + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2521,15 +2744,63 @@ packages: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true + /fast-json-stringify@5.8.0: + resolution: {integrity: sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==} + dependencies: + '@fastify/deepmerge': 1.3.0 + ajv: 8.12.0 + ajv-formats: 2.1.1(ajv@8.12.0) + fast-deep-equal: 3.1.3 + fast-uri: 2.2.0 + rfdc: 1.3.0 + dev: false + /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} + dependencies: + fast-decode-uri-component: 1.0.1 + dev: false + + /fast-redact@3.3.0: + resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} + engines: {node: '>=6'} + dev: false + + /fast-uri@2.2.0: + resolution: {integrity: sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg==} + dev: false + + /fastify@4.24.3: + resolution: {integrity: sha512-6HHJ+R2x2LS3y1PqxnwEIjOTZxFl+8h4kSC/TuDPXtA+v2JnV9yEtOsNSKK1RMD7sIR2y1ZsA4BEFaid/cK5pg==} + dependencies: + '@fastify/ajv-compiler': 3.5.0 + '@fastify/error': 3.4.0 + '@fastify/fast-json-stringify-compiler': 4.3.0 + abstract-logging: 2.0.1 + avvio: 8.2.1 + fast-content-type-parse: 1.1.0 + fast-json-stringify: 5.8.0 + find-my-way: 7.7.0 + light-my-request: 5.11.0 + pino: 8.16.0 + process-warning: 2.2.0 + proxy-addr: 2.0.7 + rfdc: 1.3.0 + secure-json-parse: 2.7.0 + semver: 7.5.4 + toad-cache: 3.3.0 + transitivePeerDependencies: + - supports-color + dev: false + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 - dev: true /ffmpeg-static@5.2.0: resolution: {integrity: sha512-WrM7kLW+do9HLr+H6tk7LzQ7kPqbAgLjdzNE32+u3Ff11gXt9Kkkd2nusGFrlWMIe+XaA97t+I8JS7sZIrvRgA==} @@ -2558,6 +2829,15 @@ packages: to-regex-range: 5.0.1 dev: true + /find-my-way@7.7.0: + resolution: {integrity: sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==} + engines: {node: '>=14'} + dependencies: + fast-deep-equal: 3.1.3 + fast-querystring: 1.1.2 + safe-regex2: 2.0.0 + dev: false + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2595,6 +2875,15 @@ packages: is-callable: 1.2.7 dev: true + /forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + dev: false + + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: true + /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -2692,6 +2981,17 @@ packages: is-glob: 4.0.3 dev: true + /glob@7.1.6: + resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + /glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} dependencies: @@ -2867,11 +3167,19 @@ packages: engines: {node: '>=14.18.0'} dev: true + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: false + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} dev: true + /immutable@4.3.4: + resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -2903,6 +3211,11 @@ packages: side-channel: 1.0.4 dev: true + /ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + dev: false + /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: @@ -3134,7 +3447,6 @@ packages: /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true /iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} @@ -3150,6 +3462,11 @@ packages: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} dev: true + /jiti@1.20.0: + resolution: {integrity: sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==} + hasBin: true + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -3175,6 +3492,10 @@ packages: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: false + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true @@ -3233,11 +3554,23 @@ packages: type-check: 0.4.0 dev: true + /light-my-request@5.11.0: + resolution: {integrity: sha512-qkFCeloXCOMpmEdZ/MV91P8AT4fjwFXWaAFz3lUeStM8RcoM1ks4J/F8r1b3r6y/H4u3ACEJ1T+Gv5bopj7oDA==} + dependencies: + cookie: 0.5.0 + process-warning: 2.2.0 + set-cookie-parser: 2.6.0 + dev: false + /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} dev: true + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + /local-pkg@0.4.3: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} @@ -3373,7 +3706,6 @@ packages: /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true /minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} @@ -3434,6 +3766,14 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3469,6 +3809,10 @@ packages: hasBin: true dev: false + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: true + /nopt@5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} engines: {node: '>=6'} @@ -3482,6 +3826,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -3509,6 +3858,11 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: true + /object-inspect@1.13.0: resolution: {integrity: sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==} dev: true @@ -3571,6 +3925,11 @@ packages: es-abstract: 1.22.2 dev: true + /on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + dev: false + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -3656,7 +4015,6 @@ packages: /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - dev: true /path-key@4.0.0: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} @@ -3697,6 +4055,44 @@ packages: engines: {node: '>=8.6'} dev: true + /pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + dev: true + + /pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + dev: false + + /pino-std-serializers@6.2.2: + resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} + dev: false + + /pino@8.16.0: + resolution: {integrity: sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==} + hasBin: true + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pino-std-serializers: 6.2.2 + process-warning: 2.2.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 + dev: false + + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: true + /pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: @@ -3716,6 +4112,28 @@ packages: play-audio: 0.5.2 dev: false + /postcss-import@15.1.0(postcss@8.4.31): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + + /postcss-js@4.0.1(postcss@8.4.31): + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.31 + dev: true + /postcss-load-config@3.1.4(postcss@8.4.31): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} @@ -3733,6 +4151,33 @@ packages: yaml: 1.10.2 dev: true + /postcss-load-config@4.0.1(postcss@8.4.31): + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.4.31 + yaml: 2.3.3 + dev: true + + /postcss-nested@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: true + /postcss-safe-parser@6.0.0(postcss@8.4.31): resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} engines: {node: '>=12.0'} @@ -3759,6 +4204,10 @@ packages: util-deprecate: 1.0.2 dev: true + /postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: true + /postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -3891,6 +4340,15 @@ packages: dependencies: '@prisma/engines': 5.4.2 + /process-warning@2.2.0: + resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} + dev: false + + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: false + /progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} @@ -3904,15 +4362,26 @@ packages: react-is: 16.13.1 dev: true + /proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + dev: false + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} - dev: true /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + dev: false + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true @@ -3921,6 +4390,12 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true + /read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + dependencies: + pify: 2.3.0 + dev: true + /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -3930,6 +4405,17 @@ packages: util-deprecate: 1.0.2 dev: false + /readable-stream@4.4.2: + resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + dev: false + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -3937,6 +4423,11 @@ packages: picomatch: 2.3.1 dev: true + /real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + dev: false + /reflect.getprototypeof@1.0.4: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} @@ -3962,6 +4453,11 @@ packages: set-function-name: 2.0.1 dev: true + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: false + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -3989,10 +4485,18 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /ret@0.2.2: + resolution: {integrity: sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==} + engines: {node: '>=4'} + dev: false + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true + + /rfdc@1.3.0: + resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} + dev: false /rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} @@ -4057,6 +4561,17 @@ packages: is-regex: 1.1.4 dev: true + /safe-regex2@2.0.0: + resolution: {integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==} + dependencies: + ret: 0.2.2 + dev: false + + /safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} + dev: false + /sander@0.5.1: resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} dependencies: @@ -4066,6 +4581,20 @@ packages: rimraf: 2.7.1 dev: true + /sass@1.69.4: + resolution: {integrity: sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + immutable: 4.3.4 + source-map-js: 1.0.2 + dev: true + + /secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + dev: false + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -4083,7 +4612,6 @@ packages: /set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} - dev: true /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} @@ -4099,12 +4627,10 @@ packages: engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 - dev: true /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - dev: true /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -4142,6 +4668,12 @@ packages: node-gyp-build: 4.6.1 dev: false + /sonic-boom@3.7.0: + resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} + dependencies: + atomic-sleep: 1.0.0 + dev: false + /sorcery@0.11.0: resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} hasBin: true @@ -4157,11 +4689,28 @@ packages: engines: {node: '>=0.10.0'} dev: true + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} dev: true + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: false + /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -4268,6 +4817,20 @@ packages: acorn: 8.10.0 dev: true + /sucrase@3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 7.1.6 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: true + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -4287,7 +4850,7 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check@3.5.2(postcss@8.4.31)(svelte@4.2.1): + /svelte-check@3.5.2(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1): resolution: {integrity: sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==} hasBin: true peerDependencies: @@ -4300,7 +4863,7 @@ packages: picocolors: 1.0.0 sade: 1.8.1 svelte: 4.2.1 - svelte-preprocess: 5.0.4(postcss@8.4.31)(svelte@4.2.1)(typescript@5.2.2) + svelte-preprocess: 5.0.4(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1)(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' @@ -4340,7 +4903,7 @@ packages: svelte: 4.2.1 dev: true - /svelte-preprocess@5.0.4(postcss@8.4.31)(svelte@4.2.1)(typescript@5.2.2): + /svelte-preprocess@5.0.4(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1)(typescript@5.2.2): resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} engines: {node: '>= 14.10.0'} requiresBuild: true @@ -4382,6 +4945,7 @@ packages: detect-indent: 6.1.0 magic-string: 0.27.0 postcss: 8.4.31 + sass: 1.69.4 sorcery: 0.11.0 strip-indent: 3.0.0 svelte: 4.2.1 @@ -4415,6 +4979,37 @@ packages: tslib: 2.6.2 dev: true + /tailwindcss@3.3.3: + resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.5.3 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.1 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.20.0 + lilconfig: 2.1.0 + micromatch: 4.0.5 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.0 + postcss: 8.4.31 + postcss-import: 15.1.0(postcss@8.4.31) + postcss-js: 4.0.1(postcss@8.4.31) + postcss-load-config: 4.0.1(postcss@8.4.31) + postcss-nested: 6.0.1(postcss@8.4.31) + postcss-selector-parser: 6.0.13 + resolve: 1.22.8 + sucrase: 3.34.0 + transitivePeerDependencies: + - ts-node + dev: true + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -4436,6 +5031,25 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + + /thread-stream@2.4.1: + resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} + dependencies: + real-require: 0.2.0 + dev: false + /tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: @@ -4474,6 +5088,11 @@ packages: is-number: 7.0.0 dev: true + /toad-cache@3.3.0: + resolution: {integrity: sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==} + engines: {node: '>=12'} + dev: false + /totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -4492,6 +5111,10 @@ packages: typescript: 5.2.2 dev: true + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + /ts-mixer@6.0.3: resolution: {integrity: sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==} dev: false @@ -4508,12 +5131,23 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tsx@3.14.0: + resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==} + hasBin: true + dependencies: + esbuild: 0.18.20 + get-tsconfig: 4.7.2 + source-map-support: 0.5.21 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /turbo-darwin-64@1.10.15: resolution: {integrity: sha512-Sik5uogjkRTe1XVP9TC2GryEMOJCaKE2pM/O9uLn4koQDnWKGcLQv+mDU+H+9DXvKLnJnKCD18OVRkwK5tdpoA==} cpu: [x64] os: [darwin] requiresBuild: true - dev: true + dev: false optional: true /turbo-darwin-arm64@1.10.15: @@ -4521,7 +5155,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true + dev: false optional: true /turbo-linux-64@1.10.15: @@ -4529,7 +5163,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true /turbo-linux-arm64@1.10.15: @@ -4537,7 +5171,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true /turbo-windows-64@1.10.15: @@ -4545,7 +5179,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true + dev: false optional: true /turbo-windows-arm64@1.10.15: @@ -4553,7 +5187,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true + dev: false optional: true /turbo@1.10.15: @@ -4566,7 +5200,7 @@ packages: turbo-linux-arm64: 1.10.15 turbo-windows-64: 1.10.15 turbo-windows-arm64: 1.10.15 - dev: true + dev: false /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -4668,11 +5302,21 @@ packages: engines: {node: '>=8'} dev: true + /update-browserslist-db@1.0.13(browserslist@4.22.1): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.1 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 - dev: true /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -4682,7 +5326,7 @@ packages: hasBin: true dev: false - /vite-node@0.34.6(@types/node@20.8.7): + /vite-node@0.34.6(@types/node@20.8.7)(sass@1.69.4): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4692,7 +5336,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) transitivePeerDependencies: - '@types/node' - less @@ -4704,7 +5348,7 @@ packages: - terser dev: true - /vite@4.5.0(@types/node@20.8.7): + /vite@4.5.0(@types/node@20.8.7)(sass@1.69.4): resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -4736,6 +5380,7 @@ packages: esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 + sass: 1.69.4 optionalDependencies: fsevents: 2.3.3 dev: true @@ -4748,10 +5393,10 @@ packages: vite: optional: true dependencies: - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) dev: true - /vitest@0.34.6: + /vitest@0.34.6(sass@1.69.4): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4803,8 +5448,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.5.0(@types/node@20.8.7) - vite-node: 0.34.6(@types/node@20.8.7) + vite: 4.5.0(@types/node@20.8.7)(sass@1.69.4) + vite-node: 0.34.6(@types/node@20.8.7)(sass@1.69.4) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -4881,7 +5526,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: true /why-is-node-running@2.2.2: resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} @@ -4935,6 +5579,11 @@ packages: engines: {node: '>= 6'} dev: true + /yaml@2.3.3: + resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} + engines: {node: '>= 14'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} From 09a9143fe9c92ebcacda5d0fe85601c674320e33 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:00:06 +0700 Subject: [PATCH 04/45] feat: auth done --- .env.example | 3 + apps/bot/data/activities.json | 20 ----- apps/bot/package.json | 1 + apps/bot/src/bot.ts | 2 + apps/bot/src/commands/web.slash.ts | 40 +++++++++ apps/bot/src/environment.ts | 2 + apps/web/package.json | 7 +- apps/web/src/app.d.ts | 23 +++-- apps/web/src/app.html | 20 ++--- apps/web/src/hooks.server.ts | 48 ++++++++++ apps/web/src/index.test.ts | 10 +-- .../src/routes/(user)/home/+layout.server.ts | 12 +++ apps/web/src/routes/(user)/home/+page.svelte | 7 ++ apps/web/src/routes/login/+page.server.ts | 67 ++++++++++++++ apps/web/src/routes/login/+page.svelte | 37 ++++++++ .../migration.sql | 12 +++ packages/database/prisma/schema.prisma | 25 ++++-- packages/database/src/index.ts | 2 + pnpm-lock.yaml | 89 ++++++++++++++++++- 19 files changed, 376 insertions(+), 51 deletions(-) delete mode 100644 apps/bot/data/activities.json create mode 100644 apps/bot/src/commands/web.slash.ts create mode 100644 apps/web/src/hooks.server.ts create mode 100644 apps/web/src/routes/(user)/home/+layout.server.ts create mode 100644 apps/web/src/routes/(user)/home/+page.svelte create mode 100644 apps/web/src/routes/login/+page.server.ts rename packages/database/prisma/migrations/{20231019082022_init_db => 20231019143318_init_db_again}/migration.sql (85%) diff --git a/.env.example b/.env.example index 5f37834..3f3668a 100644 --- a/.env.example +++ b/.env.example @@ -10,8 +10,11 @@ GOLDEN_FRAME_APIKEY= SPEECH_KEY= SPEECH_REGION= +WEB_PUBLIC_URL= + # Internal Auth INTERNAL_SECRET= +JWT_SECRET= # Database DATABASE_URL="postgresql://username:password@localhost:5432/waifubot" diff --git a/apps/bot/data/activities.json b/apps/bot/data/activities.json deleted file mode 100644 index 7781071..0000000 --- a/apps/bot/data/activities.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "LISTENING": [ - "Sannin de iru jikan", - "Yukitoki", - "il vento d'oro", - "Honey Jet Coaster", - "Daydream café", - "Can You Feel My Heart", - "Bury the Light", - "Seisyun Complex", - "Don't Fight The Music", - "INTERNET OVERDOSE" - ], - "STREAMING": [ - { - "name": "cunny", - "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" - } - ] -} diff --git a/apps/bot/package.json b/apps/bot/package.json index 21978c7..a89ebbe 100644 --- a/apps/bot/package.json +++ b/apps/bot/package.json @@ -24,6 +24,7 @@ "@discordjs/voice": "0.16.0", "@waifu-bot/auth": "workspace:0.0.0", "@waifu-bot/constants": "workspace:0.0.0", + "@waifu-bot/database": "workspace:0.0.0", "chalk": "5.3.0", "cocoa-discord": "3.1.0", "discord.js": "14.13.0", diff --git a/apps/bot/src/bot.ts b/apps/bot/src/bot.ts index f850546..13efe48 100644 --- a/apps/bot/src/bot.ts +++ b/apps/bot/src/bot.ts @@ -17,6 +17,7 @@ import { Main as MainSlash } from "./commands/main.slash.js"; import { Music } from "./commands/music.slash.js"; import { Shitpost } from "./commands/shitpost.slash.js"; import { style } from "./commands/styles.js"; +import { WebService } from "./commands/web.slash.js"; import { GuildIds, environment } from "./environment.js"; const client = new Client( @@ -45,6 +46,7 @@ scenter.addModules( new Shitpost(), new Music(client), new TTS(environment.SPEECH_KEY, environment.SPEECH_REGION, style), + new WebService(), ); scenter.useHelpCommand(style); scenter.on("error", async (name, err, ctx) => { diff --git a/apps/bot/src/commands/web.slash.ts b/apps/bot/src/commands/web.slash.ts new file mode 100644 index 0000000..9973c5e --- /dev/null +++ b/apps/bot/src/commands/web.slash.ts @@ -0,0 +1,40 @@ +import { UserRole, prisma } from "@waifu-bot/database"; + +import { SlashCommand, SlashModuleClass } from "cocoa-discord/slash/class"; + +import { environment } from "../environment.js"; + +export class WebService extends SlashModuleClass { + constructor() { + super("Web Service", "Related to website"); + } + + @SlashCommand("Get ticket to login to website") + async login(ctx: SlashCommand.Context) { + await ctx.deferReply({ ephemeral: true }); + + const user = ctx.user; + + const ticket = await prisma.ticket.create({ + data: { + user: { + connectOrCreate: { + where: { + id: user.id, + }, + create: { + id: user.id, + name: user.username, + avatarUrl: user.displayAvatarURL({ size: 4096 }), + role: UserRole.USER, + }, + }, + }, + }, + }); + + await ctx.followUp({ + content: `Login at ${environment.WEB_PUBLIC_URL}/login?ticket=${ticket.ticketId}. The ticket expires in 10 minutes.`, + }); + } +} diff --git a/apps/bot/src/environment.ts b/apps/bot/src/environment.ts index d019167..a02eae3 100644 --- a/apps/bot/src/environment.ts +++ b/apps/bot/src/environment.ts @@ -9,6 +9,8 @@ const baseEnvSchema = z.object({ SPEECH_KEY: z.string().min(10), SPEECH_REGION: z.string().min(2), + + WEB_PUBLIC_URL: z.string().regex(/https?:\/\/.+/), }); const productionSchema = z.object({ diff --git a/apps/web/package.json b/apps/web/package.json index a0eff58..1c672ee 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -7,7 +7,7 @@ "dev": "vite dev --port 7100", "build": "vite build", "preview": "vite preview", - "start": "PORT=7100 node build/index.js", + "start": "PORT=7100 HOST=0.0.0.0 ORIGIN=$WEB_PUBLIC_URL node build/index.js", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test": "vitest", @@ -17,12 +17,14 @@ "devDependencies": { "@sveltejs/adapter-node": "1.3.1", "@sveltejs/kit": "1.26.0", + "@types/jsonwebtoken": "9.0.4", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", "autoprefixer": "10.4.16", "eslint": "8.51.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-svelte": "2.34.0", + "jsonwebtoken": "9.0.2", "prettier": "3.0.3", "prettier-plugin-svelte": "3.0.3", "prettier-plugin-tailwindcss": "0.5.6", @@ -33,7 +35,8 @@ "tslib": "2.6.2", "typescript": "5.2.2", "vite": "4.5.0", - "vitest": "0.34.6" + "vitest": "0.34.6", + "zod": "3.22.4" }, "dependencies": { "@waifu-bot/auth": "workspace:0.0.0", diff --git a/apps/web/src/app.d.ts b/apps/web/src/app.d.ts index f59b884..0d4509a 100644 --- a/apps/web/src/app.d.ts +++ b/apps/web/src/app.d.ts @@ -1,12 +1,23 @@ // See https://kit.svelte.dev/docs/types#app + +import type { UserRole } from "@waifu-bot/database"; + // for information about these interfaces declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface Platform {} - } + namespace App { + // interface Error {} + + interface Locals { + user?: { + userId: string; + username: string; + role: UserRole; + }; + } + + // interface PageData {} + // interface Platform {} + } } export {}; diff --git a/apps/web/src/app.html b/apps/web/src/app.html index 6769ed5..84ffad1 100644 --- a/apps/web/src/app.html +++ b/apps/web/src/app.html @@ -1,12 +1,12 @@ - + - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/apps/web/src/hooks.server.ts b/apps/web/src/hooks.server.ts new file mode 100644 index 0000000..542c75e --- /dev/null +++ b/apps/web/src/hooks.server.ts @@ -0,0 +1,48 @@ +import { env } from "$env/dynamic/private"; +import { redirect, type Handle, error } from "@sveltejs/kit"; + +import jwt from "jsonwebtoken"; +import { z } from "zod"; + +const jwtSchema = z.object({ + userId: z.string().regex(/^[0-9]+$/), + username: z.string(), + role: z.enum(["USER", "ADMIN"]), +}); + +export const handle = (async ({ event, resolve }) => { + const isRequiredAuthPath = + event.url.pathname.startsWith("/admin") || + event.url.pathname.startsWith("/home"); + + if (!isRequiredAuthPath) { + const response = await resolve(event); + return response; + } + + if (!env.JWT_SECRET) { + throw error(500, "Server missing environment variables"); + } + + const accessToken = event.cookies.get("access_token"); + + if (!accessToken) { + throw redirect(302, "/login?error=notauthenticated"); + } + + try { + const user = jwt.verify(accessToken, env.JWT_SECRET); + + const parsed = jwtSchema.safeParse(user); + if (!parsed.success) { + throw redirect(302, "/login?error=invalidjwtcontent"); + } + + event.locals.user = parsed.data; + + const response = await resolve(event); + return response; + } catch (error) { + throw redirect(302, "/login?error=notauthenticated"); + } +}) satisfies Handle; diff --git a/apps/web/src/index.test.ts b/apps/web/src/index.test.ts index e07cbbd..dadc7e4 100644 --- a/apps/web/src/index.test.ts +++ b/apps/web/src/index.test.ts @@ -1,7 +1,7 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from "vitest"; -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { - expect(1 + 2).toBe(3); - }); +describe("sum test", () => { + it("adds 1 + 2 to equal 3", () => { + expect(1 + 2).toBe(3); + }); }); diff --git a/apps/web/src/routes/(user)/home/+layout.server.ts b/apps/web/src/routes/(user)/home/+layout.server.ts new file mode 100644 index 0000000..5353f02 --- /dev/null +++ b/apps/web/src/routes/(user)/home/+layout.server.ts @@ -0,0 +1,12 @@ +import { redirect } from "@sveltejs/kit"; +import type { LayoutServerLoad } from "./$types"; + +export const load = (async ({ locals }) => { + if (!locals.user) { + throw redirect(302, "/login?error=how"); + } + + return { + user: locals.user, + }; +}) satisfies LayoutServerLoad; diff --git a/apps/web/src/routes/(user)/home/+page.svelte b/apps/web/src/routes/(user)/home/+page.svelte new file mode 100644 index 0000000..37f25cb --- /dev/null +++ b/apps/web/src/routes/(user)/home/+page.svelte @@ -0,0 +1,7 @@ + + +

Hello {data.user.username}

diff --git a/apps/web/src/routes/login/+page.server.ts b/apps/web/src/routes/login/+page.server.ts new file mode 100644 index 0000000..d22dbeb --- /dev/null +++ b/apps/web/src/routes/login/+page.server.ts @@ -0,0 +1,67 @@ +import { error, redirect } from "@sveltejs/kit"; +import { prisma } from "@waifu-bot/database"; + +import { env } from "$env/dynamic/private"; + +import type { Actions } from "../$types"; + +import jwt from "jsonwebtoken"; + +export const actions = { + default: async ({ cookies, request }) => { + if (!env.JWT_SECRET) { + throw error(500, "Server missing environment variables"); + } + + const formData = await request.formData(); + const ticketId = formData.get("ticket"); + + if (!ticketId || typeof ticketId !== "string") { + throw error(400, "Missing ticket"); + } + + const ticket = await prisma.ticket.findUnique({ + where: { + ticketId, + }, + include: { + user: true, + }, + }); + + if (!ticket) { + throw error(400, "Invalid ticket"); + } + + await prisma.ticket.deleteMany({ + where: { + userId: ticket.userId, + }, + }); + + // Now > createdAt + 10 Min (Expired) + // Now - 10 Min > createdAt + if (new Date(Date.now() - 1000 * 60 * 10) > ticket.createdAt) { + throw error(400, "Ticket expired"); + } + + const accessToken = jwt.sign( + { + userId: ticket.userId, + username: ticket.user.name, + role: ticket.user.role, + }, + env.JWT_SECRET, + { expiresIn: "14d" }, + ); + + cookies.set("access_token", accessToken, { + path: "/", + httpOnly: true, + sameSite: true, + maxAge: 60 * 60 * 24 * 14, + }); + + throw redirect(302, "/home"); + }, +} satisfies Actions; diff --git a/apps/web/src/routes/login/+page.svelte b/apps/web/src/routes/login/+page.svelte index e69de29..9365719 100644 --- a/apps/web/src/routes/login/+page.svelte +++ b/apps/web/src/routes/login/+page.svelte @@ -0,0 +1,37 @@ + + +
+
+
+ + +
+
+ +
+
+
diff --git a/packages/database/prisma/migrations/20231019082022_init_db/migration.sql b/packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql similarity index 85% rename from packages/database/prisma/migrations/20231019082022_init_db/migration.sql rename to packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql index 0912c5d..c0961fd 100644 --- a/packages/database/prisma/migrations/20231019082022_init_db/migration.sql +++ b/packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql @@ -16,6 +16,15 @@ CREATE TABLE "user" ( CONSTRAINT "user_pkey" PRIMARY KEY ("id") ); +-- CreateTable +CREATE TABLE "ticket" ( + "ticket_id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "ticket_pkey" PRIMARY KEY ("ticket_id") +); + -- CreateTable CREATE TABLE "waifu" ( "id" TEXT NOT NULL, @@ -68,6 +77,9 @@ CREATE UNIQUE INDEX "activity_id_key" ON "activity"("id"); -- CreateIndex CREATE UNIQUE INDEX "configuration_id_key" ON "configuration"("id"); +-- AddForeignKey +ALTER TABLE "ticket" ADD CONSTRAINT "ticket_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + -- AddForeignKey ALTER TABLE "waifu" ADD CONSTRAINT "waifu_created_by_user_id_fkey" FOREIGN KEY ("created_by_user_id") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index 91f71e2..afa948f 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -20,8 +20,10 @@ model User { name String avatarUrl String @map("avatar_url") - role UserRole @default(USER) - waifu Waifu[] + role UserRole @default(USER) + tickets Ticket[] + + createdWaifus Waifu[] createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") @@ -29,6 +31,16 @@ model User { @@map("user") } +model Ticket { + ticketId String @id @default(cuid()) @map("ticket_id") + user User @relation(fields: [userId], references: [id]) + userId String @map("user_id") + + createdAt DateTime @default(now()) @map("created_at") + + @@map("ticket") +} + model Waifu { id String @id @default(cuid()) note String @default("") @@ -45,11 +57,12 @@ model Waifu { createdBy User @relation(fields: [createdByUserId], references: [id]) createdByUserId String @map("created_by_user_id") - simpInterval SimpInterval[] + simpIntervals SimpInterval[] + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") - Configuration Configuration[] + configurations Configuration[] @@map("waifu") } diff --git a/packages/database/src/index.ts b/packages/database/src/index.ts index 901f3a0..9ca5c34 100644 --- a/packages/database/src/index.ts +++ b/packages/database/src/index.ts @@ -1,3 +1,5 @@ import { PrismaClient } from "@prisma/client"; export const prisma = new PrismaClient(); + +export * from "@prisma/client"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ae6a10..a874d50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,6 +81,9 @@ importers: '@waifu-bot/constants': specifier: workspace:0.0.0 version: link:../../packages/constants + '@waifu-bot/database': + specifier: workspace:0.0.0 + version: link:../../packages/database chalk: specifier: 5.3.0 version: 5.3.0 @@ -143,6 +146,9 @@ importers: '@sveltejs/kit': specifier: 1.26.0 version: 1.26.0(svelte@4.2.1)(vite@4.5.0) + '@types/jsonwebtoken': + specifier: 9.0.4 + version: 9.0.4 '@typescript-eslint/eslint-plugin': specifier: 6.8.0 version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) @@ -161,6 +167,9 @@ importers: eslint-plugin-svelte: specifier: 2.34.0 version: 2.34.0(eslint@8.51.0)(svelte@4.2.1) + jsonwebtoken: + specifier: 9.0.2 + version: 9.0.2 prettier: specifier: 3.0.3 version: 3.0.3 @@ -194,6 +203,9 @@ importers: vitest: specifier: 0.34.6 version: 0.34.6(sass@1.69.4) + zod: + specifier: 3.22.4 + version: 3.22.4 packages/auth: dependencies: @@ -1176,6 +1188,12 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/jsonwebtoken@9.0.4: + resolution: {integrity: sha512-8UYapdmR0QlxgvJmyE8lP7guxD0UGVMfknsdtCFZh4ovShdBl3iOI4zdvqBHrB/IS+xUj3PSx73Qkey1fhWz+g==} + dependencies: + '@types/node': 20.8.7 + dev: true + /@types/node@10.17.60: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false @@ -1735,6 +1753,10 @@ packages: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true + /buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + dev: true + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -2155,6 +2177,12 @@ packages: engines: {node: '>=12'} dev: false + /ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /electron-to-chromium@1.4.559: resolution: {integrity: sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==} dev: true @@ -3511,6 +3539,22 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true + /jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} + engines: {node: '>=12', npm: '>=6'} + dependencies: + jws: 3.2.2 + lodash.includes: 4.3.0 + lodash.isboolean: 3.0.3 + lodash.isinteger: 4.0.4 + lodash.isnumber: 3.0.3 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.once: 4.1.1 + ms: 2.1.3 + semver: 7.5.4 + dev: true + /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -3521,6 +3565,21 @@ packages: object.values: 1.1.7 dev: true + /jwa@1.4.1: + resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + dev: true + + /jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + dependencies: + jwa: 1.4.1 + safe-buffer: 5.2.1 + dev: true + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -3587,10 +3646,38 @@ packages: p-locate: 5.0.0 dev: true + /lodash.includes@4.3.0: + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} + dev: true + + /lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} + dev: true + + /lodash.isinteger@4.0.4: + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} + dev: true + + /lodash.isnumber@3.0.3: + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} + dev: true + + /lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: true + + /lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + dev: true + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.once@4.1.1: + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + dev: true + /lodash.snakecase@4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} dev: false @@ -4551,7 +4638,6 @@ packages: /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: false /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} @@ -5596,4 +5682,3 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - dev: false From a23168fd19ce67db9ed2342ca7469e6d2b227cb4 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:37:08 +0700 Subject: [PATCH 05/45] chore: update env var name --- .env.example | 2 +- apps/bot/src/commands/web.slash.ts | 2 +- apps/bot/src/environment.ts | 2 +- apps/web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 3f3668a..12d6b9b 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ GOLDEN_FRAME_APIKEY= SPEECH_KEY= SPEECH_REGION= -WEB_PUBLIC_URL= +PUBLIC_WEB_URL= # Internal Auth INTERNAL_SECRET= diff --git a/apps/bot/src/commands/web.slash.ts b/apps/bot/src/commands/web.slash.ts index 9973c5e..8622688 100644 --- a/apps/bot/src/commands/web.slash.ts +++ b/apps/bot/src/commands/web.slash.ts @@ -34,7 +34,7 @@ export class WebService extends SlashModuleClass { }); await ctx.followUp({ - content: `Login at ${environment.WEB_PUBLIC_URL}/login?ticket=${ticket.ticketId}. The ticket expires in 10 minutes.`, + content: `Login at ${environment.PUBLIC_WEB_URL}/login?ticket=${ticket.ticketId}. The ticket expires in 10 minutes.`, }); } } diff --git a/apps/bot/src/environment.ts b/apps/bot/src/environment.ts index a02eae3..2a7264c 100644 --- a/apps/bot/src/environment.ts +++ b/apps/bot/src/environment.ts @@ -10,7 +10,7 @@ const baseEnvSchema = z.object({ SPEECH_KEY: z.string().min(10), SPEECH_REGION: z.string().min(2), - WEB_PUBLIC_URL: z.string().regex(/https?:\/\/.+/), + PUBLIC_WEB_URL: z.string().regex(/https?:\/\/.+/), }); const productionSchema = z.object({ diff --git a/apps/web/package.json b/apps/web/package.json index 1c672ee..e1f85ad 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -7,7 +7,7 @@ "dev": "vite dev --port 7100", "build": "vite build", "preview": "vite preview", - "start": "PORT=7100 HOST=0.0.0.0 ORIGIN=$WEB_PUBLIC_URL node build/index.js", + "start": "PORT=7100 HOST=0.0.0.0 ORIGIN=$PUBLIC_WEB_URL node build/index.js", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test": "vitest", From c7479c48a057533a4e189ca1df88c668d6e9385f Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:38:05 +0700 Subject: [PATCH 06/45] chore: update tsconfig --- packages/auth/tsconfig.json | 1 - packages/config/tsconfig-app.json | 1 - packages/constants/tsconfig.json | 1 - packages/database/tsconfig.json | 1 - 4 files changed, 4 deletions(-) diff --git a/packages/auth/tsconfig.json b/packages/auth/tsconfig.json index 397bb24..2e7130d 100644 --- a/packages/auth/tsconfig.json +++ b/packages/auth/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "./dist", "declaration": true, - "incremental": false, "module": "NodeNext" } } diff --git a/packages/config/tsconfig-app.json b/packages/config/tsconfig-app.json index f76fdce..f749325 100644 --- a/packages/config/tsconfig-app.json +++ b/packages/config/tsconfig-app.json @@ -8,7 +8,6 @@ "skipLibCheck": true, "moduleResolution": "NodeNext", "experimentalDecorators": true, - "incremental": true, "noUncheckedIndexedAccess": true, "importHelpers": true } diff --git a/packages/constants/tsconfig.json b/packages/constants/tsconfig.json index 397bb24..2e7130d 100644 --- a/packages/constants/tsconfig.json +++ b/packages/constants/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "./dist", "declaration": true, - "incremental": false, "module": "NodeNext" } } diff --git a/packages/database/tsconfig.json b/packages/database/tsconfig.json index 40d703a..5838d5f 100644 --- a/packages/database/tsconfig.json +++ b/packages/database/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "./dist", "declaration": true, - "incremental": false, "module": "NodeNext" }, "exclude": ["prisma", "dist"] From efacf58716da0ecee9c6345b165ab7e68b4edd38 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:46:32 +0700 Subject: [PATCH 07/45] favicon and og image --- apps/web/package.json | 2 + apps/web/src/app.html | 2 +- apps/web/src/lib/server/index.ts | 15 + .../src/routes/(image)/favicon.ico/+server.ts | 20 + apps/web/src/routes/(image)/image/+server.ts | 12 + .../src/routes/(image)/image/og/+server.ts | 20 + apps/web/src/routes/+layout.svelte | 3 + apps/web/src/routes/+page.server.ts | 14 +- pnpm-lock.yaml | 387 +++++++++++++++++- 9 files changed, 457 insertions(+), 18 deletions(-) create mode 100644 apps/web/src/lib/server/index.ts create mode 100644 apps/web/src/routes/(image)/favicon.ico/+server.ts create mode 100644 apps/web/src/routes/(image)/image/+server.ts create mode 100644 apps/web/src/routes/(image)/image/og/+server.ts diff --git a/apps/web/package.json b/apps/web/package.json index e1f85ad..a40b668 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -20,6 +20,7 @@ "@types/jsonwebtoken": "9.0.4", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", + "@urami/core": "1.0.2", "autoprefixer": "10.4.16", "eslint": "8.51.0", "eslint-config-prettier": "9.0.0", @@ -29,6 +30,7 @@ "prettier-plugin-svelte": "3.0.3", "prettier-plugin-tailwindcss": "0.5.6", "sass": "1.69.4", + "sharp": "0.32.6", "svelte": "4.2.1", "svelte-check": "3.5.2", "tailwindcss": "3.3.3", diff --git a/apps/web/src/app.html b/apps/web/src/app.html index 84ffad1..564d2da 100644 --- a/apps/web/src/app.html +++ b/apps/web/src/app.html @@ -2,7 +2,7 @@ - + %sveltekit.head% diff --git a/apps/web/src/lib/server/index.ts b/apps/web/src/lib/server/index.ts new file mode 100644 index 0000000..14b5a13 --- /dev/null +++ b/apps/web/src/lib/server/index.ts @@ -0,0 +1,15 @@ +import { prisma } from "@waifu-bot/database"; + +export async function getCurrentWaifu() { + const config = await prisma.configuration.findUniqueOrThrow({ + where: { id: 0 }, + }); + + const waifu = await prisma.waifu.findUniqueOrThrow({ + where: { + id: config.currentWaifuId, + }, + }); + + return waifu; +} diff --git a/apps/web/src/routes/(image)/favicon.ico/+server.ts b/apps/web/src/routes/(image)/favicon.ico/+server.ts new file mode 100644 index 0000000..93b9b91 --- /dev/null +++ b/apps/web/src/routes/(image)/favicon.ico/+server.ts @@ -0,0 +1,20 @@ +import { getCurrentWaifu } from "$lib/server"; +import { error, type RequestHandler } from "@sveltejs/kit"; + +export const GET = (async ({ setHeaders, fetch }) => { + const waifu = await getCurrentWaifu(); + + const imageUrl = `/image?url=${encodeURI(waifu.imageUrl)}&w=64&q=100`; + const res = await fetch(imageUrl); + + if (!res.body) { + throw error(500, "Failed to fetch image"); + } + + setHeaders({ + "Cache-Control": "public, max-age=3600", // cache the image for 1 hour + "Content-Type": res.headers.get("Content-Type") || "image/png", + }); + + return new Response(res.body); +}) satisfies RequestHandler; diff --git a/apps/web/src/routes/(image)/image/+server.ts b/apps/web/src/routes/(image)/image/+server.ts new file mode 100644 index 0000000..feb6974 --- /dev/null +++ b/apps/web/src/routes/(image)/image/+server.ts @@ -0,0 +1,12 @@ +import type { RequestHandler } from "@sveltejs/kit"; +import { createRequestHandler } from "@urami/core"; + +const handler = createRequestHandler({ + avif: false, + remoteDomains: ["senddude.leomotors.me"], + allowedDomains: ["waifu.leomotors.me"], + ttl: 1000 * 60 * 60 * 24 * 7, + storePath: ".svelte-kit/images", +}); + +export const GET = (({ request }) => handler(request)) satisfies RequestHandler; diff --git a/apps/web/src/routes/(image)/image/og/+server.ts b/apps/web/src/routes/(image)/image/og/+server.ts new file mode 100644 index 0000000..37793c3 --- /dev/null +++ b/apps/web/src/routes/(image)/image/og/+server.ts @@ -0,0 +1,20 @@ +import { getCurrentWaifu } from "$lib/server"; +import { error, type RequestHandler } from "@sveltejs/kit"; + +export const GET = (async ({ setHeaders, fetch }) => { + const waifu = await getCurrentWaifu(); + + const imageUrl = `/image?url=${encodeURI(waifu.bannerUrl)}&w=1200&q=100`; + const res = await fetch(imageUrl); + + if (!res.body) { + throw error(500, "Failed to fetch image"); + } + + setHeaders({ + "Cache-Control": "public, max-age=3600", // cache the image for 1 hour + "Content-Type": res.headers.get("Content-Type") || "image/png", + }); + + return new Response(res.body); +}) satisfies RequestHandler; diff --git a/apps/web/src/routes/+layout.svelte b/apps/web/src/routes/+layout.svelte index 48ede17..c0f3bb2 100644 --- a/apps/web/src/routes/+layout.svelte +++ b/apps/web/src/routes/+layout.svelte @@ -1,9 +1,12 @@ Waifu Bot + diff --git a/apps/web/src/routes/+page.server.ts b/apps/web/src/routes/+page.server.ts index 9cb74b6..9f0cc9e 100644 --- a/apps/web/src/routes/+page.server.ts +++ b/apps/web/src/routes/+page.server.ts @@ -1,16 +1,6 @@ -import { prisma } from "@waifu-bot/database"; import type { PageServerLoad } from "./$types"; +import { getCurrentWaifu } from "$lib/server"; export const load = (async () => { - const config = await prisma.configuration.findUniqueOrThrow({ - where: { id: 0 }, - }); - - const waifu = await prisma.waifu.findUniqueOrThrow({ - where: { - id: config.currentWaifuId, - }, - }); - - return waifu; + return await getCurrentWaifu(); }) satisfies PageServerLoad; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a874d50..4b1404d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -155,6 +155,9 @@ importers: '@typescript-eslint/parser': specifier: 6.8.0 version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@urami/core': + specifier: 1.0.2 + version: 1.0.2 autoprefixer: specifier: 10.4.16 version: 10.4.16(postcss@8.4.31) @@ -182,6 +185,9 @@ importers: sass: specifier: 1.69.4 version: 1.69.4 + sharp: + specifier: 0.32.6 + version: 0.32.6 svelte: specifier: 4.2.1 version: 4.2.1 @@ -796,6 +802,23 @@ packages: fast-json-stringify: 5.8.0 dev: false + /@hapi/accept@6.0.3: + resolution: {integrity: sha512-p72f9k56EuF0n3MwlBNThyVE5PXX40g+aQh+C/xbKrfzahM2Oispv3AXmOIU51t3j77zay1qrX7IIziZXspMlw==} + dependencies: + '@hapi/boom': 10.0.1 + '@hapi/hoek': 11.0.2 + dev: true + + /@hapi/boom@10.0.1: + resolution: {integrity: sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==} + dependencies: + '@hapi/hoek': 11.0.2 + dev: true + + /@hapi/hoek@11.0.2: + resolution: {integrity: sha512-aKmlCO57XFZ26wso4rJsW4oTUnrgTFw2jh3io7CAtO9w4UltBNwRXvXIVzzyfkaaLRo3nluP/19msA8vDUUuKw==} + dev: true + /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} @@ -1356,6 +1379,17 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@urami/core@1.0.2: + resolution: {integrity: sha512-dVMWfwo05WiSIdSjaLLfjNCotSi/5Xp/un9wXmOMHVXvDcHjqwkNC9Qz2AtxFOxTWCqLQ2lAojpnw7qlcozjag==} + dependencies: + '@hapi/accept': 6.0.3 + is-animated: 2.0.2 + send: 0.18.0 + sharp: 0.32.6 + transitivePeerDependencies: + - supports-color + dev: true + /@vitest/expect@0.34.6: resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} dependencies: @@ -1687,12 +1721,15 @@ packages: dequal: 2.0.3 dev: true + /b4a@1.6.4: + resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false /bent@7.3.12: resolution: {integrity: sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==} @@ -1712,6 +1749,14 @@ packages: engines: {node: '>=8'} dev: true + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + /bplist-parser@0.2.0: resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} engines: {node: '>= 5.10.0'} @@ -1760,6 +1805,13 @@ packages: /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + /buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + /buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} dependencies: @@ -1876,6 +1928,10 @@ packages: fsevents: 2.3.3 dev: true + /chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + dev: true + /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -1924,11 +1980,26 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: true + /color-support@1.1.3: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true dev: false + /color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + dev: true + /commander@11.1.0: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} @@ -1990,6 +2061,17 @@ packages: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true + /debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + dev: true + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -2012,6 +2094,13 @@ packages: dependencies: ms: 2.1.2 + /decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + dev: true + /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -2019,6 +2108,11 @@ packages: type-detect: 4.0.8 dev: true + /deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -2073,11 +2167,21 @@ packages: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} dev: false + /depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dev: true + /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} dev: true + /destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dev: true + /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -2086,7 +2190,6 @@ packages: /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} - dev: false /devalue@4.3.2: resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} @@ -2183,6 +2286,10 @@ packages: safe-buffer: 5.2.1 dev: true + /ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + dev: true + /electron-to-chromium@1.4.559: resolution: {integrity: sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==} dev: true @@ -2195,6 +2302,17 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + dev: true + + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: true + /enhanced-resolve@5.15.0: resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} @@ -2335,6 +2453,10 @@ packages: engines: {node: '>=6'} dev: true + /escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: true + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -2702,6 +2824,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + dev: true + /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -2742,6 +2869,11 @@ packages: strip-final-newline: 3.0.0 dev: true + /expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + dev: true + /fast-content-type-parse@1.1.0: resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==} dev: false @@ -2757,6 +2889,10 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true + /fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + dev: true + /fast-glob@3.3.1: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} @@ -2912,6 +3048,15 @@ packages: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true + /fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + dev: true + + /fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + dev: true + /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -2995,6 +3140,10 @@ packages: resolve-pkg-maps: 1.0.0 dev: true + /github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3159,6 +3308,17 @@ packages: engines: {node: '>= 0.4.0'} dev: true + /http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + dev: true + /http-response-object@3.0.2: resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==} dependencies: @@ -3197,7 +3357,6 @@ packages: /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} @@ -3230,6 +3389,10 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + /ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: true + /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} @@ -3244,6 +3407,10 @@ packages: engines: {node: '>= 0.10'} dev: false + /is-animated@2.0.2: + resolution: {integrity: sha512-+Hi3UdXHV/3ZgxdO9Ik45ciNhDlYrDOIdGz7Cj7ybddWnYBi4kwBuGMn79Xa2Js4VldgX5e3943Djsr/KYSPbA==} + dev: true + /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: @@ -3252,6 +3419,10 @@ packages: is-typed-array: 1.1.12 dev: true + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: true + /is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -3764,6 +3935,12 @@ packages: - utf-8-validate dev: false + /mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + dev: true + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -3774,6 +3951,11 @@ packages: engines: {node: '>=12'} dev: true + /mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + dev: true + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -3814,6 +3996,10 @@ packages: yallist: 4.0.0 dev: false + /mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + dev: true + /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -3846,6 +4032,10 @@ packages: engines: {node: '>=10'} dev: true + /ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -3867,6 +4057,10 @@ packages: hasBin: true dev: true + /napi-build-utils@1.0.2: + resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + dev: true + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -3875,10 +4069,21 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /node-abi@3.51.0: + resolution: {integrity: sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 + dev: true + /node-addon-api@5.1.0: resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} dev: false + /node-addon-api@6.1.0: + resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + dev: true + /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -4017,6 +4222,13 @@ packages: engines: {node: '>=14.0.0'} dev: false + /on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + dependencies: + ee-first: 1.1.1 + dev: true + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -4304,6 +4516,25 @@ packages: source-map-js: 1.0.2 dev: true + /prebuild-install@7.1.1: + resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + detect-libc: 2.0.2 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 1.0.2 + node-abi: 3.51.0 + pump: 3.0.0 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.1 + tunnel-agent: 0.6.0 + dev: true + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -4457,6 +4688,13 @@ packages: ipaddr.js: 1.9.1 dev: false + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} @@ -4465,10 +4703,29 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + dev: true + /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} dev: false + /range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + dev: true + + /rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + dev: true + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true @@ -4490,7 +4747,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: false /readable-stream@4.4.2: resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} @@ -4692,6 +4948,27 @@ packages: dependencies: lru-cache: 6.0.0 + /send@0.18.0: + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: true + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: false @@ -4708,6 +4985,25 @@ packages: has-property-descriptors: 1.0.0 dev: true + /setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: true + + /sharp@0.32.6: + resolution: {integrity: sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==} + engines: {node: '>=14.15.0'} + requiresBuild: true + dependencies: + color: 4.2.3 + detect-libc: 2.0.2 + node-addon-api: 6.1.0 + prebuild-install: 7.1.1 + semver: 7.5.4 + simple-get: 4.0.1 + tar-fs: 3.0.4 + tunnel-agent: 0.6.0 + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -4733,6 +5029,24 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + /simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + dev: true + + /simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + dev: true + + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: true + /sirv@2.0.3: resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} engines: {node: '>= 10'} @@ -4801,6 +5115,11 @@ packages: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true + /statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + dev: true + /std-env@3.4.3: resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} dev: true @@ -4810,6 +5129,13 @@ packages: engines: {node: '>=10.0.0'} dev: false + /streamx@2.15.1: + resolution: {integrity: sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==} + dependencies: + fast-fifo: 1.3.2 + queue-tick: 1.0.1 + dev: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -4862,7 +5188,6 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: false /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -4892,6 +5217,11 @@ packages: min-indent: 1.0.1 dev: true + /strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -5101,6 +5431,42 @@ packages: engines: {node: '>=6'} dev: true + /tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 2.2.0 + dev: true + + /tar-fs@3.0.4: + resolution: {integrity: sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==} + dependencies: + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 3.1.6 + dev: true + + /tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + + /tar-stream@3.1.6: + resolution: {integrity: sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==} + dependencies: + b4a: 1.6.4 + fast-fifo: 1.3.2 + streamx: 2.15.1 + dev: true + /tar@6.2.0: resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} @@ -5179,6 +5545,11 @@ packages: engines: {node: '>=12'} dev: false + /toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + dev: true + /totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -5228,6 +5599,12 @@ packages: fsevents: 2.3.3 dev: true + /tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /turbo-darwin-64@1.10.15: resolution: {integrity: sha512-Sik5uogjkRTe1XVP9TC2GryEMOJCaKE2pM/O9uLn4koQDnWKGcLQv+mDU+H+9DXvKLnJnKCD18OVRkwK5tdpoA==} cpu: [x64] From 60c4383b8b21e1e92472f6f2e32b606e035960e2 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:51:35 +0700 Subject: [PATCH 08/45] restructure routes --- apps/web/src/routes/+layout.svelte | 2 +- apps/web/src/routes/{(image) => api}/image/+server.ts | 0 apps/web/src/routes/{(image) => api}/image/og/+server.ts | 2 +- apps/web/src/routes/{(image) => }/favicon.ico/+server.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename apps/web/src/routes/{(image) => api}/image/+server.ts (100%) rename apps/web/src/routes/{(image) => api}/image/og/+server.ts (87%) rename apps/web/src/routes/{(image) => }/favicon.ico/+server.ts (87%) diff --git a/apps/web/src/routes/+layout.svelte b/apps/web/src/routes/+layout.svelte index c0f3bb2..76b358f 100644 --- a/apps/web/src/routes/+layout.svelte +++ b/apps/web/src/routes/+layout.svelte @@ -6,7 +6,7 @@ Waifu Bot - + diff --git a/apps/web/src/routes/(image)/image/+server.ts b/apps/web/src/routes/api/image/+server.ts similarity index 100% rename from apps/web/src/routes/(image)/image/+server.ts rename to apps/web/src/routes/api/image/+server.ts diff --git a/apps/web/src/routes/(image)/image/og/+server.ts b/apps/web/src/routes/api/image/og/+server.ts similarity index 87% rename from apps/web/src/routes/(image)/image/og/+server.ts rename to apps/web/src/routes/api/image/og/+server.ts index 37793c3..677993e 100644 --- a/apps/web/src/routes/(image)/image/og/+server.ts +++ b/apps/web/src/routes/api/image/og/+server.ts @@ -4,7 +4,7 @@ import { error, type RequestHandler } from "@sveltejs/kit"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); - const imageUrl = `/image?url=${encodeURI(waifu.bannerUrl)}&w=1200&q=100`; + const imageUrl = `/api/image?url=${encodeURI(waifu.bannerUrl)}&w=1200&q=100`; const res = await fetch(imageUrl); if (!res.body) { diff --git a/apps/web/src/routes/(image)/favicon.ico/+server.ts b/apps/web/src/routes/favicon.ico/+server.ts similarity index 87% rename from apps/web/src/routes/(image)/favicon.ico/+server.ts rename to apps/web/src/routes/favicon.ico/+server.ts index 93b9b91..5155720 100644 --- a/apps/web/src/routes/(image)/favicon.ico/+server.ts +++ b/apps/web/src/routes/favicon.ico/+server.ts @@ -4,7 +4,7 @@ import { error, type RequestHandler } from "@sveltejs/kit"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); - const imageUrl = `/image?url=${encodeURI(waifu.imageUrl)}&w=64&q=100`; + const imageUrl = `/api/image?url=${encodeURI(waifu.imageUrl)}&w=64&q=100`; const res = await fetch(imageUrl); if (!res.body) { From 740b160b10a728ac49affc25ce862ebc608847bb Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:05:06 +0700 Subject: [PATCH 09/45] add sourceEn and sourceJa field --- apps/bot/src/commands/web.slash.ts | 3 +-- apps/web/src/routes/(user)/home/+layout.server.ts | 2 ++ .../migration.sql | 2 ++ packages/database/prisma/schema.prisma | 2 ++ packages/database/prisma/seed.ts | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) rename packages/database/prisma/migrations/{20231019143318_init_db_again => 20231021084213_init_again_5}/migration.sql (97%) diff --git a/apps/bot/src/commands/web.slash.ts b/apps/bot/src/commands/web.slash.ts index 8622688..1f628ab 100644 --- a/apps/bot/src/commands/web.slash.ts +++ b/apps/bot/src/commands/web.slash.ts @@ -1,4 +1,4 @@ -import { UserRole, prisma } from "@waifu-bot/database"; +import { prisma } from "@waifu-bot/database"; import { SlashCommand, SlashModuleClass } from "cocoa-discord/slash/class"; @@ -26,7 +26,6 @@ export class WebService extends SlashModuleClass { id: user.id, name: user.username, avatarUrl: user.displayAvatarURL({ size: 4096 }), - role: UserRole.USER, }, }, }, diff --git a/apps/web/src/routes/(user)/home/+layout.server.ts b/apps/web/src/routes/(user)/home/+layout.server.ts index 5353f02..e9256d1 100644 --- a/apps/web/src/routes/(user)/home/+layout.server.ts +++ b/apps/web/src/routes/(user)/home/+layout.server.ts @@ -3,6 +3,8 @@ import type { LayoutServerLoad } from "./$types"; export const load = (async ({ locals }) => { if (!locals.user) { + console.log("(user)/home/+layout.server.ts#load : HOW"); + throw redirect(302, "/login?error=how"); } diff --git a/packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql b/packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql similarity index 97% rename from packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql rename to packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql index c0961fd..62cbca8 100644 --- a/packages/database/prisma/migrations/20231019143318_init_db_again/migration.sql +++ b/packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql @@ -37,6 +37,8 @@ CREATE TABLE "waifu" ( "image_url" TEXT NOT NULL, "banner_url" TEXT NOT NULL, "color" TEXT NOT NULL, + "source_en" TEXT NOT NULL, + "source_ja" TEXT NOT NULL, "created_by_user_id" TEXT NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL, diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index afa948f..14fd295 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -53,6 +53,8 @@ model Waifu { imageUrl String @map("image_url") bannerUrl String @map("banner_url") color String + sourceEn String @map("source_en") + sourceJa String @map("source_ja") createdBy User @relation(fields: [createdByUserId], references: [id]) createdByUserId String @map("created_by_user_id") diff --git a/packages/database/prisma/seed.ts b/packages/database/prisma/seed.ts index 00ec5ad..29da76a 100644 --- a/packages/database/prisma/seed.ts +++ b/packages/database/prisma/seed.ts @@ -24,6 +24,9 @@ const waifu = await prisma.waifu.create({ imageUrl: "https://senddude.leomotors.me/files/waifu/kanade-pfp.png", bannerUrl: "https://senddude.leomotors.me/files/waifu/kanade-banner.png", + sourceEn: "HATSUNE MIKU: COLORFUL STAGE!", + sourceJa: "プロジェクトセカイ カラフルステージ! feat. 初音ミク", + createdBy: { connect: { id: "143649805250461696", From 29d5d8bb12d3539ccdcc9ece1cee5f2eed74eeb5 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 17:17:48 +0700 Subject: [PATCH 10/45] feat: home page done --- .github/workflows/publish.yml | 7 +- apps/web/.eslintrc.cjs | 56 ++++++------ apps/web/.prettierrc | 12 +-- apps/web/package.json | 4 + apps/web/src/app.html | 6 ++ apps/web/src/app.scss | 15 ++++ apps/web/src/lib/components/Image.svelte | 27 ++++++ apps/web/src/lib/index.ts | 1 - apps/web/src/lib/server/index.ts | 5 +- apps/web/src/routes/+page.svelte | 48 ++++++++++- apps/web/src/routes/Phone.svelte | 86 +++++++++++++++++++ apps/web/tsconfig.json | 30 +++---- .../migration.sql | 3 +- packages/database/prisma/schema.prisma | 5 +- packages/database/prisma/seed.ts | 1 + pnpm-lock.yaml | 37 ++++++++ 16 files changed, 286 insertions(+), 57 deletions(-) create mode 100644 apps/web/src/lib/components/Image.svelte delete mode 100644 apps/web/src/lib/index.ts create mode 100644 apps/web/src/routes/Phone.svelte rename packages/database/prisma/migrations/{20231021084213_init_again_5 => 20231022090325_init_again_6}/migration.sql (97%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 112b4c2..c84811f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -51,12 +51,17 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - uses: winterjung/split@v2 + id: version + with: + msg: ${{ github.ref_name }} + - name: Build Docker image uses: docker/build-push-action@v4 with: context: . file: Dockerfile push: true - tags: ghcr.io/leomotors/waifu-bot:${{ github.ref_name }},ghcr.io/leomotors/waifu-bot:kanade,ghcr.io/leomotors/waifu-bot:latest + tags: ghcr.io/leomotors/waifu-bot:${{ github.ref_name }},ghcr.io/leomotors/waifu-bot:v${{ steps.version.outputs._0 }},ghcr.io/leomotors/waifu-bot:latest cache-from: type=gha cache-to: type=gha,mode=max diff --git a/apps/web/.eslintrc.cjs b/apps/web/.eslintrc.cjs index ebc1958..04fd192 100644 --- a/apps/web/.eslintrc.cjs +++ b/apps/web/.eslintrc.cjs @@ -1,30 +1,30 @@ module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:svelte/recommended', - 'prettier' - ], - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - }, - overrides: [ - { - files: ['*.svelte'], - parser: 'svelte-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser' - } - } - ] + root: true, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:svelte/recommended", + "prettier", + ], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + parserOptions: { + sourceType: "module", + ecmaVersion: 2020, + extraFileExtensions: [".svelte"], + }, + env: { + browser: true, + es2017: true, + node: true, + }, + overrides: [ + { + files: ["*.svelte"], + parser: "svelte-eslint-parser", + parserOptions: { + parser: "@typescript-eslint/parser", + }, + }, + ], }; diff --git a/apps/web/.prettierrc b/apps/web/.prettierrc index 8c3b625..d55e0d6 100644 --- a/apps/web/.prettierrc +++ b/apps/web/.prettierrc @@ -1,8 +1,8 @@ { - "useTabs": false, - "singleQuote": false, - "trailingComma": "all", - "printWidth": 80, - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] + "useTabs": false, + "singleQuote": false, + "trailingComma": "all", + "printWidth": 80, + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/apps/web/package.json b/apps/web/package.json index a40b668..b019dc6 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -21,6 +21,8 @@ "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", "@urami/core": "1.0.2", + "@urami/svelte": "1.0.1", + "@urami/types": "1.0.0", "autoprefixer": "10.4.16", "eslint": "8.51.0", "eslint-config-prettier": "9.0.0", @@ -32,7 +34,9 @@ "sass": "1.69.4", "sharp": "0.32.6", "svelte": "4.2.1", + "svelte-bootstrap-icons": "3.1.0", "svelte-check": "3.5.2", + "tailwind-merge": "1.14.0", "tailwindcss": "3.3.3", "tslib": "2.6.2", "typescript": "5.2.2", diff --git a/apps/web/src/app.html b/apps/web/src/app.html index 564d2da..6ed7c5e 100644 --- a/apps/web/src/app.html +++ b/apps/web/src/app.html @@ -4,6 +4,12 @@ + + + %sveltekit.head% diff --git a/apps/web/src/app.scss b/apps/web/src/app.scss index b5c61c9..e0b33f6 100644 --- a/apps/web/src/app.scss +++ b/apps/web/src/app.scss @@ -1,3 +1,18 @@ @tailwind base; @tailwind components; @tailwind utilities; + +:root { + font-family: + "Inter", + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Roboto, + Oxygen, + Ubuntu, + Cantarell, + "Open Sans", + "Helvetica Neue", + sans-serif; +} diff --git a/apps/web/src/lib/components/Image.svelte b/apps/web/src/lib/components/Image.svelte new file mode 100644 index 0000000..0aab0b9 --- /dev/null +++ b/apps/web/src/lib/components/Image.svelte @@ -0,0 +1,27 @@ + + + + + diff --git a/apps/web/src/lib/index.ts b/apps/web/src/lib/index.ts deleted file mode 100644 index 856f2b6..0000000 --- a/apps/web/src/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -// place files you want to import through the `$lib` alias in this folder. diff --git a/apps/web/src/lib/server/index.ts b/apps/web/src/lib/server/index.ts index 14b5a13..d4bf65a 100644 --- a/apps/web/src/lib/server/index.ts +++ b/apps/web/src/lib/server/index.ts @@ -11,5 +11,8 @@ export async function getCurrentWaifu() { }, }); - return waifu; + return { + ...waifu, + simpingSince: config.simpingSince, + }; } diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte index ef7aed5..bf708cf 100644 --- a/apps/web/src/routes/+page.svelte +++ b/apps/web/src/routes/+page.svelte @@ -1,8 +1,52 @@ -

Welcome to SvelteKit

-

Current waifu is {data.nameEn}

+
+

+ Waifu Bot +

+ +
+
+

+ Waifu Bot +

+ +

Multipurpose Waifu Discord Bot

+ + + + + +
+

Run Waifu Bot

+ +

$

+

docker pull ghcr.io/leomotors/waifu-bot:latest

+
+
+
+ + +
+
diff --git a/apps/web/src/routes/Phone.svelte b/apps/web/src/routes/Phone.svelte new file mode 100644 index 0000000..401f662 --- /dev/null +++ b/apps/web/src/routes/Phone.svelte @@ -0,0 +1,86 @@ + + + + + diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 6ae0c8c..794b95b 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,17 +1,17 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql b/packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql similarity index 97% rename from packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql rename to packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql index 62cbca8..90abcab 100644 --- a/packages/database/prisma/migrations/20231021084213_init_again_5/migration.sql +++ b/packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql @@ -67,7 +67,8 @@ CREATE TABLE "activity" ( -- CreateTable CREATE TABLE "configuration" ( "id" INTEGER NOT NULL DEFAULT 0, - "current_waifu_id" TEXT NOT NULL + "current_waifu_id" TEXT NOT NULL, + "simping_since" TIMESTAMP(3) NOT NULL ); -- CreateIndex diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index 14fd295..66807d3 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -105,8 +105,9 @@ model Activity { model Configuration { id Int @unique @default(0) - currentWaifu Waifu @relation(fields: [currentWaifuId], references: [id]) - currentWaifuId String @map("current_waifu_id") + currentWaifu Waifu @relation(fields: [currentWaifuId], references: [id]) + currentWaifuId String @map("current_waifu_id") + simpingSince DateTime @map("simping_since") @@map("configuration") } diff --git a/packages/database/prisma/seed.ts b/packages/database/prisma/seed.ts index 29da76a..6f8f6e4 100644 --- a/packages/database/prisma/seed.ts +++ b/packages/database/prisma/seed.ts @@ -42,6 +42,7 @@ await prisma.configuration.create({ id: waifu.id, }, }, + simpingSince: new Date("2023-10-17"), }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b1404d..47602ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -158,6 +158,12 @@ importers: '@urami/core': specifier: 1.0.2 version: 1.0.2 + '@urami/svelte': + specifier: 1.0.1 + version: 1.0.1(svelte@4.2.1) + '@urami/types': + specifier: 1.0.0 + version: 1.0.0 autoprefixer: specifier: 10.4.16 version: 10.4.16(postcss@8.4.31) @@ -191,9 +197,15 @@ importers: svelte: specifier: 4.2.1 version: 4.2.1 + svelte-bootstrap-icons: + specifier: 3.1.0 + version: 3.1.0 svelte-check: specifier: 3.5.2 version: 3.5.2(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1) + tailwind-merge: + specifier: 1.14.0 + version: 1.14.0 tailwindcss: specifier: 3.3.3 version: 3.3.3 @@ -1390,6 +1402,23 @@ packages: - supports-color dev: true + /@urami/svelte@1.0.1(svelte@4.2.1): + resolution: {integrity: sha512-pit9XZgnC1i1sxVNbty7yVge5c6Kj97yI/E/adsAyee3goMX10Gu/IVQZCNQwRL7aebddBrrB4zIgZuSz+jGvw==} + peerDependencies: + svelte: ^4.0.0 + dependencies: + '@urami/utils': 1.0.0 + svelte: 4.2.1 + dev: true + + /@urami/types@1.0.0: + resolution: {integrity: sha512-7Fn7fUy4cqp01pO+XG1RKfJ/M4LQt8ikL+CbzwufwQFUVhTDUqZGCv3tBMYRu83erz9Bl7FDGiYlUVV/g/uk2g==} + dev: true + + /@urami/utils@1.0.0: + resolution: {integrity: sha512-HyRm70FW73qUdZ2O75mpyp3c+jOPPlQl6bVfroeDutK+SGo7QGX1pkF6MTnS1w5zzFbLJnJQ3V66YXszqVWKyQ==} + dev: true + /@vitest/expect@0.34.6: resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} dependencies: @@ -5266,6 +5295,10 @@ packages: engines: {node: '>= 0.4'} dev: true + /svelte-bootstrap-icons@3.1.0: + resolution: {integrity: sha512-mg/feZZ7+S/ycUcfe2kHGzI4xzVokCfrBJ/YPOnIstYJsvCOZNVAHyMPW5vSvBu8ad2tWM1fPksEC1mu6gg/iQ==} + dev: true + /svelte-check@3.5.2(postcss@8.4.31)(sass@1.69.4)(svelte@4.2.1): resolution: {integrity: sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==} hasBin: true @@ -5395,6 +5428,10 @@ packages: tslib: 2.6.2 dev: true + /tailwind-merge@1.14.0: + resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==} + dev: true + /tailwindcss@3.3.3: resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} engines: {node: '>=14.0.0'} From 68a65e4a353b288fad9ac4b5bd7cfc5aa28a3809 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:31:47 +0700 Subject: [PATCH 11/45] enhance login page --- apps/web/src/hooks.server.ts | 19 ++++++++++--- apps/web/src/lib/constants.ts | 1 + apps/web/src/lib/login.ts | 7 +++++ .../src/routes/(user)/home/+layout.server.ts | 3 +- apps/web/src/routes/login/+page.server.ts | 4 ++- apps/web/src/routes/login/+page.svelte | 28 +++++++++++++++---- 6 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 apps/web/src/lib/constants.ts create mode 100644 apps/web/src/lib/login.ts diff --git a/apps/web/src/hooks.server.ts b/apps/web/src/hooks.server.ts index 542c75e..560d5dd 100644 --- a/apps/web/src/hooks.server.ts +++ b/apps/web/src/hooks.server.ts @@ -1,4 +1,6 @@ import { env } from "$env/dynamic/private"; +import { cookieTokenKey } from "$lib/constants"; +import type { AuthFailReason } from "$lib/login"; import { redirect, type Handle, error } from "@sveltejs/kit"; import jwt from "jsonwebtoken"; @@ -24,10 +26,13 @@ export const handle = (async ({ event, resolve }) => { throw error(500, "Server missing environment variables"); } - const accessToken = event.cookies.get("access_token"); + const accessToken = event.cookies.get(cookieTokenKey); if (!accessToken) { - throw redirect(302, "/login?error=notauthenticated"); + throw redirect( + 302, + `/login?error=${"notauthenticated" satisfies AuthFailReason}`, + ); } try { @@ -35,7 +40,10 @@ export const handle = (async ({ event, resolve }) => { const parsed = jwtSchema.safeParse(user); if (!parsed.success) { - throw redirect(302, "/login?error=invalidjwtcontent"); + throw redirect( + 302, + `/login?error=${"invalidjwtcontent" satisfies AuthFailReason}`, + ); } event.locals.user = parsed.data; @@ -43,6 +51,9 @@ export const handle = (async ({ event, resolve }) => { const response = await resolve(event); return response; } catch (error) { - throw redirect(302, "/login?error=notauthenticated"); + throw redirect( + 302, + `/login?error=${"notauthenticated" satisfies AuthFailReason}`, + ); } }) satisfies Handle; diff --git a/apps/web/src/lib/constants.ts b/apps/web/src/lib/constants.ts new file mode 100644 index 0000000..176ec62 --- /dev/null +++ b/apps/web/src/lib/constants.ts @@ -0,0 +1 @@ +export const cookieTokenKey = "access_token"; diff --git a/apps/web/src/lib/login.ts b/apps/web/src/lib/login.ts new file mode 100644 index 0000000..5eefc0f --- /dev/null +++ b/apps/web/src/lib/login.ts @@ -0,0 +1,7 @@ +export const authFailReason = { + notauthenticated: "You are not authenticated, please login.", + invalidjwtcontent: "Session expired, please login again.", + how: "Unexpected error", +} as const; + +export type AuthFailReason = keyof typeof authFailReason; diff --git a/apps/web/src/routes/(user)/home/+layout.server.ts b/apps/web/src/routes/(user)/home/+layout.server.ts index e9256d1..4d92f4c 100644 --- a/apps/web/src/routes/(user)/home/+layout.server.ts +++ b/apps/web/src/routes/(user)/home/+layout.server.ts @@ -1,11 +1,12 @@ import { redirect } from "@sveltejs/kit"; import type { LayoutServerLoad } from "./$types"; +import type { AuthFailReason } from "$lib/login"; export const load = (async ({ locals }) => { if (!locals.user) { console.log("(user)/home/+layout.server.ts#load : HOW"); - throw redirect(302, "/login?error=how"); + throw redirect(302, `/login?error=${"how" satisfies AuthFailReason}`); } return { diff --git a/apps/web/src/routes/login/+page.server.ts b/apps/web/src/routes/login/+page.server.ts index d22dbeb..563a617 100644 --- a/apps/web/src/routes/login/+page.server.ts +++ b/apps/web/src/routes/login/+page.server.ts @@ -7,6 +7,8 @@ import type { Actions } from "../$types"; import jwt from "jsonwebtoken"; +import { cookieTokenKey } from "$lib/constants"; + export const actions = { default: async ({ cookies, request }) => { if (!env.JWT_SECRET) { @@ -55,7 +57,7 @@ export const actions = { { expiresIn: "14d" }, ); - cookies.set("access_token", accessToken, { + cookies.set(cookieTokenKey, accessToken, { path: "/", httpOnly: true, sameSite: true, diff --git a/apps/web/src/routes/login/+page.svelte b/apps/web/src/routes/login/+page.svelte index 9365719..0a9f24f 100644 --- a/apps/web/src/routes/login/+page.svelte +++ b/apps/web/src/routes/login/+page.svelte @@ -1,5 +1,6 @@ -
-
-
+
+ {#if errorMsg} +

{errorMsg}

+ {/if} + + +
@@ -30,7 +46,7 @@ class="focus:shadow-outline rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700 focus:outline-none" type="submit" > - Submit + Login
From 4a9b146b07d9f1e88b99ce29fb346478ff0b08be Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:51:51 +0700 Subject: [PATCH 12/45] chore(web): format --- apps/web/.prettierrc | 8 ---- apps/web/.prettierrc.cjs | 31 +++++++++++++++ apps/web/README.md | 38 ------------------- apps/web/package.json | 5 ++- apps/web/src/app.d.ts | 1 - apps/web/src/hooks.server.ts | 3 +- apps/web/src/index.test.ts | 2 +- .../src/routes/(user)/home/+layout.server.ts | 4 +- apps/web/src/routes/+page.server.ts | 3 +- apps/web/src/routes/+page.svelte | 3 +- apps/web/src/routes/api/activity/+server.ts | 4 +- apps/web/src/routes/api/image/+server.ts | 1 + apps/web/src/routes/api/image/og/+server.ts | 3 +- apps/web/src/routes/favicon.ico/+server.ts | 3 +- apps/web/src/routes/login/+page.server.ts | 8 ++-- apps/web/vite.config.ts | 1 + pnpm-lock.yaml | 9 +++-- 17 files changed, 61 insertions(+), 66 deletions(-) delete mode 100644 apps/web/.prettierrc create mode 100644 apps/web/.prettierrc.cjs delete mode 100644 apps/web/README.md diff --git a/apps/web/.prettierrc b/apps/web/.prettierrc deleted file mode 100644 index d55e0d6..0000000 --- a/apps/web/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "useTabs": false, - "singleQuote": false, - "trailingComma": "all", - "printWidth": 80, - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] -} diff --git a/apps/web/.prettierrc.cjs b/apps/web/.prettierrc.cjs new file mode 100644 index 0000000..7865140 --- /dev/null +++ b/apps/web/.prettierrc.cjs @@ -0,0 +1,31 @@ +// @ts-check + +/** @satisfies {import("@trivago/prettier-plugin-sort-imports").PrettierConfig} */ +const config = { + bracketSpacing: true, + tabWidth: 2, + useTabs: false, + singleQuote: false, + semi: true, + printWidth: 80, + plugins: [ + "prettier-plugin-svelte", + "@trivago/prettier-plugin-sort-imports", + "prettier-plugin-tailwindcss", + ], + importOrder: [ + "^@waifu-bot", + "^@svelte", + "^svelte", + "^\\$", + "", + "^[.][.]", + "^[.]", + ], + importOrderSeparation: true, + importOrderSortSpecifiers: true, + importOrderParserPlugins: ["typescript", "decorators-legacy", "jsx"], + overrides: [{ files: "*.svelte", options: { parser: "svelte" } }], +}; + +module.exports = config; diff --git a/apps/web/README.md b/apps/web/README.md deleted file mode 100644 index 5c91169..0000000 --- a/apps/web/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/apps/web/package.json b/apps/web/package.json index b019dc6..17c3c4b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -11,12 +11,13 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." }, "devDependencies": { "@sveltejs/adapter-node": "1.3.1", "@sveltejs/kit": "1.26.0", + "@trivago/prettier-plugin-sort-imports": "4.2.0", "@types/jsonwebtoken": "9.0.4", "@typescript-eslint/eslint-plugin": "6.8.0", "@typescript-eslint/parser": "6.8.0", diff --git a/apps/web/src/app.d.ts b/apps/web/src/app.d.ts index 0d4509a..699b1db 100644 --- a/apps/web/src/app.d.ts +++ b/apps/web/src/app.d.ts @@ -1,5 +1,4 @@ // See https://kit.svelte.dev/docs/types#app - import type { UserRole } from "@waifu-bot/database"; // for information about these interfaces diff --git a/apps/web/src/hooks.server.ts b/apps/web/src/hooks.server.ts index 560d5dd..4aef5d8 100644 --- a/apps/web/src/hooks.server.ts +++ b/apps/web/src/hooks.server.ts @@ -1,7 +1,8 @@ +import { type Handle, error, redirect } from "@sveltejs/kit"; + import { env } from "$env/dynamic/private"; import { cookieTokenKey } from "$lib/constants"; import type { AuthFailReason } from "$lib/login"; -import { redirect, type Handle, error } from "@sveltejs/kit"; import jwt from "jsonwebtoken"; import { z } from "zod"; diff --git a/apps/web/src/index.test.ts b/apps/web/src/index.test.ts index dadc7e4..48e7ccb 100644 --- a/apps/web/src/index.test.ts +++ b/apps/web/src/index.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from "vitest"; +import { describe, expect, it } from "vitest"; describe("sum test", () => { it("adds 1 + 2 to equal 3", () => { diff --git a/apps/web/src/routes/(user)/home/+layout.server.ts b/apps/web/src/routes/(user)/home/+layout.server.ts index 4d92f4c..80209fe 100644 --- a/apps/web/src/routes/(user)/home/+layout.server.ts +++ b/apps/web/src/routes/(user)/home/+layout.server.ts @@ -1,7 +1,9 @@ import { redirect } from "@sveltejs/kit"; -import type { LayoutServerLoad } from "./$types"; + import type { AuthFailReason } from "$lib/login"; +import type { LayoutServerLoad } from "./$types"; + export const load = (async ({ locals }) => { if (!locals.user) { console.log("(user)/home/+layout.server.ts#load : HOW"); diff --git a/apps/web/src/routes/+page.server.ts b/apps/web/src/routes/+page.server.ts index 9f0cc9e..7da891c 100644 --- a/apps/web/src/routes/+page.server.ts +++ b/apps/web/src/routes/+page.server.ts @@ -1,6 +1,7 @@ -import type { PageServerLoad } from "./$types"; import { getCurrentWaifu } from "$lib/server"; +import type { PageServerLoad } from "./$types"; + export const load = (async () => { return await getCurrentWaifu(); }) satisfies PageServerLoad; diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte index bf708cf..38bf74d 100644 --- a/apps/web/src/routes/+page.svelte +++ b/apps/web/src/routes/+page.svelte @@ -1,9 +1,8 @@ diff --git a/apps/web/src/routes/api/activity/+server.ts b/apps/web/src/routes/api/activity/+server.ts index 42246ec..7fed746 100644 --- a/apps/web/src/routes/api/activity/+server.ts +++ b/apps/web/src/routes/api/activity/+server.ts @@ -1,8 +1,8 @@ -import { error, json, type RequestHandler } from "@sveltejs/kit"; - import { authEnv } from "@waifu-bot/auth"; import { prisma } from "@waifu-bot/database"; +import { type RequestHandler, error, json } from "@sveltejs/kit"; + export const GET = (async ({ request }) => { const authorization = request.headers.get("Authorization"); diff --git a/apps/web/src/routes/api/image/+server.ts b/apps/web/src/routes/api/image/+server.ts index feb6974..a2cec9e 100644 --- a/apps/web/src/routes/api/image/+server.ts +++ b/apps/web/src/routes/api/image/+server.ts @@ -1,4 +1,5 @@ import type { RequestHandler } from "@sveltejs/kit"; + import { createRequestHandler } from "@urami/core"; const handler = createRequestHandler({ diff --git a/apps/web/src/routes/api/image/og/+server.ts b/apps/web/src/routes/api/image/og/+server.ts index 677993e..451a31d 100644 --- a/apps/web/src/routes/api/image/og/+server.ts +++ b/apps/web/src/routes/api/image/og/+server.ts @@ -1,5 +1,6 @@ +import { type RequestHandler, error } from "@sveltejs/kit"; + import { getCurrentWaifu } from "$lib/server"; -import { error, type RequestHandler } from "@sveltejs/kit"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); diff --git a/apps/web/src/routes/favicon.ico/+server.ts b/apps/web/src/routes/favicon.ico/+server.ts index 5155720..baab553 100644 --- a/apps/web/src/routes/favicon.ico/+server.ts +++ b/apps/web/src/routes/favicon.ico/+server.ts @@ -1,5 +1,6 @@ +import { type RequestHandler, error } from "@sveltejs/kit"; + import { getCurrentWaifu } from "$lib/server"; -import { error, type RequestHandler } from "@sveltejs/kit"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); diff --git a/apps/web/src/routes/login/+page.server.ts b/apps/web/src/routes/login/+page.server.ts index 563a617..1124a3f 100644 --- a/apps/web/src/routes/login/+page.server.ts +++ b/apps/web/src/routes/login/+page.server.ts @@ -1,13 +1,13 @@ -import { error, redirect } from "@sveltejs/kit"; import { prisma } from "@waifu-bot/database"; -import { env } from "$env/dynamic/private"; +import { error, redirect } from "@sveltejs/kit"; -import type { Actions } from "../$types"; +import { env } from "$env/dynamic/private"; +import { cookieTokenKey } from "$lib/constants"; import jwt from "jsonwebtoken"; -import { cookieTokenKey } from "$lib/constants"; +import type { Actions } from "../$types"; export const actions = { default: async ({ cookies, request }) => { diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 4c6c519..ad4c19a 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -1,4 +1,5 @@ import { sveltekit } from "@sveltejs/kit/vite"; + import { defineConfig } from "vitest/config"; const externalPackages = ["@waifu-bot/auth", "@waifu-bot/database"]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47602ee..60fdc64 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -146,6 +146,9 @@ importers: '@sveltejs/kit': specifier: 1.26.0 version: 1.26.0(svelte@4.2.1)(vite@4.5.0) + '@trivago/prettier-plugin-sort-imports': + specifier: 4.2.0 + version: 4.2.0(prettier@3.0.3) '@types/jsonwebtoken': specifier: 9.0.4 version: 9.0.4 @@ -300,7 +303,7 @@ packages: resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.23.0 jsesc: 2.5.2 source-map: 0.5.7 dev: true @@ -356,7 +359,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.23.0 dev: true /@babel/runtime@7.23.2: @@ -386,7 +389,7 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.0 - '@babel/types': 7.17.0 + '@babel/types': 7.23.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: From b6e472caf041cb0ddf423f417cb360cc0d2aa8d4 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:33:22 +0700 Subject: [PATCH 13/45] encodeuricomponent instead --- apps/web/src/routes/api/image/og/+server.ts | 4 +++- apps/web/src/routes/favicon.ico/+server.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/src/routes/api/image/og/+server.ts b/apps/web/src/routes/api/image/og/+server.ts index 451a31d..76bf5e5 100644 --- a/apps/web/src/routes/api/image/og/+server.ts +++ b/apps/web/src/routes/api/image/og/+server.ts @@ -5,7 +5,9 @@ import { getCurrentWaifu } from "$lib/server"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); - const imageUrl = `/api/image?url=${encodeURI(waifu.bannerUrl)}&w=1200&q=100`; + const imageUrl = `/api/image?url=${encodeURIComponent( + waifu.bannerUrl, + )}&w=1200&q=100`; const res = await fetch(imageUrl); if (!res.body) { diff --git a/apps/web/src/routes/favicon.ico/+server.ts b/apps/web/src/routes/favicon.ico/+server.ts index baab553..9bd5d91 100644 --- a/apps/web/src/routes/favicon.ico/+server.ts +++ b/apps/web/src/routes/favicon.ico/+server.ts @@ -5,7 +5,9 @@ import { getCurrentWaifu } from "$lib/server"; export const GET = (async ({ setHeaders, fetch }) => { const waifu = await getCurrentWaifu(); - const imageUrl = `/api/image?url=${encodeURI(waifu.imageUrl)}&w=64&q=100`; + const imageUrl = `/api/image?url=${encodeURIComponent( + waifu.imageUrl, + )}&w=64&q=100`; const res = await fetch(imageUrl); if (!res.body) { From 5e3c1f6f2e1920161ab13f8198a5c1f2dfad8ba2 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 20:32:21 +0700 Subject: [PATCH 14/45] home page done --- .../{routes => lib/components}/Phone.svelte | 61 +++++++++++------- .../(user)/{home => }/+layout.server.ts | 16 ++++- apps/web/src/routes/(user)/home/+page.svelte | 56 +++++++++++++++- apps/web/src/routes/+page.svelte | 28 +++++++- apps/web/src/routes/api/image/+server.ts | 2 +- apps/web/static/pink-400.webp | Bin 0 -> 712 bytes .../migration.sql | 4 ++ packages/database/prisma/schema.prisma | 7 +- packages/database/prisma/seed.ts | 5 ++ 9 files changed, 145 insertions(+), 34 deletions(-) rename apps/web/src/{routes => lib/components}/Phone.svelte (56%) rename apps/web/src/routes/(user)/{home => }/+layout.server.ts (53%) create mode 100644 apps/web/static/pink-400.webp rename packages/database/prisma/migrations/{20231022090325_init_again_6 => 20231022125004_init_again_7}/migration.sql (93%) diff --git a/apps/web/src/routes/Phone.svelte b/apps/web/src/lib/components/Phone.svelte similarity index 56% rename from apps/web/src/routes/Phone.svelte rename to apps/web/src/lib/components/Phone.svelte index 401f662..df7b4ba 100644 --- a/apps/web/src/routes/Phone.svelte +++ b/apps/web/src/lib/components/Phone.svelte @@ -1,5 +1,4 @@
- + {#if bannerUrl} + + {:else} + Fallback Banner + {/if} @@ -44,33 +61,27 @@ >
-

{data.nameJa}

- {#if data.nameJa !== data.nameEn} -

{data.nameEn}

+

{namePrimary}

+ {#if nameSecondary && namePrimary !== nameSecondary} +

{nameSecondary}

{/if}
-

{data.footerText}

+ {#if statusText} +

{statusText}

+ {/if}
-
-

SOURCE

-

{data.sourceJa}

- {#if data.sourceJa !== data.sourceEn} -

{data.sourceEn}

- {/if} -
- -
-

SIMPING SINCE

-

{data.simpingSince.toLocaleDateString()}

-
- -
-

NOTE

-

{data.note || "-"}

-
+ {#each fields as field} +
+

{field.title}

+

{field.primaryField}

+ {#if field.secondaryField && field.primaryField !== field.secondaryField} +

{field.secondaryField}

+ {/if} +
+ {/each} diff --git a/apps/web/src/routes/(user)/home/+layout.server.ts b/apps/web/src/routes/(user)/+layout.server.ts similarity index 53% rename from apps/web/src/routes/(user)/home/+layout.server.ts rename to apps/web/src/routes/(user)/+layout.server.ts index 80209fe..8764b85 100644 --- a/apps/web/src/routes/(user)/home/+layout.server.ts +++ b/apps/web/src/routes/(user)/+layout.server.ts @@ -1,3 +1,5 @@ +import { prisma } from "@waifu-bot/database"; + import { redirect } from "@sveltejs/kit"; import type { AuthFailReason } from "$lib/login"; @@ -6,12 +8,22 @@ import type { LayoutServerLoad } from "./$types"; export const load = (async ({ locals }) => { if (!locals.user) { - console.log("(user)/home/+layout.server.ts#load : HOW"); + console.log("(user)/+layout.server.ts#load : HOW"); throw redirect(302, `/login?error=${"how" satisfies AuthFailReason}`); } + const user = await prisma.user.findUniqueOrThrow({ + where: { + id: locals.user.userId, + }, + include: { + simpingWaifu: true, + _count: true, + }, + }); + return { - user: locals.user, + user, }; }) satisfies LayoutServerLoad; diff --git a/apps/web/src/routes/(user)/home/+page.svelte b/apps/web/src/routes/(user)/home/+page.svelte index 37f25cb..6530887 100644 --- a/apps/web/src/routes/(user)/home/+page.svelte +++ b/apps/web/src/routes/(user)/home/+page.svelte @@ -1,7 +1,61 @@ -

Hello {data.user.username}

+
+
+

+ Welcome to the Internet +

+ + {#if data.user.role === "ADMIN"} + + + + {/if} + + +
+ + +
diff --git a/apps/web/src/routes/+page.svelte b/apps/web/src/routes/+page.svelte index 38bf74d..d7088d6 100644 --- a/apps/web/src/routes/+page.svelte +++ b/apps/web/src/routes/+page.svelte @@ -2,7 +2,8 @@ import type { PageData } from "./$types"; import GitHub from "svelte-bootstrap-icons/lib/Github.svelte"; - import Phone from "./Phone.svelte"; + + import Phone from "$lib/components/Phone.svelte"; export let data: PageData; @@ -38,7 +39,7 @@

Run Waifu Bot

$

docker pull ghcr.io/leomotors/waifu-bot:latest

@@ -46,6 +47,27 @@
- + diff --git a/apps/web/src/routes/api/image/+server.ts b/apps/web/src/routes/api/image/+server.ts index a2cec9e..ae9a581 100644 --- a/apps/web/src/routes/api/image/+server.ts +++ b/apps/web/src/routes/api/image/+server.ts @@ -4,7 +4,7 @@ import { createRequestHandler } from "@urami/core"; const handler = createRequestHandler({ avif: false, - remoteDomains: ["senddude.leomotors.me"], + remoteDomains: ["senddude.leomotors.me", "cdn.discordapp.com"], allowedDomains: ["waifu.leomotors.me"], ttl: 1000 * 60 * 60 * 24 * 7, storePath: ".svelte-kit/images", diff --git a/apps/web/static/pink-400.webp b/apps/web/static/pink-400.webp new file mode 100644 index 0000000000000000000000000000000000000000..e4bd97132f54fe5e05d1ff2d6fa9e20d9dba3732 GIT binary patch literal 712 zcmWIYbaOkv#J~{l>J$(bV4<)D$iCpqFqcv51#<$U-9(RtzN$-V?6K$n|Brj>*S-JLU30v&LHrsE17QFFz#@1@ literal 0 HcmV?d00001 diff --git a/packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql b/packages/database/prisma/migrations/20231022125004_init_again_7/migration.sql similarity index 93% rename from packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql rename to packages/database/prisma/migrations/20231022125004_init_again_7/migration.sql index 90abcab..0bd8318 100644 --- a/packages/database/prisma/migrations/20231022090325_init_again_6/migration.sql +++ b/packages/database/prisma/migrations/20231022125004_init_again_7/migration.sql @@ -10,6 +10,7 @@ CREATE TABLE "user" ( "name" TEXT NOT NULL, "avatar_url" TEXT NOT NULL, "role" "UserRole" NOT NULL DEFAULT 'USER', + "simping_waifu_id" TEXT, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL, @@ -80,6 +81,9 @@ CREATE UNIQUE INDEX "activity_id_key" ON "activity"("id"); -- CreateIndex CREATE UNIQUE INDEX "configuration_id_key" ON "configuration"("id"); +-- AddForeignKey +ALTER TABLE "user" ADD CONSTRAINT "user_simping_waifu_id_fkey" FOREIGN KEY ("simping_waifu_id") REFERENCES "waifu"("id") ON DELETE SET NULL ON UPDATE CASCADE; + -- AddForeignKey ALTER TABLE "ticket" ADD CONSTRAINT "ticket_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index 66807d3..97589a2 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -23,7 +23,9 @@ model User { role UserRole @default(USER) tickets Ticket[] - createdWaifus Waifu[] + createdWaifus Waifu[] @relation(name: "WaifuCreate") + simpingWaifu Waifu? @relation(fields: [simpingWaifuId], references: [id]) + simpingWaifuId String? @map("simping_waifu_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") @@ -56,8 +58,9 @@ model Waifu { sourceEn String @map("source_en") sourceJa String @map("source_ja") - createdBy User @relation(fields: [createdByUserId], references: [id]) + createdBy User @relation(fields: [createdByUserId], references: [id], name: "WaifuCreate") createdByUserId String @map("created_by_user_id") + simpedBy User[] simpIntervals SimpInterval[] diff --git a/packages/database/prisma/seed.ts b/packages/database/prisma/seed.ts index 6f8f6e4..ffb9a54 100644 --- a/packages/database/prisma/seed.ts +++ b/packages/database/prisma/seed.ts @@ -32,6 +32,11 @@ const waifu = await prisma.waifu.create({ id: "143649805250461696", }, }, + simpedBy: { + connect: { + id: "143649805250461696", + }, + }, }, }); From fb266e1de2254a4875d7e7ff1d4d567bb1840607 Mon Sep 17 00:00:00 2001 From: Nutthapat Pongtanyavichai <59821765+Leomotors@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:40:08 +0700 Subject: [PATCH 15/45] basic admin page and style more on phone --- apps/web/src/hooks.server.ts | 7 +++ apps/web/src/lib/components/Phone.svelte | 10 +++- .../src/routes/(user)/admin/+page.server.ts | 23 +++++++ apps/web/src/routes/(user)/admin/+page.svelte | 60 +++++++++++++++++++ .../routes/(user)/admin/activity/+page.svelte | 1 + .../routes/(user)/admin/waifu/+page.svelte | 1 + apps/web/src/routes/(user)/home/+page.svelte | 4 +- apps/web/src/routes/+page.svelte | 8 ++- 8 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 apps/web/src/routes/(user)/admin/+page.server.ts create mode 100644 apps/web/src/routes/(user)/admin/+page.svelte create mode 100644 apps/web/src/routes/(user)/admin/activity/+page.svelte create mode 100644 apps/web/src/routes/(user)/admin/waifu/+page.svelte diff --git a/apps/web/src/hooks.server.ts b/apps/web/src/hooks.server.ts index 4aef5d8..f50d5c0 100644 --- a/apps/web/src/hooks.server.ts +++ b/apps/web/src/hooks.server.ts @@ -49,6 +49,13 @@ export const handle = (async ({ event, resolve }) => { event.locals.user = parsed.data; + // Check Admin + if (event.url.pathname.startsWith("/admin")) { + if (parsed.data.role !== "ADMIN") { + throw error(403, "Forbidden"); + } + } + const response = await resolve(event); return response; } catch (error) { diff --git a/apps/web/src/lib/components/Phone.svelte b/apps/web/src/lib/components/Phone.svelte index df7b4ba..e2922c5 100644 --- a/apps/web/src/lib/components/Phone.svelte +++ b/apps/web/src/lib/components/Phone.svelte @@ -11,6 +11,7 @@ export let bannerUrl: string | undefined = undefined; export let profileUrl: string; + export let color: string | undefined = undefined; export let namePrimary: string; export let nameSecondary: string | undefined = undefined; @@ -25,7 +26,14 @@ export let fields: Field[]; -