From 731923b16a320ffc5630a032aff64cada98316bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?BITARD=20Micha=C3=ABl?= <michael.bitard@beta.gouv.fr>
Date: Tue, 18 Mar 2025 10:15:32 +0000
Subject: [PATCH] =?UTF-8?q?chore(ci):=20limite=20le=20nombre=20de=20proces?=
 =?UTF-8?q?sus=20en=20parall=C3=A8le=20pour=20v=C3=A9rifier=20les=20querie?=
 =?UTF-8?q?s=20pg=20(pub/pnm-public/camino!1676)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 package-lock.json                   | 120 +++++++++++-----------------
 package.json                        |   2 +-
 packages/api/package.json           |   7 +-
 packages/api/pgtyped-config.ci.json |   1 +
 4 files changed, 51 insertions(+), 79 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index d7fa3e426..08b000950 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6337,6 +6337,51 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
+    "node_modules/@pgtyped/runtime": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/@pgtyped/runtime/-/runtime-2.4.2.tgz",
+      "integrity": "sha512-W1fK475KjmkhleK4Be7swblT5Kqykxc/APe57r8cgmxLzbT/x9Q3BjOLBJhBPxp1gKFZGgQyxtELPOaNl/66jg==",
+      "license": "MIT",
+      "dependencies": {
+        "@pgtyped/parser": "^2.4.2",
+        "chalk": "^4.1.0",
+        "debug": "^4.1.1"
+      },
+      "engines": {
+        "node": ">=14.16"
+      }
+    },
+    "node_modules/@pgtyped/runtime/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/@pgtyped/runtime/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "license": "MIT",
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
+      }
+    },
     "node_modules/@pkgjs/parseargs": {
       "version": "0.11.0",
       "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
@@ -8400,27 +8445,6 @@
         "@types/node": "*"
       }
     },
-    "node_modules/@types/graphql-type-json": {
-      "version": "0.3.5",
-      "resolved": "https://registry.npmjs.org/@types/graphql-type-json/-/graphql-type-json-0.3.5.tgz",
-      "integrity": "sha512-BpY+pV3FQWM8DIPDMYo2cC3cJYN4+fnph0aYF7OHjWgUkb+dDJ+gQn27xfyTiQkmhvgVQ32ztUT43sAeG/KZVQ==",
-      "license": "MIT",
-      "dependencies": {
-        "graphql": "^14.5.3"
-      }
-    },
-    "node_modules/@types/graphql-type-json/node_modules/graphql": {
-      "version": "14.7.0",
-      "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz",
-      "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==",
-      "license": "MIT",
-      "dependencies": {
-        "iterall": "^1.2.2"
-      },
-      "engines": {
-        "node": ">= 6.x"
-      }
-    },
     "node_modules/@types/http-cache-semantics": {
       "version": "4.0.4",
       "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
@@ -16962,12 +16986,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/iterall": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz",
-      "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==",
-      "license": "MIT"
-    },
     "node_modules/jackspeak": {
       "version": "3.4.3",
       "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
@@ -30930,7 +30948,7 @@
       "dependencies": {
         "@graphql-tools/graphql-file-loader": "^8.0.14",
         "@graphql-tools/load": "^8.0.14",
-        "@pgtyped/runtime": "^2.3.0",
+        "@pgtyped/runtime": "^2.4.2",
         "@sentry/node": "^9.1.0",
         "@swc/core": "^1.10.16",
         "@tus/file-store": "^1.5.1",
@@ -30941,7 +30959,6 @@
         "@types/cors": "^2.8.17",
         "@types/express": "^4.17.21",
         "@types/express-serve-static-core": "^4.19.6",
-        "@types/graphql-type-json": "^0.3.5",
         "@types/jsonwebtoken": "^9.0.8",
         "@types/node": "^22.13.2",
         "@types/pg": "^8.11.11",
@@ -31002,51 +31019,6 @@
         "vitest": "^3.0.5"
       }
     },
-    "packages/api/node_modules/@pgtyped/runtime": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/@pgtyped/runtime/-/runtime-2.3.0.tgz",
-      "integrity": "sha512-B8RMUeX+zsaXfKOuR3w3Vku5YLSQ8rw+YUYc2IyAFzlQJZpAQDkkAVM0abgGNQE8bOK1wuE+nHJawWuVy+I8bA==",
-      "license": "MIT",
-      "dependencies": {
-        "@pgtyped/parser": "^2.3.0",
-        "chalk": "^4.1.0",
-        "debug": "^4.1.1"
-      },
-      "engines": {
-        "node": ">=14.16"
-      }
-    },
-    "packages/api/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"
-      }
-    },
-    "packages/api/node_modules/chalk": {
-      "version": "4.1.2",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
     "packages/common": {
       "name": "camino-common",
       "version": "1.0.0",
diff --git a/package.json b/package.json
index 0602422e2..95c9071eb 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
     "prepare": "husky",
     "test": "npm run test --workspaces",
     "lint": "npm run lint --workspaces",
-    "knip": "npx --yes knip@5.43.6"
+    "knip": "npx --yes knip@5.46.0"
   },
   "lint-staged": {
     "packages/ui/src/**/*.{js,ts,tsx}": [
diff --git a/packages/api/package.json b/packages/api/package.json
index 75cb20513..c66e4bf4d 100644
--- a/packages/api/package.json
+++ b/packages/api/package.json
@@ -20,8 +20,8 @@
     "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.3.0 pgtyped -w -c pgtyped-config.json",
-    "db:check": "npx --yes --package=@pgtyped/cli@2.3.0 pgtyped -c pgtyped-config.ci.json",
+    "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",
@@ -45,7 +45,7 @@
   "dependencies": {
     "@graphql-tools/graphql-file-loader": "^8.0.14",
     "@graphql-tools/load": "^8.0.14",
-    "@pgtyped/runtime": "^2.3.0",
+    "@pgtyped/runtime": "^2.4.2",
     "@sentry/node": "^9.1.0",
     "@swc/core": "^1.10.16",
     "@tus/file-store": "^1.5.1",
@@ -56,7 +56,6 @@
     "@types/cors": "^2.8.17",
     "@types/express": "^4.17.21",
     "@types/express-serve-static-core": "^4.19.6",
-    "@types/graphql-type-json": "^0.3.5",
     "@types/jsonwebtoken": "^9.0.8",
     "@types/node": "^22.13.2",
     "@types/pg": "^8.11.11",
diff --git a/packages/api/pgtyped-config.ci.json b/packages/api/pgtyped-config.ci.json
index 39d7548d5..755d715cd 100644
--- a/packages/api/pgtyped-config.ci.json
+++ b/packages/api/pgtyped-config.ci.json
@@ -9,6 +9,7 @@
   "srcDir": "./src/",
   "failOnError": true,
   "camelCaseColumnNames": false,
+  "maxWorkerThreads": 2,
   "db": {
     "host": "localhost",
     "user": "postgres",
-- 
GitLab