From 8b75df90e394843e47b6c502ed133eba207d2e39 Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Wed, 4 Aug 2021 14:55:06 +0200 Subject: [PATCH 1/4] fix(#2368): centralsettlement-failing-GP-tests-with-event-sdk-sidecar - Bump to patch version - Fixed event-sdk audit events for GET API requests to log the header and URI instead of the payload (which doesn't exist) - Updated dependencies - Fixed audit-resolve issues with minor to medium issues - however they mostly impact the dev documentation framework with minimal risk --- .gitignore | 4 + audit-resolve.json | 69 +++--- package-lock.json | 202 +++++++++++------- package.json | 18 +- src/api/handlers/settlementWindows.js | 6 +- src/api/handlers/settlementWindows/{id}.js | 7 +- src/api/handlers/settlements.js | 7 +- src/api/handlers/settlements/{id}.js | 7 +- .../settlements/{sid}/participants/{pid}.js | 7 +- .../participants/{pid}/accounts/{aid}.js | 7 +- 10 files changed, 208 insertions(+), 126 deletions(-) diff --git a/.gitignore b/.gitignore index e649609c..033ed7e8 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,7 @@ junit.xml # Add ignores *IGNORE* *ignore* + +# Ignore DevSpace configs, cache and log folder +.devspace/ +devspace* diff --git a/audit-resolve.json b/audit-resolve.json index 318626cb..6ebda64e 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -1,39 +1,38 @@ { "decisions": { "1677|@mojaloop/central-ledger>npm-run-all>read-pkg>normalize-package-data>hosted-git-info": { - "decision": "ignore", - "madeAt": 1624433592958, - "expiresAt": 1627025580569 + "decision": "fix", + "madeAt": 1628081467897 }, "1500|@mojaloop/central-ledger>@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", - "madeAt": 1624433596691, - "expiresAt": 1627025580569 + "madeAt": 1628081562434, + "expiresAt": 1628686256766 }, "1500|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", - "madeAt": 1624433596691, - "expiresAt": 1627025580569 + "madeAt": 1628081562434, + "expiresAt": 1628686256766 }, "1675|@mojaloop/central-ledger>@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1624433598403, - "expiresAt": 1627025580569 + "madeAt": 1628081583977, + "expiresAt": 1628686256766 }, "1675|@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1624433598403, - "expiresAt": 1627025580569 + "madeAt": 1628081583977, + "expiresAt": 1628686256766 }, "1676|@mojaloop/central-ledger>@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1624433598403, - "expiresAt": 1627025580569 + "madeAt": 1628081583977, + "expiresAt": 1628686256766 }, "1676|@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1624433598404, - "expiresAt": 1627025580569 + "madeAt": 1628081583978, + "expiresAt": 1628686256766 }, "1693|@mojaloop/central-ledger>@mojaloop/central-services-shared>shins>sanitize-html>postcss": { "decision": "ignore", @@ -46,21 +45,43 @@ "expiresAt": 1623606015896 }, "1751|@mojaloop/central-ledger>@mojaloop/central-services-shared>shins>chokidar>glob-parent": { - "decision": "ignore", - "madeAt": 1624433594959, - "expiresAt": 1627025580569 + "decision": "fix", + "madeAt": 1628081487298 }, "1751|@mojaloop/central-services-shared>shins>chokidar>glob-parent": { - "decision": "ignore", - "madeAt": 1624433594959, - "expiresAt": 1627025580569 + "decision": "fix", + "madeAt": 1628081487298 }, "1751|@mojaloop/central-ledger>require-glob>glob-parent": { "decision": "ignore", - "madeAt": 1624433599999, - "expiresAt": 1627025580569 + "madeAt": 1628081593213, + "expiresAt": 1628686256766 + }, + "1766|@mojaloop/central-ledger>@mojaloop/central-services-shared>widdershins>urijs": { + "decision": "fix", + "madeAt": 1628081506637 + }, + "1766|@mojaloop/central-services-shared>widdershins>urijs": { + "decision": "fix", + "madeAt": 1628081506637 + }, + "1770|@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": { + "decision": "fix", + "madeAt": 1628081525409 + }, + "1770|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": { + "decision": "fix", + "madeAt": 1628081525409 + }, + "1771|@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": { + "decision": "fix", + "madeAt": 1628081525409 + }, + "1771|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": { + "decision": "fix", + "madeAt": 1628081525409 } }, "rules": {}, "version": 1 -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index cf349443..9d8233bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "central-settlement", - "version": "13.4.0", + "version": "13.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -543,9 +543,9 @@ } }, "@eslint/eslintrc": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", - "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -572,9 +572,9 @@ } }, "globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -2261,9 +2261,9 @@ "dev": true }, "@types/lodash": { - "version": "4.14.171", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.171.tgz", - "integrity": "sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg==", + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==", "dev": true }, "@types/long": { @@ -2389,9 +2389,9 @@ } }, "ajv": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.1.tgz", - "integrity": "sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -2569,12 +2569,6 @@ "sprintf-js": "~1.0.2" } }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", - "dev": true - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -2705,13 +2699,10 @@ } }, "available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "dev": true, - "requires": { - "array-filter": "^1.0.0" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz", + "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==", + "dev": true }, "awaitify-stream": { "version": "1.0.2", @@ -4477,13 +4468,13 @@ } }, "eslint": { - "version": "7.30.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.30.0.tgz", - "integrity": "sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.2", + "@eslint/eslintrc": "^0.4.3", "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -4546,9 +4537,9 @@ } }, "globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -5442,9 +5433,9 @@ } }, "flatted": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.0.tgz", - "integrity": "sha512-XprP7lDrVT+kE2c2YlfiV+IfS9zxukiIOvNamPNsImNhXadSsQEbosItdL9bUQlCZXR13SvPk20BjWSWLA7m4A==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, "fn.name": { @@ -5712,9 +5703,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -5958,9 +5949,9 @@ } }, "hapi-swagger": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/hapi-swagger/-/hapi-swagger-14.2.1.tgz", - "integrity": "sha512-K1oN/88Jh4/Q6ZMKxrbQT6bYrFouA3PaE8Kh5F3loNyPm8dezAeGvx8vreeNWCzFLwqHNFjFbZcgBgKnYF1Dwg==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/hapi-swagger/-/hapi-swagger-14.2.4.tgz", + "integrity": "sha512-90kGIcWADmi8wOIJwd4jopIs+cedvl6lLsK42tObbZTvNVOwTOQkLRlVBbVO2L0t9ejlXMGdSOnPoISh8kDd1w==", "requires": { "@hapi/boom": "^9.1.0", "@hapi/hoek": "^9.0.2", @@ -6091,6 +6082,15 @@ } } }, + "has-dynamic-import": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.0.0.tgz", + "integrity": "sha512-GYPi/aZmACJVrVfEhP1rNUFmtCuK+SQ96mn8Bs7mXiGZRAJiI4VjaMmjj4uuvW8qaF085uWJvyJk9UNYUIYn0A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6576,9 +6576,9 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", "dev": true }, "is-binary-path": { @@ -6590,12 +6590,12 @@ } }, "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", "dev": true, "requires": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" } }, "is-buffer": { @@ -6696,9 +6696,9 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", "dev": true }, "is-obj": { @@ -11875,17 +11875,28 @@ } }, "sinon": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", - "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.2.tgz", + "integrity": "sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/fake-timers": "^7.1.2", "@sinonjs/samsam": "^6.0.2", "diff": "^5.0.0", "nise": "^5.1.0", "supports-color": "^7.2.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + } } }, "sisteransi": { @@ -12594,17 +12605,6 @@ "semver": "^7.3.2" }, "dependencies": { - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, "mime": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", @@ -12625,9 +12625,9 @@ } }, "supertest": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.1.3.tgz", - "integrity": "sha512-v2NVRyP73XDewKb65adz+yug1XMtmvij63qIWHZzSX8tp6wiq6xBLUy4SUAd2NII6wIipOmHT/FD9eicpJwdgQ==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.1.4.tgz", + "integrity": "sha512-giC9Zm+Bf1CZP09ciPdUyl+XlMAu6rbch79KYiYKOGcbK2R1wH8h+APul1i/3wN6RF1XfWOIF+8X1ga+7SBrug==", "dev": true, "requires": { "methods": "^1.1.2", @@ -12939,9 +12939,9 @@ } }, "tape": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.2.2.tgz", - "integrity": "sha512-grXrzPC1ly2kyTMKdqxh5GiLpb0BpNctCuecTB0psHX4Gu0nc+uxWR4xKjTh/4CfQlH4zhvTM2/EXmHXp6v/uA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.3.0.tgz", + "integrity": "sha512-C4MJ44uuvFail8XhZD6D2j2u1+lar6KMkEdtJBApkC/5Hfk99OvyRcQFwiHWZLKwvxnEDeXBoTRw53p1o3Wgxw==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -12949,12 +12949,14 @@ "defined": "^1.0.0", "dotignore": "^0.1.2", "for-each": "^0.3.3", - "glob": "^7.1.6", + "get-package-type": "^0.1.0", + "glob": "^7.1.7", "has": "^1.0.3", + "has-dynamic-import": "^2.0.0", "inherits": "^2.0.4", - "is-regex": "^1.1.2", + "is-regex": "^1.1.3", "minimist": "^1.2.5", - "object-inspect": "^1.9.0", + "object-inspect": "^1.11.0", "object-is": "^1.1.5", "object.assign": "^4.1.2", "resolve": "^2.0.0-next.3", @@ -12969,12 +12971,48 @@ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, "resolve": { "version": "2.0.0-next.3", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", @@ -13019,9 +13057,9 @@ } }, "tar": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", - "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", + "integrity": "sha512-oaWyu5dQbHaYcyZCTfyPpC+VmI62/OM2RTUYavTk1MDr1cwW5Boi3baeYQKiZbY2uSQJGr+iMOzb/JFxLrft+g==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -13524,9 +13562,9 @@ } }, "urijs": { - "version": "1.19.6", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.6.tgz", - "integrity": "sha512-eSXsXZ2jLvGWeLYlQA3Gh36BcjF+0amo92+wHPyN1mdR8Nxf75fuEuYTd9c0a+m/vhCjRK0ESlE9YNLW+E1VEw==" + "version": "1.19.7", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.7.tgz", + "integrity": "sha512-Id+IKjdU0Hx+7Zx717jwLPsPeUqz7rAtuVBRLLs+qn+J2nf9NGITWVCxcijgYxBqe83C7sqsQPs6H1pyz3x9gA==" }, "url-parse-lax": { "version": "3.0.0", diff --git a/package.json b/package.json index 97f74e73..d4bfe214 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "central-settlement", "description": "Central settlements hosted by a scheme to record and make settlements.", - "version": "13.4.0", + "version": "13.4.1", "license": "Apache-2.0", "private": false, "author": "ModusBox", @@ -46,7 +46,7 @@ "blipp": "4.0.2", "hapi-auth-bearer-token": "8.0.0", "hapi-openapi": "3.0.0", - "hapi-swagger": "14.2.1", + "hapi-swagger": "14.2.4", "lodash": "4.17.21", "mustache": "4.2.0", "parse-strings-in-object": "2.0.0", @@ -56,16 +56,16 @@ }, "devDependencies": { "@hapi/joi": "17.1.1", - "@types/lodash": "4.14.171", + "@types/lodash": "4.14.172", "@mojaloop/central-services-metrics": "11.0.0", - "ajv": "8.6.1", + "ajv": "8.6.2", "ajv-keywords": "5.0.0", "axios": "0.21.1", "bluebird": "3.7.2", "chai": "4.3.4", "chai-exclude": "2.0.3", "chai-subset": "1.6.0", - "eslint": "7.30.0", + "eslint": "7.32.0", "faucet": "0.0.1", "get-port": "5.1.1", "jest": "27.0.6", @@ -78,12 +78,12 @@ "pre-commit": "1.2.2", "proxyquire": "2.1.3", "rewire": "5.0.0", - "sinon": "11.1.1", + "sinon": "11.1.2", "standard": "16.0.3", - "supertest": "6.1.3", + "supertest": "6.1.4", "swagmock": "1.0.0", "tap-xunit": "2.4.1", - "tape": "5.2.2", + "tape": "5.3.0", "tapes": "4.1.0" }, "peerDependencies": { @@ -91,7 +91,7 @@ "@mojaloop/central-services-logger": "10.6.1", "@mojaloop/central-services-metrics": "11.0.0", "@mojaloop/event-sdk": "10.7.1", - "ajv": "8.6.1", + "ajv": "8.6.2", "ajv-keywords": "5.0.0" }, "peerDependenciesMeta": { diff --git a/src/api/handlers/settlementWindows.js b/src/api/handlers/settlementWindows.js index 2afbc35b..a6b6da1d 100644 --- a/src/api/handlers/settlementWindows.js +++ b/src/api/handlers/settlementWindows.js @@ -59,8 +59,12 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.SOURCE], headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) + span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = await request.server.methods.enums('settlementWindowStates') const settlementWindowResult = await settlementWindows.getByParams({ query: request.query }, Enums) diff --git a/src/api/handlers/settlementWindows/{id}.js b/src/api/handlers/settlementWindows/{id}.js index a37b0b41..94a0576c 100644 --- a/src/api/handlers/settlementWindows/{id}.js +++ b/src/api/handlers/settlementWindows/{id}.js @@ -60,7 +60,10 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = await request.server.methods.enums('settlementWindowStates') const settlementWindowResult = await settlementWindow.getById({ settlementWindowId }, Enums, request.server.log) return h.response(settlementWindowResult) @@ -89,7 +92,7 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit(request.payload, EventSdk.AuditEventAction.start) const Enums = await request.server.methods.enums('settlementWindowStates') return await settlementWindow.process({ settlementWindowId, reason, headers: request.raw.req.headers }, Enums) } catch (err) { diff --git a/src/api/handlers/settlements.js b/src/api/handlers/settlements.js index 1626e577..c7a44a1a 100644 --- a/src/api/handlers/settlements.js +++ b/src/api/handlers/settlements.js @@ -60,7 +60,10 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = await request.server.methods.enums('settlementStates') const settlementResult = await Settlements.getSettlementsByParams({ query: request.query }, Enums) @@ -89,7 +92,7 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit(request.payload, EventSdk.AuditEventAction.start) const Enums = { ledgerEntryTypes: await request.server.methods.enums('ledgerEntryTypes'), diff --git a/src/api/handlers/settlements/{id}.js b/src/api/handlers/settlements/{id}.js index 90deedcd..9b5859ec 100644 --- a/src/api/handlers/settlements/{id}.js +++ b/src/api/handlers/settlements/{id}.js @@ -62,7 +62,10 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = await request.server.methods.enums('settlementStates') request.server.log('info', `get settlement by Id requested with id ${settlementId}`) @@ -93,7 +96,7 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit(request.payload, EventSdk.AuditEventAction.start) const p = request.payload if (p.participants && (p.state || p.reason || p.externalReference)) { diff --git a/src/api/handlers/settlements/{sid}/participants/{pid}.js b/src/api/handlers/settlements/{sid}/participants/{pid}.js index 0b42c18c..7ec87fb8 100644 --- a/src/api/handlers/settlements/{sid}/participants/{pid}.js +++ b/src/api/handlers/settlements/{sid}/participants/{pid}.js @@ -63,7 +63,10 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = { settlementWindowStates: await request.server.methods.enums('settlementWindowStates'), ledgerAccountTypes: await request.server.methods.enums('ledgerAccountTypes') @@ -96,7 +99,7 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit(request.payload, EventSdk.AuditEventAction.start) const p = request.payload const universalPayload = { participants: [ diff --git a/src/api/handlers/settlements/{sid}/participants/{pid}/accounts/{aid}.js b/src/api/handlers/settlements/{sid}/participants/{pid}/accounts/{aid}.js index 6209d1b4..e19912ab 100644 --- a/src/api/handlers/settlements/{sid}/participants/{pid}/accounts/{aid}.js +++ b/src/api/handlers/settlements/{sid}/participants/{pid}/accounts/{aid}.js @@ -58,7 +58,10 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit({ + headers: request.headers, + params: request.params + }, EventSdk.AuditEventAction.start) const Enums = { settlementWindowStates: await request.server.methods.enums('settlementWindowStates'), ledgerAccountTypes: await request.server.methods.enums('ledgerAccountTypes') @@ -92,7 +95,7 @@ module.exports = { headers[Enum.Http.Headers.FSPIOP.DESTINATION] ) span.setTags(spanTags) - await span.audit(request.payload, EventSdk.AuditEventAction.ingress) + await span.audit(request.payload, EventSdk.AuditEventAction.start) const accounts = [Object.assign({}, request.payload, { id: accountId })] const universalPayload = { participants: [ From 4d7b2d97bc587e2ccc48a85e915426c7f1a64ec2 Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Wed, 4 Aug 2021 15:05:43 +0200 Subject: [PATCH 2/4] Updated timestamp for previous audit-resolve fix --- audit-resolve.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audit-resolve.json b/audit-resolve.json index 6ebda64e..ca877d0f 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -2,7 +2,7 @@ "decisions": { "1677|@mojaloop/central-ledger>npm-run-all>read-pkg>normalize-package-data>hosted-git-info": { "decision": "fix", - "madeAt": 1628081467897 + "madeAt": 1628082181624 }, "1500|@mojaloop/central-ledger>@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", From 2f4630ece0e6cea8a316a1df34ab01fdb31a7091 Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Wed, 4 Aug 2021 15:33:21 +0200 Subject: [PATCH 3/4] Updated audit resolve --- audit-resolve.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audit-resolve.json b/audit-resolve.json index ca877d0f..bdcf7dce 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -1,9 +1,5 @@ { "decisions": { - "1677|@mojaloop/central-ledger>npm-run-all>read-pkg>normalize-package-data>hosted-git-info": { - "decision": "fix", - "madeAt": 1628082181624 - }, "1500|@mojaloop/central-ledger>@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", "madeAt": 1628081562434, @@ -80,6 +76,10 @@ "1771|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": { "decision": "fix", "madeAt": 1628081525409 + }, + "1677|@mojaloop/central-ledger>npm-run-all>read-pkg>normalize-package-data>hosted-git-info": { + "decision": "fix", + "madeAt": 1628083974175 } }, "rules": {}, From a59177bd827deffd7e5444bf08808a563a73e631 Mon Sep 17 00:00:00 2001 From: Miguel de Barros Date: Wed, 4 Aug 2021 15:35:56 +0200 Subject: [PATCH 4/4] Updates for audit resolve --- audit-resolve.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audit-resolve.json b/audit-resolve.json index bdcf7dce..9e0ce3b1 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -78,8 +78,9 @@ "madeAt": 1628081525409 }, "1677|@mojaloop/central-ledger>npm-run-all>read-pkg>normalize-package-data>hosted-git-info": { - "decision": "fix", - "madeAt": 1628083974175 + "decision": "ignore", + "madeAt": 1628084074530, + "expiresAt": 1628688867371 } }, "rules": {},