diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0d5b9e3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +node_modules +.vscode +.env* +dist +.github +.data +.dev-data + +*.compose.yaml +docker/* +!docker/entrypoint.sh + +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/.gitignore b/.gitignore index 4d7a172..ad2564e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,11 @@ node_modules .env dist .data +.dev-data .yarn/* !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks -!.yarn/versions \ No newline at end of file +!.yarn/versions diff --git a/dev.compose.yaml b/dev.compose.yaml new file mode 100644 index 0000000..519077a --- /dev/null +++ b/dev.compose.yaml @@ -0,0 +1,25 @@ +version: "3.9" + +services: + postgres: + container_name: "snailycad-bot-postgres" + image: postgres + command: -p ${DB_PORT:-5554} + env_file: + - .env + ports: + - "${DB_PORT:-5554}:${DB_PORT:-5554}" + volumes: + - .dev-data:/var/lib/postgresql/data + + api: + container_name: "snaily-cad-bot" + image: snaily-cad-bot:dev + volumes: + - .:/srv + env_file: + - .env + environment: + - NODE_ENV=development + depends_on: + - postgres diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index cd00f4a..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "3.9" - -services: - postgres: - container_name: "snailycad-bot-postgres" - image: postgres - command: -p 5554 - env_file: - - .env - ports: - - "5554:5554" - networks: - - cad_bot_network - volumes: - - ./.data:/var/lib/postgresql/data - - api: - container_name: "snaily-cad-bot" - - user: node - image: node:18 - command: "yarn dev" - volumes: - - .:/srv/api - env_file: - - .env - working_dir: /srv/api - depends_on: - - postgres - networks: - - cad_bot_network - -networks: - cad_bot_network: - external: true diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..6e1167a --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,43 @@ +# Builder Image +FROM node:18 as builder + +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini + +COPY docker/entrypoint.sh . + +RUN chmod +x entrypoint.sh tini + +WORKDIR /srv + +COPY . . + +RUN yarn install --silent && yarn run build + +# Development Image +FROM node:18 as development + +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini + +COPY docker/entrypoint.sh . + +RUN chmod +x entrypoint.sh tini + +WORKDIR /srv + +ENTRYPOINT ["/tini", "--", "/entrypoint.sh"] + +# Production Image +FROM node:18 as production + +COPY --from=builder /tini /entrypoint.sh . + +WORKDIR /app + +COPY --from=builder /srv/package.json /srv/yarn.lock /srv/.yarn /srv/prisma . +COPY --from=builder /srv/dist ./dist + +RUN yarn install --production --silent + +ENTRYPOINT ["/tini", "--", "/entrypoint.sh"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100755 index 0000000..acafa89 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/env bash + +echo "" +echo "███████╗███╗ ██╗ █████╗ ██╗██╗ ██╗ ██╗ ██████╗ █████╗ ██████╗ ██████╗ ██████╗ ████████╗" +echo "██╔════╝████╗ ██║██╔══██╗██║██║ ╚██╗ ██╔╝██╔════╝██╔══██╗██╔══██╗ ██╔══██╗██╔═══██╗╚══██╔══╝" +echo "███████╗██╔██╗ ██║███████║██║██║ ╚████╔╝ ██║ ███████║██║ ██║ ██████╔╝██║ ██║ ██║" +echo "╚════██║██║╚██╗██║██╔══██║██║██║ ╚██╔╝ ██║ ██╔══██║██║ ██║ ██╔══██╗██║ ██║ ██║" +echo "███████║██║ ╚████║██║ ██║██║███████╗██║ ╚██████╗██║ ██║██████╔╝ ██████╔╝╚██████╔╝ ██║" +echo "╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝╚══════╝╚═╝ ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝" +echo "" +echo "[INFO] Application is running in $NODE_ENV mode" +echo "" + +if [ $NODE_ENV = "development" ]; then + echo "[INFO] Install node dependencies\n" + yarn install --silent + echo "[INFO] Run dev enviroment\n" + yarn run dev +elif [ $NODE_ENV = "production" ]; then + echo "[INFO] Start application\n" + yarn run start +fi diff --git a/nodemon.json b/nodemon.json deleted file mode 100644 index da890c1..0000000 --- a/nodemon.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "watch": ["**/*.ts"], - "exec": "ts-node --esm src/index.ts", - "ext": "js ts" -} diff --git a/package.json b/package.json index afef83b..9072cbf 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,28 @@ "type": "module", "license": "MIT", "scripts": { - "dev": "npx prisma db push && nodemon", - "build": "npx prisma generate && npx swc ./src -d dist", - "start": "npx prisma migrate deploy && node dist/index.js", + "dev": "prisma migrate dev && node --no-warnings --watch --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' src/index.ts", + "build": "prisma generate && swc src -d dist", + "start": "prisma migrate deploy && node ./dist/index.js", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\" --ignore-path .gitignore", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "test-tsc": "tsc --noEmit", - "postinstall": "npx prisma generate" + "postinstall": "prisma generate", + "docker-dev:build": "docker buildx build . -f docker/Dockerfile --target development -t snaily-cad-bot:dev", + "docker-prod:build": "docker buildx build . -f docker/Dockerfile --target production -t snaily-cad-bot:prod", + "docker:clean-build": "docker builder prune --force --all 2>&1 > /dev/null", + "docker-dev:start": "npm run docker-dev:build && docker compose -f dev.compose.yaml up -d && npm run docker:clean-build", + "docker-dev:stop": "docker compose -f dev.compose.yaml down", + "docker-prod:start": "npm run docker-prod:build && docker compose -f prod.compose.yaml up -d && npm run docker:clean-build", + "docker-prod:stop": "docker compose -f prod.compose.yaml down" }, "dependencies": { "@discordjs/builders": "^1.6.5", "@prisma/client": "^5.5.2", "@sentry/node": "^7.76.0", + "@swc/helpers": "^0.5.3", "discord.js": "^14.13.0", + "dotenv": "^16.3.1", "globby": "^13.2.2", "pretty-ms": "^8.0.0", "undici": "^5.27.0" @@ -25,16 +34,14 @@ "@casperiv/eslint-config": "^8.0.0", "@swc/cli": "^0.1.62", "@swc/core": "^1.3.95", - "@swc/helpers": "^0.5.3", "@types/glob": "^8.1.0", "@types/node": "^20.8.9", - "dotenv": "^16.3.1", "eslint": "^8.52.0", - "nodemon": "^3.0.1", "prettier": "^3.0.3", "prisma": "^5.5.2", "regenerator-runtime": "^0.14.0", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", + "tsx": "^4.7.0", "typescript": "^5.2.2" }, "packageManager": "yarn@4.0.1" diff --git a/prod.compose.yaml b/prod.compose.yaml new file mode 100644 index 0000000..5af179e --- /dev/null +++ b/prod.compose.yaml @@ -0,0 +1,23 @@ +version: "3.9" + +services: + postgres: + container_name: "snailycad-bot-postgres" + image: postgres + command: -p ${DB_PORT:-55545} + env_file: + - .env + ports: + - "${DB_PORT:-55545}:${DB_PORT:-55545}" + volumes: + - .data:/var/lib/postgresql/data + + api: + container_name: "snaily-cad-bot" + image: snaily-cad-bot:prod + env_file: + - .env + environment: + - NODE_ENV=production + depends_on: + - postgres diff --git a/prod.docker-compose.yml b/prod.docker-compose.yml deleted file mode 100644 index deed662..0000000 --- a/prod.docker-compose.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "3.9" - -services: - postgres: - container_name: "snailycad-bot-postgres" - image: postgres - command: -p 55545 - env_file: - - .env - ports: - - "55545:55545" - networks: - - cad_bot_network - volumes: - - ./.data:/var/lib/postgresql/data - - api: - container_name: "snaily-cad-bot" - - user: node - image: node:18 - command: "yarn start" - volumes: - - .:/srv/api - env_file: - - .env - working_dir: /srv/api - depends_on: - - postgres - networks: - - cad_bot_network - -networks: - cad_bot_network: - external: true diff --git a/tsconfig.json b/tsconfig.json index 2ffd482..836e115 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,14 @@ { - "exclude": [".dev-data", ".data"], + "include": [ + "src/**/*" + ], + "exclude": [ + ".dev-data", + ".data", + "node_modules" + ], "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */, "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, @@ -12,8 +18,9 @@ "importHelpers": true, "outDir": "dist", "sourceMap": true, - "lib": ["esnext"], - + "lib": [ + "esnext" + ], /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */, "strictNullChecks": true /* Enable strict null checks. */, @@ -22,7 +29,6 @@ "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */, "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, - /* Additional Checks */ "noUnusedLocals": true /* Report errors on unused locals. */, "noUnusedParameters": true /* Report errors on unused parameters. */, @@ -30,11 +36,9 @@ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, "noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */, "noPropertyAccessFromIndexSignature": true /* Require undeclared properties from index signatures to use element accesses. */, - /* Module Resolution Options */ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - /* Advanced Options */ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ diff --git a/yarn.lock b/yarn.lock index 3f5cdf9..2a8dc61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -145,6 +145,167 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/aix-ppc64@npm:0.19.10" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-arm64@npm:0.19.10" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-arm@npm:0.19.10" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/android-x64@npm:0.19.10" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/darwin-arm64@npm:0.19.10" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/darwin-x64@npm:0.19.10" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/freebsd-arm64@npm:0.19.10" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/freebsd-x64@npm:0.19.10" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-arm64@npm:0.19.10" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-arm@npm:0.19.10" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-ia32@npm:0.19.10" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-loong64@npm:0.19.10" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-mips64el@npm:0.19.10" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-ppc64@npm:0.19.10" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-riscv64@npm:0.19.10" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-s390x@npm:0.19.10" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/linux-x64@npm:0.19.10" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/netbsd-x64@npm:0.19.10" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/openbsd-x64@npm:0.19.10" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/sunos-x64@npm:0.19.10" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-arm64@npm:0.19.10" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-ia32@npm:0.19.10" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.19.10": + version: 0.19.10 + resolution: "@esbuild/win32-x64@npm:0.19.10" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -644,9 +805,9 @@ __metadata: linkType: hard "@tsconfig/node16@npm:^1.0.2": - version: 1.0.3 - resolution: "@tsconfig/node16@npm:1.0.3" - checksum: 3a8b657dd047495b7ad23437d6afd20297ce90380ff0bdee93fc7d39a900dbd8d9e26e53ff6b465e7967ce2adf0b218782590ce9013285121e6a5928fbd6819f + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff languageName: node linkType: hard @@ -886,7 +1047,7 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:1, abbrev@npm:^1.0.0": +"abbrev@npm:^1.0.0": version: 1.1.1 resolution: "abbrev@npm:1.1.1" checksum: 2d882941183c66aa665118bafdab82b7a177e9add5eb2776c33e960a4f3c89cff88a1b38aba13a456de01d0dd9d66a8bea7c903268b21ea91dd1097e1e2e8243 @@ -903,18 +1064,18 @@ __metadata: linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de + version: 8.3.1 + resolution: "acorn-walk@npm:8.3.1" + checksum: 64187f1377afcba01ec6a57950e3f6a31fff50e429cdb9c9ab2c24343375e711f0d552e5fce5b6ecf21f754566e7526b6d79e4da80bd83c7ad15644d285b2ad5 languageName: node linkType: hard "acorn@npm:^8.4.1": - version: 8.8.2 - resolution: "acorn@npm:8.8.2" + version: 8.11.3 + resolution: "acorn@npm:8.11.3" bin: acorn: bin/acorn - checksum: b4e77d56d24d3e11a45d9ac8ae661b4e14a4af04ae33edbf1e6bf910887e5bb352cc60e9ea06a0944880e6b658f58c095d3b54e88e1921cb9319608b51085dd7 + checksum: b688e7e3c64d9bfb17b596e1b35e4da9d50553713b3b3630cf5690f2b023a84eac90c56851e6912b483fe60e8b4ea28b254c07e92f17ef83d72d78745a8352dd languageName: node linkType: hard @@ -994,16 +1155,6 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:~3.1.2": - version: 3.1.3 - resolution: "anymatch@npm:3.1.3" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 - languageName: node - linkType: hard - "aproba@npm:^1.0.3 || ^2.0.0": version: 2.0.0 resolution: "aproba@npm:2.0.0" @@ -1094,13 +1245,6 @@ __metadata: languageName: node linkType: hard -"binary-extensions@npm:^2.0.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 - languageName: node - linkType: hard - "bplist-parser@npm:^0.2.0": version: 0.2.0 resolution: "bplist-parser@npm:0.2.0" @@ -1129,7 +1273,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": +"braces@npm:^3.0.2": version: 3.0.2 resolution: "braces@npm:3.0.2" dependencies: @@ -1239,25 +1383,6 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.5.2": - version: 3.5.3 - resolution: "chokidar@npm:3.5.3" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 - languageName: node - linkType: hard - "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -1409,15 +1534,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: d86fd7be2b85462297ea16f1934dc219335e802f629ca9a69b63ed8ed041dda492389bb2ee039217c02e5b54792b1c51aa96ae954cf28634d363a2360c7a1639 - languageName: node - linkType: hard - "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -1593,6 +1709,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.19.10": + version: 0.19.10 + resolution: "esbuild@npm:0.19.10" + dependencies: + "@esbuild/aix-ppc64": "npm:0.19.10" + "@esbuild/android-arm": "npm:0.19.10" + "@esbuild/android-arm64": "npm:0.19.10" + "@esbuild/android-x64": "npm:0.19.10" + "@esbuild/darwin-arm64": "npm:0.19.10" + "@esbuild/darwin-x64": "npm:0.19.10" + "@esbuild/freebsd-arm64": "npm:0.19.10" + "@esbuild/freebsd-x64": "npm:0.19.10" + "@esbuild/linux-arm": "npm:0.19.10" + "@esbuild/linux-arm64": "npm:0.19.10" + "@esbuild/linux-ia32": "npm:0.19.10" + "@esbuild/linux-loong64": "npm:0.19.10" + "@esbuild/linux-mips64el": "npm:0.19.10" + "@esbuild/linux-ppc64": "npm:0.19.10" + "@esbuild/linux-riscv64": "npm:0.19.10" + "@esbuild/linux-s390x": "npm:0.19.10" + "@esbuild/linux-x64": "npm:0.19.10" + "@esbuild/netbsd-x64": "npm:0.19.10" + "@esbuild/openbsd-x64": "npm:0.19.10" + "@esbuild/sunos-x64": "npm:0.19.10" + "@esbuild/win32-arm64": "npm:0.19.10" + "@esbuild/win32-ia32": "npm:0.19.10" + "@esbuild/win32-x64": "npm:0.19.10" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 875a30e6dc9142273a24648eadfc33dcf9a74fe2823d013419d058db1597320692e92676dcc17ba3548348b0672eafaa04a3ca8ab3f9bfcbcbafeefefe3869f7 + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -2059,19 +2255,19 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": - version: 2.3.2 - resolution: "fsevents@npm:2.3.2" +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" dependencies: node-gyp: "npm:latest" - checksum: 6b5b6f5692372446ff81cf9501c76e3e0459a4852b3b5f1fc72c103198c125a6b8c72f5f166bdd76ffb2fca261e7f6ee5565daf80dca6e571e55bcc589cc1256 + checksum: 4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 conditions: os=darwin languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": - version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" +"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: node-gyp: "npm:latest" conditions: os=darwin @@ -2124,7 +2320,16 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: f21135848fb5d16012269b7b34b186af7a41824830f8616aba17a15eb4d9e54fdc876833f1e21768395215a826c8145582f5acd594ae2b4de3284d10b38d20f8 + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -2352,13 +2557,6 @@ __metadata: languageName: node linkType: hard -"ignore-by-default@npm:^1.0.1": - version: 1.0.1 - resolution: "ignore-by-default@npm:1.0.1" - checksum: 441509147b3615e0365e407a3c18e189f78c07af08564176c680be1fabc94b6c789cad1342ad887175d4ecd5225de86f73d376cec8e06b42fd9b429505ffcf8a - languageName: node - linkType: hard - "ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.2.4 resolution: "ignore@npm:5.2.4" @@ -2428,15 +2626,6 @@ __metadata: languageName: node linkType: hard -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e - languageName: node - linkType: hard - "is-builtin-module@npm:^3.2.1": version: 3.2.1 resolution: "is-builtin-module@npm:3.2.1" @@ -2487,7 +2676,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -2956,7 +3145,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:^2.0.0, ms@npm:^2.1.1": +"ms@npm:^2.0.0": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -2997,26 +3186,6 @@ __metadata: languageName: node linkType: hard -"nodemon@npm:^3.0.1": - version: 3.0.1 - resolution: "nodemon@npm:3.0.1" - dependencies: - chokidar: "npm:^3.5.2" - debug: "npm:^3.2.7" - ignore-by-default: "npm:^1.0.1" - minimatch: "npm:^3.1.2" - pstree.remy: "npm:^1.1.8" - semver: "npm:^7.5.3" - simple-update-notifier: "npm:^2.0.0" - supports-color: "npm:^5.5.0" - touch: "npm:^3.1.0" - undefsafe: "npm:^2.0.5" - bin: - nodemon: bin/nodemon.js - checksum: a0e614f8b22317009afde2e87a16517f7791ec37d2b732cf7444d8e05d8f8003ffa519c82e617bad5b9248b9d1b0b3fbb4c28d6dad57332451230cb53364c50e - languageName: node - linkType: hard - "nopt@npm:^6.0.0": version: 6.0.0 resolution: "nopt@npm:6.0.0" @@ -3028,17 +3197,6 @@ __metadata: languageName: node linkType: hard -"nopt@npm:~1.0.10": - version: 1.0.10 - resolution: "nopt@npm:1.0.10" - dependencies: - abbrev: "npm:1" - bin: - nopt: ./bin/nopt.js - checksum: 4f01ad1e144883a190d70bd6003f26e2f3a899230fe1b0f3310e43779c61cab5ae0063a9209912cd52fc4c552b266b38173853aa9abe27ecb04acbdfdca2e9fc - languageName: node - linkType: hard - "normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" @@ -3051,13 +3209,6 @@ __metadata: languageName: node linkType: hard -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": - version: 3.0.0 - resolution: "normalize-path@npm:3.0.0" - checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 - languageName: node - linkType: hard - "normalize-url@npm:^6.0.1": version: 6.1.0 resolution: "normalize-url@npm:6.1.0" @@ -3323,7 +3474,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": +"picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc @@ -3413,13 +3564,6 @@ __metadata: languageName: node linkType: hard -"pstree.remy@npm:^1.1.8": - version: 1.1.8 - resolution: "pstree.remy@npm:1.1.8" - checksum: ef13b1b5896b35f67dbd4fb7ba54bb2a5da1a5c317276cbad4bcad4159bf8f7b5e1748dc244bf36865f3d560d2fc952521581280a91468c9c2df166cc760c8c1 - languageName: node - linkType: hard - "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -3494,15 +3638,6 @@ __metadata: languageName: node linkType: hard -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" - dependencies: - picomatch: "npm:^2.2.1" - checksum: 196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 - languageName: node - linkType: hard - "regenerator-runtime@npm:^0.14.0": version: 0.14.0 resolution: "regenerator-runtime@npm:0.14.0" @@ -3544,6 +3679,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e + languageName: node + linkType: hard + "resolve@npm:^1.10.0": version: 1.22.3 resolution: "resolve@npm:1.22.3" @@ -3681,7 +3823,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -3738,15 +3880,6 @@ __metadata: languageName: node linkType: hard -"simple-update-notifier@npm:^2.0.0": - version: 2.0.0 - resolution: "simple-update-notifier@npm:2.0.0" - dependencies: - semver: "npm:^7.5.3" - checksum: 40bd4f96aa89aedbf717ae9f4ab8fca70e8f7511e8b766feb15471cca3f6fe4fe673743309b08b4ba8abfe0965c9cd927e1de46550a757b819b70fc7430cc85d - languageName: node - linkType: hard - "slash@npm:3.0.0, slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -3785,12 +3918,12 @@ __metadata: dotenv: "npm:^16.3.1" eslint: "npm:^8.52.0" globby: "npm:^13.2.2" - nodemon: "npm:^3.0.1" prettier: "npm:^3.0.3" pretty-ms: "npm:^8.0.0" prisma: "npm:^5.5.2" regenerator-runtime: "npm:^0.14.0" - ts-node: "npm:^10.9.1" + ts-node: "npm:^10.9.2" + tsx: "npm:^4.7.0" typescript: "npm:^5.2.2" undici: "npm:^5.27.0" languageName: unknown @@ -3975,7 +4108,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": +"supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" dependencies: @@ -4057,17 +4190,6 @@ __metadata: languageName: node linkType: hard -"touch@npm:^3.1.0": - version: 3.1.0 - resolution: "touch@npm:3.1.0" - dependencies: - nopt: "npm:~1.0.10" - bin: - nodetouch: ./bin/nodetouch.js - checksum: ece1d9693fbc9b73d8a6d902537b787b5685ac1aeab7562857c50e6671415a73c985055393442b518f4ac37b85c3e7a3e6c36af71142fed13b8bb04fb6664936 - languageName: node - linkType: hard - "trim-repeated@npm:^2.0.0": version: 2.0.0 resolution: "trim-repeated@npm:2.0.0" @@ -4093,9 +4215,9 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^10.9.1": - version: 10.9.1 - resolution: "ts-node@npm:10.9.1" +"ts-node@npm:^10.9.2": + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" dependencies: "@cspotcode/source-map-support": "npm:^0.8.0" "@tsconfig/node10": "npm:^1.0.7" @@ -4127,7 +4249,7 @@ __metadata: ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js - checksum: bee56d4dc96ccbafc99dfab7b73fbabc62abab2562af53cdea91c874a301b9d11e42bc33c0a032a6ed6d813dbdc9295ec73dde7b73ea4ebde02b0e22006f7e04 + checksum: a91a15b3c9f76ac462f006fa88b6bfa528130dcfb849dd7ef7f9d640832ab681e235b8a2bc58ecde42f72851cc1d5d4e22c901b0c11aa51001ea1d395074b794 languageName: node linkType: hard @@ -4145,6 +4267,22 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^4.7.0": + version: 4.7.0 + resolution: "tsx@npm:4.7.0" + dependencies: + esbuild: "npm:~0.19.10" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: 3e6ee0a0a8adb7b1cb58875f50b143b41df0132ade3a7cdda16a166ac473eee446197762ba6afb235ace4c6adae7e55f61a420ee55b17438717eea1e55e611c0 + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -4195,13 +4333,6 @@ __metadata: languageName: node linkType: hard -"undefsafe@npm:^2.0.5": - version: 2.0.5 - resolution: "undefsafe@npm:2.0.5" - checksum: f42ab3b5770fedd4ada175fc1b2eb775b78f609156f7c389106aafd231bfc210813ee49f54483d7191d7b76e483bc7f537b5d92d19ded27156baf57592eb02cc - languageName: node - linkType: hard - "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5"