{
  "name": "camino-api",
  "version": "1.0.0",
  "description": "Camino api",
  "private": true,
  "main": "./src/index.js",
  "type": "module",
  "scripts": {
    "build": "tsc --incremental",
    "check-prolongations": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/scripts/check-prolongations.ts",
    "fill-documents-non-renseigne": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/scripts/fill-documents-non-renseigne.ts",
    "daily": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/scripts/daily.ts",
    "monthly": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/scripts/monthly.ts",
    "db:dump": "rm -rf ./backups/* && pg_dump --host=localhost --username=postgres --clean --if-exists --format=d --no-owner --no-privileges --dbname=camino --file=./backups/",
    "postdb:dump-schema": "node -e \"console.log(\\\"il faut supprimer le 'create schema public' et 'SELECT pg_catalog.set_config('search_path', '', false);'\\\")\"",
    "db:dump-schema": "pg_dump --host=localhost --username=postgres --exclude-table=knex_migrations --exclude-table=knex_migrations_lock --exclude-table=knex_migrations_id_seq --exclude-table=knex_migrations_lock_index_seq --no-owner --no-privileges --dbname=camino --schema-only --schema public --no-comments > src/knex/migrations/20230413090214_init_schema.sql",
    "db:import": "pg_restore --host=localhost --username=postgres --clean --if-exists --no-owner --no-privileges --dbname=camino ./backups",
    "db:import-without-files": "pg_restore --host=localhost --username=postgres --clean --if-exists --no-owner --no-privileges --dbname=camino < ./backup_without_files.backup",
    "db:prod-fetch": "rm -rf ./backups/* && ssh camino.beta.gouv.fr 'rm -f ~/backup.tgz && cd  /srv/backups/dump/ && tar cvzf ~/backup.tgz .' && scp camino.beta.gouv.fr:~/backup.tgz backups/ && tar xvf backups/backup.tgz --directory ./backups",
    "db:prod-fetch-without-files": "scp camino.beta.gouv.fr:/srv/backups/dump_without_files.backup ./backup_without_files.backup",
    "db:recreate": "dropdb --host=localhost --username=postgres camino && createdb --host=localhost --username=postgres camino",
    "db:migrate": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/knex/migrate.ts",
    "db:add-migration": "NODE_OPTIONS='--loader ts-node/esm/transpile-only' knex migrate:make",
    "db:watch": "npx --yes --package=@pgtyped/cli@2.4.3 pgtyped -w -c pgtyped-config.json",
    "db:check": "npx --yes --package=@pgtyped/cli@2.4.3 pgtyped -c pgtyped-config.ci.json",
    "dev": "node --watch --enable-source-maps --loader ts-node/esm/transpile-only --inspect ./src/index.ts",
    "daily-debug": "node  --inspect-brk=3000 --loader ts-node/esm/transpile-only ./src/scripts/daily.ts",
    "dev:update": "npm-check-updates -u && npm install && npm audit fix",
    "lint": "prettier --write . && eslint --fix .",
    "start": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/index.ts",
    "test": "vitest",
    "test:unit": "vitest --config ./vitest.unit.config.ts",
    "test:integration": "vitest --config ./vitest.integration.config.ts",
    "test:generate-data": "node --enable-source-maps --loader ts-node/esm/transpile-only src/tools/demarches/tests-creation.ts",
    "test:generate-matrices-data": "node --enable-source-maps --loader ts-node/esm/transpile-only src/tools/matrices/tests-creation.ts",
    "test:generate-sections-data": "node --enable-source-maps --loader ts-node/esm/transpile-only src/tools/activites/tests-creation.ts",
    "ci:lint": "prettier --check . && eslint .",
    "matrices": "node --enable-source-maps --loader ts-node/esm/transpile-only ./src/scripts/matrices.ts"
  },
  "@comment dependencies": {
    "--enable-source-maps": "Vient de l'issue https://github.com/TypeStrong/ts-node/issues/2053",
    "modules esm": "On doit pouvoir migrer ts-node maintenant qu'on a supprimé express-graphql : https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c. mettre à jour express-jwt et graphql-upload"
  },
  "dependencies": {
    "@graphql-tools/graphql-file-loader": "^8.0.14",
    "@graphql-tools/load": "^8.0.14",
    "@pgtyped/runtime": "^2.4.2",
    "@sentry/node": "^9.1.0",
    "@swc/core": "^1.10.16",
    "@tus/file-store": "^1.5.1",
    "@tus/server": "^1.10.2",
    "@types/basic-auth": "^1.1.8",
    "@types/bcryptjs": "^2.4.6",
    "@types/compression": "1.7.5",
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.21",
    "@types/express-serve-static-core": "^4.19.6",
    "@types/jsonwebtoken": "^9.0.8",
    "@types/node": "^22.13.2",
    "@types/pg": "^8.11.11",
    "@types/shpjs": "^3.4.7",
    "basic-auth": "^2.0.1",
    "bcryptjs": "^2.4.3",
    "camino-common": "1.0.0",
    "carbone": "^3.5.6",
    "compression": "^1.8.0",
    "cookie-parser": "^1.4.7",
    "cors": "^2.8.5",
    "decimal.js": "^10.5.0",
    "dotenv": "^16.4.7",
    "effect": "^3.12.11",
    "express": "^4.21.2",
    "express-jwt": "^8.5.1",
    "express-rate-limit": "^7.5.0",
    "graphql": "^16.10.0",
    "graphql-fields": "^2.0.3",
    "graphql-http": "^1.22.4",
    "graphql-scalars": "^1.24.1",
    "graphql-type-json": "^0.3.2",
    "html-to-text": "^9.0.5",
    "jsondiffpatch": "^0.6.0",
    "jsonwebtoken": "^9.0.2",
    "jszip": "^3.10.1",
    "knex": "^3.1.0",
    "objection": "^3.1.5",
    "pg": "^8.13.3",
    "pg-large-object": "^2.0.0",
    "prettier": "^3.5.1",
    "qs": "^6.14.0",
    "shpjs": "^6.1.0",
    "stream-chain": "3.1.0",
    "stream-json": "^1.9.1",
    "ts-node": "^10.9.2",
    "undici": "^7.3.0",
    "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
    "xstate": "^5.19.2",
    "zod": "^3.24.2",
    "zod-validation-error": "^3.4.0"
  },
  "devDependencies": {
    "@types/carbone": "^3.2.5",
    "@types/cookie-parser": "^1.4.8",
    "@types/pg-large-object": "^2.0.7",
    "@types/stream-json": "^1.7.8",
    "@types/supertest": "^6.0.2",
    "@typescript-eslint/eslint-plugin": "^8.24.0",
    "@typescript-eslint/parser": "^8.24.0",
    "@vitest/coverage-v8": "^3.0.5",
    "eslint": "^9.20.1",
    "eslint-config-prettier": "^10.0.1",
    "eslint-plugin-promise": "^7.2.1",
    "eslint-plugin-sql": "^3.2.1",
    "supertest": "^7.0.0",
    "typescript": "^5.7.3",
    "vitest": "^3.0.5"
  },
  "prettier": {
    "semi": false,
    "singleQuote": true,
    "arrowParens": "avoid",
    "trailingComma": "es5",
    "printWidth": 200
  }
}