diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..c421aff8 Binary files /dev/null and b/.DS_Store differ diff --git a/charybdis/cloud-prisma/prisma.ts b/charybdis/cloud-prisma/prisma.ts index 010df39a..55b1d688 100644 --- a/charybdis/cloud-prisma/prisma.ts +++ b/charybdis/cloud-prisma/prisma.ts @@ -1,3 +1,5 @@ import { PrismaClient } from "./cloud-prisma-client"; -export const prisma = new PrismaClient(); \ No newline at end of file +export const prisma = new PrismaClient(); + +export { PrismaClient }; diff --git a/charybdis/compose.yml b/charybdis/compose.yml new file mode 100644 index 00000000..8427df9f --- /dev/null +++ b/charybdis/compose.yml @@ -0,0 +1,20 @@ +services: + server: + build: + context: . # Use root as build context to include package.json + dockerfile: server/Dockerfile + container_name: server + restart: unless-stopped + environment: + NODE_ENV: "${NODE_ENV:-development}" + LOCAL_DATABASE_URL: "${LOCAL_DATABASE_URL:-postgresql://postgres:password@localhost:5432/postgres?schema=public}" + CLOUD_DATABASE_URL: "${CLOUD_DATABASE_URL:-postgresql://postgres:docker@localhost:8001/postgres?schema=public}" + PRISMA_CLI_BINARY_TARGETS: "linux-arm64-openssl-3.0.x" + ports: + - "3000:3000" + volumes: + - .:/app # ✅ Mount root directory so dependencies remain available + - ./server:/app/server # ✅ Ensure server files are mounted correctly + - ./local-prisma:/app/local-prisma + - ./cloud-prisma:/app/cloud-prisma + - /app/node_modules # ✅ Prevents overwriting installed dependencies diff --git a/charybdis/local-prisma/prisma.ts b/charybdis/local-prisma/prisma.ts index 966521f8..be32af6e 100644 --- a/charybdis/local-prisma/prisma.ts +++ b/charybdis/local-prisma/prisma.ts @@ -1,3 +1,5 @@ import { PrismaClient } from "./local-prisma-client"; -export const prisma = new PrismaClient(); \ No newline at end of file +export const prisma = new PrismaClient(); + +export { PrismaClient }; diff --git a/charybdis/package-lock.json b/charybdis/package-lock.json index bc162d0a..c025bd31 100644 --- a/charybdis/package-lock.json +++ b/charybdis/package-lock.json @@ -9,15 +9,41 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@prisma/client": "^6.2.1" + "@inquirer/prompts": "^7.3.1", + "@prisma/client": "^6.2.1", + "@types/figlet": "^1.7.0", + "@types/json2csv": "^5.0.7", + "@types/pg": "^8.11.11", + "chalk": "^5.4.1", + "csv-parse": "^5.6.0", + "figlet": "^1.8.0", + "json2csv": "^6.0.0-alpha.2", + "pg": "^8.13.1", + "uuid": "^11.0.5" }, "devDependencies": { - "@types/node": "^22.10.6", + "@types/csv-parse": "^1.1.12", + "@types/express": "^5.0.0", + "@types/node": "^22.10.10", "prisma": "^6.2.1", + "ts-node": "^10.9.2", "tsx": "^4.19.2", "typescript": "^5.7.3" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", @@ -426,6 +452,338 @@ "node": ">=18" } }, + "node_modules/@inquirer/checkbox": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.1.tgz", + "integrity": "sha512-os5kFd/52gZTl/W6xqMfhaKVJHQM8V/U1P8jcSaQJ/C4Qhdrf2jEXdA/HaxfQs9iiUA/0yzYhk5d3oRHTxGDDQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.5.tgz", + "integrity": "sha512-ZB2Cz8KeMINUvoeDi7IrvghaVkYT2RB0Zb31EaLWOE87u276w4wnApv0SH2qWaJ3r0VSUa3BIuz7qAV2ZvsZlg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.6.tgz", + "integrity": "sha512-Bwh/Zk6URrHwZnSSzAZAKH7YgGYi0xICIBDFOqBQoXNNAzBHw/bgXgLmChfp+GyR3PnChcTbiCTZGC6YJNJkMA==", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.6.tgz", + "integrity": "sha512-l0smvr8g/KAVdXx4I92sFxZiaTG4kFc06cFZw+qqwTirwdUHMFLnouXBB9OafWhpO3cfEkEz2CdPoCmor3059A==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.8.tgz", + "integrity": "sha512-k0ouAC6L+0Yoj/j0ys2bat0fYcyFVtItDB7h+pDFKaDDSFJey/C/YY1rmIOqkmFVZ5rZySeAQuS8zLcKkKRLmg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.10.tgz", + "integrity": "sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.5.tgz", + "integrity": "sha512-bB6wR5wBCz5zbIVBPnhp94BHv/G4eKbUEjlpCw676pI2chcvzTx1MuwZSCZ/fgNOdqDlAxkhQ4wagL8BI1D3Zg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.8.tgz", + "integrity": "sha512-CTKs+dT1gw8dILVWATn8Ugik1OHLkkfY82J+Musb57KpmF6EKyskv8zmMiEJPzOnLTZLo05X/QdMd8VH9oulXw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.8.tgz", + "integrity": "sha512-MgA+Z7o3K1df2lGY649fyOBowHGfrKRz64dx3+b6c1w+h2W7AwBoOkHhhF/vfhbs5S4vsKNCuDzS3s9r5DpK1g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.3.1.tgz", + "integrity": "sha512-r1CiKuDV86BDpvj9DRFR+V+nIjsVBOsa2++dqdPqLYAef8kgHYvmQ8ySdP/ZeAIOWa27YGJZRkENdP3dK0H3gg==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.1.1", + "@inquirer/confirm": "^5.1.5", + "@inquirer/editor": "^4.2.6", + "@inquirer/expand": "^4.0.8", + "@inquirer/input": "^4.1.5", + "@inquirer/number": "^3.0.8", + "@inquirer/password": "^4.0.8", + "@inquirer/rawlist": "^4.0.8", + "@inquirer/search": "^3.0.8", + "@inquirer/select": "^4.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.8.tgz", + "integrity": "sha512-hl7rvYW7Xl4un8uohQRUgO6uc2hpn7PKqfcGkCOWC0AA4waBxAv6MpGOFCEDrUaBCP+pXPVqp4LmnpWmn1E1+g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.8.tgz", + "integrity": "sha512-ihSE9D3xQAupNg/aGDZaukqoUSXG2KfstWosVmFCG7jbMQPaj2ivxWtsB+CnYY/T4D6LX1GHKixwJLunNCffww==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.0.8.tgz", + "integrity": "sha512-Io2prxFyN2jOCcu4qJbVoilo19caiD3kqkD3WR0q3yDA5HUCo83v4LrRtg55ZwniYACW64z36eV7gyVbOfORjA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz", + "integrity": "sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@prisma/client": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.2.1.tgz", @@ -494,75 +852,423 @@ "@prisma/debug": "6.2.1" } }, - "node_modules/@types/node": { - "version": "22.10.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.6.tgz", - "integrity": "sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==", + "node_modules/@streamparser/json": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@streamparser/json/-/json-0.0.6.tgz", + "integrity": "sha512-vL9EVn/v+OhZ+Wcs6O4iKE9EUpwHUqHmCtNUMWjqp+6dr85+XPOSGTEsqYNq1Vn04uk9SWlOVmx9J48ggJVT2Q==", + "license": "MIT" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "@types/connect": "*", + "@types/node": "*" } }, - "node_modules/esbuild": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", - "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.1", - "@esbuild/android-arm": "0.23.1", - "@esbuild/android-arm64": "0.23.1", - "@esbuild/android-x64": "0.23.1", - "@esbuild/darwin-arm64": "0.23.1", - "@esbuild/darwin-x64": "0.23.1", - "@esbuild/freebsd-arm64": "0.23.1", - "@esbuild/freebsd-x64": "0.23.1", - "@esbuild/linux-arm": "0.23.1", - "@esbuild/linux-arm64": "0.23.1", - "@esbuild/linux-ia32": "0.23.1", - "@esbuild/linux-loong64": "0.23.1", - "@esbuild/linux-mips64el": "0.23.1", - "@esbuild/linux-ppc64": "0.23.1", - "@esbuild/linux-riscv64": "0.23.1", - "@esbuild/linux-s390x": "0.23.1", - "@esbuild/linux-x64": "0.23.1", - "@esbuild/netbsd-x64": "0.23.1", - "@esbuild/openbsd-arm64": "0.23.1", - "@esbuild/openbsd-x64": "0.23.1", - "@esbuild/sunos-x64": "0.23.1", - "@esbuild/win32-arm64": "0.23.1", - "@esbuild/win32-ia32": "0.23.1", - "@esbuild/win32-x64": "0.23.1" + "dependencies": { + "@types/node": "*" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "node_modules/@types/csv-parse": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@types/csv-parse/-/csv-parse-1.1.12.tgz", + "integrity": "sha512-p6uZznjJOcFaymduLYf45ik28IYzChnkt+ofJOWa16bb2JRCHdxs/ai03q6raizCc5JuunVsbgtlDxfu9y2Nag==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.0.tgz", + "integrity": "sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.5.tgz", + "integrity": "sha512-GLZPrd9ckqEBFMcVM/qRFAP0Hg3qiVEojgEFsx/N/zKXsBzbGF6z5FBDpZ0+Xhp1xr+qRZYjfGr1cWHB9oFHSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/figlet": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@types/figlet/-/figlet-1.7.0.tgz", + "integrity": "sha512-KwrT7p/8Eo3Op/HBSIwGXOsTZKYiM9NpWRBJ5sVjWP/SmlS+oxxRvJht/FNAtliJvja44N3ul1yATgohnVBV0Q==", + "license": "MIT" + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json2csv": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@types/json2csv/-/json2csv-5.0.7.tgz", + "integrity": "sha512-Ma25zw9G9GEBnX8b12R4EYvnFT6dBh8L3jwsN5EUFXa+fl2dqmbLDbNWN0XuQU3rSXdsbBeCYjI9uHU2PUBxhA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz", + "integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/pg": { + "version": "8.11.11", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.11.tgz", + "integrity": "sha512-kGT1qKM8wJQ5qlawUrEkXgvMSXoV213KfMGXcwfDwUIfUHXqXYXOfS1nE1LINRJVVVx5wCm70XnFlMHaIcQAfw==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^4.0.1" + } + }, + "node_modules/@types/qs": { + "version": "6.9.18", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", + "integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "license": "MIT" + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/csv-parse": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.6.0.tgz", + "integrity": "sha512-l3nz3euub2QMg5ouu5U09Ew9Wf6/wQ8I++ch1loQ0ljmzhmfZYrH9fflS22i/PQEvsPvxCwxgz5q7UB8K1JO4Q==", + "license": "MIT" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/figlet": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.0.tgz", + "integrity": "sha512-chzvGjd+Sp7KUvPHZv6EXV5Ir3Q7kYNpCr4aHrRW79qFtTefmQZNny+W1pW9kf5zeE6dikku2W50W/wAH2xWgw==", + "license": "MIT", + "bin": { + "figlet": "bin/index.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", "dev": true, "license": "MIT", "dependencies": { @@ -572,6 +1278,283 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/json2csv": { + "version": "6.0.0-alpha.2", + "resolved": "https://registry.npmjs.org/json2csv/-/json2csv-6.0.0-alpha.2.tgz", + "integrity": "sha512-nJ3oP6QxN8z69IT1HmrJdfVxhU1kLTBVgMfRnNZc37YEY+jZ4nU27rBGxT4vaqM/KUCavLRhntmTuBFqZLBUcA==", + "license": "MIT", + "dependencies": { + "@streamparser/json": "^0.0.6", + "commander": "^6.2.0", + "lodash.get": "^4.4.2" + }, + "bin": { + "json2csv": "bin/json2csv.js" + }, + "engines": { + "node": ">= 12", + "npm": ">= 6.13.0" + } + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", + "license": "MIT" + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "license": "MIT" + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pg": { + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz", + "integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.7.0", + "pg-pool": "^3.7.0", + "pg-protocol": "^1.7.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.7.0.tgz", + "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-numeric": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz", + "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/pg-pool": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz", + "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.7.0.tgz", + "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", + "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "pg-numeric": "1.0.2", + "postgres-array": "~3.0.1", + "postgres-bytea": "~3.0.0", + "postgres-date": "~2.1.0", + "postgres-interval": "^3.0.0", + "postgres-range": "^1.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pg/node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pg/node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pg/node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pg/node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pg/node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/postgres-array": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz", + "integrity": "sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/postgres-bytea": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", + "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", + "license": "MIT", + "dependencies": { + "obuf": "~1.1.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postgres-date": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", + "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/postgres-interval": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", + "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/postgres-range": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz", + "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==", + "license": "MIT" + }, "node_modules/prisma": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.2.1.tgz", @@ -602,6 +1585,115 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/tsx": { "version": "4.19.2", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", @@ -622,6 +1714,18 @@ "fsevents": "~2.3.3" } }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", @@ -640,8 +1744,72 @@ "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz", + "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true, "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/charybdis/package.json b/charybdis/package.json index 1d231aa9..66cbb9ee 100644 --- a/charybdis/package.json +++ b/charybdis/package.json @@ -22,12 +22,26 @@ "author": "Northeastern Electric Racing", "license": "MIT", "devDependencies": { - "@types/node": "^22.10.6", + "@types/csv-parse": "^1.1.12", + "@types/express": "^5.0.0", + "@types/node": "^22.10.10", "prisma": "^6.2.1", + "ts-node": "^10.9.2", "tsx": "^4.19.2", "typescript": "^5.7.3" }, "dependencies": { - "@prisma/client": "^6.2.1" - } + "@inquirer/prompts": "^7.3.1", + "@prisma/client": "^6.2.1", + "@types/figlet": "^1.7.0", + "@types/json2csv": "^5.0.7", + "@types/pg": "^8.11.11", + "chalk": "^5.4.1", + "csv-parse": "^5.6.0", + "figlet": "^1.8.0", + "json2csv": "^6.0.0-alpha.2", + "pg": "^8.13.1", + "uuid": "^11.0.5" + }, + "type": "module" } diff --git a/charybdis/server/Dockerfile b/charybdis/server/Dockerfile new file mode 100644 index 00000000..d47a07cd --- /dev/null +++ b/charybdis/server/Dockerfile @@ -0,0 +1,33 @@ +# Use Node.js official image +FROM node:23 + +# Set working directory inside the container +WORKDIR /app + +# Copy package.json and package-lock.json from root +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm install + +# Copy the full server directory +COPY server /app/server + +# Copy Prisma directories +COPY local-prisma /app/local-prisma +COPY cloud-prisma /app/cloud-prisma + +# Install Prisma globally +RUN npm install -g prisma + +# Ensure `@prisma/client` is installed +RUN npm install @prisma/client --save-dev + +# Expose the server port +EXPOSE 3000 + +# Set working directory to server before running scripts +WORKDIR /app/server + +# ✅ Ensure Prisma Client is generated **before starting the server** +CMD ["sh", "-c", "npx prisma generate --schema=/app/local-prisma/schema.prisma && npx prisma generate --schema=/app/cloud-prisma/schema.prisma && npm start"] diff --git a/charybdis/server/package-lock.json b/charybdis/server/package-lock.json new file mode 100644 index 00000000..b2153d50 --- /dev/null +++ b/charybdis/server/package-lock.json @@ -0,0 +1,826 @@ +{ + "name": "server", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "server", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@inquirer/prompts": "^7.3.1", + "@inquirer/type": "^3.0.4", + "@types/figlet": "^1.7.0", + "cfonts": "^3.3.0", + "chalk": "^5.4.1", + "enquirer": "^2.4.1", + "figlet": "^1.8.0", + "gradient-string": "^3.0.0" + }, + "devDependencies": { + "@types/gradient-string": "^1.1.6", + "@types/node": "^22.13.0" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.1.tgz", + "integrity": "sha512-os5kFd/52gZTl/W6xqMfhaKVJHQM8V/U1P8jcSaQJ/C4Qhdrf2jEXdA/HaxfQs9iiUA/0yzYhk5d3oRHTxGDDQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.5.tgz", + "integrity": "sha512-ZB2Cz8KeMINUvoeDi7IrvghaVkYT2RB0Zb31EaLWOE87u276w4wnApv0SH2qWaJ3r0VSUa3BIuz7qAV2ZvsZlg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.6.tgz", + "integrity": "sha512-Bwh/Zk6URrHwZnSSzAZAKH7YgGYi0xICIBDFOqBQoXNNAzBHw/bgXgLmChfp+GyR3PnChcTbiCTZGC6YJNJkMA==", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.6.tgz", + "integrity": "sha512-l0smvr8g/KAVdXx4I92sFxZiaTG4kFc06cFZw+qqwTirwdUHMFLnouXBB9OafWhpO3cfEkEz2CdPoCmor3059A==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.8.tgz", + "integrity": "sha512-k0ouAC6L+0Yoj/j0ys2bat0fYcyFVtItDB7h+pDFKaDDSFJey/C/YY1rmIOqkmFVZ5rZySeAQuS8zLcKkKRLmg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.10.tgz", + "integrity": "sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.5.tgz", + "integrity": "sha512-bB6wR5wBCz5zbIVBPnhp94BHv/G4eKbUEjlpCw676pI2chcvzTx1MuwZSCZ/fgNOdqDlAxkhQ4wagL8BI1D3Zg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.8.tgz", + "integrity": "sha512-CTKs+dT1gw8dILVWATn8Ugik1OHLkkfY82J+Musb57KpmF6EKyskv8zmMiEJPzOnLTZLo05X/QdMd8VH9oulXw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.8.tgz", + "integrity": "sha512-MgA+Z7o3K1df2lGY649fyOBowHGfrKRz64dx3+b6c1w+h2W7AwBoOkHhhF/vfhbs5S4vsKNCuDzS3s9r5DpK1g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.3.1.tgz", + "integrity": "sha512-r1CiKuDV86BDpvj9DRFR+V+nIjsVBOsa2++dqdPqLYAef8kgHYvmQ8ySdP/ZeAIOWa27YGJZRkENdP3dK0H3gg==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.1.1", + "@inquirer/confirm": "^5.1.5", + "@inquirer/editor": "^4.2.6", + "@inquirer/expand": "^4.0.8", + "@inquirer/input": "^4.1.5", + "@inquirer/number": "^3.0.8", + "@inquirer/password": "^4.0.8", + "@inquirer/rawlist": "^4.0.8", + "@inquirer/search": "^3.0.8", + "@inquirer/select": "^4.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.8.tgz", + "integrity": "sha512-hl7rvYW7Xl4un8uohQRUgO6uc2hpn7PKqfcGkCOWC0AA4waBxAv6MpGOFCEDrUaBCP+pXPVqp4LmnpWmn1E1+g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.8.tgz", + "integrity": "sha512-ihSE9D3xQAupNg/aGDZaukqoUSXG2KfstWosVmFCG7jbMQPaj2ivxWtsB+CnYY/T4D6LX1GHKixwJLunNCffww==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.0.8.tgz", + "integrity": "sha512-Io2prxFyN2jOCcu4qJbVoilo19caiD3kqkD3WR0q3yDA5HUCo83v4LrRtg55ZwniYACW64z36eV7gyVbOfORjA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.6", + "@inquirer/figures": "^1.0.10", + "@inquirer/type": "^3.0.4", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz", + "integrity": "sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@types/figlet": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@types/figlet/-/figlet-1.7.0.tgz", + "integrity": "sha512-KwrT7p/8Eo3Op/HBSIwGXOsTZKYiM9NpWRBJ5sVjWP/SmlS+oxxRvJht/FNAtliJvja44N3ul1yATgohnVBV0Q==", + "license": "MIT" + }, + "node_modules/@types/gradient-string": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@types/gradient-string/-/gradient-string-1.1.6.tgz", + "integrity": "sha512-LkaYxluY4G5wR1M4AKQUal2q61Di1yVVCw42ImFTuaIoQVgmV0WP1xUaLB8zwb47mp82vWTpePI9JmrjEnJ7nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/tinycolor2": "*" + } + }, + "node_modules/@types/node": { + "version": "22.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.0.tgz", + "integrity": "sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/tinycolor2": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.6.tgz", + "integrity": "sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==", + "license": "MIT" + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cfonts": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cfonts/-/cfonts-3.3.0.tgz", + "integrity": "sha512-RlVxeEw2FXWI5Bs9LD0/Ef3bsQIc9m6lK/DINN20HIW0Y0YHUO2jjy88cot9YKZITiRTCdWzTfLmTyx47HeSLA==", + "license": "GPL-3.0-or-later", + "dependencies": { + "supports-color": "^8", + "window-size": "^1" + }, + "bin": { + "cfonts": "bin/index.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "license": "MIT" + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "license": "MIT", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/figlet": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.0.tgz", + "integrity": "sha512-chzvGjd+Sp7KUvPHZv6EXV5Ir3Q7kYNpCr4aHrRW79qFtTefmQZNny+W1pW9kf5zeE6dikku2W50W/wAH2xWgw==", + "license": "MIT", + "bin": { + "figlet": "bin/index.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gradient-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gradient-string/-/gradient-string-3.0.0.tgz", + "integrity": "sha512-frdKI4Qi8Ihp4C6wZNB565de/THpIaw3DjP5ku87M+N9rNSGmPTjfkq61SdRXB7eCaL8O1hkKDvf6CDMtOzIAg==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "tinygradient": "^1.1.5" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "license": "MIT" + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "license": "MIT", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", + "license": "MIT" + }, + "node_modules/tinygradient": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/tinygradient/-/tinygradient-1.1.5.tgz", + "integrity": "sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==", + "license": "MIT", + "dependencies": { + "@types/tinycolor2": "^1.4.0", + "tinycolor2": "^1.0.0" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/window-size": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-1.1.1.tgz", + "integrity": "sha512-5D/9vujkmVQ7pSmc0SCBmHXbkv6eaHwXEx65MywhmUMsI8sGqJ972APq1lotfcwMKPFLuCFfL8xGHLIp7jaBmA==", + "license": "MIT", + "dependencies": { + "define-property": "^1.0.0", + "is-number": "^3.0.0" + }, + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/charybdis/server/package.json b/charybdis/server/package.json new file mode 100644 index 00000000..18a9499b --- /dev/null +++ b/charybdis/server/package.json @@ -0,0 +1,26 @@ +{ + "name": "server", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "start": "npx tsx src/index.ts" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "@inquirer/prompts": "^7.3.1", + "@inquirer/type": "^3.0.4", + "@types/figlet": "^1.7.0", + "cfonts": "^3.3.0", + "chalk": "^5.4.1", + "enquirer": "^2.4.1", + "figlet": "^1.8.0", + "gradient-string": "^3.0.0" + }, + "devDependencies": { + "@types/gradient-string": "^1.1.6", + "@types/node": "^22.13.0" + } +} diff --git a/charybdis/server/src/errors/audit.errors.ts b/charybdis/server/src/errors/audit.errors.ts new file mode 100644 index 00000000..88e862bc --- /dev/null +++ b/charybdis/server/src/errors/audit.errors.ts @@ -0,0 +1,5 @@ +export class FailedWriteAuditLog extends Error { + constructor(error: string) { + super(`Failed to write to audit log: ${error}`); + } +} diff --git a/charybdis/server/src/errors/dump.errors.ts b/charybdis/server/src/errors/dump.errors.ts new file mode 100644 index 00000000..27d39062 --- /dev/null +++ b/charybdis/server/src/errors/dump.errors.ts @@ -0,0 +1,23 @@ +export class CouldNotConnectToLocalDB extends Error { + constructor(message = "Could not connect to database") { + super(message); + } +} + +export class DataTypeDumpFailed extends Error { + constructor(error: string) { + super(`Failed to dump data types: ${error}`); + } +} + +export class RunDumpFailed extends Error { + constructor(error: string) { + super(`Failed to dump runs: ${error}`); + } +} + +export class DataDumpFailed extends Error { + constructor(error: string) { + super(`Failed to dump data: ${error}`); + } +} diff --git a/charybdis/server/src/errors/upload.errors.ts b/charybdis/server/src/errors/upload.errors.ts new file mode 100644 index 00000000..3d2f71a3 --- /dev/null +++ b/charybdis/server/src/errors/upload.errors.ts @@ -0,0 +1,23 @@ +export class CouldNotConnectToCloudDB extends Error { + constructor(message = "Could not connect to database") { + super(message); + } +} + +export class DataTypeUploadError extends Error { + constructor(error: string) { + super("Failed to upload data types: " + error); + } +} + +export class RunsUploadError extends Error { + constructor(error: string) { + super("Failed to upload runs: " + error); + } +} + +export class DataUploadError extends Error { + constructor(error: string) { + super("Failed to upload data: " + error); + } +} diff --git a/charybdis/server/src/index.ts b/charybdis/server/src/index.ts new file mode 100644 index 00000000..9e7dcef9 --- /dev/null +++ b/charybdis/server/src/index.ts @@ -0,0 +1,128 @@ +// import { upload } from "./controllers/upload.controller"; +import { uploadToCloud } from "./services/upload.service"; +import figlet from "figlet"; +import { select } from "@inquirer/prompts"; +import { deleteAllDownloads, dumpLocalDb } from "./services/dump.service"; +import { compareDatabases } from "./services/compare.service"; +import chalk from "chalk"; +import { + CouldNotConnectToLocalDB, + DataDumpFailed, + DataTypeDumpFailed, + RunDumpFailed, +} from "./errors/dump.errors"; +import { FailedWriteAuditLog } from "./errors/audit.errors"; +import { + CouldNotConnectToCloudDB, + DataTypeUploadError, + DataUploadError, + RunsUploadError, +} from "./errors/upload.errors"; + +const main = async () => { + await printTitle("Charybdis 2.0"); + await await commandDialog(); +}; + +const printTitle = async (projectName: string) => { + // Print the project title in ASCII art using figlet. + figlet(projectName, (err, projectName) => { + if (err) { + console.error("Something went wrong with figlet:", err); + return; + } + console.log(`\n${projectName}\n`); + }); + + // Wait a second so that the project title is fully printed + // before the user can enter anything else. + await new Promise((resolve) => setTimeout(resolve, 1000)); +}; + +const commandDialog = async () => { + // Using chalk to style the select prompt message. + const command = await select({ + message: chalk.bold.blue("What would you like to do with the data:"), + choices: ["dump", "upload", "compare", "delete-all-downloads"], + }); + + switch (command) { + case "dump": + try { + await dumpLocalDb(); + } catch (error) { + handleDumpError(error); + } + break; + case "upload": + try { + await uploadToCloud(); + } catch (error) { + handleUploadError(error); + } + break; + case "compare": + try { + let info = await compareDatabases(); + let formattedInfo = chalk.bold.green(info.matches.join("\n")); + formattedInfo += "\n" + chalk.bold.red(info.mismatches.join("\n")); + formattedInfo += "\n" + chalk.bold.yellow(info.extraTables.join("\n")); + console.log(formattedInfo); + } catch (error) { + printError("compare databases failed"); + } + break; + case "delete-all-downloads": + try { + await deleteAllDownloads(); + } catch (error) { + printError("delete all downloads failed"); + } + + break; + default: + printError("Invalid command"); + } + + await commandDialog(); +}; + +const printError = (errorMessage: string) => { + console.log( + chalk.whiteBright.bold("\n\nError: ") + + chalk.underline.red.bold(`${errorMessage}\n`) + ); +}; + +function handleUploadError(error: any) { + if (error instanceof CouldNotConnectToCloudDB) { + printError("Could not connect to the cloud database: " + error.message); + } else if (error instanceof DataTypeUploadError) { + printError("Failed to upload data types: " + error.message); + } else if (error instanceof RunsUploadError) { + printError("Failed to upload runs: " + error.message); + } else if (error instanceof DataUploadError) { + printError("Failed to upload data: " + error.message); + } else { + printError("An unknown error occurred: " + error.message); + } +} + +function handleDumpError(error: any) { + if (error instanceof CouldNotConnectToLocalDB) { + printError(error.message); + } else if (error instanceof DataTypeDumpFailed) { + printError(error.message); + } else if (error instanceof RunDumpFailed) { + printError(error.message); + } else if (error instanceof DataDumpFailed) { + printError(error.message); + } else if (error instanceof FailedWriteAuditLog) { + printError(error.message); + } else { + printError(error.message); + } +} + +// Start the CLI +main(); diff --git a/charybdis/server/src/services/audit.service.ts b/charybdis/server/src/services/audit.service.ts new file mode 100644 index 00000000..eb031fea --- /dev/null +++ b/charybdis/server/src/services/audit.service.ts @@ -0,0 +1,39 @@ +import path from "path"; +import { parse } from "csv-parse"; +import fs from "fs"; +import { DOWNLOADS_PATH } from "../storage-paths"; + +/** + * + * @returns the path to the folder based on the folder name at the top of the list of the audit_log.csv file. + */ +export async function getMostRecentDownloadFolder(): Promise { + return new Promise((resolve, reject) => { + console.log("Getting most recent download folder..."); + const auditLogPath = path.resolve(`${DOWNLOADS_PATH}/audit_log.csv`); + console.log(`Reading audit log from: ${auditLogPath}`); + const auditLogStream = fs.createReadStream(auditLogPath).pipe(parse({})); + + let lineCount = 0; + + console.log("Reading audit log..."); + auditLogStream.on("data", (row) => { + lineCount += 1; + if (lineCount === 2) { + const folderName = row[1]; // Get the second column of the second row + console.log(`Found folder: ${folderName}`); + resolve(`${DOWNLOADS_PATH}/${folderName}`); + } + }); + + auditLogStream.on("error", (err) => { + reject(err); + }); + + auditLogStream.on("end", () => { + if (lineCount < 2) { + reject(new Error("No second row found in audit log.")); + } + }); + }); +} diff --git a/charybdis/server/src/services/compare.service.ts b/charybdis/server/src/services/compare.service.ts new file mode 100644 index 00000000..4fadf16e --- /dev/null +++ b/charybdis/server/src/services/compare.service.ts @@ -0,0 +1,86 @@ +import pg from "pg"; +const { Client } = pg; + +// PostgreSQL connection settings from environment variables +const localDbConfig = { + connectionString: process.env.LOCAL_DATABASE_URL, +}; + +const cloudDbConfig = { + connectionString: process.env.CLOUD_DATABASE_URL, +}; + +// Query to get table row counts +const rowCountQuery = ` + SELECT table_name, + (xpath('/row/c/text()', + query_to_xml(format('SELECT COUNT(*) AS c FROM %I', table_name), true, true, '')))[1]::text::int AS row_count + FROM information_schema.tables + WHERE table_schema = 'public' + AND table_type = 'BASE TABLE' + ORDER BY table_name; +`; + +// Function to fetch row counts from a database +async function fetchRowCounts( + clientConfig: any, + dbLabel: string +): Promise> { + const client = new Client(clientConfig); + await client.connect(); + try { + console.log(`Fetching row counts from ${dbLabel} database...`); + const res = await client.query(rowCountQuery); + const counts: Record = {}; + res.rows.forEach((row) => { + counts[row.table_name] = row.row_count; + }); + return counts; + } catch (error) { + console.error(`Error fetching row counts from ${dbLabel}:`, error); + throw error; + } finally { + await client.end(); + } +} + +// Function to compare local and cloud row counts and return comparison results +export async function compareDatabases() { + try { + const localCounts = await fetchRowCounts(localDbConfig, "LOCAL"); + const cloudCounts = await fetchRowCounts(cloudDbConfig, "CLOUD"); + + const matches: string[] = []; + const mismatches: string[] = []; + const extraTables: string[] = []; + + // Compare common tables + Object.keys(localCounts).forEach((table) => { + const localCount = localCounts[table] || 0; + const cloudCount = cloudCounts[table] || 0; + + if (localCount !== cloudCount) { + mismatches.push( + `Mismatch: Table ${table} - LOCAL: ${localCount}, CLOUD: ${cloudCount}` + ); + } else { + matches.push( + `Match: Table ${table} - LOCAL: ${localCount}, CLOUD: ${cloudCount}` + ); + } + }); + + // Check if there are tables in cloud that do not exist in local + Object.keys(cloudCounts).forEach((table) => { + if (!(table in localCounts)) { + extraTables.push( + `Extra table in CLOUD: ${table} with ${cloudCounts[table]} rows` + ); + } + }); + + return { matches, mismatches, extraTables }; + } catch (error) { + throw error; + } +} diff --git a/charybdis/server/src/services/dump.service.ts b/charybdis/server/src/services/dump.service.ts new file mode 100644 index 00000000..2345b1ed --- /dev/null +++ b/charybdis/server/src/services/dump.service.ts @@ -0,0 +1,246 @@ +import { prisma as localPrisma } from "../../../local-prisma/prisma"; +import * as fs from "fs/promises"; +import * as path from "path"; +import { v4 as uuidV4 } from "uuid"; +import { LocalData, LocalDataType, LocalRun } from "../types/local.types"; +import { AuditRow, CsvRunRow } from "../types/csv.types"; +import { DOWNLOADS_PATH } from "../storage-paths"; +import { + CouldNotConnectToLocalDB, + DataTypeDumpFailed, + RunDumpFailed, + DataDumpFailed, +} from "../errors/dump.errors"; +import { createCsvStreamWriter, extractRunIds } from "../utils/csv.utils"; +import { + createFolder, + createMeaningfulFileName, +} from "../utils/filesystem.utils"; +import { FailedWriteAuditLog } from "../errors/audit.errors"; + +async function checkDbConnection() { + try { + await localPrisma.$connect(); + } catch (error) { + throw new CouldNotConnectToLocalDB("Could not connect to database"); + } +} + +export async function dumpLocalDb(): Promise { + console.log("Checking database connection..."); + // check that we can actually connect to the database + await checkDbConnection(); // throws if prisma cannot connect to local + + console.log("Acquiring dump file paths..."); + const auditLogFile = `${DOWNLOADS_PATH}/audit_log.csv`; + const currentDumpName = createMeaningfulFileName("dump", new Date()); + const dumpFolderPath = `${DOWNLOADS_PATH}/${currentDumpName}`; + await createFolder(DOWNLOADS_PATH); + await createFolder(dumpFolderPath); + + console.log("Starting dump process..."); + try { + try { + console.log("Data Types dump..."); + // data type goes first because it is not dependent on any other table + await dumpDataTypeToCsv(1000, dumpFolderPath); + } catch (error) { + throw new DataTypeDumpFailed(error.message); + } + + try { + console.log("Run dump..."); + // run goes second because it is not dependent on any other table + await dumpRunToCsv(1000, dumpFolderPath); + } catch (error) { + throw new RunDumpFailed(error.message); + } + + try { + console.log("Data dump..."); + // data goes last because it is dependent on the run and data type tables + await dumpAllDataByRuns(10000, dumpFolderPath); + } catch (error) { + throw new DataDumpFailed(error.message); + } + } catch (error) { + try { + createCsvStreamWriter(auditLogFile).prependRecord({ + status: "Failed", + dumpFolderName: currentDumpName, + timeTrigger: new Date(), + }); + } catch (error) { + throw new FailedWriteAuditLog(error.message); + } + + throw error; + } + + try { + // if we made here we should have avoided all the errors... + // if not that's cool, it still looks like we succeeded + createCsvStreamWriter(auditLogFile).prependRecord({ + status: "Success", + dumpFolderName: currentDumpName, + timeTrigger: new Date(), + }); + } catch (error) { + console.error("Failed to update audit log:", error); + throw error; + } +} + +async function dumpDataTypeToCsv(batchSize: number, storagePath: string) { + let moreData = true; + let cursor: { name: string } | undefined; + let csvWriter = createCsvStreamWriter( + `${storagePath}/data_type.csv` + ); + + while (moreData) { + const dataTypes = await localPrisma.data_type.findMany({ + // order by is important to ensure we don't grab the same data + // twice while batch querying. + orderBy: { + name: "asc", + }, + cursor, + skip: cursor ? 1 : 0, // skip the cursor itself if we already have one + take: batchSize, + }); + + if (dataTypes.length === 0) { + moreData = false; + } else { + // Update cursor + cursor = { + name: dataTypes[dataTypes.length - 1].name, + }; + csvWriter.appendRecords(dataTypes); + console.log(`Fetched ${dataTypes.length} Data Types`); + } + } +} + +async function dumpRunToCsv(batchSize: number, storagePath: string) { + let moreRuns = true; + let cursor: { runId: number } | undefined; + let csvWriter = createCsvStreamWriter(`${storagePath}/run.csv`); + let totalDataFetched = 0; + + while (moreRuns) { + const runs: LocalRun[] = await localPrisma.run.findMany({ + orderBy: { + runId: `asc`, + }, + cursor, + skip: cursor ? 1 : 0, // skip the cursor which we have already got last loop + take: batchSize, + }); + + if (runs.length === 0) { + moreRuns = false; + } else { + // Update cursor, this is where we will start of next loop + cursor = { + runId: runs[runs.length - 1].runId, + }; + + // convert to the csv type before inserting (allowing us to create a uuid) + const csvRunRow: CsvRunRow[] = runs.map((localRun) => { + return { + uuid: uuidV4(), + runId: localRun.runId.toString(), + driverName: localRun.driverName, + locationName: localRun.locationName, + notes: localRun.notes, + time: localRun.time.toISOString(), + }; + }); + + csvWriter.appendRecords(csvRunRow); + totalDataFetched += csvRunRow.length; + console.log(`Inserted ${csvRunRow.length} to run.csv`); + } + } + + console.log(`Total runs fetched: ${totalDataFetched}`); +} + +async function dumpAllDataByRuns(batchSize: number, currentDumpPath: string) { + // check our current download folder to ensure that we are only using runs that we have downloaded + // and query the runId column for all the runIds using a parser + + // TODO: whether or not we want to cross refrence this with the run table is TBD + // (or at least give a warning if there are more runIds in the data table than the run table) + let downloadedRunIds = await extractRunIds(`${currentDumpPath}/run.csv`); + + const dataFolder = `${currentDumpPath}/data`; + await createFolder(dataFolder); + + let allDataFetched = 0; + // TODO: if there is ever some sort of restart, we should have some way of resuming where we left off. + for (const runId of downloadedRunIds.values()) { + allDataFetched += await dumpDataByRun(runId, 50000, dataFolder); + } + console.log(`Total of ALL DATA fetched: ${allDataFetched}`); +} + +async function dumpDataByRun( + runId: number, + batchSize: number, + storagePath: string +): Promise { + let moreData = true; + let offset = 0; + let csvWriter = createCsvStreamWriter( + `${storagePath}/run-${runId}-data.csv` + ); + let totalDataFetched = 0; + + while (moreData) { + // Fetch batched data using `findMany` + const dataChunk = await localPrisma.data.findMany({ + where: { runId }, + take: batchSize, + skip: offset, // skip the previously seen data + orderBy: [{ time: "asc" }, { dataTypeName: "asc" }], + }); + + if (dataChunk.length === 0) { + moreData = false; + } else { + offset += dataChunk.length; // move offset by the amount of data we just read + csvWriter.appendRecords(dataChunk); + totalDataFetched += dataChunk.length; + console.log(`Inserted ${dataChunk.length} rows to run-${runId}-data.csv`); + } + } + + console.log(`Total data fetched for run ${runId}: ${totalDataFetched}`); + return totalDataFetched; +} + +export async function deleteAllDownloads(): Promise { + try { + // Read all entries in the downloads folder + const entries = await fs.readdir(DOWNLOADS_PATH, { withFileTypes: true }); + + // Iterate over each entry and remove it + for (const entry of entries) { + const fullPath = path.join(DOWNLOADS_PATH, entry.name); + if (entry.isDirectory()) { + // Recursively remove the directory and its contents + await fs.rm(fullPath, { recursive: true, force: true }); + } else { + // Remove the file + await fs.unlink(fullPath); + } + } + console.log("All downloads have been deleted."); + } catch (error) { + console.error("Error deleting downloads:", error); + throw error; + } +} diff --git a/charybdis/server/src/services/upload.service.ts b/charybdis/server/src/services/upload.service.ts new file mode 100644 index 00000000..79c107ab --- /dev/null +++ b/charybdis/server/src/services/upload.service.ts @@ -0,0 +1,192 @@ +import { PrismaClient as CloudPrisma } from "../../../cloud-prisma/prisma"; +import { LocalDataType } from "../types/local.types"; +import { CloudData, CloudDataType, CloudRun } from "../types/cloud.types"; +import { CsvDataRow, CsvDataTypeRow, CsvRunRow } from "../types/csv.types"; +import { extractRunIds } from "../utils/csv.utils"; +import { csvToCloudData } from "../transformers/csv.transformer"; +import { getMostRecentDownloadFolder } from "./audit.service"; +import { processCsvInBatches } from "../utils/csv.utils"; +import { + DataTypeUploadError, + RunsUploadError, + DataUploadError, + CouldNotConnectToCloudDB, +} from "../errors/upload.errors"; + +const cloudDb = new CloudPrisma(); + +const DATATYPE_BATCH_SIZE = 1000; +const RUN_BATCH_SIZE = 1000; +const DATA_BATCH_SIZE = 4960; + +const csvNames = { + run: (path: string) => `${path}/run.csv`, + data: (path: string, runId: number) => `${path}/data/run-${runId}-data.csv`, + data_type: (path: string) => `${path}/data_type.csv`, +}; + +async function checkDbConnection() { + try { + await cloudDb.$connect(); + } catch (error) { + throw new CouldNotConnectToCloudDB(); + } +} + +export async function uploadToCloud() { + // ensure we can actually connect to the database + console.info("Checking database connection..."); + await checkDbConnection(); + + try { + console.info("Opening most recent download folder..."); + let dumpFolderPath = await getMostRecentDownloadFolder(); + + console.info("Processing data types..."); + try { + await processDataType(dumpFolderPath); + } catch (error) { + throw new DataTypeUploadError(error.message); + } + + console.info("Startin Run uploads..."); + try { + await processRuns(dumpFolderPath); + } catch (error) { + throw new RunsUploadError(error.message); + } + + console.info("Starting Data uploads..."); + try { + await processData(dumpFolderPath); + } catch (error) { + throw new DataUploadError(error.message); + } + + console.log("Inserted all data entries"); + console.log("CSV to Cloud transfer complete."); + } catch (error) { + throw error; + } finally { + await cloudDb.$disconnect(); + } +} + +export async function processDataType( + dumpFolderPath: string, + batchSize: number = DATATYPE_BATCH_SIZE +) { + const dataTypeCsvPath = csvNames.data_type(dumpFolderPath); + + await processCsvInBatches( + dataTypeCsvPath, + async (batch: CsvDataTypeRow[]) => { + console.info("Processing data types"); + const cloudDataTypes: CloudDataType[] = batch.map((localDataType) => ({ + name: localDataType.name, + unit: localDataType.unit, + nodeName: localDataType.nodeName, + })); + + await cloudDb.data_type.createMany({ + data: cloudDataTypes, + skipDuplicates: true, + }); + console.log(`Inserted ${cloudDataTypes.length} data_type entries`); + }, + batchSize + ); +} + +export async function processRuns( + dumpFolderPath: string, + batchSize: number = RUN_BATCH_SIZE +) { + const runsCsvPath = csvNames.run(dumpFolderPath); + try { + await processCsvInBatches( + runsCsvPath, + async (batch: CsvRunRow[]) => { + const cloudRuns: CloudRun[] = batch.map((csvRun: CsvRunRow) => ({ + id: csvRun.uuid, + runId: Number(csvRun.runId), + driverName: csvRun.driverName, + notes: csvRun.notes, + time: new Date(csvRun.time), + })); + + if (cloudRuns.length !== 0) { + // check if the run we are uploading already exists + const existingRuns = await cloudDb.run.findFirst({ + where: { + runId: { + equals: cloudRuns[0].runId, + }, + time: { + equals: cloudRuns[0].time, + }, + }, + }); + if (existingRuns) { + console.info( + `Aborting!!!!!!!! Run with runId: ${cloudRuns[0].runId} and time: ${cloudRuns[0].time} already exists. ` + ); + throw new RunsUploadError( + "A Run already exists, with same time and runId as cloud db" + ); + } + } + + console.info(`Inserting run batch of: ${cloudRuns.length}`); + try { + await cloudDb.run.createMany({ + data: cloudRuns, + skipDuplicates: true, + }); + console.info("Inserted all runs successfully"); + } catch (error) { + console.error("Error inserting runs:", error); + process.exit(1); + } + }, + batchSize + ); + } catch (error) { + throw new RunsUploadError(error.message); + } +} + +export async function processData( + dumpFolderPath: string, + batchSize: number = DATA_BATCH_SIZE +) { + const runsCsvPath = csvNames.run(dumpFolderPath); + const uuidToRunId = await extractRunIds(runsCsvPath); + let insertCount = 0; + + for (const run of uuidToRunId) { + let dataCsvPath = csvNames.data(dumpFolderPath, run[1]); + await processCsvInBatches( + dataCsvPath, + async (batch) => { + try { + const cloudData: CloudData[] = batch.map((localData: CsvDataRow) => + csvToCloudData(localData, run[0]) + ); + + await cloudDb.data.createMany({ + data: cloudData, + skipDuplicates: true, + }); + insertCount += cloudData.length; + console.log(`Inserted ${cloudData.length} data entries`); + } catch (error) { + console.error("Error inserting data:", error); + process.exit(1); + } + }, + batchSize + ); + } + console.log(`Inserted a TOTAL of ${insertCount} DATA entries`); +} diff --git a/charybdis/server/src/storage-paths.ts b/charybdis/server/src/storage-paths.ts new file mode 100644 index 00000000..6d1c21c3 --- /dev/null +++ b/charybdis/server/src/storage-paths.ts @@ -0,0 +1,4 @@ +import * as path from "path"; + +export const PROJECT_ROOT = path.resolve(__dirname, "../"); +export const DOWNLOADS_PATH = path.resolve(PROJECT_ROOT, "downloads"); diff --git a/charybdis/server/src/transformers/csv.transformer.ts b/charybdis/server/src/transformers/csv.transformer.ts new file mode 100644 index 00000000..ccc3f581 --- /dev/null +++ b/charybdis/server/src/transformers/csv.transformer.ts @@ -0,0 +1,67 @@ +import { CloudData } from "../types/cloud.types"; +import { CsvDataRow, CsvDataTypeRow, CsvRunRow } from "../types/csv.types"; +import { LocalData, LocalDataType, LocalRun } from "../types/local.types"; + +export const csvToCloudData = ( + csvDataRow: CsvDataRow, + uuid: string +): CloudData => { + const time = BigInt(csvDataRow.time); + + const values = parseFloatArray(csvDataRow.values); + + return { + runId: uuid, + dataTypeName: csvDataRow.dataTypeName, + time, + values, + }; +}; + +/** + * Parses a string representation of an array of floats in the format "[1,2,3]". + * Throws an error if NaN values are encountered. + */ +function parseFloatArray(maybeArrayString: string): number[] { + if (!maybeArrayString || maybeArrayString.trim() === "") { + console.log("Empty values field found in CSV:", maybeArrayString); + throw new Error( + "Error: Encountered empty values field, expected format '[1,2,3]'." + ); + } + + // Ensure string starts and ends with square brackets + if (!/^\[.*\]$/.test(maybeArrayString.trim())) { + console.log("Invalid format found in CSV:", maybeArrayString); + throw new Error( + `Error: Invalid format, expected "[...]", received: "${maybeArrayString}"` + ); + } + + // Remove brackets and whitespace + const cleaned = maybeArrayString.trim().slice(1, -1).trim(); + + if (cleaned.length === 0) { + console.log("Empty values array found in CSV:", maybeArrayString); + throw new Error( + `Error: Empty values array after parsing for input: "${maybeArrayString}"` + ); + } + + // Split values by comma, trim whitespace, and parse to float + const parsedArray = cleaned.split(",").map((val) => { + const parsed = parseFloat(val.trim()); + + if (isNaN(parsed)) { + console.log("Invalid value found in CSV:", val.trim()); + throw new Error( + `Error: Encountered NaN value in input: "${maybeArrayString}" at "${val.trim()}"` + ); + } + + // each returned value builds the array of values + return parsed; + }); + + return parsedArray; +} diff --git a/charybdis/server/src/types/cloud.types.ts b/charybdis/server/src/types/cloud.types.ts new file mode 100644 index 00000000..7a332f7a --- /dev/null +++ b/charybdis/server/src/types/cloud.types.ts @@ -0,0 +1,29 @@ +/** + * Represents a run in our cloud database. + */ +export interface CloudRun { + id: string; // uuid + runId: number; // based on the day of the run + driverName: string; + notes: string; + time: Date; +} + +/** + * Representation of data in our cloud database. + */ +export interface CloudData { + runId: string; // the run this data was recorded during + dataTypeName: string; // the name of where the data came from (on the car) + time: bigint; // the time the data was recorded + values: number[]; // the values recorded +} + +/** + * Representation of a data type in the cloud database. + */ +export interface CloudDataType { + name: string; // unique id + unit: string; // e.g. "V (Volts), "A (Amps)", "C (Celsius)" + nodeName: string; +} diff --git a/charybdis/server/src/types/csv.types.ts b/charybdis/server/src/types/csv.types.ts new file mode 100644 index 00000000..b98e6cbd --- /dev/null +++ b/charybdis/server/src/types/csv.types.ts @@ -0,0 +1,34 @@ +/* these all match the local database types, except the are the format we expect our csv local csv to hold them in */ + +export interface CsvRunRow { + /* + we store uuid locally in order to fully ensure + that when a run upload fails, and we will be able to maintain access + and knowledge of the uuid mapping to our local runId. + */ + uuid: string; + runId: string; + driverName: string; + locationName: string; + notes: string; + time: string; +} + +export interface CsvDataRow { + values: string; + time: string; + runId: string; + dataTypeName: string; +} + +export interface CsvDataTypeRow { + name: string; + unit: string; + nodeName: string; +} + +export interface AuditRow { + status: string; + dumpFolderName: string; + timeTrigger: Date; +} diff --git a/charybdis/server/src/types/local.types.ts b/charybdis/server/src/types/local.types.ts new file mode 100644 index 00000000..18fd8cca --- /dev/null +++ b/charybdis/server/src/types/local.types.ts @@ -0,0 +1,29 @@ +/** + * Representation of run in our local database. + */ +export interface LocalRun { + runId: number; + driverName: string; + locationName: string; + notes: string; + time: Date; +} + +/** + * Representation of data in our local database. + */ +export interface LocalData { + values: number[]; + time: bigint; + runId: number; + dataTypeName: string; +} + +/** + * Representation of a data type in our local database. + */ +export interface LocalDataType { + name: string; + unit: string; + nodeName: string; +} diff --git a/charybdis/server/src/utils/csv.utils.ts b/charybdis/server/src/utils/csv.utils.ts new file mode 100644 index 00000000..63818f9a --- /dev/null +++ b/charybdis/server/src/utils/csv.utils.ts @@ -0,0 +1,188 @@ +import * as fs from "fs"; +import { WriteStream } from "fs"; +import { Parser } from "json2csv"; +import { parse } from "csv-parse"; +import { CsvRunRow } from "../types/csv.types"; +import path from "path"; + +export async function processCsvInBatches( + csv_path: string, + processBatch: (batch: T[]) => Promise, + batchSize: number +): Promise { + return new Promise((resolve, reject) => { + const records: any[] = []; + const readStream = fs + .createReadStream(path.resolve(csv_path)) + .pipe(parse({ columns: true, skip_empty_lines: true, cast: true })); + + readStream.on("data", (row) => { + records.push(row); + + if (records.length >= batchSize) { + readStream.pause(); + processBatch(records.splice(0, batchSize)) + .then(() => readStream.resume()) + .catch(reject); + } + }); + + readStream.on("end", async () => { + if (records.length > 0) { + try { + await processBatch(records); + } catch (error) { + reject(error); + } + } + console.log(`Finished processing ${csv_path}`); + resolve(); + }); + + readStream.on("error", (err) => { + reject(`Error reading ${csv_path}: ${err.message}`); + }); + }); +} + +/** + * The interface describing our CSV writer, parameterized by a generic type T. + * + * - `appendRecords(records: T[]): void` + * Appends an array of T records to the CSV. + * - `close(): void` + * Closes the underlying file stream. + */ +export interface CsvStreamWriter { + appendRecords(records: T[]): void; + prependRecord(record: T): void; + close(): void; +} + +/** + * Creates a writer object that can append records to a CSV file in batches. + * + * @param filename The path to the CSV file. + * @returns A typed object (`CsvStreamWriter`) with `appendRecords` and `close` methods. + */ +export function createCsvStreamWriter(filename: string): CsvStreamWriter { + // Check if the file already exists (to determine whether to write headers). + const fileExists = fs.existsSync(filename); + + // Create a write stream in append mode. + const writeStream: WriteStream = fs.createWriteStream(filename, { + flags: "a", + }); + + // Create a JSON2CSV parser. If the file doesn't exist, enable headers. Otherwise, skip them. + // Adjust parser options as needed (e.g., flatten, transforms, etc.) + const parser = new Parser({ + header: !fileExists, // Write headers only if file doesn't exist + }); + + return { + /** + * Appends the given records of type T to the CSV file. + * + * @param records Array of T objects to append. + */ + appendRecords(records: T[]): void { + if (!records || records.length === 0) { + return; + } + + const csv = parser.parse(records); + const filePath = writeStream.path as string; // Get file path from stream + + // Check if the file already has content (i.e., a header) + if (fs.existsSync(filePath) && fs.statSync(filePath).size > 0) { + // ✅ File already has a header, append only data + const lines = csv.split("\n").slice(1).join("\n"); // Remove first line (header) + writeStream.write(lines + "\n"); + } else { + // ✅ File is new, write full CSV including header + writeStream.write(csv + "\n"); + } + }, + + /** + * Adds the record to the beginning of the file, under the header. + */ + prependRecord(record: T): void { + if (!record) { + return; + } + + console.log("Prepending record to CSV file..."); + const filePath = writeStream.path as string; // Get file path from stream + const newCsv = parser.parse([record]); // Convert record to CSV format + + if (!fs.existsSync(filePath) || fs.statSync(filePath).size === 0) { + // ✅ File does not exist or is empty, write full CSV including header + fs.writeFileSync(filePath, newCsv + "\n", "utf8"); + return; + } + + // ✅ File exists and has content, read existing content + const existingContent = fs.readFileSync(filePath, "utf8").trim(); + const lines = existingContent.split("\n"); + + if (lines.length > 1) { + // ✅ File has a header and data, insert under header + const header = lines[0]; + const data = lines.slice(1); // Keep only the existing data rows + const updatedContent = [header, ...newCsv.split("\n"), ...data].join( + "\n" + ); + console.info( + "Audit log update with new record at the top: ", + newCsv.split("\n") + ); + fs.writeFileSync(filePath, updatedContent + "\n", "utf8"); + } else { + // ✅ File only has a header, add the new record as the first data entry + fs.writeFileSync( + filePath, + existingContent + "\n" + newCsv.split("\n")[1] + "\n", + "utf8" + ); + } + }, + + /** + * Closes the underlying file stream. + * Make sure to call this after finishing all appends! + */ + close(): void { + writeStream.end(); + }, + }; +} + +/** + * Extracts the runids linked to there new uuid's from the run.csv file + * @param filePath + * @returns + */ +export async function extractRunIds( + filePath: string +): Promise> { + return new Promise((resolve, reject) => { + console.info("Extracting runIds from run.csv"); + const runIdMap = new Map(); + const parser = parse({ columns: true }); + const fileStream = fs.createReadStream(filePath).pipe(parser); + + fileStream.on("data", (row: CsvRunRow) => { + runIdMap.set(row.uuid, parseInt(row.runId, 10)); + }); + + fileStream.on("end", () => { + resolve(runIdMap); + }); + + fileStream.on("error", (error) => { + reject(error); + }); + }); +} diff --git a/charybdis/server/src/utils/filesystem.utils.ts b/charybdis/server/src/utils/filesystem.utils.ts new file mode 100644 index 00000000..8aa6beeb --- /dev/null +++ b/charybdis/server/src/utils/filesystem.utils.ts @@ -0,0 +1,26 @@ +import * as fs from "fs"; + +export async function createFolder(folderPath: string) { + if (!fs.existsSync(folderPath)) { + fs.mkdirSync(folderPath); + console.info(`Folder created at: ${folderPath}`); + } else { + console.info(`Folder already exists at: ${folderPath}`); + } +} + +export function createMeaningfulFileName(name: string, date: Date): string { + // Format the date as "yyyy_month_day-hr_minute_ms" + const year = date.getUTCFullYear(); + const month = String(date.getUTCMonth() + 1).padStart(2, "0"); + const day = String(date.getUTCDate()).padStart(2, "0"); + const hours = String(date.getUTCHours()).padStart(2, "0"); + const minutes = String(date.getUTCMinutes()).padStart(2, "0"); + const seconds = String(date.getUTCSeconds()).padStart(2, "0"); + const milliseconds = String(date.getUTCMilliseconds()).padStart(3, "0"); + + const formattedDate = `${year}-${month}-${day}__${hours}-${minutes}-${seconds}-${milliseconds}`; + + // Combine the sanitized file name with the formatted date + return `${name}_${formattedDate}`; +} diff --git a/charybdis/tsconfig.json b/charybdis/tsconfig.json deleted file mode 100644 index c9c555d9..00000000 --- a/charybdis/tsconfig.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} diff --git a/compose/.DS_Store b/compose/.DS_Store new file mode 100644 index 00000000..9308f85d Binary files /dev/null and b/compose/.DS_Store differ diff --git a/compose/compose.fake-data.yml b/compose/compose.fake-data.yml new file mode 100644 index 00000000..b9010985 --- /dev/null +++ b/compose/compose.fake-data.yml @@ -0,0 +1,12 @@ +services: + siren: + extends: + file: ../siren-base/compose.siren.yml + service: siren + + calypso: + extends: + file: ./compose.calypso.yml + service: calypso + depends_on: + - siren \ No newline at end of file