diff --git a/package-lock.json b/package-lock.json index 85f18949..b923ef21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -285,30 +285,24 @@ } }, "node_modules/@apollo/client": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.14.0.tgz", - "integrity": "sha512-0YQKKRIxiMlIou+SekQqdCo0ZTHxOcES+K8vKB53cIDpwABNR0P0yRzPgsbgcj3zRJniD93S/ontsnZsCLZrxQ==", - "license": "MIT", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-4.0.9.tgz", + "integrity": "sha512-Lh2drMzFE9x5jVS8RKmlGL5SORkvpyUJIT+wTErxDUR2HpWePiBfhhcHHRSlZFiCR866ewCv4euTc4IDF0GWxw==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", "@wry/equality": "^0.5.6", "@wry/trie": "^0.5.0", "graphql-tag": "^2.12.6", - "hoist-non-react-statics": "^3.3.2", "optimism": "^0.18.0", - "prop-types": "^15.7.2", - "rehackt": "^0.1.0", - "symbol-observable": "^4.0.0", - "ts-invariant": "^0.10.3", - "tslib": "^2.3.0", - "zen-observable-ts": "^1.2.5" + "tslib": "^2.3.0" }, "peerDependencies": { - "graphql": "^15.0.0 || ^16.0.0", + "graphql": "^16.0.0", "graphql-ws": "^5.5.5 || ^6.0.3", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "react-dom": "^17.0.0 || ^18.0.0 || >=19.0.0-rc", + "rxjs": "^7.3.0", "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" }, "peerDependenciesMeta": { @@ -5521,7 +5515,6 @@ "integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.1.0", @@ -5710,7 +5703,6 @@ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=8.0.0" } @@ -5845,10 +5837,9 @@ } }, "node_modules/@platformatic/kafka": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@platformatic/kafka/-/kafka-1.18.0.tgz", - "integrity": "sha512-sn8M1iQoTuOTDx9+QSROivO8+DjI0p/yWJ7vFRh7lyNhG4jRNmW4Jt5CyyggwiqK78nrVsouJmn14Bhk9Oohzw==", - "license": "Apache-2.0", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@platformatic/kafka/-/kafka-1.20.0.tgz", + "integrity": "sha512-TubyEQRlsmstdx9xQAu5TspG0rFW/FAwqxdX0BzZgo3dHDmx49MhCcXFnDFW1c39Fci7emHSFe4BfORevKCwJA==", "dependencies": { "ajv": "^8.17.1", "debug": "^4.4.3", @@ -5943,7 +5934,6 @@ "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.1.tgz", "integrity": "sha512-/KCsg3xSlR+nCK8/8ZYSknYxvXHwubJrU82F3Lm1Fp6789VQ0/3RJKfsmRXjqfaTA++23CvC3hqmqe/2GEt6Kw==", "license": "MIT", - "peer": true, "dependencies": { "cluster-key-slot": "1.1.2", "generic-pool": "3.9.0", @@ -7114,6 +7104,12 @@ "text-hex": "1.0.x" } }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "dev": true + }, "node_modules/@stylistic/eslint-plugin": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.5.0.tgz", @@ -7444,7 +7440,6 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.0.tgz", "integrity": "sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^5.0.0", @@ -7535,7 +7530,6 @@ "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.15.0.tgz", "integrity": "sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==", "license": "MIT", - "peer": true, "dependencies": { "@types/accepts": "*", "@types/content-disposition": "*", @@ -7706,11 +7700,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz", - "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==", - "license": "MIT", - "peer": true, + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", "dependencies": { "undici-types": "~7.16.0" } @@ -8067,7 +8059,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.46.2", "@typescript-eslint/types": "8.46.2", @@ -8560,7 +8551,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -9461,7 +9451,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.19", "caniuse-lite": "^1.0.30001751", @@ -11358,7 +11347,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -12878,7 +12866,6 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.0.tgz", "integrity": "sha512-iy2GE3MHrYTL5lrCtMZ0X1KLEKKUjmK0kzwcnefhR66txcEmXZD2YWgR5GNdcEwkNx3a0siYkSvl0vIC+Svjmg==", "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -15412,11 +15399,9 @@ "license": "MIT" }, "node_modules/graphql": { - "version": "16.11.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.11.0.tgz", - "integrity": "sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==", - "license": "MIT", - "peer": true, + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz", + "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -15734,15 +15719,6 @@ "node": ">=18.0.0" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "license": "BSD-3-Clause", - "dependencies": { - "react-is": "^16.7.0" - } - }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -17435,6 +17411,15 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "optional": true, + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/jose": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", @@ -17464,7 +17449,6 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "license": "MIT", - "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -17681,7 +17665,6 @@ "resolved": "https://registry.npmjs.org/koa/-/koa-2.16.3.tgz", "integrity": "sha512-zPPuIt+ku1iCpFBRwseMcPYQ1cJL8l60rSmKeOuGfOXyE6YnTBmf2aEFNL2HQGrD0cPcLO/t+v9RTgC+fwEh/g==", "license": "MIT", - "peer": true, "dependencies": { "accepts": "^1.3.5", "cache-content-type": "^1.0.0", @@ -18662,6 +18645,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -18674,6 +18658,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/loupe": { @@ -20203,18 +20188,34 @@ } }, "node_modules/nock": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", - "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", + "version": "14.0.10", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.10.tgz", + "integrity": "sha512-Q7HjkpyPeLa0ZVZC5qpxBt5EyLczFJ91MEewQiIi9taWuA0KB/MDJlUWtON+7dGouVdADTQsf9RA7TZk6D8VMw==", "dev": true, - "license": "MIT", "dependencies": { - "debug": "^4.1.0", + "@mswjs/interceptors": "^0.39.5", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, "engines": { - "node": ">= 10.13" + "node": ">=18.20.0 <20 || >=20.12.1" + } + }, + "node_modules/nock/node_modules/@mswjs/interceptors": { + "version": "0.39.8", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.8.tgz", + "integrity": "sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA==", + "dev": true, + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/node-abort-controller": { @@ -20958,7 +20959,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", "@yarnpkg/lockfile": "^1.1.0", @@ -22686,17 +22686,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", @@ -22923,12 +22912,6 @@ "node": ">= 0.8" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" - }, "node_modules/read": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/read/-/read-3.0.1.tgz", @@ -23348,24 +23331,6 @@ "node": ">=6" } }, - "node_modules/rehackt": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz", - "integrity": "sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "*" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - } - } - }, "node_modules/relative-microtime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/relative-microtime/-/relative-microtime-2.0.0.tgz", @@ -25145,15 +25110,6 @@ "tslib": "^2.0.3" } }, - "node_modules/symbol-observable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", - "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/table-layout": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-4.1.1.tgz", @@ -25389,7 +25345,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -25701,18 +25656,6 @@ "url": "https://github.com/sponsors/ts-graphviz" } }, - "node_modules/ts-invariant": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", - "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", @@ -26015,7 +25958,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -26588,7 +26530,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.12.tgz", "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -26702,7 +26643,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -26731,7 +26671,6 @@ "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "license": "MIT", - "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", @@ -26821,7 +26760,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -27562,21 +27500,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zen-observable": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", - "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==", - "license": "MIT" - }, - "node_modules/zen-observable-ts": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", - "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", - "license": "MIT", - "dependencies": { - "zen-observable": "0.8.15" - } - }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", @@ -27942,47 +27865,181 @@ "version": "1.0.13", "license": "MIT", "dependencies": { - "@apollo/client": "^3.11.8", - "chalk": "^5.3.0", + "@apollo/client": "^4.0.9", + "chalk": "^5.6.2", "color-hash": "^2.0.2", - "graphql": "^16.9.0", + "graphql": "^16.12.0", "js-yaml": "^4.1.0", "lodash": "^4.17.21", "node-fetch": "^3.3.2", "promise-streams": "^2.1.1", - "readdirp": "^4.0.2", + "readdirp": "^4.1.2", "through2": "^4.0.2", "yaml-document-stream": "^1.1.0" }, "devDependencies": { "@restorecommerce/dev": "^0.2.0", "@types/color-hash": "^2.0.0", - "@types/node": "^22.7.9", + "@types/node": "^24.10.0", "@types/through2": "^2.0.41", - "@typescript-eslint/eslint-plugin": "^8.45.0", - "@typescript-eslint/parser": "^8.45.0", - "@vitest/coverage-v8": "^3.2.4", - "eslint": "^9.36.0", + "@typescript-eslint/eslint-plugin": "^8.46.2", + "@typescript-eslint/parser": "^8.46.2", + "@vitest/coverage-v8": "^4.0.6", + "eslint": "^9.39.0", "eslint-plugin-prefer-arrow-functions": "^3.9.1", - "msw": "^2.5.2", - "nock": "^13.5.5", + "msw": "^2.11.6", + "nock": "^14.0.10", "npm-run-all": "^4.1.5", - "ts-node": "^10.9.1", - "typescript": "^5.1.6", - "vitest": "^3.2.4" + "ts-node": "^10.9.2", + "typescript": "^5.9.3", + "vitest": "^4.0.6" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 18.20.0" } }, - "packages/gql-bot/node_modules/@types/node": { - "version": "22.18.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.13.tgz", - "integrity": "sha512-Bo45YKIjnmFtv6I1TuC8AaHBbqXtIo+Om5fE4QiU1Tj8QR/qt+8O3BAtOimG5IFmwaWiPmB3Mv3jtYzBA4Us2A==", + "packages/gql-bot/node_modules/@vitest/coverage-v8": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.6.tgz", + "integrity": "sha512-cv6pFXj9/Otk7q1Ocoj8k3BUVVwnFr3jqcqpwYrU5LkKClU9DpaMEdX+zptx/RyIJS+/VpoxMWmfISXchmVDPQ==", "dev": true, - "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "@bcoe/v8-coverage": "^1.0.2", + "@vitest/utils": "4.0.6", + "ast-v8-to-istanbul": "^0.3.5", + "debug": "^4.4.3", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.2.0", + "magicast": "^0.3.5", + "std-env": "^3.9.0", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "4.0.6", + "vitest": "4.0.6" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "packages/gql-bot/node_modules/@vitest/expect": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.6.tgz", + "integrity": "sha512-5j8UUlBVhOjhj4lR2Nt9sEV8b4WtbcYh8vnfhTNA2Kn5+smtevzjNq+xlBuVhnFGXiyPPNzGrOVvmyHWkS5QGg==", + "dev": true, + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.0.6", + "@vitest/utils": "4.0.6", + "chai": "^6.0.1", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/@vitest/mocker": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.6.tgz", + "integrity": "sha512-3COEIew5HqdzBFEYN9+u0dT3i/NCwppLnO1HkjGfAP1Vs3vti1Hxm/MvcbC4DAn3Szo1M7M3otiAaT83jvqIjA==", + "dev": true, + "dependencies": { + "@vitest/spy": "4.0.6", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.19" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "packages/gql-bot/node_modules/@vitest/pretty-format": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.6.tgz", + "integrity": "sha512-4vptgNkLIA1W1Nn5X4x8rLJBzPiJwnPc+awKtfBE5hNMVsoAl/JCCPPzNrbf+L4NKgklsis5Yp2gYa+XAS442g==", + "dev": true, + "dependencies": { + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/@vitest/runner": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.6.tgz", + "integrity": "sha512-trPk5qpd7Jj+AiLZbV/e+KiiaGXZ8ECsRxtnPnCrJr9OW2mLB72Cb824IXgxVz/mVU3Aj4VebY+tDTPn++j1Og==", + "dev": true, + "dependencies": { + "@vitest/utils": "4.0.6", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/@vitest/snapshot": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.6.tgz", + "integrity": "sha512-PaYLt7n2YzuvxhulDDu6c9EosiRuIE+FI2ECKs6yvHyhoga+2TBWI8dwBjs+IeuQaMtZTfioa9tj3uZb7nev1g==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "4.0.6", + "magic-string": "^0.30.19", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/@vitest/spy": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.6.tgz", + "integrity": "sha512-g9jTUYPV1LtRPRCQfhbMintW7BTQz1n6WXYQYRQ25qkyffA4bjVXjkROokZnv7t07OqfaFKw1lPzqKGk1hmNuQ==", + "dev": true, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/@vitest/utils": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.6.tgz", + "integrity": "sha512-bG43VS3iYKrMIZXBo+y8Pti0O7uNju3KvNn6DrQWhQQKcLavMB+0NZfO1/QBAEbq0MaQ3QjNsnnXlGQvsh0Z6A==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "4.0.6", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/gql-bot/node_modules/chai": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.0.tgz", + "integrity": "sha512-aUTnJc/JipRzJrNADXVvpVqi6CO0dn3nx4EVPxijri+fj3LUUDyZQOgVeW54Ob3Y1Xh9Iz8f+CgaCl8v0mn9bA==", + "dev": true, + "engines": { + "node": ">=18" } }, "packages/gql-bot/node_modules/chalk": { @@ -27995,12 +28052,136 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "packages/gql-bot/node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "packages/gql-bot/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "packages/gql-bot/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "packages/gql-bot/node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "packages/gql-bot/node_modules/tinyrainbow": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", + "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "packages/gql-bot/node_modules/vitest": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.6.tgz", + "integrity": "sha512-gR7INfiVRwnEOkCk47faros/9McCZMp5LM+OMNWGLaDBSvJxIzwjgNFufkuePBNaesGRnLmNfW+ddbUJRZn0nQ==", + "dev": true, + "dependencies": { + "@vitest/expect": "4.0.6", + "@vitest/mocker": "4.0.6", + "@vitest/pretty-format": "4.0.6", + "@vitest/runner": "4.0.6", + "@vitest/snapshot": "4.0.6", + "@vitest/spy": "4.0.6", + "@vitest/utils": "4.0.6", + "debug": "^4.4.3", + "es-module-lexer": "^1.7.0", + "expect-type": "^1.2.2", + "magic-string": "^0.30.19", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.0.3", + "vite": "^6.0.0 || ^7.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.0.6", + "@vitest/browser-preview": "4.0.6", + "@vitest/browser-webdriverio": "4.0.6", + "@vitest/ui": "4.0.6", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } }, "packages/grpc-client": { "name": "@restorecommerce/grpc-client", @@ -28158,7 +28339,7 @@ "version": "1.3.6", "license": "MIT", "dependencies": { - "@platformatic/kafka": "1.18.0", + "@platformatic/kafka": "1.20.0", "@restorecommerce/logger": "^1.3.8", "@restorecommerce/rc-grpc-clients": "^5.1.63", "async": "^3.2.6", diff --git a/packages/chassis-srv/src/offsets/index.ts b/packages/chassis-srv/src/offsets/index.ts index 2fd3f8b5..35b0f7b4 100644 --- a/packages/chassis-srv/src/offsets/index.ts +++ b/packages/chassis-srv/src/offsets/index.ts @@ -96,7 +96,7 @@ export class OffsetStore { 'The offset value retreived from redis for topic is:', { topicName, offsetValue: Number(offsetValue) } ); - return BigInt(Number(offsetValue) || 0); + return BigInt(offsetValue || 0); } /** diff --git a/packages/gql-bot/package.json b/packages/gql-bot/package.json index 44de1f3a..a5cc0f89 100755 --- a/packages/gql-bot/package.json +++ b/packages/gql-bot/package.json @@ -17,34 +17,34 @@ ], "type": "module", "dependencies": { - "@apollo/client": "^3.11.8", - "chalk": "^5.3.0", + "@apollo/client": "^4.0.9", + "chalk": "^5.6.2", "color-hash": "^2.0.2", - "graphql": "^16.9.0", + "graphql": "^16.12.0", "js-yaml": "^4.1.0", "lodash": "^4.17.21", "node-fetch": "^3.3.2", "promise-streams": "^2.1.1", - "readdirp": "^4.0.2", + "readdirp": "^4.1.2", "through2": "^4.0.2", "yaml-document-stream": "^1.1.0" }, "devDependencies": { "@restorecommerce/dev": "^0.2.0", "@types/color-hash": "^2.0.0", - "@types/node": "^22.7.9", + "@types/node": "^24.10.0", "@types/through2": "^2.0.41", - "@typescript-eslint/eslint-plugin": "^8.45.0", - "@typescript-eslint/parser": "^8.45.0", - "@vitest/coverage-v8": "^3.2.4", - "eslint": "^9.36.0", + "@typescript-eslint/eslint-plugin": "^8.46.2", + "@typescript-eslint/parser": "^8.46.2", + "@vitest/coverage-v8": "^4.0.6", + "eslint": "^9.39.0", "eslint-plugin-prefer-arrow-functions": "^3.9.1", - "msw": "^2.5.2", - "nock": "^13.5.5", + "msw": "^2.11.6", + "nock": "^14.0.10", "npm-run-all": "^4.1.5", - "ts-node": "^10.9.1", - "typescript": "^5.1.6", - "vitest": "^3.2.4" + "ts-node": "^10.9.2", + "typescript": "^5.9.3", + "vitest": "^4.0.6" }, "scripts": { "pretest": "npm run lint", @@ -55,7 +55,7 @@ "build": "npm-run-all lint build:clean build:tsc" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 18.20.0" }, "nx": { "targets": { diff --git a/packages/gql-bot/src/client.ts b/packages/gql-bot/src/client.ts index b2edb070..92952257 100644 --- a/packages/gql-bot/src/client.ts +++ b/packages/gql-bot/src/client.ts @@ -3,11 +3,13 @@ import * as url from 'url'; import * as fs from 'fs'; import { ApolloClient } from '@apollo/client/core'; import { InMemoryCache } from '@apollo/client/cache'; -import { HttpOptions, createHttpLink } from '@apollo/client/link/http'; +import { HttpLink } from '@apollo/client/link/http'; import * as https from 'https'; import { processResponse } from './utils.js'; import {parse} from 'graphql'; +type HttpOptions = ConstructorParameters[0]; + const _checkVariableMutation = (mutation: string): boolean => { const mutationName = mutation.slice(mutation.indexOf(' '), mutation.indexOf('($')); @@ -185,10 +187,10 @@ export class Client { if (ignoreSelfSigned) { apolloLinkOpts.fetchOptions = { agent: new https.Agent({rejectUnauthorized: false}), - }; + } as any; } - const apolloLink = createHttpLink(apolloLinkOpts); + const apolloLink = new HttpLink(apolloLinkOpts); const apolloCache = new InMemoryCache(); const apolloClient = new ApolloClient({ diff --git a/packages/kafka-client/package.json b/packages/kafka-client/package.json index 6e90312b..8847abc4 100644 --- a/packages/kafka-client/package.json +++ b/packages/kafka-client/package.json @@ -18,7 +18,7 @@ "type": "module", "typings": "lib/index.d.ts", "dependencies": { - "@platformatic/kafka": "1.18.0", + "@platformatic/kafka": "1.20.0", "@restorecommerce/logger": "^1.3.8", "@restorecommerce/rc-grpc-clients": "^5.1.63", "async": "^3.2.6", diff --git a/packages/kafka-client/src/events/provider/kafka/index.ts b/packages/kafka-client/src/events/provider/kafka/index.ts index 3c904257..1a76eb81 100644 --- a/packages/kafka-client/src/events/provider/kafka/index.ts +++ b/packages/kafka-client/src/events/provider/kafka/index.ts @@ -54,7 +54,7 @@ export class Topic { this.provider = provider; this.subscribed = []; this.waitQueue = []; - this.currentOffset = BigInt(0); + this.currentOffset = 0n; this.config = config; this.manualOffsetCommit = manualOffsetCommit; } @@ -150,11 +150,11 @@ export class Topic { * @param {bigint} time Use -1 for latest and 0 for earliest. * @return {bigint} offset number */ - async $offset(time: bigint = BigInt(-1)): Promise { + async $offset(time: bigint = -1n): Promise { await this.initConsumerIfNotExists(); return new Promise((resolve, reject) => { - if (time < BigInt(0)) { + if (time < 0n) { this.consumer.listOffsets({ topics: [this.name], }).then((r) => { @@ -481,13 +481,13 @@ export class Topic { async on(eventName: string, listener: any, opts: SubscriptionOptions = {}): Promise { let { startingOffset } = opts; const { queue, forceOffset } = opts; - if (!(this.subscribed.indexOf(eventName) > -1)) { + if (!(this.subscribed.includes(eventName))) { if (isNullish(startingOffset) || (this.config.latestOffset && !forceOffset)) { // override the startingOffset with the latestOffset from Kafka // if above config is set - startingOffset = await this.$offset(BigInt(-1)); + startingOffset = await this.$offset(-1n); } - await this.$subscribe(eventName, startingOffset, queue); + await this.$subscribe(eventName, BigInt(startingOffset), queue); } this.emitter.on(eventName, listener); } diff --git a/packages/scs-jobs/src/index.ts b/packages/scs-jobs/src/index.ts index fa593880..4fc25d68 100644 --- a/packages/scs-jobs/src/index.ts +++ b/packages/scs-jobs/src/index.ts @@ -204,6 +204,7 @@ export const runWorker = async ( return worker; }; + export type RunWorkerFunc = typeof runWorker; export type DefaultExportFunc = ( cfg: ServiceConfig, @@ -211,4 +212,24 @@ export type DefaultExportFunc = ( events: Events, runWorker: RunWorkerFunc, ) => Promise; + +const workers = new Array(); +export function register(...worker: DefaultExportFunc[]) { + workers.push(...worker); +} + +export async function execute( + cfg: ServiceConfig, + logger: Logger, + events: Events, + runWorker: RunWorkerFunc, +) { + await Promise.allSettled( + workers.map( + w => w(cfg, logger, events, runWorker) + ) + ); +} + export * from './types.js'; +export default execute;