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% + + +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)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% - - -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 @@ + + +Current waifu is {data.nameEn}
+Multipurpose Waifu Discord Bot
+ + + + + +Run Waifu Bot
+
+ $
+ docker pull ghcr.io/leomotors/waifu-bot:latest
+
+