diff --git a/CHANGELOG.md b/CHANGELOG.md index 5363f8b7d..93aa60d3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [17.6.1](https://github.com/mojaloop/central-ledger/compare/v17.6.0...v17.6.1) (2024-03-28) + + +### Bug Fixes + +* cluster performance testing issues ([#996](https://github.com/mojaloop/central-ledger/issues/996)) ([6bc8aeb](https://github.com/mojaloop/central-ledger/commit/6bc8aebef5d4e4e5ec3072d7450f5cac2199800d)) + + +### Tests + +* fix disconnect errors ([#998](https://github.com/mojaloop/central-ledger/issues/998)) ([34f5418](https://github.com/mojaloop/central-ledger/commit/34f54188caaafffab51044a1b5e113b92eb9f53c)) + ## [17.6.0](https://github.com/mojaloop/central-ledger/compare/v17.5.0...v17.6.0) (2023-12-20) diff --git a/audit-ci.jsonc b/audit-ci.jsonc index 47092753f..0f6ab0ae0 100644 --- a/audit-ci.jsonc +++ b/audit-ci.jsonc @@ -4,26 +4,24 @@ // Only use one of ["low": true, "moderate": true, "high": true, "critical": true] "moderate": true, "allowlist": [ // NOTE: Please add as much information as possible to any items added to the allowList - "GHSA-v88g-cgmw-v5xw", // widdershins>swagger2openapi>oas-validator>ajv - "GHSA-mg85-8mv5-ffjr", // hapi>ammo - "GHSA-phwq-j96m-2c2q", // @mojaloop/central-services-shared>shins>ejs - "GHSA-7hx8-2rxv-66xv", // hapi - "GHSA-c429-5p7v-vgjp", // hapi>boom>hoek - "GHSA-c429-5p7v-vgjp", // hapi>hoek - "GHSA-c429-5p7v-vgjp", // hapi-auth-basic>hoek - "GHSA-282f-qqgm-c34q", // widdershins>swagger2openapi>better-ajv-errors>jsonpointer - "GHSA-8cf7-32gw-wr33", // @now-ims/hapi-now-auth>jsonwebtoken - "GHSA-hjrf-2m68-5959", // @now-ims/hapi-now-auth>jsonwebtoken - "GHSA-qwph-4952-7xr6", // @now-ims/hapi-now-auth>jsonwebtoken - "GHSA-6vfc-qv3f-vr6c", // widdershins>markdown-it - "GHSA-7fh5-64p2-3v2j", // @mojaloop/central-services-shared>shins>sanitize-html>postcss - "GHSA-mjxr-4v3x-q3m4", // @mojaloop/central-services-shared>shins>sanitize-html - "GHSA-rjqq-98f6-6j3r", // @mojaloop/central-services-shared>shins>sanitize-html - "GHSA-rm97-x556-q36h", // @mojaloop/central-services-shared>shins>sanitize-html - "GHSA-g64q-3vg8-8f93", // hapi>subtext - "GHSA-5854-jvxx-2cg9", // hapi>subtext - "GHSA-2mvq-xp48-4c77", // hapi>subtext - "GHSA-w5p7-h5w8-2hfq", // tap-spec>tap-out>trim - "GHSA-p9pc-299p-vxgp" // widdershins>yargs>yargs-parser + "GHSA-v88g-cgmw-v5xw", // widdershins>swagger2openapi>oas-validator>ajv + "GHSA-mg85-8mv5-ffjr", // hapi-auth-basic>hapi>ammo + "GHSA-phwq-j96m-2c2q", // @mojaloop/central-services-shared>shins>ejs + "GHSA-7hx8-2rxv-66xv", // hapi-auth-basic>hapi + "GHSA-c429-5p7v-vgjp", // hapi>boom>hoek + "GHSA-282f-qqgm-c34q", // widdershins>swagger2openapi>better-ajv-errors>jsonpointer + "GHSA-8cf7-32gw-wr33", // @now-ims/hapi-now-auth>jsonwebtoken + "GHSA-hjrf-2m68-5959", // @now-ims/hapi-now-auth>jsonwebtoken + "GHSA-qwph-4952-7xr6", // @now-ims/hapi-now-auth>jsonwebtoken + "GHSA-6vfc-qv3f-vr6c", // widdershins>markdown-it + "GHSA-7fh5-64p2-3v2j", // @mojaloop/central-services-shared>shins>sanitize-html>postcss + "GHSA-mjxr-4v3x-q3m4", // @mojaloop/central-services-shared>shins>sanitize-html + "GHSA-rjqq-98f6-6j3r", // @mojaloop/central-services-shared>shins>sanitize-html + "GHSA-rm97-x556-q36h", // @mojaloop/central-services-shared>shins>sanitize-html + "GHSA-g64q-3vg8-8f93", // hapi-auth-basic>hapi>subtext + "GHSA-5854-jvxx-2cg9", // hapi-auth-basic>hapi>subtext + "GHSA-2mvq-xp48-4c77", // hapi-auth-basic>hapi>subtext + "GHSA-w5p7-h5w8-2hfq", // tap-spec>tap-out>trim + "GHSA-p9pc-299p-vxgp" // widdershins>yargs>yargs-parser ] -} \ No newline at end of file +} diff --git a/config/default.json b/config/default.json index 7dce253c6..a244a7b1f 100644 --- a/config/default.json +++ b/config/default.json @@ -294,7 +294,6 @@ "metadata.broker.list": "localhost:9092", "socket.keepalive.enable": true, "allow.auto.create.topics": true, - "partition.assignment.strategy": "cooperative-sticky", "enable.auto.commit": false }, "topicConf": { @@ -320,7 +319,6 @@ "metadata.broker.list": "localhost:9092", "socket.keepalive.enable": true, "allow.auto.create.topics": true, - "partition.assignment.strategy": "cooperative-sticky", "enable.auto.commit": false }, "topicConf": { diff --git a/package-lock.json b/package-lock.json index 13769a5b0..37d21523f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,18 +11,18 @@ "dependencies": { "@hapi/catbox-memory": "6.0.1", "@hapi/good": "9.0.1", - "@hapi/hapi": "21.3.3", + "@hapi/hapi": "21.3.7", "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", - "@mojaloop/central-services-error-handling": "12.0.7", - "@mojaloop/central-services-health": "14.0.2", - "@mojaloop/central-services-logger": "11.2.2", + "@mojaloop/central-services-error-handling": "13.0.0", + "@mojaloop/central-services-health": "15.0.0", + "@mojaloop/central-services-logger": "11.3.0", "@mojaloop/central-services-metrics": "12.0.8", "@mojaloop/central-services-shared": "18.2.1-snapshot.1", - "@mojaloop/central-services-stream": "11.2.0", + "@mojaloop/central-services-stream": "11.2.4", "@mojaloop/database-lib": "11.0.3", - "@mojaloop/event-sdk": "14.0.0", + "@mojaloop/event-sdk": "14.0.1", "@mojaloop/ml-number": "11.2.3", "@mojaloop/object-store-lib": "12.0.2", "@now-ims/hapi-now-auth": "2.1.0", @@ -36,7 +36,7 @@ "docdash": "2.0.2", "event-stream": "4.0.1", "five-bells-condition": "5.0.1", - "glob": "10.3.10", + "glob": "10.3.12", "hapi-auth-basic": "5.0.0", "hapi-auth-bearer-token": "8.0.0", "hapi-swagger": "17.2.1", @@ -55,7 +55,7 @@ "jsdoc": "4.0.2", "jsonpath": "1.1.1", "nodemon": "3.1.0", - "npm-check-updates": "16.14.15", + "npm-check-updates": "16.14.18", "nyc": "15.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", @@ -82,13 +82,13 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -153,11 +153,11 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.23.4", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { @@ -229,30 +229,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", + "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", - "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", + "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-compilation-targets": "^7.23.6", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.3", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.0", - "@babel/parser": "^7.24.0", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", - "@babel/types": "^7.24.0", + "@babel/helpers": "^7.23.2", + "@babel/parser": "^7.23.3", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.3", + "@babel/types": "^7.23.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -283,12 +283,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", + "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", + "@babel/types": "^7.23.3", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -298,14 +298,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -427,9 +427,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" @@ -444,32 +444,32 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", - "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -544,9 +544,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", + "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -556,9 +556,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", - "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -567,34 +567,34 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", + "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.3", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", + "debug": "^4.1.0", "globals": "^11.1.0" }, "engines": { @@ -602,12 +602,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", + "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-string-parser": "^7.22.5", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -619,6 +619,8 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, "engines": { "node": ">=0.1.90" } @@ -658,9 +660,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -707,9 +709,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -752,9 +754,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -772,15 +774,15 @@ "dev": true }, "node_modules/@grpc/grpc-js": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz", - "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.3.tgz", + "integrity": "sha512-qiO9MNgYnwbvZ8MK0YLWbnGrNX3zTcj6/Ef7UHu5ZofER3e2nF3Y35GaPo9qNJJ/UJQKa4KL+z/F4Q8Q+uCdUQ==", "dependencies": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" + "@grpc/proto-loader": "^0.7.10", + "@js-sdsl/ordered-map": "^4.4.2" }, "engines": { - "node": "^8.13.0 || >=10.10.0" + "node": ">=12.10.0" } }, "node_modules/@grpc/proto-loader": { @@ -946,9 +948,9 @@ "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" }, "node_modules/@hapi/hapi": { - "version": "21.3.3", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.3.tgz", - "integrity": "sha512-6pgwWVl/aSKSNVn86n+mWa06jRqCAKi2adZp/Hti19A0u5x3/6eiKz8UTBPMzfrdGf9WcrYbFBYzWr/qd2s28g==", + "version": "21.3.7", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.7.tgz", + "integrity": "sha512-33J0nreMfqkhY7wwRAZRy+9J+7J4QOH1JtICMjIUmxfaOYSJL/d8JJCtg57SX60944bhlCeu7isb7qyr2jT2oA==", "dependencies": { "@hapi/accept": "^6.0.1", "@hapi/ammo": "^6.0.1", @@ -1002,9 +1004,9 @@ } }, "node_modules/@hapi/hoek": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", - "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==" + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.2.tgz", + "integrity": "sha512-aKmlCO57XFZ26wso4rJsW4oTUnrgTFw2jh3io7CAtO9w4UltBNwRXvXIVzzyfkaaLRo3nluP/19msA8vDUUuKw==" }, "node_modules/@hapi/inert": { "version": "7.1.0", @@ -1277,13 +1279,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", "minimatch": "^3.0.5" }, "engines": { @@ -1326,9 +1328,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@hutson/parse-repository-url": { @@ -1459,12 +1461,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -1475,32 +1471,32 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.2.1", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, "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==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1513,24 +1509,33 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" }, "node_modules/@jsdoc/salty": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.7.tgz", - "integrity": "sha512-mh8LbS9d4Jq84KLw8pzho7XC2q2/IJGiJss3xwRoLD1A+EE16SjN4PfaG4jRCzKegTFLlN0Zd8SdUPE6XdoPFg==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", + "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", "dependencies": { "lodash": "^4.17.21" }, @@ -1539,14 +1544,14 @@ } }, "node_modules/@mojaloop/central-services-error-handling": { - "version": "12.0.7", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-12.0.7.tgz", - "integrity": "sha512-Pf32Y1U6gvrCjyueK+eI7avqAAUJFMXmbCLkU8M/PA+6/rrKDjBVJGgVgMUAeZyKaH3JcdjS9Pd0LcAylF4dsQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-13.0.0.tgz", + "integrity": "sha512-U+XKSQJ8/QmDo3LVQ3bxzgUcdwf5iZakbeNIGTH0Sy9RL36aYMFOj9JFTqvM8yBwCyiUwFMHVnV1wv+TX9KBLw==", "dependencies": { "lodash": "4.17.21" }, "peerDependencies": { - "@mojaloop/sdk-standard-components": "17.x.x" + "@mojaloop/sdk-standard-components": ">=17.x.x" }, "peerDependenciesMeta": { "@mojaloop/sdk-standard-components": { @@ -1555,16 +1560,16 @@ } }, "node_modules/@mojaloop/central-services-health": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-health/-/central-services-health-14.0.2.tgz", - "integrity": "sha512-WW57T2Kq5LCJz5wJNQdwez1uOblNA4QZngHv2hKkD1HN1rafyLYNSrXaceBeeK8TYPmxVrtqArQ0SjSp8JyQIA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-health/-/central-services-health-15.0.0.tgz", + "integrity": "sha512-z0vIyK9XGnIIaOfHADG3IDeLw2puJKlEDReJeNxMSocwhiacIm+xLbE0CMyM1lFSQGmr4USg9LP9Y9tdOznkyg==", "dependencies": { - "@hapi/hapi": "21.3.2", + "@hapi/hapi": "21.3.6", "tslib": "2.6.2" }, "peerDependencies": { - "@mojaloop/central-services-error-handling": "12.x.x", - "@mojaloop/central-services-logger": "11.x.x" + "@mojaloop/central-services-error-handling": ">=12.x.x", + "@mojaloop/central-services-logger": ">=11.x.x" }, "peerDependenciesMeta": { "@mojaloop/central-services-error-handling": { @@ -1576,9 +1581,9 @@ } }, "node_modules/@mojaloop/central-services-health/node_modules/@hapi/hapi": { - "version": "21.3.2", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.2.tgz", - "integrity": "sha512-tbm0zmsdUj8iw4NzFV30FST/W4qzh/Lsw6Q5o5gAhOuoirWvxm8a4G3o60bqBw8nXvRNJ8uLtE0RKLlZINxHcQ==", + "version": "21.3.6", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.6.tgz", + "integrity": "sha512-fbJ7QYQZl7Ixe6fmKjJbVO3zUrDa5aY+4xn7xBvJFXw6be76B4d28qknrD2la1aXo6GIhTUsJnqzU2awqmG0Sg==", "dependencies": { "@hapi/accept": "^6.0.1", "@hapi/ammo": "^6.0.1", @@ -1613,15 +1618,15 @@ } }, "node_modules/@mojaloop/central-services-logger": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-11.2.2.tgz", - "integrity": "sha512-EMlhCs1CoWG4zQfftOKQmJjlaSxUXfXOdNLZmkPn2t0jrt5fvbkfRWl0Nl0ppSRKRto7BEGYD/8RGLnOdYTtgA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-11.3.0.tgz", + "integrity": "sha512-5OcrTRKJhc6nSdbePwYMM/m6+qnJpkvwV7kY+R1oBqo5gFGBFpBx0Hrf7bg+P2cB/M9P7ZK8MrOq41WFHbWt7Q==", "dependencies": { - "@types/node": "^20.5.7", + "@types/node": "^20.11.30", "parse-strings-in-object": "2.0.0", "rc": "1.2.8", "safe-stable-stringify": "^2.4.3", - "winston": "3.10.0" + "winston": "3.12.0" } }, "node_modules/@mojaloop/central-services-metrics": { @@ -1707,17 +1712,18 @@ "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" }, "node_modules/@mojaloop/central-services-stream": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-stream/-/central-services-stream-11.2.0.tgz", - "integrity": "sha512-MH/8cMx0AGCpuu/dRy20oeLaQkwUGN/29yzSSYHlMjbMFya3HbvKSkLiCteLE0Jrp+r/5Wl8SiXbvvMShz/dgQ==", + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-stream/-/central-services-stream-11.2.4.tgz", + "integrity": "sha512-XAuHkBL0jn2SvQy7OMZvQvc9DqIqyBYCXMWbwSW+pcZEr8X1rLAgNCXOhFnnXgcCkp6f9PDLlGI9ZF3BpGyVaQ==", "dependencies": { - "async": "3.2.4", + "async": "3.2.5", + "async-exit-hook": "2.0.1", "events": "3.3.0", - "node-rdkafka": "2.17.0" + "node-rdkafka": "2.18.0" }, "peerDependencies": { - "@mojaloop/central-services-error-handling": "12.x.x", - "@mojaloop/central-services-logger": "11.x.x" + "@mojaloop/central-services-error-handling": ">=12.x.x", + "@mojaloop/central-services-logger": ">=11.x.x" }, "peerDependenciesMeta": { "@mojaloop/central-services-error-handling": { @@ -1796,33 +1802,28 @@ } } }, - "node_modules/@mojaloop/database-lib/node_modules/pg-connection-string": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.1.tgz", - "integrity": "sha512-w6ZzNu6oMmIzEAYVw+RLK0+nqHPt8K3ZnknKi+g48Ak2pr3dtljJW3o+D/n2zzCG07Zoe9VOX3aiKpj+BN0pjg==" - }, "node_modules/@mojaloop/event-sdk": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-14.0.0.tgz", - "integrity": "sha512-grwC4QYz5aHgMOhGQ7uJKF73OEagSkTlDe2MSNOQvoKGfk8woX9AoTGEWyyNDdLRiRj+445jek0iqlfXxHg4Gg==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-14.0.1.tgz", + "integrity": "sha512-zafqzXi+m9S9b/kLoCrA9Rtw+mcHtPHf0SCEpNax/63UBn8aEWMtQFEUUrBeJ/Dm6AwpuHsiCFOSutz1TsTzJw==", "dependencies": { - "@grpc/grpc-js": "^1.9.9", + "@grpc/grpc-js": "^1.10.3", "@grpc/proto-loader": "0.7.10", "brototype": "0.0.6", "error-callsites": "2.0.4", "lodash": "4.17.21", - "moment": "2.29.4", + "moment": "2.30.1", "parse-strings-in-object": "2.0.0", - "protobufjs": "7.2.5", + "protobufjs": "7.2.6", "rc": "1.2.8", "serialize-error": "8.1.0", "traceparent": "1.0.0", "tslib": "2.6.2", "uuid4": "2.0.3", - "winston": "3.11.0" + "winston": "3.12.0" }, "peerDependencies": { - "@mojaloop/central-services-logger": "11.x.x" + "@mojaloop/central-services-logger": ">=11.x.x" }, "peerDependenciesMeta": { "@mojaloop/central-services-logger": { @@ -1830,56 +1831,6 @@ } } }, - "node_modules/@mojaloop/event-sdk/node_modules/@colors/colors": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", - "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@mojaloop/event-sdk/node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "engines": { - "node": "*" - } - }, - "node_modules/@mojaloop/event-sdk/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@mojaloop/event-sdk/node_modules/winston": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.11.0.tgz", - "integrity": "sha512-L3yR6/MzZAOl0DsysUXHVjOwv8mKZ71TrA/41EIduGpOOV5LQVodqN+QdQ6BS6PJ/RdIshZhq84P/fStEZkk7g==", - "dependencies": { - "@colors/colors": "^1.6.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@mojaloop/ml-number": { "version": "11.2.3", "resolved": "https://registry.npmjs.org/@mojaloop/ml-number/-/ml-number-11.2.3.tgz", @@ -1905,22 +1856,22 @@ } }, "node_modules/@mojaloop/sdk-standard-components": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-17.4.0.tgz", - "integrity": "sha512-DheZ4LN/pLjVr1LPYTjAppEGkIVo4R5WYjHh/9GlxXPF4iN5Y9Tn/ZMDeU1WTpKHIoA3wbp7xM/7hkhnmGWBmw==", + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-17.1.3.tgz", + "integrity": "sha512-+I7oh2otnGOgi3oOKsr1v7lm7/e5C5KnZNP+qW2XFObUjfg+2glESdRGBHK2pc1WO8NlE+9g0NuepR+qnUqZdg==", "peer": true, "dependencies": { "base64url": "3.0.1", "fast-safe-stringify": "^2.1.1", "ilp-packet": "2.2.0", - "jsonwebtoken": "9.0.2", + "jsonwebtoken": "9.0.1", "jws": "4.0.0" } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", - "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", + "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", "optional": true, "dependencies": { "sparse-bitfield": "^3.0.3" @@ -2345,9 +2296,9 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", "dependencies": { "@hapi/hoek": "^9.0.0" } @@ -2428,9 +2379,9 @@ } }, "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -2538,9 +2489,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==" + "version": "4.14.201", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.201.tgz", + "integrity": "sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ==" }, "node_modules/@types/lodash.clonedeep": { "version": "4.5.9", @@ -2551,9 +2502,9 @@ } }, "node_modules/@types/luxon": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.8.tgz", - "integrity": "sha512-jYvz8UMLDgy3a5SkGJne8H7VA7zPV2Lwohjx0V8V31+SqAjNmurWMkk9cQhfvlcnXWudBpK9xPM1n4rljOcHYQ==" + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.4.tgz", + "integrity": "sha512-H9OXxv4EzJwE75aTPKpiGXJq+y4LFxjpsdgKwSmr503P5DkWc3AG7VAFYrFNVvqemT5DfgZJV9itYhqBHSGujA==" }, "node_modules/@types/markdown-it": { "version": "12.2.3", @@ -2578,9 +2529,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", "dependencies": { "undici-types": "~5.26.4" } @@ -2591,6 +2542,12 @@ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, + "node_modules/@types/semver-utils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/semver-utils/-/semver-utils-1.1.3.tgz", + "integrity": "sha512-T+YwkslhsM+CeuhYUxyAjWm7mJ5am/K10UX40RuA6k6Lc7eGtq8iY2xOzy7Vq0GOqhl/xZl5l2FwURZMTPTUww==", + "dev": true + }, "node_modules/@types/triple-beam": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", @@ -2635,9 +2592,9 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2896,16 +2853,13 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2949,55 +2903,17 @@ "node": ">=8" } }, - "node_modules/array.prototype.filter": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", - "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.4.tgz", - "integrity": "sha512-BMtLxpV+8BD+6ZPFIWmnUBpQoy+A+ujcg4rhp2iwCRJYA7PEh2MS4NL3lz8EiDlLrJPp2hg9qWihr5pd//jcGw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", - "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -3042,44 +2958,31 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.toreversed": { + "node_modules/array.prototype.tosorted": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz", + "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", - "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.1.0", - "es-shim-unscopables": "^1.0.2" + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -3109,9 +3012,17 @@ } }, "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/async-exit-hook": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/async-exit-hook/-/async-exit-hook-2.0.1.tgz", + "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==", + "engines": { + "node": ">=0.12.0" + } }, "node_modules/async-retry": { "version": "1.3.3", @@ -3159,13 +3070,10 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, "engines": { "node": ">= 0.4" }, @@ -3421,9 +3329,9 @@ "integrity": "sha512-UcQusNAX7nnuXf9tvvLRC6DtZ8/YkDJRtTIbiA5ayb8MehwtSwtkvd5ZTXNLUTTtU6J/yJsi+1LJXqgRz1obwg==" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "funding": [ { @@ -3440,9 +3348,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", "update-browserslist-db": "^1.0.13" }, "bin": { @@ -3616,9 +3524,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001593", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001593.tgz", - "integrity": "sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==", + "version": "1.0.30001561", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz", + "integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==", "dev": true, "funding": [ { @@ -3711,9 +3619,15 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3726,9 +3640,6 @@ "engines": { "node": ">= 8.10.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -4532,9 +4443,9 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-js": { - "version": "3.36.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.36.0.tgz", - "integrity": "sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz", + "integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -4901,9 +4812,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, "engines": { "node": ">=0.3.1" @@ -5219,17 +5130,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/ed25519": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/ed25519/-/ed25519-0.0.4.tgz", - "integrity": "sha512-81yyGDHl4hhTD2YY779FRRMMAuKR3IQ2MmPFdwTvLnmZ+O02PgONzVgeyTWCjs/NCNAr35Ccg+hUd1y84Kdkbg==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "bindings": "^1.2.1", - "nan": "^2.0.9" - } - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -5245,9 +5145,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.690", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.690.tgz", - "integrity": "sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==", + "version": "1.4.579", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.579.tgz", + "integrity": "sha512-bJKvA+awBIzYR0xRced7PrQuRIwGQPpo6ZLP62GAShahU9fWpsNN2IP6BSP1BLDDSbxvBVRGAMWlvVVq3npmLA==", "dev": true }, "node_modules/emoji-regex": { @@ -5334,52 +5234,50 @@ } }, "node_modules/es-abstract": { - "version": "1.22.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", - "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "hasown": "^2.0.1", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.3", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.0", - "safe-regex-test": "^1.0.3", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.5", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -5388,12 +5286,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -5414,40 +5306,36 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", - "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", + "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", "dev": true, "dependencies": { "asynciterator.prototype": "^1.0.0", - "call-bind": "^1.0.7", + "call-bind": "^1.0.2", "define-properties": "^1.2.1", - "es-abstract": "^1.22.4", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", + "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", + "internal-slot": "^1.0.5", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" + "safe-array-concat": "^1.0.1" } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -5491,9 +5379,9 @@ "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "engines": { "node": ">=6" } @@ -5623,16 +5511,16 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -5751,9 +5639,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -5820,9 +5708,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, "dependencies": { "array-includes": "^3.1.7", @@ -5841,7 +5729,7 @@ "object.groupby": "^1.0.1", "object.values": "^1.1.7", "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" + "tsconfig-paths": "^3.14.2" }, "engines": { "node": ">=4" @@ -5962,29 +5850,27 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.34.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.0.tgz", - "integrity": "sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==", + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", "dev": true, "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlast": "^1.2.4", - "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.17", + "es-iterator-helpers": "^1.0.12", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7", - "object.hasown": "^1.1.3", - "object.values": "^1.1.7", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", + "resolve": "^2.0.0-next.4", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.10" + "string.prototype.matchall": "^4.0.8" }, "engines": { "node": ">=4" @@ -6147,9 +6033,9 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -6428,16 +6314,16 @@ "dev": true }, "node_modules/express": { - "version": "4.18.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", - "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -6468,6 +6354,14 @@ "node": ">= 0.10.0" } }, + "node_modules/express/node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -6476,11 +6370,6 @@ "ms": "2.0.0" } }, - "node_modules/express/node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -6548,9 +6437,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dependencies": { "reusify": "^1.0.4" } @@ -6701,9 +6590,9 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", "dev": true, "dependencies": { "flatted": "^3.2.9", @@ -6711,7 +6600,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flat-cache/node_modules/brace-expansion": { @@ -6772,9 +6661,9 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/fn.name": { @@ -6783,9 +6672,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -6959,19 +6848,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -7279,14 +7155,13 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -7382,15 +7257,15 @@ "dev": true }, "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", + "jackspeak": "^2.3.6", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -7913,9 +7788,9 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "engines": { "node": ">= 0.4" }, @@ -7935,12 +7810,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "dependencies": { - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7984,9 +7859,9 @@ } }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", "dependencies": { "function-bind": "^1.1.2" }, @@ -8100,9 +7975,9 @@ } }, "node_modules/http-status": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.7.4.tgz", - "integrity": "sha512-c2qSwNtTlHVYAhMj9JpGdyo0No/+DiKXCJ9pHtZ2Yf3QmPnBIytKSRT7BuyIiQ7icXLynavGmxUqkOjSrAuMuA==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.7.3.tgz", + "integrity": "sha512-GS8tL1qHT2nBCMJDYMHGkkkKQLNkIAHz37vgO68XKvzv+XyqB4oh/DfmMHdtRzfqSJPj1xKG2TaELZtlCz6BEQ==", "engines": { "node": ">= 0.4.0" } @@ -8113,9 +7988,9 @@ "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" }, "node_modules/http2-wrapper": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", - "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", + "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", "dev": true, "dependencies": { "quick-lru": "^5.1.1", @@ -8322,9 +8197,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "engines": { "node": ">= 4" } @@ -8336,9 +8211,9 @@ "dev": true }, "node_modules/ignore-walk": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz", - "integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz", + "integrity": "sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==", "dev": true, "dependencies": { "minimatch": "^9.0.0" @@ -8474,12 +8349,12 @@ } }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, "dependencies": { - "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.2", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -8503,17 +8378,10 @@ "node": ">=4" } }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } + "node_modules/ip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", + "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -8540,16 +8408,14 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8768,9 +8634,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -8884,15 +8750,12 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" + "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8952,12 +8815,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -9217,9 +9080,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -9276,13 +9139,13 @@ "dev": true }, "node_modules/joi": { - "version": "17.12.2", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.2.tgz", - "integrity": "sha512-RonXAIzCiHLc8ss3Ibuz45u28GOsWE1UpfDXLbN/9NKbL4tCJf8TWYVKsoYuuh+sAUt7fsSNpA+r2+TBA6Wjmw==", + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.11.0.tgz", + "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -9325,11 +9188,6 @@ "xmlcreate": "^2.0.4" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, "node_modules/jsdoc": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", @@ -9393,9 +9251,9 @@ "dev": true }, "node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -9516,21 +9374,15 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", "peer": true, "dependencies": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^7.5.4" + "semver": "^7.3.8" }, "engines": { "node": ">=12", @@ -9574,9 +9426,9 @@ } }, "node_modules/just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, "node_modules/jwa": { @@ -9702,6 +9554,11 @@ "node": ">=14" } }, + "node_modules/knex/node_modules/pg-connection-string": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" + }, "node_modules/kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", @@ -9972,9 +9829,9 @@ } }, "node_modules/luxon": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", - "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.3.tgz", + "integrity": "sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg==", "engines": { "node": ">=12" } @@ -10386,13 +10243,9 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -10753,9 +10606,9 @@ } }, "node_modules/mongodb": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.1.tgz", - "integrity": "sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.0.tgz", + "integrity": "sha512-g+GCMHN1CoRUA+wb1Agv0TI4YTSiWr42B5ulkiAfLLHitGK1R+PkSAf3Lr5rPZwi/3F04LiaZEW0Kxro9Fi2TA==", "dependencies": { "bson": "^5.5.0", "mongodb-connection-string-url": "^2.6.0", @@ -10802,13 +10655,13 @@ } }, "node_modules/mongoose": { - "version": "7.6.9", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.9.tgz", - "integrity": "sha512-3lR1fA/gS1E9Bn0woFqIysnnjCFDYtVo3yY+rGsVg1Q7kHX+gUTgAHTEKXrkwKxk2gHFdUfAsLt/Zjrdf6+nZA==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.4.tgz", + "integrity": "sha512-kadPkS/f5iZJrrMxxOvSoOAErXmdnb28lMvHmuYgmV1ZQTpRqpp132PIPHkJMbG4OC2H0eSXYw/fNzYTH+LUcw==", "dependencies": { "bson": "^5.5.0", "kareem": "2.5.1", - "mongodb": "5.9.1", + "mongodb": "5.9.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -10882,9 +10735,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -10911,24 +10764,60 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node_modules/nise": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz", - "integrity": "sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.5.tgz", + "integrity": "sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/text-encoding": "^0.7.2", - "just-extend": "^6.2.0", - "path-to-regexp": "^6.2.1" + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" } }, - "node_modules/nise/node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/nise/node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/nise/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/nise/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "dev": true }, + "node_modules/nise/node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -11259,9 +11148,9 @@ } }, "node_modules/node-rdkafka": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/node-rdkafka/-/node-rdkafka-2.17.0.tgz", - "integrity": "sha512-vFABzRcE5FaH0WqfqJRxDoqeG6P8UEB3M4qFQ7SkwMgQueMMO78+fm8MYfl5hLW3bBYfBekK2BXIIr0lDQtSEQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/node-rdkafka/-/node-rdkafka-2.18.0.tgz", + "integrity": "sha512-jYkmO0sPvjesmzhv1WFOO4z7IMiAFpThR6/lcnFDWgSPkYL95CtcuVNo/R5PpjujmqSgS22GMkL1qvU4DTAvEQ==", "hasInstallScript": true, "dependencies": { "bindings": "^1.3.1", @@ -11280,9 +11169,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/nodemon": { @@ -11431,11 +11320,12 @@ } }, "node_modules/npm-check-updates": { - "version": "16.14.15", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.15.tgz", - "integrity": "sha512-WH0wJ9j6CP7Azl+LLCxWAYqroT2IX02kRIzgK/fg0rPpMbETgHITWBdOPtrv521xmA3JMgeNsQ62zvVtS/nCmQ==", + "version": "16.14.18", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.18.tgz", + "integrity": "sha512-9iaRe9ohx9ykdbLjPRIYcq1A0RkrPYUx9HmQK1JIXhfxtJCNE/+497H9Z4PGH6GWRALbz5KF+1iZoySK2uSEpQ==", "dev": true, "dependencies": { + "@types/semver-utils": "^1.1.1", "chalk": "^5.3.0", "cli-table3": "^0.6.3", "commander": "^10.0.1", @@ -12155,13 +12045,13 @@ } }, "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" }, "engines": { "node": ">= 0.4" @@ -12180,13 +12070,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -12229,16 +12119,15 @@ } }, "node_modules/object.groupby": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", - "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", "dev": true, "dependencies": { - "array.prototype.filter": "^1.0.3", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" } }, "node_modules/object.hasown": { @@ -12335,9 +12224,9 @@ } }, "node_modules/openapi-sampler": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.4.0.tgz", - "integrity": "sha512-3FKJQCHAMG9T7RsRy9u5Ft4ERPq1QQmn77C8T3OSofYL9uur59AqychvQ0YQKijrqRwIkAbzkh+nQnAE3gjMVA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.3.1.tgz", + "integrity": "sha512-Ert9mvc2tLPmmInwSyGZS+v4Ogu9/YoZuq9oP3EdUklg2cad6+IGndP9yqJJwbgdXwZibiq5fpv6vYujchdJFg==", "dependencies": { "@types/json-schema": "^7.0.7", "json-pointer": "0.6.2" @@ -12697,11 +12586,11 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { @@ -12741,9 +12630,9 @@ } }, "node_modules/pg-connection-string": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", - "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.1.tgz", + "integrity": "sha512-w6ZzNu6oMmIzEAYVw+RLK0+nqHPt8K3ZnknKi+g48Ak2pr3dtljJW3o+D/n2zzCG07Zoe9VOX3aiKpj+BN0pjg==" }, "node_modules/picocolors": { "version": "0.2.1", @@ -12936,15 +12825,6 @@ "node": ">=0.10.0" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/postcss": { "version": "7.0.39", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", @@ -13161,9 +13041,9 @@ "dev": true }, "node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -13276,11 +13156,11 @@ } }, "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", + "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -13664,16 +13544,15 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", - "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0", - "get-intrinsic": "^1.2.3", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", "globalthis": "^1.0.3", "which-builtin-type": "^1.1.3" }, @@ -13693,20 +13572,19 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -14255,13 +14133,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -14298,18 +14176,15 @@ ] }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", "is-regex": "^1.1.4" }, - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14418,9 +14293,9 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -14544,31 +14419,30 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.2", + "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", "dev": true, "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", + "define-data-property": "^1.0.1", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" + "has-property-descriptors": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -14686,11 +14560,6 @@ "node": ">=0.10.0" } }, - "node_modules/shins/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/shins/node_modules/uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", @@ -14903,15 +14772,15 @@ } }, "node_modules/socks": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", - "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "dependencies": { - "ip-address": "^9.0.5", + "ip": "^2.0.0", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.0.0", + "node": ">= 10.13.0", "npm": ">= 3.0.0" } }, @@ -15083,9 +14952,9 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "node_modules/spdx-expression-parse": { @@ -15099,9 +14968,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", "dev": true }, "node_modules/split": { @@ -15139,9 +15008,9 @@ } }, "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/sqlstring": { "version": "2.3.1", @@ -15474,9 +15343,9 @@ } }, "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "node_modules/string_decoder": { "version": "1.1.1", @@ -15742,9 +15611,9 @@ } }, "node_modules/swagger-ui-dist": { - "version": "5.11.9", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.11.9.tgz", - "integrity": "sha512-e1x1x92wwjBWTjM+P9aH6qRurjFol/y5eCN0U2pK/nrS5mKxZuTsZUqdYya1W+JMom8fbw6/X8Ymp99lHRjBfw==" + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.9.3.tgz", + "integrity": "sha512-/OgHfO96RWXF+p/EOjEnvKNEh94qAG/VHukgmVKh5e6foX9kas1WbjvQnDDj0sSTAMr9MHRBqAWytDcQi0VOrg==" }, "node_modules/swagger2openapi": { "version": "6.2.3", @@ -16166,12 +16035,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/tap-parser/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/tap-spec": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/tap-spec/-/tap-spec-5.0.0.tgz", @@ -16726,9 +16589,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", @@ -16825,30 +16688,29 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -16858,17 +16720,16 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -16878,20 +16739,14 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", - "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "is-typed-array": "^1.1.9" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17310,16 +17165,16 @@ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" }, "node_modules/which-typed-array": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", - "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -17483,11 +17338,6 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" }, - "node_modules/widdershins/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/widdershins/node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -17672,11 +17522,11 @@ } }, "node_modules/winston": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.10.0.tgz", - "integrity": "sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.12.0.tgz", + "integrity": "sha512-OwbxKaOlESDi01mC9rkM0dQqQt2I8DAUMRLZ/HpbwvDXm85IryEHgoogy5fziQy38PntgZsLlhAYHz//UPHZ5w==", "dependencies": { - "@colors/colors": "1.5.0", + "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", @@ -17686,7 +17536,7 @@ "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" + "winston-transport": "^4.7.0" }, "engines": { "node": ">= 12.0.0" @@ -17718,6 +17568,14 @@ "node": ">= 6" } }, + "node_modules/winston/node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/winston/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", diff --git a/package.json b/package.json index c9796ba54..f8afd99bc 100644 --- a/package.json +++ b/package.json @@ -82,18 +82,18 @@ "dependencies": { "@hapi/catbox-memory": "6.0.1", "@hapi/good": "9.0.1", - "@hapi/hapi": "21.3.3", + "@hapi/hapi": "21.3.7", "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", - "@mojaloop/central-services-error-handling": "12.0.7", - "@mojaloop/central-services-health": "14.0.2", - "@mojaloop/central-services-logger": "11.2.2", + "@mojaloop/database-lib": "11.0.3", + "@mojaloop/central-services-error-handling": "13.0.0", + "@mojaloop/central-services-health": "15.0.0", + "@mojaloop/central-services-logger": "11.3.0", "@mojaloop/central-services-metrics": "12.0.8", "@mojaloop/central-services-shared": "18.2.1-snapshot.1", - "@mojaloop/central-services-stream": "11.2.0", - "@mojaloop/database-lib": "11.0.3", - "@mojaloop/event-sdk": "14.0.0", + "@mojaloop/central-services-stream": "11.2.4", + "@mojaloop/event-sdk": "14.0.1", "@mojaloop/ml-number": "11.2.3", "@mojaloop/object-store-lib": "12.0.2", "@now-ims/hapi-now-auth": "2.1.0", @@ -107,7 +107,7 @@ "docdash": "2.0.2", "event-stream": "4.0.1", "five-bells-condition": "5.0.1", - "glob": "10.3.10", + "glob": "10.3.12", "hapi-auth-basic": "5.0.0", "hapi-auth-bearer-token": "8.0.0", "hapi-swagger": "17.2.1", @@ -129,7 +129,7 @@ "jsdoc": "4.0.2", "jsonpath": "1.1.1", "nodemon": "3.1.0", - "npm-check-updates": "16.14.15", + "npm-check-updates": "16.14.18", "nyc": "15.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", diff --git a/src/domain/position/index.js b/src/domain/position/index.js index eb24caad5..581e65340 100644 --- a/src/domain/position/index.js +++ b/src/domain/position/index.js @@ -64,7 +64,7 @@ const calculatePreparePositionsBatch = async (transferList) => { ['success', 'funcName'] ).startTimer() let result - const action = transferList[0].value.metadata.event.action + const action = transferList[0]?.value.metadata.event.action if (action === Enum.Events.Event.Action.FX_PREPARE) { // FX transfer result = PositionFacade.prepareChangeParticipantPositionTransactionFx(transferList) diff --git a/src/handlers/positions/handlerBatch.js b/src/handlers/positions/handlerBatch.js index c4f6b3c17..cc706b3ca 100644 --- a/src/handlers/positions/handlerBatch.js +++ b/src/handlers/positions/handlerBatch.js @@ -88,6 +88,7 @@ const positions = async (error, messages) => { // Iterate through consumedMessages const bins = {} + const lastPerPartition = {} for (const message of consumedMessages) { const histTimerMsgEnd = Metrics.getHistogram( 'transfer_position', @@ -120,6 +121,11 @@ const positions = async (error, messages) => { histTimerMsgEnd }) + const last = lastPerPartition[message.partition] + if (!last || message.offset > last.offset) { + lastPerPartition[message.partition] = message + } + await span.audit(message, EventSdk.AuditEventAction.start) } @@ -132,11 +138,11 @@ const positions = async (error, messages) => { // If Bin Processor processed bins successfully, commit Kafka offset // Commit the offset of last message in the array - const lastMessageToCommit = consumedMessages[consumedMessages.length - 1] - const params = { message: lastMessageToCommit, kafkaTopic: lastMessageToCommit.topic, consumer: Consumer } - - // We are using Kafka.proceed() to just commit the offset of the last message in the array - await Kafka.proceed(Config.KAFKA_CONFIG, params, { consumerCommit }) + for (const message of Object.values(lastPerPartition)) { + const params = { message, kafkaTopic: message.topic, consumer: Consumer } + // We are using Kafka.proceed() to just commit the offset of the last message in the array + await Kafka.proceed(Config.KAFKA_CONFIG, params, { consumerCommit }) + } // Commit DB transaction await trx.commit() diff --git a/src/handlers/timeouts/handler.js b/src/handlers/timeouts/handler.js index 8f2492aa7..0bd1b2e86 100644 --- a/src/handlers/timeouts/handler.js +++ b/src/handlers/timeouts/handler.js @@ -47,6 +47,7 @@ const resourceVersions = require('@mojaloop/central-services-shared').Util.resou const Logger = require('@mojaloop/central-services-logger') let timeoutJob let isRegistered +let running = false /** * @function TransferTimeoutHandler @@ -61,7 +62,9 @@ let isRegistered * @returns {boolean} - Returns a boolean: true if successful, or throws and error if failed */ const timeout = async () => { + if (running) return try { + running = true const timeoutSegment = await TimeoutService.getTimeoutSegment() const intervalMin = timeoutSegment ? timeoutSegment.value : 0 const segmentId = timeoutSegment ? timeoutSegment.segmentId : 0 @@ -135,6 +138,8 @@ const timeout = async () => { } catch (err) { Logger.isErrorEnabled && Logger.error(err) throw ErrorHandler.Factory.reformatFSPIOPError(err) + } finally { + running = false } } diff --git a/src/handlers/transfers/handler.js b/src/handlers/transfers/handler.js index 48345567b..40dce0a62 100644 --- a/src/handlers/transfers/handler.js +++ b/src/handlers/transfers/handler.js @@ -103,9 +103,9 @@ const fulfil = async (error, messages) => { })() if (action === TransferEventAction.FX_RESERVE) { - await processFxFulfilMessage(message, functionality, span) + return await processFxFulfilMessage(message, functionality, span) } else { - await processFulfilMessage(message, functionality, span) + return await processFulfilMessage(message, functionality, span) } } catch (err) { const fspiopError = ErrorHandler.Factory.reformatFSPIOPError(err) diff --git a/test/integration-override/handlers/positions/handlerBatch.test.js b/test/integration-override/handlers/positions/handlerBatch.test.js index f6b5baf14..5eec541f0 100644 --- a/test/integration-override/handlers/positions/handlerBatch.test.js +++ b/test/integration-override/handlers/positions/handlerBatch.test.js @@ -47,7 +47,6 @@ const { wrapWithRetries } = require('#test/util/helpers') const TestConsumer = require('#test/integration/helpers/testConsumer') -const KafkaHelper = require('#test/integration/helpers/kafkaHelper') const ParticipantCached = require('#src/models/participant/participantCached') const ParticipantCurrencyCached = require('#src/models/participant/participantCurrencyCached') @@ -451,6 +450,10 @@ const _endpointSetup = async (participantName, baseURL) => { await ParticipantEndpointHelper.prepareData(participantName, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT', `${baseURL}/bulkTransfers/{{id}}`) await ParticipantEndpointHelper.prepareData(participantName, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR', `${baseURL}/bulkTransfers/{{id}}/error`) await ParticipantEndpointHelper.prepareData(participantName, 'FSPIOP_CALLBACK_URL_QUOTES', `${baseURL}`) + await ParticipantEndpointHelper.prepareData(participantName, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${baseURL}`) + await ParticipantEndpointHelper.prepareData(participantName, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${baseURL}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(participantName, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${baseURL}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(participantName, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${baseURL}/fxTransfers/{{commitRequestId}}/error`) } const prepareTestData = async (dataObj) => { @@ -722,9 +725,8 @@ Test('Handlers test', async handlersTest => { test.pass('done') test.end() + setupTests.end() }) - - await setupTests.end() }) await handlersTest.test('position batch handler should', async transferPositionPrepare => { @@ -1226,10 +1228,9 @@ Test('Handlers test', async handlersTest => { await Cache.destroyCache() await Db.disconnect() assert.pass('database connection closed') - await testConsumer.destroy() + await testConsumer.destroy() // this disconnects the consumers - await KafkaHelper.producers.disconnect() - await KafkaHelper.consumers.disconnect() + await Producer.disconnect() if (debug) { const elapsedTime = Math.round(((new Date()) - startTime) / 100) / 10 @@ -1241,8 +1242,8 @@ Test('Handlers test', async handlersTest => { Logger.error(`teardown failed with error - ${err}`) assert.fail() assert.end() + } finally { + handlersTest.end() } }) - - handlersTest.end() }) diff --git a/test/integration-override/handlers/transfers/handlers.test.js b/test/integration-override/handlers/transfers/handlers.test.js index daeded04f..77f28f36c 100644 --- a/test/integration-override/handlers/transfers/handlers.test.js +++ b/test/integration-override/handlers/transfers/handlers.test.js @@ -28,8 +28,6 @@ const Test = require('tape') const { randomUUID } = require('crypto') const Logger = require('@mojaloop/central-services-logger') const Config = require('#src/lib/config') -const Time = require('@mojaloop/central-services-shared').Util.Time -const sleep = Time.sleep const Db = require('@mojaloop/database-lib').Db const Cache = require('#src/lib/cache') const Producer = require('@mojaloop/central-services-stream').Util.Producer @@ -157,6 +155,10 @@ const prepareTestData = async (dataObj) => { await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT', `${dataObj.endpoint.base}/bulkTransfers/{{id}}`) await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR', `${dataObj.endpoint.base}/bulkTransfers/{{id}}/error`) await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_QUOTES', `${dataObj.endpoint.base}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${dataObj.endpoint.base}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${dataObj.endpoint.base}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${dataObj.endpoint.base}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${dataObj.endpoint.base}/fxTransfers/{{commitRequestId}}/error`) } const transferPayload = { @@ -331,13 +333,12 @@ Test('Handlers test', async handlersTest => { await testConsumer.startListening() await KafkaHelper.producers.connect() // TODO: MIG - Disabling these handlers to test running the CL as a separate service independently. - sleep(rebalanceDelay, debug, 'registerAllHandlers', 'awaiting registration of common handlers') + await new Promise(resolve => setTimeout(resolve, rebalanceDelay)) test.pass('done') test.end() + registerAllHandlers.end() }) - - await registerAllHandlers.end() }) await handlersTest.test('transferPrepare should', async transferPrepare => { @@ -425,32 +426,9 @@ Test('Handlers test', async handlersTest => { await Cache.destroyCache() await Db.disconnect() assert.pass('database connection closed') - await testConsumer.destroy() - - // TODO: Story to investigate as to why the Producers failed reconnection on the ./transfers/handlers.test.js - https://github.com/mojaloop/project/issues/3067 - // const topics = KafkaHelper.topics - // for (const topic of topics) { - // try { - // await Producer.getProducer(topic).disconnect() - // assert.pass(`producer to ${topic} disconnected`) - // } catch (err) { - // assert.pass(err.message) - // } - // } - // Lets make sure that all existing Producers are disconnected - await KafkaHelper.producers.disconnect() - - // TODO: Clean this up once the above issue has been resolved. - // for (const topic of topics) { - // try { - // await Consumer.getConsumer(topic).disconnect() - // assert.pass(`consumer to ${topic} disconnected`) - // } catch (err) { - // assert.pass(err.message) - // } - // } - // Lets make sure that all existing Consumers are disconnected - await KafkaHelper.consumers.disconnect() + await testConsumer.destroy() // this disconnects the consumers + + await Producer.disconnect() if (debug) { const elapsedTime = Math.round(((new Date()) - startTime) / 100) / 10 @@ -462,8 +440,8 @@ Test('Handlers test', async handlersTest => { Logger.error(`teardown failed with error - ${err}`) assert.fail() assert.end() + } finally { + handlersTest.end() } }) - - handlersTest.end() }) diff --git a/test/integration/domain/participant/index.test.js b/test/integration/domain/participant/index.test.js index 4dbdf976c..ada866199 100644 --- a/test/integration/domain/participant/index.test.js +++ b/test/integration/domain/participant/index.test.js @@ -220,6 +220,10 @@ Test('Participant service', async (participantTest) => { await ParticipantEndpointHelper.prepareData(participant.name, 'SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL', testData.notificationEmail) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_AUTHORIZATIONS', testData.endpointBase) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE', testData.endpointBase) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${testData.endpointBase}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${testData.endpointBase}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}/error`) participant = participantFixtures[2] await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRANSFER_POST', `${testData.simulatorBase}/${participant.name}/transfers`) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRANSFER_PUT', `${testData.simulatorBase}/${participant.name}/transfers/{{transferId}}`) @@ -233,6 +237,10 @@ Test('Participant service', async (participantTest) => { await ParticipantEndpointHelper.prepareData(participant.name, 'SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL', testData.notificationEmail) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_AUTHORIZATIONS', testData.endpointBase) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE', testData.endpointBase) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${testData.endpointBase}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${testData.endpointBase}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}/error`) participant = participantFixtures[3] await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRANSFER_POST', `${testData.simulatorBase}/${participant.name}/transfers`) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRANSFER_PUT', `${testData.simulatorBase}/${participant.name}/transfers/{{transferId}}`) @@ -246,6 +254,10 @@ Test('Participant service', async (participantTest) => { await ParticipantEndpointHelper.prepareData(participant.name, 'SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL', testData.notificationEmail) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_AUTHORIZATIONS', testData.endpointBase) await ParticipantEndpointHelper.prepareData(participant.name, 'FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE', testData.endpointBase) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${testData.endpointBase}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${testData.endpointBase}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(participant.name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${testData.endpointBase}/fxTransfers/{{commitRequestId}}/error`) assert.end() } catch (err) { console.log(err) diff --git a/test/integration/handlers/transfers/handlers.test.js b/test/integration/handlers/transfers/handlers.test.js index 3712121a7..d3c80b3fc 100644 --- a/test/integration/handlers/transfers/handlers.test.js +++ b/test/integration/handlers/transfers/handlers.test.js @@ -31,7 +31,6 @@ const retry = require('async-retry') const Logger = require('@mojaloop/central-services-logger') const Config = require('#src/lib/config') const Time = require('@mojaloop/central-services-shared').Util.Time -const sleep = Time.sleep const Db = require('@mojaloop/database-lib').Db const Cache = require('#src/lib/cache') const Producer = require('@mojaloop/central-services-stream').Util.Producer @@ -54,7 +53,6 @@ const { sleepPromise } = require('#test/util/helpers') const TestConsumer = require('#test/integration/helpers/testConsumer') -const KafkaHelper = require('#test/integration/helpers/kafkaHelper') const ParticipantCached = require('#src/models/participant/participantCached') const ParticipantCurrencyCached = require('#src/models/participant/participantCurrencyCached') @@ -186,6 +184,10 @@ const prepareTestData = async (dataObj) => { await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT', `${dataObj.endpoint.base}/bulkTransfers/{{id}}`) await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR', `${dataObj.endpoint.base}/bulkTransfers/{{id}}/error`) await ParticipantEndpointHelper.prepareData(name, 'FSPIOP_CALLBACK_URL_QUOTES', `${dataObj.endpoint.base}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_QUOTES, `${dataObj.endpoint.base}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_POST, `${dataObj.endpoint.base}/fxTransfers`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_PUT, `${dataObj.endpoint.base}/fxTransfers/{{commitRequestId}}`) + await ParticipantEndpointHelper.prepareData(name, Enum.EndPoints.FspEndpointTypes.FSPIOP_CALLBACK_URL_FX_TRANSFER_ERROR, `${dataObj.endpoint.base}/fxTransfers/{{commitRequestId}}/error`) } const transferPayload = { @@ -390,13 +392,12 @@ Test('Handlers test', async handlersTest => { await testConsumer.startListening() // TODO: MIG - Disabling these handlers to test running the CL as a separate service independently. - sleep(rebalanceDelay, debug, 'registerAllHandlers', 'awaiting registration of common handlers') + await new Promise(resolve => setTimeout(resolve, rebalanceDelay)) test.pass('done') test.end() + registerAllHandlers.end() }) - - await registerAllHandlers.end() }) await handlersTest.test('transferPrepare should', async transferPrepare => { @@ -1344,32 +1345,9 @@ Test('Handlers test', async handlersTest => { await Cache.destroyCache() await Db.disconnect() assert.pass('database connection closed') - await testConsumer.destroy() - - // TODO: Story to investigate as to why the Producers failed reconnection on the ./transfers/handlers.test.js - https://github.com/mojaloop/project/issues/3067 - // const topics = KafkaHelper.topics - // for (const topic of topics) { - // try { - // await Producer.getProducer(topic).disconnect() - // assert.pass(`producer to ${topic} disconnected`) - // } catch (err) { - // assert.pass(err.message) - // } - // } - // Lets make sure that all existing Producers are disconnected - await KafkaHelper.producers.disconnect() - - // TODO: Clean this up once the above issue has been resolved. - // for (const topic of topics) { - // try { - // await Consumer.getConsumer(topic).disconnect() - // assert.pass(`consumer to ${topic} disconnected`) - // } catch (err) { - // assert.pass(err.message) - // } - // } - // Lets make sure that all existing Consumers are disconnected - await KafkaHelper.consumers.disconnect() + await testConsumer.destroy() // this disconnects the consumers + + await Producer.disconnect() if (debug) { const elapsedTime = Math.round(((new Date()) - startTime) / 100) / 10 @@ -1381,8 +1359,8 @@ Test('Handlers test', async handlersTest => { Logger.error(`teardown failed with error - ${err}`) assert.fail() assert.end() + } finally { + handlersTest.end() } }) - - handlersTest.end() }) diff --git a/test/integration/helpers/testConsumer.js b/test/integration/helpers/testConsumer.js index 336853f67..d154159d4 100644 --- a/test/integration/helpers/testConsumer.js +++ b/test/integration/helpers/testConsumer.js @@ -76,7 +76,9 @@ class TestConsumer { */ async destroy () { Logger.warn(`TestConsumer.destroy(): destroying ${this.consumers.length} consumers`) - await Promise.all(this.consumers.map(async c => c.disconnect())) + await Promise.all(this.consumers.map(consumer => new Promise((resolve, reject) => { + consumer.disconnect((err) => err ? reject(err) : resolve()) + }))) } /** diff --git a/test/unit/domain/position/index.test.js b/test/unit/domain/position/index.test.js index ff8a5a6b6..96adf21dc 100644 --- a/test/unit/domain/position/index.test.js +++ b/test/unit/domain/position/index.test.js @@ -51,6 +51,7 @@ Test('Position Service', positionIndexTest => { test.pass('Error not thrown') test.end() } catch (e) { + console.log(e) test.fail('Error Thrown') test.end() } @@ -67,6 +68,7 @@ Test('Position Service', positionIndexTest => { test.pass('Error not thrown') test.end() } catch (e) { + console.log(e) test.fail('Error Thrown') test.end() } diff --git a/test/unit/handlers/transfers/handler.test.js b/test/unit/handlers/transfers/handler.test.js index e6885e213..62e11565c 100644 --- a/test/unit/handlers/transfers/handler.test.js +++ b/test/unit/handlers/transfers/handler.test.js @@ -37,6 +37,7 @@ const Test = require('tapes')(require('tape')) const Kafka = require('@mojaloop/central-services-shared').Util.Kafka const Validator = require('../../../../src/handlers/transfers/validator') const TransferService = require('../../../../src/domain/transfer') +const Cyril = require('../../../../src/domain/fx/cyril') const TransferObjectTransform = require('../../../../src/domain/transfer/transform') const MainUtil = require('@mojaloop/central-services-shared').Util const Time = require('@mojaloop/central-services-shared').Util.Time @@ -52,7 +53,6 @@ const Comparators = require('@mojaloop/central-services-shared').Util.Comparator const Proxyquire = require('proxyquire') const { getMessagePayloadOrThrow } = require('../../../util/helpers') const Participant = require('../../../../src/domain/participant') -const Config = require('../../../../src/lib/config') const transfer = { transferId: 'b51ec534-ee48-4575-b6a9-ead2955b8999', @@ -235,33 +235,9 @@ const config = { } } -const configAutocommit = { - options: { - mode: 2, - batchSize: 1, - pollFrequency: 10, - recursiveTimeout: 100, - messageCharset: 'utf8', - messageAsJSON: true, - sync: true, - consumeTimeout: 1000 - }, - rdkafkaConf: { - 'client.id': 'kafka-test', - debug: 'all', - 'group.id': 'central-ledger-kafka', - 'metadata.broker.list': 'localhost:9092', - 'enable.auto.commit': true - } -} - const command = () => { } -const error = () => { - throw new Error() -} - let SpanStub let allTransferHandlers let prepare @@ -325,6 +301,10 @@ Test('Transfer handler', transferHandlerTest => { sandbox.stub(Comparators) sandbox.stub(Validator) sandbox.stub(TransferService) + sandbox.stub(Cyril) + Cyril.processFulfilMessage.returns({ + isFx: false + }) sandbox.stub(Consumer, 'getConsumer').returns({ commitMessageSync: async function () { return true @@ -357,500 +337,6 @@ Test('Transfer handler', transferHandlerTest => { test.end() }) - transferHandlerTest.test('prepare should', prepareTest => { - prepareTest.test('persist transfer to database when messages is an array', async (test) => { - const localMessages = MainUtil.clone(messages) - // here copy - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - const kafkaCallOne = Kafka.proceed.getCall(0) - test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) - test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) - test.equal(kafkaCallOne.args[2].messageKey, '0') - test.equal(kafkaCallOne.args[2].topicNameOverride, null) - test.equal(result, true) - test.end() - }) - - prepareTest.test('use topic name override if specified in config', async (test) => { - Config.KAFKA_CONFIG.EVENT_TYPE_ACTION_TOPIC_MAP.POSITION.PREPARE = 'topic-test-override' - const localMessages = MainUtil.clone(messages) - // here copy - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - const kafkaCallOne = Kafka.proceed.getCall(0) - test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) - test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) - test.equal(kafkaCallOne.args[2].messageKey, '0') - test.equal(kafkaCallOne.args[2].topicNameOverride, 'topic-test-override') - test.equal(result, true) - delete Config.KAFKA_CONFIG.EVENT_TYPE_ACTION_TOPIC_MAP.POSITION.PREPARE - test.end() - }) - - prepareTest.test('persist transfer to database when messages is an array - consumer throws error', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Consumer.getConsumer.throws(new Error()) - Kafka.transformAccountToTopicName.returns(topicName) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - const kafkaCallOne = Kafka.proceed.getCall(0) - test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) - test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) - test.equal(kafkaCallOne.args[2].messageKey, '0') - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate found but without transferState', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.getByIdLight.returns(Promise.resolve(null)) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate found but without transferState - autocommit is enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.getByIdLight.returns(Promise.resolve(null)) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate found but without transferState - kafka autocommit enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, configAutocommit, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.getByIdLight.returns(Promise.resolve(null)) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate found and transferState is COMMITTED', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getByIdLight.withArgs(transfer.transferId).returns(Promise.resolve(transferReturn)) - TransferObjectTransform.toTransfer.withArgs(transferReturn).returns(transfer) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate found and transferState is ABORTED_REJECTED', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'ABORTED' })) - TransferService.getById.withArgs(transfer.transferId).returns(Promise.resolve(transferReturn)) - - TransferObjectTransform.toFulfil.withArgs(transferReturn).returns(fulfil) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('do nothing when duplicate found and transferState is RECEIVED', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'RECEIVED' })) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('do nothing when duplicate found and transferState is RECEIVED', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'unknown' })) - localMessages[0].value.metadata.event.action = 'unknown' - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('do nothing when duplicate found and transferState is RESERVED', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'RESERVED' })) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate transfer id found but hash doesnt match', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: true - })) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send callback when duplicate transfer id found but hash doesnt match - kafka autocommit enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, configAutocommit, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: true, - hasDuplicateHash: false - })) - - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('persist transfer to database when single message sent', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages[0]) - test.equal(result, true) - test.end() - }) - - prepareTest.test('persist transfer to database when BULK_PREPARE single message sent', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages[1]) - test.equal(result, true) - test.end() - }) - - prepareTest.test('persist transfer to database when single message sent - autocommit is enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages[0]) - test.equal(result, true) - test.end() - }) - - prepareTest.test('persist transfer to database when single message sent - kafka autocommit enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, configAutocommit, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages[0]) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send notification when validation successful but duplicate error thrown by prepare', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.throws(new Error()) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send notification when validation successful but duplicate error thrown by prepare - kafka autocommit enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, configAutocommit, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) - TransferService.prepare.throws(new Error()) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('fail validation and persist INVALID transfer to database and insert transferError', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - MainUtil.StreamingProtocol.createEventState.returns(messageProtocol.metadata.event.state) - Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) - TransferService.getById.returns(Promise.resolve(null)) - TransferService.prepare.returns(Promise.resolve(true)) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('fail validation and persist INVALID transfer to database and insert transferError -kafka autocommit enabled', async (test) => { - await Consumer.createHandler(topicName, configAutocommit, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - MainUtil.StreamingProtocol.createEventState.returns(messageProtocol.metadata.event.state) - Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) - TransferService.prepare.returns(Promise.resolve(true)) - - const result = await allTransferHandlers.prepare(null, messages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send notification when validation failed and duplicate error thrown by prepare', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) - TransferService.prepare.throws(new Error()) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('send notification when validation failed and duplicate error thrown by prepare - kafka autocommit enabled', async (test) => { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, configAutocommit, command) - Consumer.isConsumerAutoCommitEnabled.returns(true) - Kafka.transformAccountToTopicName.returns(topicName) - Kafka.proceed.returns(true) - Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) - TransferService.prepare.throws(new Error()) - TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) - TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) - Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ - hasDuplicateId: false, - hasDuplicateHash: false - })) - const result = await allTransferHandlers.prepare(null, localMessages) - test.equal(result, true) - test.end() - }) - - prepareTest.test('log an error when consumer not found', async (test) => { - try { - const localMessages = MainUtil.clone(messages) - await Consumer.createHandler(topicName, config, command) - Kafka.transformAccountToTopicName.returns('invalid-topic') - await allTransferHandlers.prepare(null, localMessages) - const expectedState = new EventSdk.EventStateMetadata(EventSdk.EventStatusType.failed, '2001', 'Internal server error') - const args = SpanStub.finish.getCall(0).args - test.ok(args[0].length > 0) - test.deepEqual(args[1], expectedState) - test.end() - } catch (e) { - test.fail('Error Thrown') - test.end() - } - }) - - prepareTest.test('throw an error when an error is thrown from Kafka', async (test) => { - try { - await allTransferHandlers.prepare(error, null) - test.fail('No Error Thrown') - test.end() - } catch (e) { - test.pass('Error Thrown') - test.end() - } - }) - - prepareTest.end() - }) - transferHandlerTest.test('register getTransferHandler should', registerTransferhandler => { registerTransferhandler.test('return a true when registering the transfer handler', async (test) => { const localMessages = MainUtil.clone(messages) @@ -1491,6 +977,7 @@ Test('Transfer handler', transferHandlerTest => { const localfulfilMessages = MainUtil.clone(fulfilMessages) await Consumer.createHandler(topicName, config, command) Kafka.transformGeneralTopicName.returns(topicName) + TransferService.getById.returns(Promise.resolve({ condition: 'condition', payeeFsp: 'dfsp2', diff --git a/test/unit/handlers/transfers/prepare.test.js b/test/unit/handlers/transfers/prepare.test.js new file mode 100644 index 000000000..8d3e9488c --- /dev/null +++ b/test/unit/handlers/transfers/prepare.test.js @@ -0,0 +1,797 @@ +/***** + License +-------------- +Copyright © 2017 Bill & Melinda Gates Foundation +The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +Contributors +-------------- +This is the official list of the Mojaloop project contributors for this file. +Names of the original copyright holders (individuals or organizations) +should be listed with a '*' in the first column. People who have +contributed from an organization can be listed under the organization +that actually holds the copyright for their contributions (see the +Gates Foundation organization for an example). Those individuals should have +their names indented and be marked with a '-'. Email address can be added +optionally within square brackets . + +* Gates Foundation +- Name Surname + +* Georgi Georgiev +* Rajiv Mothilal +* Miguel de Barros +* Deon Botha +* Shashikant Hirugade + +-------------- +******/ +'use strict' + +const Sinon = require('sinon') +const Test = require('tapes')(require('tape')) +const Kafka = require('@mojaloop/central-services-shared').Util.Kafka +const Validator = require('../../../../src/handlers/transfers/validator') +const TransferService = require('../../../../src/domain/transfer') +const Cyril = require('../../../../src/domain/fx/cyril') +const TransferObjectTransform = require('../../../../src/domain/transfer/transform') +const MainUtil = require('@mojaloop/central-services-shared').Util +const ilp = require('../../../../src/models/transfer/ilpPacket') +const { randomUUID } = require('crypto') +const KafkaConsumer = require('@mojaloop/central-services-stream').Kafka.Consumer +const Consumer = require('@mojaloop/central-services-stream').Util.Consumer +const Enum = require('@mojaloop/central-services-shared').Enum +const EventSdk = require('@mojaloop/event-sdk') +const Comparators = require('@mojaloop/central-services-shared').Util.Comparators +const Proxyquire = require('proxyquire') +const Participant = require('../../../../src/domain/participant') +const Config = require('../../../../src/lib/config') + +const transfer = { + transferId: 'b51ec534-ee48-4575-b6a9-ead2955b8999', + payerFsp: 'dfsp1', + payeeFsp: 'dfsp2', + amount: { + currency: 'USD', + amount: '433.88' + }, + ilpPacket: 'AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA', + condition: 'YlK5TZyhflbXaDRPtR5zhCu8FrbgvrQwwmzuH0iQ0AI', + expiration: '2016-05-24T08:38:08.699-04:00', + extensionList: { + extension: [ + { + key: 'key1', + value: 'value1' + }, + { + key: 'key2', + value: 'value2' + } + ] + } +} + +const transferReturn = { + transferId: 'b51ec534-ee48-4575-b6a9-ead2955b8999', + amount: { + currency: 'USD', + amount: '433.88' + }, + transferState: 'COMMITTED', + transferStateEnumeration: 'COMMITTED', + completedTimestamp: '2016-05-15T18:44:38.000Z', + ilpPacket: 'AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA', + condition: 'YlK5TZyhflbXaDRPtR5zhCu8FrbgvrQwwmzuH0iQ0AI', + expiration: '2016-05-24T08:38:08.699-04:00', + fulfilment: 'uz0FAeutW6o8Mz7OmJh8ALX6mmsZCcIDOqtE01eo4uI', + extensionList: [{ + key: 'key1', + value: 'value1' + }] +} + +const fulfil = { + fulfilment: 'oAKAAA', + completedTimestamp: '2018-10-24T08:38:08.699-04:00', + transferState: 'COMMITTED', + extensionList: { + extension: [ + { + key: 'key1', + value: 'value1' + }, + { + key: 'key2', + value: 'value2' + } + ] + } +} + +const messageProtocol = { + id: randomUUID(), + from: transfer.payerFsp, + to: transfer.payeeFsp, + type: 'application/json', + content: { + headers: { 'fspiop-destination': transfer.payerFsp, 'content-type': 'application/vnd.interoperability.transfers+json;version=1.1' }, + uriParams: { id: transfer.transferId }, + payload: transfer + }, + metadata: { + event: { + id: randomUUID(), + type: 'prepare', + action: 'prepare', + createdAt: new Date(), + state: { + status: 'success', + code: 0 + } + } + }, + pp: '' +} + +const messageProtocolBulkPrepare = MainUtil.clone(messageProtocol) +messageProtocolBulkPrepare.metadata.event.action = 'bulk-prepare' +const messageProtocolBulkCommit = MainUtil.clone(messageProtocol) +messageProtocolBulkCommit.metadata.event.action = 'bulk-commit' + +const topicName = 'topic-test' + +const messages = [ + { + topic: topicName, + value: messageProtocol + }, + { + topic: topicName, + value: messageProtocolBulkPrepare + } +] + +const config = { + options: { + mode: 2, + batchSize: 1, + pollFrequency: 10, + recursiveTimeout: 100, + messageCharset: 'utf8', + messageAsJSON: true, + sync: true, + consumeTimeout: 1000 + }, + rdkafkaConf: { + 'client.id': 'kafka-test', + debug: 'all', + 'group.id': 'central-ledger-kafka', + 'metadata.broker.list': 'localhost:9092', + 'enable.auto.commit': false + } +} + +const configAutocommit = { + options: { + mode: 2, + batchSize: 1, + pollFrequency: 10, + recursiveTimeout: 100, + messageCharset: 'utf8', + messageAsJSON: true, + sync: true, + consumeTimeout: 1000 + }, + rdkafkaConf: { + 'client.id': 'kafka-test', + debug: 'all', + 'group.id': 'central-ledger-kafka', + 'metadata.broker.list': 'localhost:9092', + 'enable.auto.commit': true + } +} + +const command = () => { +} + +const error = () => { + throw new Error() +} + +let SpanStub +let allTransferHandlers +let prepare +let createRemittanceEntity + +const cyrilStub = async (payload) => ({ + participantName: payload.payerFsp, + currencyId: payload.amount.currency, + amount: payload.amount.amount +}) + +Test('Transfer handler', transferHandlerTest => { + let sandbox + + transferHandlerTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + SpanStub = { + audit: sandbox.stub().callsFake(), + error: sandbox.stub().callsFake(), + finish: sandbox.stub().callsFake(), + debug: sandbox.stub().callsFake(), + info: sandbox.stub().callsFake(), + getChild: sandbox.stub().returns(SpanStub), + setTags: sandbox.stub().callsFake() + } + + const TracerStub = { + extractContextFromMessage: sandbox.stub().callsFake(() => { + return {} + }), + createChildSpanFromContext: sandbox.stub().callsFake(() => { + return SpanStub + }) + } + + const EventSdkStub = { + Tracer: TracerStub + } + + createRemittanceEntity = Proxyquire('../../../../src/handlers/transfers/createRemittanceEntity', { + '../../domain/fx/cyril': { + getParticipantAndCurrencyForTransferMessage: cyrilStub, + getParticipantAndCurrencyForFxTransferMessage: cyrilStub + } + }) + prepare = Proxyquire('../../../../src/handlers/transfers/prepare', { + '@mojaloop/event-sdk': EventSdkStub, + './createRemittanceEntity': createRemittanceEntity + }) + allTransferHandlers = Proxyquire('../../../../src/handlers/transfers/handler', { + '@mojaloop/event-sdk': EventSdkStub, + './prepare': prepare + }) + + sandbox.stub(KafkaConsumer.prototype, 'constructor').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'connect').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'consume').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'commitMessageSync').returns(Promise.resolve()) + sandbox.stub(Comparators) + sandbox.stub(Validator) + sandbox.stub(TransferService) + sandbox.stub(Cyril) + Cyril.processFulfilMessage.returns({ + isFx: false + }) + sandbox.stub(Consumer, 'getConsumer').returns({ + commitMessageSync: async function () { + return true + } + }) + sandbox.stub(Consumer, 'isConsumerAutoCommitEnabled').returns(false) + sandbox.stub(ilp) + sandbox.stub(Kafka) + sandbox.stub(MainUtil.StreamingProtocol) + sandbox.stub(TransferObjectTransform, 'toTransfer') + sandbox.stub(TransferObjectTransform, 'toFulfil') + sandbox.stub(Participant, 'getAccountByNameAndCurrency').callsFake((...args) => { + if (args[0] === transfer.payerFsp) { + return { + participantCurrencyId: 0 + } + } + if (args[0] === transfer.payeeFsp) { + return { + participantCurrencyId: 1 + } + } + }) + Kafka.produceGeneralMessage.returns(Promise.resolve()) + test.end() + }) + + transferHandlerTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + transferHandlerTest.test('prepare should', prepareTest => { + prepareTest.test('persist transfer to database when messages is an array', async (test) => { + const localMessages = MainUtil.clone(messages) + // here copy + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + const kafkaCallOne = Kafka.proceed.getCall(0) + test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) + test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) + test.equal(kafkaCallOne.args[2].messageKey, '0') + test.equal(kafkaCallOne.args[2].topicNameOverride, null) + test.equal(result, true) + test.end() + }) + + prepareTest.test('use topic name override if specified in config', async (test) => { + Config.KAFKA_CONFIG.EVENT_TYPE_ACTION_TOPIC_MAP.POSITION.PREPARE = 'topic-test-override' + const localMessages = MainUtil.clone(messages) + // here copy + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + const kafkaCallOne = Kafka.proceed.getCall(0) + test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) + test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) + test.equal(kafkaCallOne.args[2].messageKey, '0') + test.equal(kafkaCallOne.args[2].topicNameOverride, 'topic-test-override') + test.equal(result, true) + delete Config.KAFKA_CONFIG.EVENT_TYPE_ACTION_TOPIC_MAP.POSITION.PREPARE + test.end() + }) + + prepareTest.test('persist transfer to database when messages is an array - consumer throws error', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Consumer.getConsumer.throws(new Error()) + Kafka.transformAccountToTopicName.returns(topicName) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + const kafkaCallOne = Kafka.proceed.getCall(0) + test.equal(kafkaCallOne.args[2].eventDetail.functionality, Enum.Events.Event.Type.POSITION) + test.equal(kafkaCallOne.args[2].eventDetail.action, Enum.Events.Event.Action.PREPARE) + test.equal(kafkaCallOne.args[2].messageKey, '0') + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate found but without transferState', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.getByIdLight.returns(Promise.resolve(null)) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate found but without transferState - autocommit is enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.getByIdLight.returns(Promise.resolve(null)) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate found but without transferState - kafka autocommit enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, configAutocommit, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.getByIdLight.returns(Promise.resolve(null)) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve(null)) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate found and transferState is COMMITTED', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getByIdLight.withArgs(transfer.transferId).returns(Promise.resolve(transferReturn)) + TransferObjectTransform.toTransfer.withArgs(transferReturn).returns(transfer) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate found and transferState is ABORTED_REJECTED', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'ABORTED' })) + TransferService.getById.withArgs(transfer.transferId).returns(Promise.resolve(transferReturn)) + + TransferObjectTransform.toFulfil.withArgs(transferReturn).returns(fulfil) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('do nothing when duplicate found and transferState is RECEIVED', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'RECEIVED' })) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('do nothing when duplicate found and transferState is RECEIVED', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'unknown' })) + localMessages[0].value.metadata.event.action = 'unknown' + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('do nothing when duplicate found and transferState is RESERVED', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + TransferService.getTransferStateChange.withArgs(transfer.transferId).returns(Promise.resolve({ enumeration: 'RESERVED' })) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate transfer id found but hash doesnt match', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: true + })) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send callback when duplicate transfer id found but hash doesnt match - kafka autocommit enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, configAutocommit, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: true, + hasDuplicateHash: false + })) + + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('persist transfer to database when single message sent', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages[0]) + test.equal(result, true) + test.end() + }) + + prepareTest.test('persist transfer to database when BULK_PREPARE single message sent', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages[1]) + test.equal(result, true) + test.end() + }) + + prepareTest.test('persist transfer to database when single message sent - autocommit is enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages[0]) + test.equal(result, true) + test.end() + }) + + prepareTest.test('persist transfer to database when single message sent - kafka autocommit enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, configAutocommit, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages[0]) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send notification when validation successful but duplicate error thrown by prepare', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.throws(new Error()) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send notification when validation successful but duplicate error thrown by prepare - kafka autocommit enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, configAutocommit, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: true, reasons: [] }) + TransferService.prepare.throws(new Error()) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('fail validation and persist INVALID transfer to database and insert transferError', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + MainUtil.StreamingProtocol.createEventState.returns(messageProtocol.metadata.event.state) + Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) + TransferService.getById.returns(Promise.resolve(null)) + TransferService.prepare.returns(Promise.resolve(true)) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('fail validation and persist INVALID transfer to database and insert transferError -kafka autocommit enabled', async (test) => { + await Consumer.createHandler(topicName, configAutocommit, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + MainUtil.StreamingProtocol.createEventState.returns(messageProtocol.metadata.event.state) + Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) + TransferService.prepare.returns(Promise.resolve(true)) + + const result = await allTransferHandlers.prepare(null, messages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send notification when validation failed and duplicate error thrown by prepare', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) + TransferService.prepare.throws(new Error()) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('send notification when validation failed and duplicate error thrown by prepare - kafka autocommit enabled', async (test) => { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, configAutocommit, command) + Consumer.isConsumerAutoCommitEnabled.returns(true) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Validator.validatePrepare.returns({ validationPassed: false, reasons: [] }) + TransferService.prepare.throws(new Error()) + TransferService.getTransferDuplicateCheck.returns(Promise.resolve(null)) + TransferService.saveTransferDuplicateCheck.returns(Promise.resolve(null)) + Comparators.duplicateCheckComparator.withArgs(transfer.transferId, transfer).returns(Promise.resolve({ + hasDuplicateId: false, + hasDuplicateHash: false + })) + const result = await allTransferHandlers.prepare(null, localMessages) + test.equal(result, true) + test.end() + }) + + prepareTest.test('log an error when consumer not found', async (test) => { + try { + const localMessages = MainUtil.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns('invalid-topic') + await allTransferHandlers.prepare(null, localMessages) + const expectedState = new EventSdk.EventStateMetadata(EventSdk.EventStatusType.failed, '2001', 'Internal server error') + const args = SpanStub.finish.getCall(0).args + test.ok(args[0].length > 0) + test.deepEqual(args[1], expectedState) + test.end() + } catch (e) { + test.fail('Error Thrown') + test.end() + } + }) + + prepareTest.test('throw an error when an error is thrown from Kafka', async (test) => { + try { + await allTransferHandlers.prepare(error, null) + test.fail('No Error Thrown') + test.end() + } catch (e) { + test.pass('Error Thrown') + test.end() + } + }) + + prepareTest.end() + }) + transferHandlerTest.end() +}) diff --git a/test/unit/handlers/transfers/validator.test.js b/test/unit/handlers/transfers/validator.test.js index 64e3c9d1a..3eb3c1f77 100644 --- a/test/unit/handlers/transfers/validator.test.js +++ b/test/unit/handlers/transfers/validator.test.js @@ -10,6 +10,8 @@ const Enum = require('@mojaloop/central-services-shared').Enum let payload let headers +let fxPayload +let fxHeaders Test('transfer validator', validatorTest => { let sandbox @@ -39,10 +41,30 @@ Test('transfer validator', validatorTest => { ] } } + fxPayload = { + commitRequestId: '88622a75-5bde-4da4-a6cc-f4cd23b268c4', + determiningTransferId: 'c05c3f31-33b5-4e33-8bfd-7c3a2685fb6c', + condition: 'YlK5TZyhflbXaDRPtR5zhCu8FrbgvrQwwmzuH0iQ0AI', + expiration: new Date((new Date()).getTime() + (24 * 60 * 60 * 1000)), // tomorrow + initiatingFsp: 'fx_dfsp1', + counterPartyFsp: 'fx_dfsp2', + sourceAmount: { + currency: 'USD', + amount: '433.88' + }, + targetAmount: { + currency: 'EUR', + amount: '200.00' + } + } headers = { 'fspiop-source': 'dfsp1', 'fspiop-destination': 'dfsp2' } + fxHeaders = { + 'fspiop-source': 'fx_dfsp1', + 'fspiop-destination': 'fx_dfsp2' + } sandbox = Sinon.createSandbox() sandbox.stub(Participant) sandbox.stub(CryptoConditions, 'validateCondition') @@ -213,6 +235,20 @@ Test('transfer validator', validatorTest => { test.end() }) + validatePrepareTest.test('select variables based on prepare is fx', async (test) => { + Participant.getByName.returns(Promise.resolve({ isActive: true })) + Participant.getAccountByNameAndCurrency.returns(Promise.resolve({ currencyIsActive: true })) + CryptoConditions.validateCondition.returns(true) + + const { validationPassed } = await Validator.validatePrepare(fxPayload, fxHeaders, true) + test.equal(validationPassed, true) + test.ok(Participant.getByName.calledWith('fx_dfsp1')) + test.ok(Participant.getByName.calledWith('fx_dfsp2')) + test.ok(Participant.getAccountByNameAndCurrency.calledWith('fx_dfsp1', 'USD', Enum.Accounts.LedgerAccountType.POSITION)) + test.ok(Participant.getAccountByNameAndCurrency.calledWith('fx_dfsp2', 'EUR', Enum.Accounts.LedgerAccountType.POSITION)) + test.end() + }) + validatePrepareTest.end() }) diff --git a/test/unit/models/position/facade.test.js b/test/unit/models/position/facade.test.js index 6feb81af9..c0879b082 100644 --- a/test/unit/models/position/facade.test.js +++ b/test/unit/models/position/facade.test.js @@ -217,7 +217,14 @@ Test('Position facade', async (positionFacadeTest) => { type: 'application/json', content: { header: '', - payload: transfer + payload: transfer, + context: { + cyrilResult: { + participantName: 'dfsp1', + currencyId: 'USD', + amount: '100' + } + } }, metadata: { event: {