From 8325f0040ecaa642b9546f35054bfea8c4926d15 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 22 Sep 2023 15:23:11 +0800 Subject: [PATCH 01/64] chore: bump mongoose to 6.12 --- package-lock.json | 4365 +++++++++++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 2779 insertions(+), 1588 deletions(-) diff --git a/package-lock.json b/package-lock.json index 544ea63ea9..a6397742cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,7 +77,7 @@ "moment-timezone": "0.5.41", "mongodb-memory-server-core": "^6.9.6", "mongodb-uri": "^0.9.7", - "mongoose": "^5.13.20", + "mongoose": "^6.12.0", "multiparty": ">=4.2.3", "nan": "^2.17.0", "neverthrow": "^6.0.0", @@ -360,6 +360,524 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz", "integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==" }, + "node_modules/@aws-sdk/client-cognito-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.433.0.tgz", + "integrity": "sha512-42znkBhcLweedtcp+k0Vz4As9FavThrYYGtvuleW82GQqtwyOXSifinXw7xfY2JngqCuCEenFQPsf1hudOWzyw==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.433.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/client-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.433.0.tgz", + "integrity": "sha512-L7ksMP7UnYH+w52ly+m+s5vk8662VtyqJ+UduFEMPqKUHTFEm7w+CCw4Xfk3hl5GlVvqPvYWqBqv8eLKSHpCEQ==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/client-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.433.0.tgz", + "integrity": "sha512-hQ+NLIcA1KRJ2qPdrtkJ3fOEVnehLLMlnB/I5mjg9K2UKjuiOufLao6tc5SyW9fseIL9AdX3fjJ8Unhg+y1RWg==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.433.0.tgz", + "integrity": "sha512-T+YhCOORyA4+i4T86FfFCmi/jPsmLOP6GAtScHp/K8XzB9XuVvJSZ+T8SUKeW6/9G9z3Az7dqeBVLcMdC6fFDA==", + "optional": true, + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.433.0.tgz", + "integrity": "sha512-uOTBJszqGJIX5SrH2YdN501cv9rW4ghuSkasxI9DL+sVV5YRMd/bwu6I3PphRyK7z4dosDEbJ1xoIuVR/W04HQ==", + "optional": true, + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.433.0.tgz", + "integrity": "sha512-vuc2X7q/1HUAO/NowfnNMpRDoHw8H2lyZZzUc0lmamy6PDrEFBi/VTm1nStGPuS9egCFrYlkRHsfp50ukYGa5w==", + "optional": true, + "dependencies": { + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/token-providers": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "optional": true, + "dependencies": { + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.433.0.tgz", + "integrity": "sha512-jMgA1jHfisBK4oSjMKrtKEZf0sl2vzADivkFmyZFzORpSZxBnF6hC21RjaI+70LJLcc9rSCzLgcoz5lHb9LLDg==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "optional": true, + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/token-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.433.0.tgz", + "integrity": "sha512-Q6aYVaQKB+CkBLHQQlN8MHVpOzZv9snRfVz7SxIpdbHkRuGEHiLliCY3fg6Sonvu3AKEPERPuHcaC75tnNpOBw==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/util-endpoints": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.433.0.tgz", + "integrity": "sha512-LFNUh9FH7RMtYjSjPGz9lAJQMzmJ3RcXISzc5X5k2R/9mNwMK7y1k2VAfvx+RbuDbll6xwsXlgv6QHcxVdF2zw==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.433.0.tgz", + "integrity": "sha512-yT1tO4MbbsUBLl5+S+jVv8wxiAtP5TKjKib9B2KQ2x0OtWWTrIf2o+IZK8va+zQqdV4MVMjezdxdE20hOdB4yQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "optional": true, + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + }, "node_modules/@aws-sdk/client-lambda": { "version": "3.414.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.414.0.tgz", @@ -1010,6 +1528,53 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" }, + "node_modules/@aws-sdk/credential-provider-cognito-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.433.0.tgz", + "integrity": "sha512-zBTrVbruYkPY4/YrUNP11mHbuVwGx7lxfo/Hlul7iUFhRbVhd/Xg3EYi6fgdTojEWEhY4SltFwVFUrzVAm8V5g==", + "optional": true, + "dependencies": { + "@aws-sdk/client-cognito-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + }, "node_modules/@aws-sdk/credential-provider-env": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.347.0.tgz", @@ -1028,6 +1593,69 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.433.0.tgz", + "integrity": "sha512-HA3Op+tT/EvJnRTzeURFbygNUX5wx5wlD84h4RgWpDa6x3G0lhI1wxCUR5/+qzIpF5vC7E3Q9/yu7ln07RmZlg==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + }, "node_modules/@aws-sdk/credential-provider-imds": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.347.0.tgz", @@ -1155,6 +1783,503 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" }, + "node_modules/@aws-sdk/credential-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.433.0.tgz", + "integrity": "sha512-GKsdnFiab+uiwUCzEZKRVa0/h2Ov/Lft/69DJQtFqkM+RHT/XXhAOA9noZmCOyta6UlRbj3P5ep28oQOTc1czw==", + "optional": true, + "dependencies": { + "@aws-sdk/client-cognito-identity": "3.433.0", + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/client-sts": "3.433.0", + "@aws-sdk/credential-provider-cognito-identity": "3.433.0", + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-http": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/client-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.433.0.tgz", + "integrity": "sha512-L7ksMP7UnYH+w52ly+m+s5vk8662VtyqJ+UduFEMPqKUHTFEm7w+CCw4Xfk3hl5GlVvqPvYWqBqv8eLKSHpCEQ==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/client-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.433.0.tgz", + "integrity": "sha512-hQ+NLIcA1KRJ2qPdrtkJ3fOEVnehLLMlnB/I5mjg9K2UKjuiOufLao6tc5SyW9fseIL9AdX3fjJ8Unhg+y1RWg==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.433.0.tgz", + "integrity": "sha512-T+YhCOORyA4+i4T86FfFCmi/jPsmLOP6GAtScHp/K8XzB9XuVvJSZ+T8SUKeW6/9G9z3Az7dqeBVLcMdC6fFDA==", + "optional": true, + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.433.0.tgz", + "integrity": "sha512-uOTBJszqGJIX5SrH2YdN501cv9rW4ghuSkasxI9DL+sVV5YRMd/bwu6I3PphRyK7z4dosDEbJ1xoIuVR/W04HQ==", + "optional": true, + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.433.0.tgz", + "integrity": "sha512-vuc2X7q/1HUAO/NowfnNMpRDoHw8H2lyZZzUc0lmamy6PDrEFBi/VTm1nStGPuS9egCFrYlkRHsfp50ukYGa5w==", + "optional": true, + "dependencies": { + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/token-providers": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "optional": true, + "dependencies": { + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.433.0.tgz", + "integrity": "sha512-jMgA1jHfisBK4oSjMKrtKEZf0sl2vzADivkFmyZFzORpSZxBnF6hC21RjaI+70LJLcc9rSCzLgcoz5lHb9LLDg==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "optional": true, + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/token-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.433.0.tgz", + "integrity": "sha512-Q6aYVaQKB+CkBLHQQlN8MHVpOzZv9snRfVz7SxIpdbHkRuGEHiLliCY3fg6Sonvu3AKEPERPuHcaC75tnNpOBw==", + "optional": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/util-endpoints": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.433.0.tgz", + "integrity": "sha512-LFNUh9FH7RMtYjSjPGz9lAJQMzmJ3RcXISzc5X5k2R/9mNwMK7y1k2VAfvx+RbuDbll6xwsXlgv6QHcxVdF2zw==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.433.0.tgz", + "integrity": "sha512-yT1tO4MbbsUBLl5+S+jVv8wxiAtP5TKjKib9B2KQ2x0OtWWTrIf2o+IZK8va+zQqdV4MVMjezdxdE20hOdB4yQ==", + "optional": true, + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "optional": true, + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + }, "node_modules/@aws-sdk/eventstream-codec": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-codec/-/eventstream-codec-3.347.0.tgz", @@ -2053,23 +3178,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@babel/core/node_modules/json5": { "version": "2.2.1", "dev": true, @@ -2253,22 +3361,6 @@ "@babel/core": "^7.4.0-0" } }, - "node_modules/@babel/helper-define-polyfill-provider/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { "version": "6.3.0", "dev": true, @@ -4007,23 +5099,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@babel/preset-env/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4161,14 +5236,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/@babel/types": { "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", @@ -4364,23 +5431,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.19.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", @@ -4472,23 +5522,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -5443,6 +6476,15 @@ "node": ">=8" } }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.0.tgz", + "integrity": "sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw==", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "dev": true, @@ -5765,22 +6807,6 @@ "node": ">=16.3.0" } }, - "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@puppeteer/browsers/node_modules/tar-fs": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", @@ -5960,11 +6986,11 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.8.tgz", - "integrity": "sha512-2SOdVj5y0zE37Y9scSXoizoxgi6mgnDabi7a/SOfhl0p+50I0rIkuJTfyAuTPDtQ7e5dD6tSZPCLB3c/YM6Zig==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.12.tgz", + "integrity": "sha512-YIJyefe1mi3GxKdZxEBEuzYOeQ9xpYfqnFmWzojCssRAuR7ycxwpoRQgp965vuW426xUAQhCV5rCaWElQ7XsaA==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -5972,9 +6998,9 @@ } }, "node_modules/@smithy/abort-controller/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -5988,14 +7014,14 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/config-resolver": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.9.tgz", - "integrity": "sha512-QBkGPLUqyPmis9Erz8v4q5lo/ErnF7+GD5WZHa6JZiXopUPfaaM+B21n8gzS5xCkIXZmnwzNQhObP9xQPu8oqQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", + "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", "dependencies": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/types": "^2.3.2", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.1", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -6003,9 +7029,9 @@ } }, "node_modules/@smithy/config-resolver/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6019,14 +7045,14 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.11.tgz", - "integrity": "sha512-uJJs8dnM5iXkn8a2GaKvlKMhcOJ+oJPYqY9gY3CM/EieCVObIDjxUtR/g8lU/k/A+OauA78GzScAfulmFjPOYA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", + "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", "dependencies": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/property-provider": "^2.0.9", - "@smithy/types": "^2.3.2", - "@smithy/url-parser": "^2.0.8", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "tslib": "^2.5.0" }, "engines": { @@ -6034,9 +7060,9 @@ } }, "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6192,23 +7218,23 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.1.4.tgz", - "integrity": "sha512-SL24M9W5ERByoXaVicRx+bj9GJVujDnPn+QO7GY7adhY0mPGa6DSF58pVKsgIh4r5Tx/k3SWCPlH4BxxSxA/fQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.4.tgz", + "integrity": "sha512-gIPRFEGi+c6V52eauGKrjDzPWF2Cu7Z1r5F8A3j2wcwz25sPG/t8kjsbEhli/tS/2zJp/ybCZXe4j4ro3yv/HA==", "dependencies": { - "@smithy/protocol-http": "^3.0.4", - "@smithy/querystring-builder": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/fetch-http-handler/node_modules/@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6216,9 +7242,9 @@ } }, "node_modules/@smithy/fetch-http-handler/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6232,11 +7258,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/hash-node": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.8.tgz", - "integrity": "sha512-yZL/nmxZzjZV5/QX5JWSgXlt0HxuMTwFO89CS++jOMMPiCMZngf6VYmtNdccs8IIIAMmfQeTzwu07XgUE/Zd3Q==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.12.tgz", + "integrity": "sha512-fDZnTr5j9t5qcbeJ037aMZXxMka13Znqwrgy3PAqYj6Dm3XHXHftTH3q+NWgayUxl1992GFtQt1RuEzRMy3NnQ==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -6246,9 +7272,9 @@ } }, "node_modules/@smithy/hash-node/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6262,18 +7288,18 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.8.tgz", - "integrity": "sha512-88VOS7W3KzUz/bNRc+Sl/F/CDIasFspEE4G39YZRHIh9YmsXF7GUyVaAKURfMNulTie62ayk6BHC9O0nOBAVgQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.12.tgz", + "integrity": "sha512-p5Y+iMHV3SoEpy3VSR7mifbreHQwVSvHSAz/m4GdoXfOzKzaYC8hYv10Ks7Deblkf7lhas8U+lAp9ThbBM+ZXA==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/invalid-dependency/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6303,12 +7329,12 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.10.tgz", - "integrity": "sha512-EGSbysyA4jH0p3xI6G0jdXoj9Iz9GUnAta6aEaHtXm3wVWtenRf80y2TeVvNkVSr5jwKOdSCjKIRI2l1A/oZLA==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.14.tgz", + "integrity": "sha512-poUNgKTw9XwPXfX9nEHpVgrMNVpaSMZbshqvPxFVoalF4wp6kRzYKOfdesSVectlQ51VtigoLfbXcdyPwvxgTg==", "dependencies": { - "@smithy/protocol-http": "^3.0.4", - "@smithy/types": "^2.3.2", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6316,11 +7342,11 @@ } }, "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6328,9 +7354,9 @@ } }, "node_modules/@smithy/middleware-content-length/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6344,14 +7370,16 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.8.tgz", - "integrity": "sha512-yOpogfG2d2V0cbJdAJ6GLAWkNOc9pVsL5hZUfXcxJu408N3CUCsXzIAFF6+70ZKSE+lCfG3GFErcSXv/UfUbjw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", + "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", "dependencies": { - "@smithy/middleware-serde": "^2.0.8", - "@smithy/types": "^2.3.2", - "@smithy/url-parser": "^2.0.8", - "@smithy/util-middleware": "^2.0.1", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -6359,9 +7387,9 @@ } }, "node_modules/@smithy/middleware-endpoint/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6375,16 +7403,16 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.11.tgz", - "integrity": "sha512-pknfokumZ+wvBERSuKAI2vVr+aK3ZgPiWRg6+0ZG4kKJogBRpPmDGWw+Jht0izS9ZaEbIobNzueIb4wD33JJVg==", - "dependencies": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/protocol-http": "^3.0.4", - "@smithy/service-error-classification": "^2.0.1", - "@smithy/types": "^2.3.2", - "@smithy/util-middleware": "^2.0.1", - "@smithy/util-retry": "^2.0.1", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", + "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "@smithy/util-retry": "^2.0.5", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -6393,11 +7421,11 @@ } }, "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6405,9 +7433,9 @@ } }, "node_modules/@smithy/middleware-retry/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6429,11 +7457,11 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.8.tgz", - "integrity": "sha512-Is0sm+LiNlgsc0QpstDzifugzL9ehno1wXp109GgBgpnKTK3j+KphiparBDI4hWTtH9/7OUsxuspNqai2yyhcg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.12.tgz", + "integrity": "sha512-IBeco157lIScecq2Z+n0gq56i4MTnfKxS7rbfrAORveDJgnbBAaEQgYqMqp/cYqKrpvEXcyTjwKHrBjCCIZh2A==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6441,9 +7469,9 @@ } }, "node_modules/@smithy/middleware-serde/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6457,11 +7485,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.1.tgz", - "integrity": "sha512-UexsfY6/oQZRjTQL56s9AKtMcR60tBNibSgNYX1I2WXaUaXg97W9JCkFyth85TzBWKDBTyhLfenrukS/kyu54A==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.6.tgz", + "integrity": "sha512-YSvNZeOKWLJ0M/ycxwDIe2Ztkp6Qixmcml1ggsSv2fdHKGkBPhGrX5tMzPGMI1yyx55UEYBi2OB4s+RriXX48A==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6469,9 +7497,9 @@ } }, "node_modules/@smithy/middleware-stack/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6485,13 +7513,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/node-config-provider": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.11.tgz", - "integrity": "sha512-CaR1dciSSGKttjhcefpytYjsfI/Yd5mqL8am4wfmyFCDxSiPsvnEWHl8UjM/RbcAjX0klt+CeIKPSHEc0wGvJA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", + "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", "dependencies": { - "@smithy/property-provider": "^2.0.9", - "@smithy/shared-ini-file-loader": "^2.0.10", - "@smithy/types": "^2.3.2", + "@smithy/property-provider": "^2.0.13", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6499,9 +7527,9 @@ } }, "node_modules/@smithy/node-config-provider/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6515,14 +7543,14 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/node-http-handler": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.4.tgz", - "integrity": "sha512-8Rw/AusvWDyC6SK8esAcVBeTlQHf94NMFv805suFUJCQ2gwlh0oLDNh+6s2MDOrxcjvLxjjzv1mytM0Mt+0cPQ==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.8.tgz", + "integrity": "sha512-KZylM7Wff/So5SmCiwg2kQNXJ+RXgz34wkxS7WNwIUXuZrZZpY/jKJCK+ZaGyuESDu3TxcaY+zeYGJmnFKbQsA==", "dependencies": { - "@smithy/abort-controller": "^2.0.8", - "@smithy/protocol-http": "^3.0.4", - "@smithy/querystring-builder": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/abort-controller": "^2.0.12", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6530,11 +7558,11 @@ } }, "node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6542,9 +7570,9 @@ } }, "node_modules/@smithy/node-http-handler/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6558,11 +7586,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/property-provider": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.9.tgz", - "integrity": "sha512-25pPZ8f8DeRwYI5wbPRZaoMoR+3vrw8DwbA0TjP+GsdiB2KxScndr4HQehiJ5+WJ0giOTWhLz0bd+7Djv1qpUQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.13.tgz", + "integrity": "sha512-VJqUf2CbsQX6uUiC5dUPuoEATuFjkbkW3lJHbRnpk9EDC9X+iKqhfTK+WP+lve5EQ9TcCI1Q6R7hrg41FyC54w==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6570,9 +7598,9 @@ } }, "node_modules/@smithy/property-provider/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6603,11 +7631,11 @@ "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.8.tgz", - "integrity": "sha512-+vzIMwjC8Saz97/ptPn+IJRCRRZ+pP95ZIWDRqEqZV/a6hiKbaFoMSa2iCKsnKzR696U2JZXrDqMu3e/FD1+2g==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.12.tgz", + "integrity": "sha512-cDbF07IuCjiN8CdGvPzfJjXIrmDSelScRfyJYrYBNBbKl2+k7QD/KqiHhtRyEKgID5mmEVrV6KE6L/iPJ98sFw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -6616,9 +7644,9 @@ } }, "node_modules/@smithy/querystring-builder/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6632,11 +7660,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.8.tgz", - "integrity": "sha512-ArbanNuR7O/MmTd90ZqhDqGOPPDYmxx3huHxD+R3cuCnazcK/1tGQA+SnnR5307T7ZRb5WTpB6qBggERuibVSA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.12.tgz", + "integrity": "sha512-fytyTcXaMzPBuNtPlhj5v6dbl4bJAnwKZFyyItAGt4Tgm9HFPZNo7a9r1SKPr/qdxUEBzvL9Rh+B9SkTX3kFxg==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6644,9 +7672,9 @@ } }, "node_modules/@smithy/querystring-parser/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6660,20 +7688,20 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.1.tgz", - "integrity": "sha512-QHa9+t+v4s0cMuDCcbjIJN67mNZ42/+fc3jKe8P6ZMPXZl5ksKk6a8vhZ/m494GZng5eFTc3OePv+NF9cG83yg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", "dependencies": { - "@smithy/types": "^2.3.2" + "@smithy/types": "^2.4.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6687,11 +7715,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.10.tgz", - "integrity": "sha512-jWASteSezRKohJ7GdA7pHDvmr7Q7tw3b5mu3xLHIkZy/ICftJ+O7aqNaF8wklhI7UNFoQ7flFRM3Rd0KA+1BbQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", + "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6699,9 +7727,9 @@ } }, "node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6749,13 +7777,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/smithy-client": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.5.tgz", - "integrity": "sha512-7S865uKzsxApM8W8Q6zkij7tcUFgaG8PuADMFdMt1yL/ku3d0+s6Zwrg3N7iXCPM08Gu/mf0BIfTXIu/9i450Q==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.12.tgz", + "integrity": "sha512-XXqhridfkKnpj+lt8vM6HRlZbqUAqBjVC74JIi13F/AYQd/zTj9SOyGfxnbp4mjY9q28LityxIuV8CTinr9r5w==", "dependencies": { - "@smithy/middleware-stack": "^2.0.1", - "@smithy/types": "^2.3.2", - "@smithy/util-stream": "^2.0.11", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "engines": { @@ -6763,9 +7791,9 @@ } }, "node_modules/@smithy/smithy-client/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6795,19 +7823,19 @@ "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" }, "node_modules/@smithy/url-parser": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.8.tgz", - "integrity": "sha512-wQw7j004ScCrBRJ+oNPXlLE9mtofxyadSZ9D8ov/rHkyurS7z1HTNuyaGRj6OvKsEk0SVQsuY0C9+EfM75XTkw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.12.tgz", + "integrity": "sha512-qgkW2mZqRvlNUcBkxYB/gYacRaAdck77Dk3/g2iw0S9F0EYthIS3loGfly8AwoWpIvHKhkTsCXXQfzksgZ4zIA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/querystring-parser": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/url-parser/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6900,13 +7928,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.9.tgz", - "integrity": "sha512-JONLJVQWT8165XoSV36ERn3SVlZLJJ4D6IeGsCSePv65Uxa93pzSLE0UMSR9Jwm4zix7rst9AS8W5QIypZWP8Q==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.16.tgz", + "integrity": "sha512-Uv5Cu8nVkuvLn0puX+R9zWbSNpLIR3AxUlPoLJ7hC5lvir8B2WVqVEkJLwtixKAncVLasnTVjPDCidtAUTGEQw==", "dependencies": { - "@smithy/property-provider": "^2.0.9", - "@smithy/smithy-client": "^2.1.5", - "@smithy/types": "^2.3.2", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -6915,9 +7943,9 @@ } }, "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6931,16 +7959,16 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.11.tgz", - "integrity": "sha512-tmqjNsfj+bgZN6jXBe6efZnukzILA7BUytHkzqikuRLNtR+0VVchQHvawD0w6vManh76rO81ydhioe7i4oBzuA==", - "dependencies": { - "@smithy/config-resolver": "^2.0.9", - "@smithy/credential-provider-imds": "^2.0.11", - "@smithy/node-config-provider": "^2.0.11", - "@smithy/property-provider": "^2.0.9", - "@smithy/smithy-client": "^2.1.5", - "@smithy/types": "^2.3.2", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", + "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", + "dependencies": { + "@smithy/config-resolver": "^2.0.16", + "@smithy/credential-provider-imds": "^2.0.18", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6948,9 +7976,9 @@ } }, "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6980,11 +8008,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/util-middleware": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.1.tgz", - "integrity": "sha512-LnsBMi0Mg3gfz/TpNGLv2Jjcz2ra1OX5HR/4IaCepIYmtPQzqMWDdhX/XTW1LS8OZ0xbQuyQPcHkQ+2XkhWOVQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz", + "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==", "dependencies": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -6992,9 +8020,9 @@ } }, "node_modules/@smithy/util-middleware/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -7008,12 +8036,12 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/util-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.1.tgz", - "integrity": "sha512-naj4X0IafJ9yJnVJ58QgSMkCNLjyQOnyrnKh/T0f+0UOUxJiT8vuFn/hS7B/pNqbo2STY7PyJ4J4f+5YqxwNtA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.5.tgz", + "integrity": "sha512-x3t1+MQAJ6QONk3GTbJNcugCFDVJ+Bkro5YqQQK1EyVesajNDqxFtCx9WdOFNGm/Cbm7tUdwVEmfKQOJoU2Vtw==", "dependencies": { - "@smithy/service-error-classification": "^2.0.1", - "@smithy/types": "^2.3.2", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -7021,9 +8049,9 @@ } }, "node_modules/@smithy/util-retry/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -7037,13 +8065,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@smithy/util-stream": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.11.tgz", - "integrity": "sha512-2MeWfqSpZKdmEJ+tH8CJQSgzLWhH5cmdE24X7JB0hiamXrOmswWGGuPvyj/9sQCTclo57pNxLR2p7KrP8Ahiyg==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.17.tgz", + "integrity": "sha512-fP/ZQ27rRvHsqItds8yB7jerwMpZFTL3QqbQbidUiG0+mttMoKdP0ZqnvM8UK5q0/dfc3/pN7g4XKPXOU7oRWw==", "dependencies": { - "@smithy/fetch-http-handler": "^2.1.4", - "@smithy/node-http-handler": "^2.1.4", - "@smithy/types": "^2.3.2", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -7055,9 +8083,9 @@ } }, "node_modules/@smithy/util-stream/node_modules/@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -7592,22 +8620,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/@stoplight/prism-http/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@stoplight/prism-http/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7796,6 +8808,7 @@ }, "node_modules/@types/bson": { "version": "4.0.4", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -8111,6 +9124,7 @@ }, "node_modules/@types/mongodb": { "version": "3.6.20", + "dev": true, "license": "MIT", "dependencies": { "@types/bson": "*", @@ -8324,6 +9338,20 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.2.tgz", + "integrity": "sha512-uNv6b/uGRLlCVmelat2rA8bcVd3k/42mV2EmjhPh6JLkd35T5bgwR/t6xy7a9MWhd9sixIeBUzhBenvk3NO+DQ==" + }, + "node_modules/@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "dependencies": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, "node_modules/@types/yargs-parser": { "version": "15.0.0", "dev": true, @@ -8370,23 +9398,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -8503,23 +9514,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -8588,23 +9582,6 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/types": { "version": "5.47.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.0.tgz", @@ -8645,23 +9622,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -9042,21 +10002,6 @@ "node": ">= 6.0.0" } }, - "node_modules/agent-base/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/aggregate-error": { "version": "3.0.1", "dev": true, @@ -10361,6 +11306,7 @@ "node_modules/bl": { "version": "2.2.1", "license": "MIT", + "optional": true, "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -11668,21 +12614,6 @@ "mongodb": "^4.1.0" } }, - "node_modules/connect-mongo/node_modules/debug": { - "version": "4.3.1", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/console-browserify": { "version": "1.2.0", "dev": true @@ -12439,16 +13370,21 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/debug": { - "version": "3.1.0", - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, "node_modules/decamelize": { "version": "1.2.0", "dev": true, @@ -12758,6 +13694,7 @@ "node_modules/denque": { "version": "1.4.1", "license": "Apache-2.0", + "optional": true, "engines": { "node": ">=0.10" } @@ -13183,23 +14120,6 @@ "node": ">=10.0.0" } }, - "node_modules/engine.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/engine.io/node_modules/ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", @@ -14065,23 +14985,6 @@ "node": ">= 8" } }, - "node_modules/eslint-plugin-typesafe/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/eslint-plugin-typesafe/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -14493,22 +15396,6 @@ "node": ">= 8" } }, - "node_modules/eslint/node_modules/debug": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", "dev": true, @@ -15474,21 +16361,6 @@ "@types/yauzl": "^2.9.1" } }, - "node_modules/extract-zip/node_modules/debug": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/extsprintf": { "version": "1.3.0", "dev": true, @@ -16662,22 +17534,6 @@ "node": ">= 14" } }, - "node_modules/get-uri/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/get-uri/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -17458,22 +18314,6 @@ "node": ">= 14" } }, - "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/http-reasons": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", @@ -17536,21 +18376,6 @@ "node": ">= 6" } }, - "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/human-signals": { "version": "1.1.1", "dev": true, @@ -18389,23 +19214,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/istanbul-lib-source-maps/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -19188,23 +19996,6 @@ "node": ">=12" } }, - "node_modules/jest-environment-jsdom/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/jest-environment-jsdom/node_modules/domexception": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", @@ -19327,18 +20118,6 @@ "node": ">=6" } }, - "node_modules/jest-environment-jsdom/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/jest-environment-jsdom/node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -19360,15 +20139,6 @@ "node": ">=14" } }, - "node_modules/jest-environment-jsdom/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/jest-environment-jsdom/node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -19381,19 +20151,6 @@ "node": ">=12" } }, - "node_modules/jest-environment-jsdom/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/jest-environment-jsdom/node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", @@ -20724,22 +21481,6 @@ "node": ">=14" } }, - "node_modules/jsdom/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/jsdom/node_modules/domexception": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", @@ -20841,14 +21582,6 @@ "node": ">=14" } }, - "node_modules/jsdom/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "engines": { - "node": ">=12" - } - }, "node_modules/jsdom/node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -21148,8 +21881,12 @@ "license": "MIT" }, "node_modules/kareem": { - "version": "2.3.2", - "license": "Apache-2.0" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "engines": { + "node": ">=12.0.0" + } }, "node_modules/keyv": { "version": "4.5.0", @@ -21301,22 +22038,6 @@ "node": ">= 8" } }, - "node_modules/lint-staged/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/lint-staged/node_modules/execa": { "version": "6.1.0", "dev": true, @@ -22169,22 +22890,6 @@ "node": ">=12" } }, - "node_modules/maildev/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/maildev/node_modules/domexception": { "version": "4.0.0", "dev": true, @@ -22320,17 +23025,6 @@ "node": ">=6" } }, - "node_modules/maildev/node_modules/tr46": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/maildev/node_modules/w3c-xmlserializer": { "version": "3.0.0", "dev": true, @@ -22342,14 +23036,6 @@ "node": ">=12" } }, - "node_modules/maildev/node_modules/webidl-conversions": { - "version": "7.0.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, "node_modules/maildev/node_modules/whatwg-encoding": { "version": "2.0.0", "dev": true, @@ -22806,6 +23492,7 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", + "optional": true, "dependencies": { "bl": "^2.2.1", "bson": "^1.1.4", @@ -22840,6 +23527,15 @@ } } }, + "node_modules/mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, "node_modules/mongodb-memory-server-core": { "version": "6.9.6", "license": "MIT", @@ -22899,21 +23595,6 @@ "node": ">= 8" } }, - "node_modules/mongodb-memory-server-core/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/mongodb-memory-server-core/node_modules/find-cache-dir": { "version": "3.3.2", "license": "MIT", @@ -23062,6 +23743,7 @@ "node_modules/mongodb/node_modules/bson": { "version": "1.1.6", "license": "Apache-2.0", + "optional": true, "engines": { "node": ">=0.6.19" } @@ -23069,6 +23751,7 @@ "node_modules/mongodb/node_modules/optional-require": { "version": "1.1.8", "license": "Apache-2.0", + "optional": true, "dependencies": { "require-at": "^1.0.6" }, @@ -23077,47 +23760,59 @@ } }, "node_modules/mongoose": { - "version": "5.13.20", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.13.20.tgz", - "integrity": "sha512-TjGFa/XnJYt+wLmn8y9ssjyO2OhBMeEBtOHb9iJM16EWu2Du6L1Q6zSiEK2ziyYQM8agb4tumNIQFzqbxId7MA==", - "dependencies": { - "@types/bson": "1.x || 4.0.x", - "@types/mongodb": "^3.5.27", - "bson": "^1.1.4", - "kareem": "2.3.2", - "mongodb": "3.7.4", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.8.4", - "mquery": "3.2.5", - "ms": "2.1.2", - "optional-require": "1.0.x", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "13.5.2", - "sliced": "1.0.1" + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.12.1.tgz", + "integrity": "sha512-VEawZMiMaclKrR5q8rj+Bu95PfUmx0ld+dk/poi37fqPlSd93sE4TlIPSqBY9GKY9tZPxu0aDEtgFDuHoI8sOg==", + "dependencies": { + "bson": "^4.7.2", + "kareem": "2.5.1", + "mongodb": "4.17.1", + "mpath": "0.9.0", + "mquery": "4.0.3", + "ms": "2.1.3", + "sift": "16.0.1" }, "engines": { - "node": ">=4.0.0" + "node": ">=12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mongoose" } }, - "node_modules/mongoose-legacy-pluralize": { - "version": "1.0.2", - "license": "Apache-2.0", - "peerDependencies": { - "mongoose": "*" + "node_modules/mongoose/node_modules/bson": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", + "dependencies": { + "buffer": "^5.6.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/mongoose/node_modules/bson": { - "version": "1.1.6", - "license": "Apache-2.0", + "node_modules/mongoose/node_modules/mongodb": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.1.tgz", + "integrity": "sha512-MBuyYiPUPRTqfH2dV0ya4dcr2E5N52ocBuZ8Sgg/M030nGF78v855B3Z27mZJnp8PxjnUquEnAtjOsphgMZOlQ==", + "dependencies": { + "bson": "^4.7.2", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + }, "engines": { - "node": ">=0.6.19" + "node": ">=12.9.0" + }, + "optionalDependencies": { + "@aws-sdk/credential-providers": "^3.186.0", + "@mongodb-js/saslprep": "^1.1.0" } }, + "node_modules/mongoose/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/morgan": { "version": "1.10.0", "dev": true, @@ -23171,34 +23866,24 @@ } }, "node_modules/mpath": { - "version": "0.8.4", - "license": "MIT", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", "engines": { "node": ">=4.0.0" } }, "node_modules/mquery": { - "version": "3.2.5", - "license": "MIT", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", + "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", "dependencies": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" + "debug": "4.x" }, "engines": { - "node": ">=4.0.0" + "node": ">=12.0.0" } }, - "node_modules/mquery/node_modules/bluebird": { - "version": "3.5.1", - "license": "MIT" - }, - "node_modules/mquery/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, "node_modules/ms": { "version": "2.1.2", "license": "MIT" @@ -23998,13 +24683,6 @@ "version": "0.0.10", "license": "MIT" }, - "node_modules/optional-require": { - "version": "1.0.3", - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/os-browserify": { "version": "0.3.0", "dev": true, @@ -24143,22 +24821,6 @@ "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -25108,22 +25770,6 @@ "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/proxy-agent/node_modules/https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -25239,21 +25885,6 @@ "node-fetch": "^2.6.12" } }, - "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/puppeteer-core/node_modules/ws": { "version": "8.14.2", "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", @@ -25980,10 +26611,6 @@ "node": ">=0.10.0" } }, - "node_modules/regexp-clone": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", "dev": true, @@ -26153,6 +26780,7 @@ "node_modules/require-at": { "version": "1.0.6", "license": "Apache-2.0", + "optional": true, "engines": { "node": ">=4" } @@ -26733,8 +27361,9 @@ } }, "node_modules/sift": { - "version": "13.5.2", - "license": "MIT" + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" }, "node_modules/sifter": { "version": "0.5.4", @@ -26881,10 +27510,6 @@ "node": ">=8" } }, - "node_modules/sliced": { - "version": "1.0.1", - "license": "MIT" - }, "node_modules/slick-carousel": { "version": "1.8.1", "license": "MIT", @@ -27125,40 +27750,6 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", @@ -27196,22 +27787,6 @@ "node": ">= 14" } }, - "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socks/node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", @@ -27340,21 +27915,6 @@ "aws-sdk": "^2.1114.0" } }, - "node_modules/sqs-consumer/node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/sqs-producer": { "version": "2.1.0", "license": "Apache-2.0", @@ -27687,23 +28247,6 @@ "node": ">=6.4.0 <13 || >=14" } }, - "node_modules/superagent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/superagent/node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -28250,22 +28793,6 @@ "node": ">= 8" } }, - "node_modules/testcafe-browser-tools/node_modules/debug": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/testcafe-browser-tools/node_modules/del": { "version": "5.1.0", "dev": true, @@ -28700,22 +29227,6 @@ "node": ">= 8" } }, - "node_modules/testcafe/node_modules/debug": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/testcafe/node_modules/dedent": { "version": "0.4.0", "dev": true, @@ -29147,6 +29658,17 @@ "node": ">=0.8" } }, + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/tree-kill": { "version": "1.2.2", "dev": true, @@ -30496,6 +31018,14 @@ "node": ">= 0.10.0" } }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, "node_modules/webpack": { "version": "4.46.0", "dev": true, @@ -30960,6 +31490,18 @@ "node": ">=12" } }, + "node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/which": { "version": "1.3.1", "dev": true, @@ -31666,6 +32208,439 @@ } } }, + "@aws-sdk/client-cognito-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.433.0.tgz", + "integrity": "sha512-42znkBhcLweedtcp+k0Vz4As9FavThrYYGtvuleW82GQqtwyOXSifinXw7xfY2JngqCuCEenFQPsf1hudOWzyw==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.433.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "dependencies": { + "@aws-sdk/client-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.433.0.tgz", + "integrity": "sha512-L7ksMP7UnYH+w52ly+m+s5vk8662VtyqJ+UduFEMPqKUHTFEm7w+CCw4Xfk3hl5GlVvqPvYWqBqv8eLKSHpCEQ==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/client-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.433.0.tgz", + "integrity": "sha512-hQ+NLIcA1KRJ2qPdrtkJ3fOEVnehLLMlnB/I5mjg9K2UKjuiOufLao6tc5SyW9fseIL9AdX3fjJ8Unhg+y1RWg==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-ini": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.433.0.tgz", + "integrity": "sha512-T+YhCOORyA4+i4T86FfFCmi/jPsmLOP6GAtScHp/K8XzB9XuVvJSZ+T8SUKeW6/9G9z3Az7dqeBVLcMdC6fFDA==", + "optional": true, + "requires": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.433.0.tgz", + "integrity": "sha512-uOTBJszqGJIX5SrH2YdN501cv9rW4ghuSkasxI9DL+sVV5YRMd/bwu6I3PphRyK7z4dosDEbJ1xoIuVR/W04HQ==", + "optional": true, + "requires": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.433.0.tgz", + "integrity": "sha512-vuc2X7q/1HUAO/NowfnNMpRDoHw8H2lyZZzUc0lmamy6PDrEFBi/VTm1nStGPuS9egCFrYlkRHsfp50ukYGa5w==", + "optional": true, + "requires": { + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/token-providers": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "optional": true, + "requires": { + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-user-agent": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.433.0.tgz", + "integrity": "sha512-jMgA1jHfisBK4oSjMKrtKEZf0sl2vzADivkFmyZFzORpSZxBnF6hC21RjaI+70LJLcc9rSCzLgcoz5lHb9LLDg==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "optional": true, + "requires": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/token-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.433.0.tgz", + "integrity": "sha512-Q6aYVaQKB+CkBLHQQlN8MHVpOzZv9snRfVz7SxIpdbHkRuGEHiLliCY3fg6Sonvu3AKEPERPuHcaC75tnNpOBw==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-endpoints": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.433.0.tgz", + "integrity": "sha512-LFNUh9FH7RMtYjSjPGz9lAJQMzmJ3RcXISzc5X5k2R/9mNwMK7y1k2VAfvx+RbuDbll6xwsXlgv6QHcxVdF2zw==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-user-agent-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.433.0.tgz", + "integrity": "sha512-yT1tO4MbbsUBLl5+S+jVv8wxiAtP5TKjKib9B2KQ2x0OtWWTrIf2o+IZK8va+zQqdV4MVMjezdxdE20hOdB4yQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "requires": { + "tslib": "^2.5.0" + } + }, + "fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "optional": true, + "requires": { + "strnum": "^1.0.5" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + } + } + }, "@aws-sdk/client-lambda": { "version": "3.414.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.414.0.tgz", @@ -32230,6 +33205,46 @@ } } }, + "@aws-sdk/credential-provider-cognito-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.433.0.tgz", + "integrity": "sha512-zBTrVbruYkPY4/YrUNP11mHbuVwGx7lxfo/Hlul7iUFhRbVhd/Xg3EYi6fgdTojEWEhY4SltFwVFUrzVAm8V5g==", + "optional": true, + "requires": { + "@aws-sdk/client-cognito-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "dependencies": { + "@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "requires": { + "tslib": "^2.5.0" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + } + } + }, "@aws-sdk/credential-provider-env": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.347.0.tgz", @@ -32247,6 +33262,59 @@ } } }, + "@aws-sdk/credential-provider-http": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.433.0.tgz", + "integrity": "sha512-HA3Op+tT/EvJnRTzeURFbygNUX5wx5wlD84h4RgWpDa6x3G0lhI1wxCUR5/+qzIpF5vC7E3Q9/yu7ln07RmZlg==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "dependencies": { + "@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "requires": { + "tslib": "^2.5.0" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + } + } + }, "@aws-sdk/credential-provider-imds": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.347.0.tgz", @@ -32368,6 +33436,418 @@ } } }, + "@aws-sdk/credential-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.433.0.tgz", + "integrity": "sha512-GKsdnFiab+uiwUCzEZKRVa0/h2Ov/Lft/69DJQtFqkM+RHT/XXhAOA9noZmCOyta6UlRbj3P5ep28oQOTc1czw==", + "optional": true, + "requires": { + "@aws-sdk/client-cognito-identity": "3.433.0", + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/client-sts": "3.433.0", + "@aws-sdk/credential-provider-cognito-identity": "3.433.0", + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-http": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "dependencies": { + "@aws-sdk/client-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.433.0.tgz", + "integrity": "sha512-L7ksMP7UnYH+w52ly+m+s5vk8662VtyqJ+UduFEMPqKUHTFEm7w+CCw4Xfk3hl5GlVvqPvYWqBqv8eLKSHpCEQ==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/client-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.433.0.tgz", + "integrity": "sha512-hQ+NLIcA1KRJ2qPdrtkJ3fOEVnehLLMlnB/I5mjg9K2UKjuiOufLao6tc5SyW9fseIL9AdX3fjJ8Unhg+y1RWg==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-ini": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.433.0.tgz", + "integrity": "sha512-T+YhCOORyA4+i4T86FfFCmi/jPsmLOP6GAtScHp/K8XzB9XuVvJSZ+T8SUKeW6/9G9z3Az7dqeBVLcMdC6fFDA==", + "optional": true, + "requires": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.433.0.tgz", + "integrity": "sha512-uOTBJszqGJIX5SrH2YdN501cv9rW4ghuSkasxI9DL+sVV5YRMd/bwu6I3PphRyK7z4dosDEbJ1xoIuVR/W04HQ==", + "optional": true, + "requires": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-sso": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.433.0.tgz", + "integrity": "sha512-vuc2X7q/1HUAO/NowfnNMpRDoHw8H2lyZZzUc0lmamy6PDrEFBi/VTm1nStGPuS9egCFrYlkRHsfp50ukYGa5w==", + "optional": true, + "requires": { + "@aws-sdk/client-sso": "3.433.0", + "@aws-sdk/token-providers": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "optional": true, + "requires": { + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/middleware-user-agent": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.433.0.tgz", + "integrity": "sha512-jMgA1jHfisBK4oSjMKrtKEZf0sl2vzADivkFmyZFzORpSZxBnF6hC21RjaI+70LJLcc9rSCzLgcoz5lHb9LLDg==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "optional": true, + "requires": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/token-providers": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.433.0.tgz", + "integrity": "sha512-Q6aYVaQKB+CkBLHQQlN8MHVpOzZv9snRfVz7SxIpdbHkRuGEHiLliCY3fg6Sonvu3AKEPERPuHcaC75tnNpOBw==", + "optional": true, + "requires": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.433.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.433.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-endpoints": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.433.0.tgz", + "integrity": "sha512-LFNUh9FH7RMtYjSjPGz9lAJQMzmJ3RcXISzc5X5k2R/9mNwMK7y1k2VAfvx+RbuDbll6xwsXlgv6QHcxVdF2zw==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "@aws-sdk/util-user-agent-node": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.433.0.tgz", + "integrity": "sha512-yT1tO4MbbsUBLl5+S+jVv8wxiAtP5TKjKib9B2KQ2x0OtWWTrIf2o+IZK8va+zQqdV4MVMjezdxdE20hOdB4yQ==", + "optional": true, + "requires": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "optional": true, + "requires": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, + "@smithy/types": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", + "optional": true, + "requires": { + "tslib": "^2.5.0" + } + }, + "fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "optional": true, + "requires": { + "strnum": "^1.0.5" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "optional": true + } + } + }, "@aws-sdk/eventstream-codec": { "version": "3.347.0", "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-codec/-/eventstream-codec-3.347.0.tgz", @@ -33211,15 +34691,6 @@ "@babel/highlight": "^7.18.6" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "json5": { "version": "2.2.1", "dev": true @@ -33359,13 +34830,6 @@ "semver": "^6.1.2" }, "dependencies": { - "debug": { - "version": "4.3.4", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "semver": { "version": "6.3.0", "dev": true @@ -34512,15 +35976,6 @@ "@babel/helper-define-polyfill-provider": "^0.4.0" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -34625,13 +36080,6 @@ "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" } - }, - "debug": { - "version": "4.1.1", - "dev": true, - "requires": { - "ms": "^2.1.1" - } } } }, @@ -34786,15 +36234,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "globals": { "version": "13.19.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", @@ -34850,17 +36289,6 @@ "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.5" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@humanwhocodes/module-importer": { @@ -35569,6 +36997,15 @@ } } }, + "@mongodb-js/saslprep": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.0.tgz", + "integrity": "sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "dev": true, @@ -35808,14 +37245,6 @@ "yargs": "17.7.1" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "tar-fs": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", @@ -35960,18 +37389,18 @@ } }, "@smithy/abort-controller": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.8.tgz", - "integrity": "sha512-2SOdVj5y0zE37Y9scSXoizoxgi6mgnDabi7a/SOfhl0p+50I0rIkuJTfyAuTPDtQ7e5dD6tSZPCLB3c/YM6Zig==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.12.tgz", + "integrity": "sha512-YIJyefe1mi3GxKdZxEBEuzYOeQ9xpYfqnFmWzojCssRAuR7ycxwpoRQgp965vuW426xUAQhCV5rCaWElQ7XsaA==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -35984,21 +37413,21 @@ } }, "@smithy/config-resolver": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.9.tgz", - "integrity": "sha512-QBkGPLUqyPmis9Erz8v4q5lo/ErnF7+GD5WZHa6JZiXopUPfaaM+B21n8gzS5xCkIXZmnwzNQhObP9xQPu8oqQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", + "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", "requires": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/types": "^2.3.2", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.1", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36011,21 +37440,21 @@ } }, "@smithy/credential-provider-imds": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.11.tgz", - "integrity": "sha512-uJJs8dnM5iXkn8a2GaKvlKMhcOJ+oJPYqY9gY3CM/EieCVObIDjxUtR/g8lU/k/A+OauA78GzScAfulmFjPOYA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", + "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", "requires": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/property-provider": "^2.0.9", - "@smithy/types": "^2.3.2", - "@smithy/url-parser": "^2.0.8", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36163,30 +37592,30 @@ } }, "@smithy/fetch-http-handler": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.1.4.tgz", - "integrity": "sha512-SL24M9W5ERByoXaVicRx+bj9GJVujDnPn+QO7GY7adhY0mPGa6DSF58pVKsgIh4r5Tx/k3SWCPlH4BxxSxA/fQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.4.tgz", + "integrity": "sha512-gIPRFEGi+c6V52eauGKrjDzPWF2Cu7Z1r5F8A3j2wcwz25sPG/t8kjsbEhli/tS/2zJp/ybCZXe4j4ro3yv/HA==", "requires": { - "@smithy/protocol-http": "^3.0.4", - "@smithy/querystring-builder": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36199,20 +37628,20 @@ } }, "@smithy/hash-node": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.8.tgz", - "integrity": "sha512-yZL/nmxZzjZV5/QX5JWSgXlt0HxuMTwFO89CS++jOMMPiCMZngf6VYmtNdccs8IIIAMmfQeTzwu07XgUE/Zd3Q==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.12.tgz", + "integrity": "sha512-fDZnTr5j9t5qcbeJ037aMZXxMka13Znqwrgy3PAqYj6Dm3XHXHftTH3q+NWgayUxl1992GFtQt1RuEzRMy3NnQ==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36225,18 +37654,18 @@ } }, "@smithy/invalid-dependency": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.8.tgz", - "integrity": "sha512-88VOS7W3KzUz/bNRc+Sl/F/CDIasFspEE4G39YZRHIh9YmsXF7GUyVaAKURfMNulTie62ayk6BHC9O0nOBAVgQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.12.tgz", + "integrity": "sha512-p5Y+iMHV3SoEpy3VSR7mifbreHQwVSvHSAz/m4GdoXfOzKzaYC8hYv10Ks7Deblkf7lhas8U+lAp9ThbBM+ZXA==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36264,28 +37693,28 @@ } }, "@smithy/middleware-content-length": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.10.tgz", - "integrity": "sha512-EGSbysyA4jH0p3xI6G0jdXoj9Iz9GUnAta6aEaHtXm3wVWtenRf80y2TeVvNkVSr5jwKOdSCjKIRI2l1A/oZLA==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.14.tgz", + "integrity": "sha512-poUNgKTw9XwPXfX9nEHpVgrMNVpaSMZbshqvPxFVoalF4wp6kRzYKOfdesSVectlQ51VtigoLfbXcdyPwvxgTg==", "requires": { - "@smithy/protocol-http": "^3.0.4", - "@smithy/types": "^2.3.2", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36298,21 +37727,23 @@ } }, "@smithy/middleware-endpoint": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.8.tgz", - "integrity": "sha512-yOpogfG2d2V0cbJdAJ6GLAWkNOc9pVsL5hZUfXcxJu408N3CUCsXzIAFF6+70ZKSE+lCfG3GFErcSXv/UfUbjw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", + "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", "requires": { - "@smithy/middleware-serde": "^2.0.8", - "@smithy/types": "^2.3.2", - "@smithy/url-parser": "^2.0.8", - "@smithy/util-middleware": "^2.0.1", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36325,33 +37756,33 @@ } }, "@smithy/middleware-retry": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.11.tgz", - "integrity": "sha512-pknfokumZ+wvBERSuKAI2vVr+aK3ZgPiWRg6+0ZG4kKJogBRpPmDGWw+Jht0izS9ZaEbIobNzueIb4wD33JJVg==", - "requires": { - "@smithy/node-config-provider": "^2.0.11", - "@smithy/protocol-http": "^3.0.4", - "@smithy/service-error-classification": "^2.0.1", - "@smithy/types": "^2.3.2", - "@smithy/util-middleware": "^2.0.1", - "@smithy/util-retry": "^2.0.1", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", + "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", + "requires": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "@smithy/util-retry": "^2.0.5", "tslib": "^2.5.0", "uuid": "^8.3.2" }, "dependencies": { "@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36369,18 +37800,18 @@ } }, "@smithy/middleware-serde": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.8.tgz", - "integrity": "sha512-Is0sm+LiNlgsc0QpstDzifugzL9ehno1wXp109GgBgpnKTK3j+KphiparBDI4hWTtH9/7OUsxuspNqai2yyhcg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.12.tgz", + "integrity": "sha512-IBeco157lIScecq2Z+n0gq56i4MTnfKxS7rbfrAORveDJgnbBAaEQgYqMqp/cYqKrpvEXcyTjwKHrBjCCIZh2A==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36393,18 +37824,18 @@ } }, "@smithy/middleware-stack": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.1.tgz", - "integrity": "sha512-UexsfY6/oQZRjTQL56s9AKtMcR60tBNibSgNYX1I2WXaUaXg97W9JCkFyth85TzBWKDBTyhLfenrukS/kyu54A==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.6.tgz", + "integrity": "sha512-YSvNZeOKWLJ0M/ycxwDIe2Ztkp6Qixmcml1ggsSv2fdHKGkBPhGrX5tMzPGMI1yyx55UEYBi2OB4s+RriXX48A==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36417,20 +37848,20 @@ } }, "@smithy/node-config-provider": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.11.tgz", - "integrity": "sha512-CaR1dciSSGKttjhcefpytYjsfI/Yd5mqL8am4wfmyFCDxSiPsvnEWHl8UjM/RbcAjX0klt+CeIKPSHEc0wGvJA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", + "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", "requires": { - "@smithy/property-provider": "^2.0.9", - "@smithy/shared-ini-file-loader": "^2.0.10", - "@smithy/types": "^2.3.2", + "@smithy/property-provider": "^2.0.13", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36443,30 +37874,30 @@ } }, "@smithy/node-http-handler": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.4.tgz", - "integrity": "sha512-8Rw/AusvWDyC6SK8esAcVBeTlQHf94NMFv805suFUJCQ2gwlh0oLDNh+6s2MDOrxcjvLxjjzv1mytM0Mt+0cPQ==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.8.tgz", + "integrity": "sha512-KZylM7Wff/So5SmCiwg2kQNXJ+RXgz34wkxS7WNwIUXuZrZZpY/jKJCK+ZaGyuESDu3TxcaY+zeYGJmnFKbQsA==", "requires": { - "@smithy/abort-controller": "^2.0.8", - "@smithy/protocol-http": "^3.0.4", - "@smithy/querystring-builder": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/abort-controller": "^2.0.12", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/protocol-http": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.4.tgz", - "integrity": "sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36479,18 +37910,18 @@ } }, "@smithy/property-provider": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.9.tgz", - "integrity": "sha512-25pPZ8f8DeRwYI5wbPRZaoMoR+3vrw8DwbA0TjP+GsdiB2KxScndr4HQehiJ5+WJ0giOTWhLz0bd+7Djv1qpUQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.13.tgz", + "integrity": "sha512-VJqUf2CbsQX6uUiC5dUPuoEATuFjkbkW3lJHbRnpk9EDC9X+iKqhfTK+WP+lve5EQ9TcCI1Q6R7hrg41FyC54w==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36519,19 +37950,19 @@ } }, "@smithy/querystring-builder": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.8.tgz", - "integrity": "sha512-+vzIMwjC8Saz97/ptPn+IJRCRRZ+pP95ZIWDRqEqZV/a6hiKbaFoMSa2iCKsnKzR696U2JZXrDqMu3e/FD1+2g==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.12.tgz", + "integrity": "sha512-cDbF07IuCjiN8CdGvPzfJjXIrmDSelScRfyJYrYBNBbKl2+k7QD/KqiHhtRyEKgID5mmEVrV6KE6L/iPJ98sFw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36544,18 +37975,18 @@ } }, "@smithy/querystring-parser": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.8.tgz", - "integrity": "sha512-ArbanNuR7O/MmTd90ZqhDqGOPPDYmxx3huHxD+R3cuCnazcK/1tGQA+SnnR5307T7ZRb5WTpB6qBggERuibVSA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.12.tgz", + "integrity": "sha512-fytyTcXaMzPBuNtPlhj5v6dbl4bJAnwKZFyyItAGt4Tgm9HFPZNo7a9r1SKPr/qdxUEBzvL9Rh+B9SkTX3kFxg==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36568,17 +37999,17 @@ } }, "@smithy/service-error-classification": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.1.tgz", - "integrity": "sha512-QHa9+t+v4s0cMuDCcbjIJN67mNZ42/+fc3jKe8P6ZMPXZl5ksKk6a8vhZ/m494GZng5eFTc3OePv+NF9cG83yg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", "requires": { - "@smithy/types": "^2.3.2" + "@smithy/types": "^2.4.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36591,18 +38022,18 @@ } }, "@smithy/shared-ini-file-loader": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.10.tgz", - "integrity": "sha512-jWASteSezRKohJ7GdA7pHDvmr7Q7tw3b5mu3xLHIkZy/ICftJ+O7aqNaF8wklhI7UNFoQ7flFRM3Rd0KA+1BbQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", + "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36645,20 +38076,20 @@ } }, "@smithy/smithy-client": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.5.tgz", - "integrity": "sha512-7S865uKzsxApM8W8Q6zkij7tcUFgaG8PuADMFdMt1yL/ku3d0+s6Zwrg3N7iXCPM08Gu/mf0BIfTXIu/9i450Q==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.12.tgz", + "integrity": "sha512-XXqhridfkKnpj+lt8vM6HRlZbqUAqBjVC74JIi13F/AYQd/zTj9SOyGfxnbp4mjY9q28LityxIuV8CTinr9r5w==", "requires": { - "@smithy/middleware-stack": "^2.0.1", - "@smithy/types": "^2.3.2", - "@smithy/util-stream": "^2.0.11", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36686,19 +38117,19 @@ } }, "@smithy/url-parser": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.8.tgz", - "integrity": "sha512-wQw7j004ScCrBRJ+oNPXlLE9mtofxyadSZ9D8ov/rHkyurS7z1HTNuyaGRj6OvKsEk0SVQsuY0C9+EfM75XTkw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.12.tgz", + "integrity": "sha512-qgkW2mZqRvlNUcBkxYB/gYacRaAdck77Dk3/g2iw0S9F0EYthIS3loGfly8AwoWpIvHKhkTsCXXQfzksgZ4zIA==", "requires": { - "@smithy/querystring-parser": "^2.0.8", - "@smithy/types": "^2.3.2", + "@smithy/querystring-parser": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36788,21 +38219,21 @@ } }, "@smithy/util-defaults-mode-browser": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.9.tgz", - "integrity": "sha512-JONLJVQWT8165XoSV36ERn3SVlZLJJ4D6IeGsCSePv65Uxa93pzSLE0UMSR9Jwm4zix7rst9AS8W5QIypZWP8Q==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.16.tgz", + "integrity": "sha512-Uv5Cu8nVkuvLn0puX+R9zWbSNpLIR3AxUlPoLJ7hC5lvir8B2WVqVEkJLwtixKAncVLasnTVjPDCidtAUTGEQw==", "requires": { - "@smithy/property-provider": "^2.0.9", - "@smithy/smithy-client": "^2.1.5", - "@smithy/types": "^2.3.2", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36815,23 +38246,23 @@ } }, "@smithy/util-defaults-mode-node": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.11.tgz", - "integrity": "sha512-tmqjNsfj+bgZN6jXBe6efZnukzILA7BUytHkzqikuRLNtR+0VVchQHvawD0w6vManh76rO81ydhioe7i4oBzuA==", - "requires": { - "@smithy/config-resolver": "^2.0.9", - "@smithy/credential-provider-imds": "^2.0.11", - "@smithy/node-config-provider": "^2.0.11", - "@smithy/property-provider": "^2.0.9", - "@smithy/smithy-client": "^2.1.5", - "@smithy/types": "^2.3.2", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", + "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", + "requires": { + "@smithy/config-resolver": "^2.0.16", + "@smithy/credential-provider-imds": "^2.0.18", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36859,18 +38290,18 @@ } }, "@smithy/util-middleware": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.1.tgz", - "integrity": "sha512-LnsBMi0Mg3gfz/TpNGLv2Jjcz2ra1OX5HR/4IaCepIYmtPQzqMWDdhX/XTW1LS8OZ0xbQuyQPcHkQ+2XkhWOVQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz", + "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==", "requires": { - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36883,19 +38314,19 @@ } }, "@smithy/util-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.1.tgz", - "integrity": "sha512-naj4X0IafJ9yJnVJ58QgSMkCNLjyQOnyrnKh/T0f+0UOUxJiT8vuFn/hS7B/pNqbo2STY7PyJ4J4f+5YqxwNtA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.5.tgz", + "integrity": "sha512-x3t1+MQAJ6QONk3GTbJNcugCFDVJ+Bkro5YqQQK1EyVesajNDqxFtCx9WdOFNGm/Cbm7tUdwVEmfKQOJoU2Vtw==", "requires": { - "@smithy/service-error-classification": "^2.0.1", - "@smithy/types": "^2.3.2", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -36908,13 +38339,13 @@ } }, "@smithy/util-stream": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.11.tgz", - "integrity": "sha512-2MeWfqSpZKdmEJ+tH8CJQSgzLWhH5cmdE24X7JB0hiamXrOmswWGGuPvyj/9sQCTclo57pNxLR2p7KrP8Ahiyg==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.17.tgz", + "integrity": "sha512-fP/ZQ27rRvHsqItds8yB7jerwMpZFTL3QqbQbidUiG0+mttMoKdP0ZqnvM8UK5q0/dfc3/pN7g4XKPXOU7oRWw==", "requires": { - "@smithy/fetch-http-handler": "^2.1.4", - "@smithy/node-http-handler": "^2.1.4", - "@smithy/types": "^2.3.2", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -36923,9 +38354,9 @@ }, "dependencies": { "@smithy/types": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.2.tgz", - "integrity": "sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "requires": { "tslib": "^2.5.0" } @@ -37341,14 +38772,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -37539,6 +38962,7 @@ }, "@types/bson": { "version": "4.0.4", + "dev": true, "requires": { "@types/node": "*" } @@ -37820,6 +39244,7 @@ }, "@types/mongodb": { "version": "3.6.20", + "dev": true, "requires": { "@types/bson": "*", "@types/node": "*" @@ -38011,6 +39436,20 @@ "version": "13.7.10", "dev": true }, + "@types/webidl-conversions": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.2.tgz", + "integrity": "sha512-uNv6b/uGRLlCVmelat2rA8bcVd3k/42mV2EmjhPh6JLkd35T5bgwR/t6xy7a9MWhd9sixIeBUzhBenvk3NO+DQ==" + }, + "@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "requires": { + "@types/node": "*", + "@types/webidl-conversions": "*" + } + }, "@types/yargs-parser": { "version": "15.0.0", "dev": true @@ -38039,15 +39478,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -38112,15 +39542,6 @@ "eslint-visitor-keys": "^3.3.0" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -38158,17 +39579,6 @@ "@typescript-eslint/utils": "5.47.0", "debug": "^4.3.4", "tsutils": "^3.21.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/types": { @@ -38192,15 +39602,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -38488,14 +39889,6 @@ "version": "6.0.2", "requires": { "debug": "4" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "requires": { - "ms": "2.1.2" - } - } } }, "aggregate-error": { @@ -39349,6 +40742,7 @@ }, "bl": { "version": "2.2.1", + "optional": true, "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -40257,14 +41651,6 @@ "requires": { "debug": "^4.3.1", "kruptein": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "requires": { - "ms": "2.1.2" - } - } } }, "console-browserify": { @@ -40822,14 +42208,11 @@ } }, "debug": { - "version": "3.1.0", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0" - } + "ms": "2.1.2" } }, "decamelize": { @@ -41034,7 +42417,8 @@ "version": "1.0.0" }, "denque": { - "version": "1.4.1" + "version": "1.4.1", + "optional": true }, "depd": { "version": "2.0.0" @@ -41339,15 +42723,6 @@ "ws": "~8.11.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", @@ -41618,13 +42993,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.2", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "escape-string-regexp": { "version": "4.0.0", "dev": true @@ -42181,15 +43549,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -42864,14 +44223,6 @@ "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" - }, - "dependencies": { - "debug": { - "version": "4.2.0", - "requires": { - "ms": "2.1.2" - } - } } }, "extsprintf": { @@ -43683,14 +45034,6 @@ "fs-extra": "^8.1.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -44232,14 +45575,6 @@ "requires": { "debug": "^4.3.4" } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } } } }, @@ -44283,14 +45618,6 @@ "requires": { "agent-base": "6", "debug": "4" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "requires": { - "ms": "2.1.2" - } - } } }, "human-signals": { @@ -44825,15 +46152,6 @@ "source-map": "^0.6.1" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -45384,15 +46702,6 @@ "whatwg-url": "^11.0.0" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "domexception": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", @@ -45486,15 +46795,6 @@ "url-parse": "^1.5.3" } }, - "tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, "universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -45510,12 +46810,6 @@ "xml-name-validator": "^4.0.0" } }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - }, "whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -45525,16 +46819,6 @@ "iconv-lite": "0.6.3" } }, - "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "requires": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - } - }, "ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", @@ -46508,14 +47792,6 @@ "whatwg-url": "^12.0.0" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "domexception": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", @@ -46590,11 +47866,6 @@ "xml-name-validator": "^4.0.0" } }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" - }, "whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -46819,7 +48090,9 @@ "version": "3.1.2" }, "kareem": { - "version": "2.3.2" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", + "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==" }, "keyv": { "version": "4.5.0", @@ -46926,13 +48199,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.4", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "execa": { "version": "6.1.0", "dev": true, @@ -47548,13 +48814,6 @@ } } }, - "debug": { - "version": "4.3.4", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "domexception": { "version": "4.0.0", "dev": true, @@ -47644,13 +48903,6 @@ "universalify": "^0.1.2" } }, - "tr46": { - "version": "3.0.0", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, "w3c-xmlserializer": { "version": "3.0.0", "dev": true, @@ -47658,10 +48910,6 @@ "xml-name-validator": "^4.0.0" } }, - "webidl-conversions": { - "version": "7.0.0", - "dev": true - }, "whatwg-encoding": { "version": "2.0.0", "dev": true, @@ -47970,6 +49218,7 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", + "optional": true, "requires": { "bl": "^2.2.1", "bson": "^1.1.4", @@ -47980,16 +49229,27 @@ }, "dependencies": { "bson": { - "version": "1.1.6" + "version": "1.1.6", + "optional": true }, "optional-require": { "version": "1.1.8", + "optional": true, "requires": { "require-at": "^1.0.6" } } } }, + "mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" + } + }, "mongodb-memory-server-core": { "version": "6.9.6", "requires": { @@ -48031,12 +49291,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.4", - "requires": { - "ms": "2.1.2" - } - }, "find-cache-dir": { "version": "3.3.2", "requires": { @@ -48116,34 +49370,46 @@ "version": "0.9.7" }, "mongoose": { - "version": "5.13.20", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.13.20.tgz", - "integrity": "sha512-TjGFa/XnJYt+wLmn8y9ssjyO2OhBMeEBtOHb9iJM16EWu2Du6L1Q6zSiEK2ziyYQM8agb4tumNIQFzqbxId7MA==", - "requires": { - "@types/bson": "1.x || 4.0.x", - "@types/mongodb": "^3.5.27", - "bson": "^1.1.4", - "kareem": "2.3.2", - "mongodb": "3.7.4", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.8.4", - "mquery": "3.2.5", - "ms": "2.1.2", - "optional-require": "1.0.x", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "13.5.2", - "sliced": "1.0.1" + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.12.1.tgz", + "integrity": "sha512-VEawZMiMaclKrR5q8rj+Bu95PfUmx0ld+dk/poi37fqPlSd93sE4TlIPSqBY9GKY9tZPxu0aDEtgFDuHoI8sOg==", + "requires": { + "bson": "^4.7.2", + "kareem": "2.5.1", + "mongodb": "4.17.1", + "mpath": "0.9.0", + "mquery": "4.0.3", + "ms": "2.1.3", + "sift": "16.0.1" }, "dependencies": { "bson": { - "version": "1.1.6" + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", + "requires": { + "buffer": "^5.6.0" + } + }, + "mongodb": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.1.tgz", + "integrity": "sha512-MBuyYiPUPRTqfH2dV0ya4dcr2E5N52ocBuZ8Sgg/M030nGF78v855B3Z27mZJnp8PxjnUquEnAtjOsphgMZOlQ==", + "requires": { + "@aws-sdk/credential-providers": "^3.186.0", + "@mongodb-js/saslprep": "^1.1.0", + "bson": "^4.7.2", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, - "mongoose-legacy-pluralize": { - "version": "1.0.2" - }, "morgan": { "version": "1.10.0", "dev": true, @@ -48190,24 +49456,16 @@ } }, "mpath": { - "version": "0.8.4" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" }, "mquery": { - "version": "3.2.5", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz", + "integrity": "sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==", "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "bluebird": { - "version": "3.5.1" - }, - "safe-buffer": { - "version": "5.1.2" - } + "debug": "4.x" } }, "ms": { @@ -48780,9 +50038,6 @@ } } }, - "optional-require": { - "version": "1.0.3" - }, "os-browserify": { "version": "0.3.0", "dev": true @@ -48864,14 +50119,6 @@ "debug": "^4.3.4" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -49536,14 +50783,6 @@ "debug": "^4.3.4" } }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, "https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -49643,12 +50882,6 @@ "node-fetch": "^2.6.12" } }, - "debug": { - "version": "4.3.4", - "requires": { - "ms": "2.1.2" - } - }, "ws": { "version": "8.14.2", "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", @@ -50169,9 +51402,6 @@ "safe-regex": "^1.1.0" } }, - "regexp-clone": { - "version": "1.0.0" - }, "regexp.prototype.flags": { "version": "1.4.3", "dev": true, @@ -50288,7 +51518,8 @@ } }, "require-at": { - "version": "1.0.6" + "version": "1.0.6", + "optional": true }, "require-directory": { "version": "2.1.1" @@ -50690,7 +51921,9 @@ } }, "sift": { - "version": "13.5.2" + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", + "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" }, "sifter": { "version": "0.5.4", @@ -50788,9 +52021,6 @@ } } }, - "sliced": { - "version": "1.0.1" - }, "slick-carousel": { "version": "1.8.1" }, @@ -50931,17 +52161,6 @@ "engine.io": "~6.4.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "socket.io-adapter": { @@ -50969,17 +52188,6 @@ "requires": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "socks": { @@ -51015,14 +52223,6 @@ "requires": { "debug": "^4.3.4" } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } } } }, @@ -51123,14 +52323,6 @@ "version": "5.7.0", "requires": { "debug": "^4.3.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "requires": { - "ms": "2.1.2" - } - } } }, "sqs-producer": { @@ -51373,15 +52565,6 @@ "semver": "^7.3.8" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -51789,13 +52972,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.2", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "dedent": { "version": "0.4.0", "dev": true @@ -51968,13 +53144,6 @@ "which": "^2.0.1" } }, - "debug": { - "version": "4.3.2", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "del": { "version": "5.1.0", "dev": true, @@ -52378,6 +53547,14 @@ "punycode": "^2.1.1" } }, + "tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "requires": { + "punycode": "^2.1.1" + } + }, "tree-kill": { "version": "1.2.2", "dev": true @@ -53281,6 +54458,11 @@ "version": "1.1.0", "dev": true }, + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, "webpack": { "version": "4.46.0", "dev": true, @@ -53610,6 +54792,15 @@ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==" }, + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + }, "which": { "version": "1.3.1", "dev": true, diff --git a/package.json b/package.json index 57ac01dbf0..65ec0ccc2b 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "moment-timezone": "0.5.41", "mongodb-memory-server-core": "^6.9.6", "mongodb-uri": "^0.9.7", - "mongoose": "^5.13.20", + "mongoose": "^6.12.0", "multiparty": ">=4.2.3", "nan": "^2.17.0", "neverthrow": "^6.0.0", From 75b4ac7eca0ed64e201115540b2c76b34a94a2d5 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 29 Sep 2023 01:43:03 +0800 Subject: [PATCH 02/64] fix: type mismatch on cursorquery, objectid --- src/app/models/form_feedback.server.model.ts | 4 ++-- src/app/models/form_issue.server.model.ts | 4 ++-- src/app/models/submission.server.model.ts | 22 +++++++++++++------- src/app/modules/feedback/feedback.service.ts | 4 ++-- src/app/modules/issue/issue.service.ts | 4 ++-- src/types/form_feedback.ts | 6 ++++-- src/types/form_issue.ts | 4 ++-- 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/app/models/form_feedback.server.model.ts b/src/app/models/form_feedback.server.model.ts index 42329ccfcb..ca3f66c1ec 100644 --- a/src/app/models/form_feedback.server.model.ts +++ b/src/app/models/form_feedback.server.model.ts @@ -1,4 +1,4 @@ -import { Mongoose, QueryCursor, Schema } from 'mongoose' +import { Cursor as QueryCursor, Mongoose, QueryOptions, Schema } from 'mongoose' import { IFormFeedbackModel, IFormFeedbackSchema } from '../../types' @@ -51,7 +51,7 @@ FormFeedbackSchema.index({ */ FormFeedbackSchema.statics.getFeedbackCursorByFormId = function ( formId: string, -): QueryCursor { +): QueryCursor> { return this.find({ formId }).batchSize(2000).read('secondary').lean().cursor() } diff --git a/src/app/models/form_issue.server.model.ts b/src/app/models/form_issue.server.model.ts index 0689c933ac..f6de21389d 100644 --- a/src/app/models/form_issue.server.model.ts +++ b/src/app/models/form_issue.server.model.ts @@ -1,4 +1,4 @@ -import { Mongoose, QueryCursor, Schema } from 'mongoose' +import { Cursor as QueryCursor, Mongoose, QueryOptions, Schema } from 'mongoose' import { FormIssueStreamData, @@ -48,7 +48,7 @@ FormIssueSchema.index({ formId: 1 }) FormIssueSchema.statics.getIssueCursorByFormId = function ( formId: string, fields: (keyof IFormIssueSchema)[], -): QueryCursor { +): QueryCursor> { return this.find({ formId }, fields) .batchSize(2000) .read('secondary') diff --git a/src/app/models/submission.server.model.ts b/src/app/models/submission.server.model.ts index a470127993..f7a58b5ecf 100644 --- a/src/app/models/submission.server.model.ts +++ b/src/app/models/submission.server.model.ts @@ -1,5 +1,10 @@ import moment from 'moment-timezone' -import mongoose, { Mongoose, QueryCursor, Schema } from 'mongoose' +import mongoose, { + Cursor as QueryCursor, + Mongoose, + QueryOptions, + Schema, +} from 'mongoose' import { FormAuthType, @@ -260,8 +265,8 @@ EncryptSubmissionSchema.statics.findSingleMetadata = function ( { $match: { submissionType: SubmissionType.Encrypt, - form: mongoose.Types.ObjectId(formId), - _id: mongoose.Types.ObjectId(submissionId), + form: new mongoose.Types.ObjectId(formId), + _id: new mongoose.Types.ObjectId(submissionId), }, }, { $limit: 1 }, @@ -328,7 +333,7 @@ EncryptSubmissionSchema.statics.findAllMetadataByFormId = function ( const numToSkip = (page - 1) * pageSize // return documents within the page const pageResults: Promise = this.aggregate([ - { $match: { form: mongoose.Types.ObjectId(formId) } }, + { $match: { form: new mongoose.Types.ObjectId(formId) } }, { $sort: { created: -1 } }, { $skip: numToSkip }, { $limit: pageSize }, @@ -354,7 +359,7 @@ EncryptSubmissionSchema.statics.findAllMetadataByFormId = function ( const count = this.countDocuments({ - form: mongoose.Types.ObjectId(formId), + form: new mongoose.Types.ObjectId(formId), submissionType: SubmissionType.Encrypt, }).exec() ?? 0 @@ -386,7 +391,7 @@ EncryptSubmissionSchema.statics.getSubmissionCursorByFormId = function ( startDate?: string endDate?: string } = {}, -): QueryCursor { +): QueryCursor> { const streamQuery = { form: formId, ...createQueryWithDateParam(dateRange?.startDate, dateRange?.endDate), @@ -406,7 +411,10 @@ EncryptSubmissionSchema.statics.getSubmissionCursorByFormId = function ( .read('secondary') .lean() // Override typing as Map is converted to Object once passed through `lean()`. - .cursor() as QueryCursor + .cursor() as QueryCursor< + SubmissionCursorData, + QueryOptions + > ) } diff --git a/src/app/modules/feedback/feedback.service.ts b/src/app/modules/feedback/feedback.service.ts index ce4a033eba..b893d48b57 100644 --- a/src/app/modules/feedback/feedback.service.ts +++ b/src/app/modules/feedback/feedback.service.ts @@ -1,6 +1,6 @@ import { isEmpty } from 'lodash' import moment from 'moment-timezone' -import mongoose from 'mongoose' +import mongoose, { Cursor as QueryCursor, QueryOptions } from 'mongoose' import { errAsync, okAsync, ResultAsync } from 'neverthrow' import { @@ -52,7 +52,7 @@ export const getFormFeedbackCount = ( */ export const getFormFeedbackStream = ( formId: string, -): mongoose.QueryCursor => { +): QueryCursor> => { return FormFeedbackModel.getFeedbackCursorByFormId(formId) } diff --git a/src/app/modules/issue/issue.service.ts b/src/app/modules/issue/issue.service.ts index f6bb8cfe03..aa55437743 100644 --- a/src/app/modules/issue/issue.service.ts +++ b/src/app/modules/issue/issue.service.ts @@ -1,7 +1,7 @@ import { ObjectId } from 'bson' import { isEmpty } from 'lodash' import moment from 'moment-timezone' -import mongoose from 'mongoose' +import mongoose, { Cursor as QueryCursor, QueryOptions } from 'mongoose' import { errAsync, okAsync, ResultAsync } from 'neverthrow' import { @@ -238,7 +238,7 @@ export const getFormIssues = ( */ export const getFormIssueStream = ( formId: string, -): mongoose.QueryCursor => { +): QueryCursor> => { return FormIssueModel.getIssueCursorByFormId(formId, [ 'issue', 'email', diff --git a/src/types/form_feedback.ts b/src/types/form_feedback.ts index 0b9a9ebb3f..eeb0aff0b2 100644 --- a/src/types/form_feedback.ts +++ b/src/types/form_feedback.ts @@ -1,4 +1,4 @@ -import { Document, Model, QueryCursor } from 'mongoose' +import { Cursor as QueryCursor, Document, Model, QueryOptions } from 'mongoose' import type { Merge } from 'type-fest' import { FormFeedbackBase } from '../../shared/types' @@ -26,5 +26,7 @@ export interface IFormFeedbackModel extends Model { * @param formId the form id to return the submissions cursor for * @returns a cursor to the feedback retrieved */ - getFeedbackCursorByFormId(formId: string): QueryCursor + getFeedbackCursorByFormId( + formId: string, + ): QueryCursor> } diff --git a/src/types/form_issue.ts b/src/types/form_issue.ts index 014c9e4a3d..92316bf20e 100644 --- a/src/types/form_issue.ts +++ b/src/types/form_issue.ts @@ -1,4 +1,4 @@ -import { Document, Model, QueryCursor } from 'mongoose' +import { Cursor as QueryCursor, Document, Model, QueryOptions } from 'mongoose' import { FormIssueBase } from 'shared/types' import type { Merge } from 'type-fest' @@ -23,5 +23,5 @@ export interface IFormIssueModel extends Model { getIssueCursorByFormId( formId: string, fields: (keyof IFormIssueSchema)[], - ): QueryCursor + ): QueryCursor> } From dc2eedbd1aed3a59c56484b428b0dc2692792d60 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 14:27:15 +0800 Subject: [PATCH 03/64] fix: required and validator shape in user and form model --- src/app/models/form.server.model.ts | 12 ++++++------ src/app/models/user.server.model.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 0f4f887fa0..1575f8c5be 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -270,14 +270,14 @@ const EmailFormSchema = new Schema({ }, ], set: transformEmails, - validate: { - validator: (v: string[]) => { + validate: [ + (v: string[]) => { if (!Array.isArray(v)) return false if (v.length === 0) return false return v.every((email) => validator.isEmail(email)) }, - message: 'Please provide valid email addresses', - }, + 'Please provide valid email addresses', + ], // Mongoose v5 only checks if the type is an array, not whether the array // is non-empty. required: true, @@ -292,7 +292,7 @@ const compileFormModel = (db: Mongoose): IFormModel => { { title: { type: String, - required: 'Form name cannot be blank', + required: [true, 'Form name cannot be blank'], minlength: [4, 'Form name must be at least 4 characters'], maxlength: [200, 'Form name can have a maximum of 200 characters'], // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -980,7 +980,7 @@ const compileFormModel = (db: Mongoose): IFormModel => { logicId: string, ): Promise { return this.findByIdAndUpdate( - mongoose.Types.ObjectId(formId), + formId, { $pull: { form_logics: { _id: logicId } }, }, diff --git a/src/app/models/user.server.model.ts b/src/app/models/user.server.model.ts index 30f45bba6d..4ce49e687e 100644 --- a/src/app/models/user.server.model.ts +++ b/src/app/models/user.server.model.ts @@ -28,7 +28,7 @@ const compileUserModel = (db: Mongoose) => { // @ts-ignore trim: true, unique: true, - required: 'Please enter your email', + required: [true, 'Please enter your email'], validate: { // Check if email entered exists in the Agency collection validator: async (value: string) => { From d2273d433179ce28762781de0f5bddf7d6729bdb Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 14:28:27 +0800 Subject: [PATCH 04/64] fix: use try catch block for mongoose connect loader --- src/app/loaders/mongoose.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/loaders/mongoose.ts b/src/app/loaders/mongoose.ts index 46fd01c059..4ac3348fc7 100644 --- a/src/app/loaders/mongoose.ts +++ b/src/app/loaders/mongoose.ts @@ -47,7 +47,9 @@ export default async (): Promise => { } // Only required for initial connection errors, reconnect on error. - connect().catch((err) => { + try { + await connect() + } catch (err) { logger.error({ message: '@MongoDB: Error caught while connecting', meta: { @@ -55,8 +57,8 @@ export default async (): Promise => { }, error: err, }) - return connect() - }) + await connect() + } mongoose.connection.on('error', (err) => { // No need to reconnect here since mongo config has auto reconnect, we log. From bb290a9b068d3130932f31d808e9976fe4e7b058 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 14:37:57 +0800 Subject: [PATCH 05/64] fix: add missing goLinkSuffix property in IForm --- shared/types/form/form.ts | 2 ++ src/types/form.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/shared/types/form/form.ts b/shared/types/form/form.ts index 2e7113d1ff..5224862433 100644 --- a/shared/types/form/form.ts +++ b/shared/types/form/form.ts @@ -150,6 +150,8 @@ export interface FormBase { webhook: FormWebhook responseMode: FormResponseMode + + goLinkSuffix?: string } export interface EmailFormBase extends FormBase { diff --git a/src/types/form.ts b/src/types/form.ts index 9dcee52742..1e63ffe3a7 100644 --- a/src/types/form.ts +++ b/src/types/form.ts @@ -87,6 +87,7 @@ export type IForm = Merge< // string type is allowed due to a setter on the form schema that transforms // strings to string array. emails?: string[] | string + goLinkSuffix?: string } > From 25fe76c69b385e09302e6b7f39d4caa939e6bb07 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 14:58:02 +0800 Subject: [PATCH 06/64] fix: overwrite typing of IPaymentSchema for mongoose Id --- src/types/payment.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/types/payment.ts b/src/types/payment.ts index 1310ee284e..d88155a366 100644 --- a/src/types/payment.ts +++ b/src/types/payment.ts @@ -3,7 +3,14 @@ import Stripe from 'stripe' import { Payment } from '../../shared/types/payment' +import { IFormSchema } from './form' +import { IPendingSubmissionSchema } from './submission' + export interface IPaymentSchema extends Payment, Document { + // overwrites the id type of Payment to be Schema.Types.ObjectId in mongoose + pendingSubmissionId: IPendingSubmissionSchema['_id'] + formId: IFormSchema['_id'] + /** * Additional field to store responses for sending email confirmations post-payment. * Will be used to store FilteredResponse[], allows for population. From 0454c9851ccf512fac970114a32b0df1b0d210f8 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 15:24:16 +0800 Subject: [PATCH 07/64] fix: querycursor import in submission.ts --- src/types/submission.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/submission.ts b/src/types/submission.ts index b16fbc478b..9764d5666b 100644 --- a/src/types/submission.ts +++ b/src/types/submission.ts @@ -1,4 +1,4 @@ -import { Document, Model, QueryCursor } from 'mongoose' +import { Cursor as QueryCursor, Document, Model, QueryOptions } from 'mongoose' import { EmailModeSubmissionBase, @@ -146,7 +146,7 @@ export type IEncryptSubmissionModel = Model & startDate?: string endDate?: string }, - ): QueryCursor + ): QueryCursor> findEncryptedSubmissionById( formId: string, From 203e07978a41234d613faa5fb967139ef0a68378 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 15:25:26 +0800 Subject: [PATCH 08/64] fix: removed undefined in AgencySchema causing schema methods to be never --- src/app/models/agency.server.model.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/models/agency.server.model.ts b/src/app/models/agency.server.model.ts index f5d56c5fbf..789e1b873e 100644 --- a/src/app/models/agency.server.model.ts +++ b/src/app/models/agency.server.model.ts @@ -17,7 +17,6 @@ export const AGENCY_PUBLIC_FIELDS = [ const AgencySchema = new Schema< IAgencySchema, IAgencyModel, - undefined, AgencyInstanceMethods >( { From 266ff9cedf136e7b50fe92cfb9109cc8016ff8ea Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 15:46:35 +0800 Subject: [PATCH 09/64] fix: schema typings in form logic and sms types --- src/app/services/sms/sms.types.ts | 8 ++++++-- src/types/form_logic.ts | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/services/sms/sms.types.ts b/src/app/services/sms/sms.types.ts index e74ebd4ed1..d0b9c674f8 100644 --- a/src/app/services/sms/sms.types.ts +++ b/src/app/services/sms/sms.types.ts @@ -63,7 +63,9 @@ export interface IVerificationSmsCount extends ISmsCount { isOnboardedAccount: boolean } -export interface IVerificationSmsCountSchema extends ISmsCountSchema { +export interface IVerificationSmsCountSchema + extends IVerificationSmsCount, + ISmsCountSchema { isOnboardedAccount: boolean } @@ -71,7 +73,9 @@ export interface IAdminContactSmsCount extends ISmsCount { admin: IUserSchema['_id'] } -export type IAdminContactSmsCountSchema = ISmsCountSchema +export interface IAdminContactSmsCountSchema + extends IAdminContactSmsCount, + ISmsCountSchema {} export interface IFormDeactivatedSmsCount extends ISmsCount, diff --git a/src/types/form_logic.ts b/src/types/form_logic.ts index 1d884216a3..f8e49f1f9b 100644 --- a/src/types/form_logic.ts +++ b/src/types/form_logic.ts @@ -27,6 +27,8 @@ export interface IShowFieldsLogicSchema extends ILogicSchema, ShowFieldLogic, Document { + // overwriting field id type in show to reflect mongoose Id type + show: IFieldSchema['_id'][] logicType: LogicType.ShowFields conditions: IConditionSchema[] } From dcb1c185dfc0066340852746e1bc0790cc4bef5a Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 15:56:17 +0800 Subject: [PATCH 10/64] fix: replace ConnectionOptions with ConnectOptions --- src/types/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/config.ts b/src/types/config.ts index a19d4e7ea9..0c85b6d056 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -2,7 +2,7 @@ import { Lambda } from '@aws-sdk/client-lambda' import { PackageMode } from '@opengovsg/formsg-sdk/dist/types' import aws from 'aws-sdk' import { SessionOptions } from 'express-session' -import { ConnectionOptions } from 'mongoose' +import { ConnectOptions } from 'mongoose' import Mail from 'nodemailer/lib/mailer' // Enums @@ -25,7 +25,7 @@ export type AppConfig = { export type DbConfig = { uri: string - options: ConnectionOptions + options: ConnectOptions } export type AwsConfig = { From bd9a8ac5a6b98c060b9406bb2730587884284593 Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 29 Sep 2023 16:05:44 +0800 Subject: [PATCH 11/64] fix: remove deprecated connect options --- src/app/config/config.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/config/config.ts b/src/app/config/config.ts index f9cc3d1573..1e9b268c05 100644 --- a/src/app/config/config.ts +++ b/src/app/config/config.ts @@ -126,14 +126,6 @@ const dbConfig: DbConfig = { pass: '', // Only create indexes in dev env to avoid adverse production impact. autoIndex: isDev, - // Avoid using deprecated URL string parser in MongoDB driver - useNewUrlParser: true, - useUnifiedTopology: true, - // Avoid using deprecated collection.ensureIndex internally - useCreateIndex: true, - // upgrade to mongo driver's native findOneAndUpdate function instead of - // findAndModify. - useFindAndModify: false, promiseLibrary: global.Promise, }, } From 9200683044571a9c49d837c74e2f269b982d2314 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 29 Sep 2023 17:55:46 +0800 Subject: [PATCH 12/64] fix: objectid imports --- src/app/modules/payments/payments.service.ts | 7 +++---- .../forms/__tests__/admin-forms.feedback.routes.spec.ts | 3 +-- .../forms/__tests__/public-forms.feedback.routes.spec.ts | 4 ++-- .../__tests__/legacy-redirect.routes.spec.ts | 4 ++-- src/types/payment.ts | 7 +++++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/app/modules/payments/payments.service.ts b/src/app/modules/payments/payments.service.ts index 324cf9f4f3..68fad2e851 100644 --- a/src/app/modules/payments/payments.service.ts +++ b/src/app/modules/payments/payments.service.ts @@ -1,6 +1,5 @@ import moment from 'moment-timezone' -import { ObjectId } from 'mongodb' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { errAsync, okAsync, ResultAsync } from 'neverthrow' import { PaymentStatus } from '../../../../shared/types' @@ -84,7 +83,7 @@ export const findBySubmissionIdAndUpdate = ( ): ResultAsync => { return ResultAsync.fromPromise( PaymentModel.findOneAndUpdate( - { 'completedPayment.submissionId': new ObjectId(submissionId) }, + { 'completedPayment.submissionId': new Types.ObjectId(submissionId) }, update, ).exec(), (error) => { @@ -116,7 +115,7 @@ export const findPaymentBySubmissionId = ( ): ResultAsync => { return ResultAsync.fromPromise( PaymentModel.findOne({ - 'completedPayment.submissionId': new ObjectId(submissionId), + 'completedPayment.submissionId': new Types.ObjectId(submissionId), }), (error) => { logger.error({ diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts index 7515b1aa11..ce2ed456a2 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts @@ -7,8 +7,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' import { ObjectId } from 'bson-ext' -import { ObjectID } from 'mongodb' -import mongoose from 'mongoose' +import mongoose, { ObjectID } from 'mongoose' import supertest, { Session } from 'supertest-session' import { getEncryptedFormModel } from 'src/app/models/form.server.model' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.feedback.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.feedback.routes.spec.ts index cd474ccae7..95feff9a14 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.feedback.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.feedback.routes.spec.ts @@ -1,7 +1,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'mongodb' +import { Types } from 'mongoose' import { errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' @@ -126,7 +126,7 @@ describe('public-form.feedback.routes', () => { }), ) - const INVALID_SUBMISSION_ID = new ObjectId().toHexString() + const INVALID_SUBMISSION_ID = new Types.ObjectId().toHexString() const actualResp = await request .post( `/forms/${form._id}/submissions/${INVALID_SUBMISSION_ID}/feedback`, diff --git a/src/app/routes/legacy-redirect/__tests__/legacy-redirect.routes.spec.ts b/src/app/routes/legacy-redirect/__tests__/legacy-redirect.routes.spec.ts index 9e291952f0..a408e60d77 100644 --- a/src/app/routes/legacy-redirect/__tests__/legacy-redirect.routes.spec.ts +++ b/src/app/routes/legacy-redirect/__tests__/legacy-redirect.routes.spec.ts @@ -1,12 +1,12 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' -import { ObjectId } from 'mongodb' +import { Types } from 'mongoose' import session, { Session } from 'supertest-session' import { LegacyRedirectRouter } from '../legacy-redirect.routes' const app = setupApp(undefined, LegacyRedirectRouter) -const MOCK_FORM_ID = new ObjectId().toHexString() +const MOCK_FORM_ID = new Types.ObjectId().toHexString() describe('legacy-redirect.routes', () => { let request: Session diff --git a/src/types/payment.ts b/src/types/payment.ts index d88155a366..673dbe81d8 100644 --- a/src/types/payment.ts +++ b/src/types/payment.ts @@ -3,14 +3,17 @@ import Stripe from 'stripe' import { Payment } from '../../shared/types/payment' -import { IFormSchema } from './form' +import { IEncryptedFormSchema, IFormSchema } from './form' import { IPendingSubmissionSchema } from './submission' -export interface IPaymentSchema extends Payment, Document { +export interface IPayment extends Payment { // overwrites the id type of Payment to be Schema.Types.ObjectId in mongoose pendingSubmissionId: IPendingSubmissionSchema['_id'] formId: IFormSchema['_id'] + payment_fields_snapshot: IEncryptedFormSchema['payments_field'] +} +export interface IPaymentSchema extends IPayment, Document { /** * Additional field to store responses for sending email confirmations post-payment. * Will be used to store FilteredResponse[], allows for population. From ec2537fb120938d5ea9419ad628124fd4d050555 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 29 Sep 2023 17:57:14 +0800 Subject: [PATCH 13/64] chore: remove mongodb package, upgrade connect-mongo to 4.6.0 --- package-lock.json | 35 +---------------------------------- package.json | 3 +-- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index a6397742cc..9f7ddf2fd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "celebrate": "^15.0.1", "compression": "~1.7.2", "connect-datadog": "0.0.9", - "connect-mongo": "~4.6.0", + "connect-mongo": "^4.6.0", "convict": "^6.2.4", "convict-format-with-validator": "^6.2.0", "cookie-parser": "~1.4.6", @@ -144,7 +144,6 @@ "@types/jsonwebtoken": "^8.5.9", "@types/jwk-to-pem": "^2.0.1", "@types/lodash": "^4.14.191", - "@types/mongodb": "^3.6.20", "@types/mongodb-uri": "^0.9.1", "@types/node": "^14.18.23", "@types/nodemailer": "^6.4.7", @@ -8806,14 +8805,6 @@ "@types/node": "*" } }, - "node_modules/@types/bson": { - "version": "4.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/busboy": { "version": "1.5.0", "dev": true, @@ -9122,15 +9113,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/mongodb": { - "version": "3.6.20", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/bson": "*", - "@types/node": "*" - } - }, "node_modules/@types/mongodb-uri": { "version": "0.9.1", "dev": true, @@ -38960,13 +38942,6 @@ "@types/node": "*" } }, - "@types/bson": { - "version": "4.0.4", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/busboy": { "version": "1.5.0", "dev": true, @@ -39242,14 +39217,6 @@ "version": "3.0.5", "dev": true }, - "@types/mongodb": { - "version": "3.6.20", - "dev": true, - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, "@types/mongodb-uri": { "version": "0.9.1", "dev": true diff --git a/package.json b/package.json index 65ec0ccc2b..7a8d785464 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "celebrate": "^15.0.1", "compression": "~1.7.2", "connect-datadog": "0.0.9", - "connect-mongo": "~4.6.0", + "connect-mongo": "^4.6.0", "convict": "^6.2.4", "convict-format-with-validator": "^6.2.0", "cookie-parser": "~1.4.6", @@ -190,7 +190,6 @@ "@types/jsonwebtoken": "^8.5.9", "@types/jwk-to-pem": "^2.0.1", "@types/lodash": "^4.14.191", - "@types/mongodb": "^3.6.20", "@types/mongodb-uri": "^0.9.1", "@types/node": "^14.18.23", "@types/nodemailer": "^6.4.7", From 6a7038553afd2c4b1eec81ea404032b766a8be17 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 29 Sep 2023 17:58:21 +0800 Subject: [PATCH 14/64] chore: replace mongoerror import reference --- src/app/models/user.server.model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/models/user.server.model.ts b/src/app/models/user.server.model.ts index 4ce49e687e..4bfc391533 100644 --- a/src/app/models/user.server.model.ts +++ b/src/app/models/user.server.model.ts @@ -1,6 +1,7 @@ import { parsePhoneNumberFromString } from 'libphonenumber-js/mobile' -import { MongoError } from 'mongodb' import { CallbackError, Mongoose, Schema } from 'mongoose' +// https://stackoverflow.com/a/61679809 +import { MongoError } from 'mongoose/node_modules/mongodb' import validator from 'validator' import { From 55671d3c8820ecf540172eab43189072343e9840 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 29 Sep 2023 17:59:57 +0800 Subject: [PATCH 15/64] fix: typescript errors --- src/app/models/payment.server.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/models/payment.server.model.ts b/src/app/models/payment.server.model.ts index 8a4a32bcc2..4d1b36b919 100644 --- a/src/app/models/payment.server.model.ts +++ b/src/app/models/payment.server.model.ts @@ -113,7 +113,7 @@ const PaymentSchema = new Schema( ], }, - payment_fields_snapshot: { type: formPaymentsFieldSchema }, + payment_fields_snapshot: formPaymentsFieldSchema, }, { timestamps: { From 944be5b388a6a92982876f0997c3f8a85975231d Mon Sep 17 00:00:00 2001 From: foochifa Date: Fri, 20 Oct 2023 14:51:25 +0800 Subject: [PATCH 16/64] chore: change nModified to modifiedCount --- src/app/modules/admin-feedback/admin-feedback.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/modules/admin-feedback/admin-feedback.service.ts b/src/app/modules/admin-feedback/admin-feedback.service.ts index b1295153eb..50223df014 100644 --- a/src/app/modules/admin-feedback/admin-feedback.service.ts +++ b/src/app/modules/admin-feedback/admin-feedback.service.ts @@ -102,7 +102,7 @@ export const updateAdminFeedback = ({ return new DatabaseError('Admin feedback could not be created') }, ).andThen((mongoResult) => { - if (!mongoResult.nModified) { + if (!mongoResult.modifiedCount) { logger.error({ message: 'Unable to retrieve feedback document', meta: { From 5206b01440114c3fda57aedaa78ef19af364a662 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 20 Oct 2023 15:36:26 +0800 Subject: [PATCH 17/64] fix: typeerror on form_statistics_total.server.model --- src/app/models/form_statistics_total.server.model.ts | 3 ++- src/types/form_statistics_total.ts | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/models/form_statistics_total.server.model.ts b/src/app/models/form_statistics_total.server.model.ts index 76aa6962c7..545a1374f6 100644 --- a/src/app/models/form_statistics_total.server.model.ts +++ b/src/app/models/form_statistics_total.server.model.ts @@ -1,4 +1,5 @@ import { Mongoose, Schema } from 'mongoose' +import { ExtractTypeFromArray } from 'shared/types' import { AggregateFormCountResult, @@ -53,7 +54,7 @@ const compileFormStatisticsTotalModel = (db: Mongoose) => { FormStatisticsTotalSchema.statics.aggregateFormCount = function ( minSubCount: number, ): Promise { - return this.aggregate([ + return this.aggregate>([ { $match: { totalCount: { diff --git a/src/types/form_statistics_total.ts b/src/types/form_statistics_total.ts index a3ff50e67a..9bff50854b 100644 --- a/src/types/form_statistics_total.ts +++ b/src/types/form_statistics_total.ts @@ -12,9 +12,7 @@ export interface IFormStatisticsTotalSchema extends IFormStatisticsTotal, Document {} -export type AggregateFormCountResult = - | [{ numActiveForms: number } | undefined] - | never[] +export type AggregateFormCountResult = { numActiveForms: number }[] export interface IFormStatisticsTotalModel extends Model { From 925c42ccb09c0e920d2e56779404775ba3250554 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 20 Oct 2023 15:38:26 +0800 Subject: [PATCH 18/64] fix: typeerror on bouncemodel --- src/app/modules/bounce/bounce.model.ts | 111 +++++++++++++------------ 1 file changed, 58 insertions(+), 53 deletions(-) diff --git a/src/app/modules/bounce/bounce.model.ts b/src/app/modules/bounce/bounce.model.ts index 891693a493..3fd0190bf5 100644 --- a/src/app/modules/bounce/bounce.model.ts +++ b/src/app/modules/bounce/bounce.model.ts @@ -118,82 +118,87 @@ BounceSchema.statics.fromSnsNotification = function ( * @param snsInfo the notification information to merge * @returns the updated document */ -BounceSchema.methods.updateBounceInfo = function ( - snsInfo: IEmailNotification, -): IBounceSchema { - // Correctly parse the emails from commonHeaders.to - const emailsArray = parseBounceNotificationCommonHeadersToEmails( - snsInfo.mail.commonHeaders.to, - ) - // First, get rid of outdated emails - const latestRecipients = new Set(emailsArray) - this.bounces = this.bounces.filter((bounceInfo) => - latestRecipients.has(bounceInfo.email), - ) - // Reshape this.bounces to avoid O(n^2) computation - const bouncesByEmail = keyBy(this.bounces, 'email') - // The following block needs to work for the cross product of cases: - // (notification type) * - // (does the notification confirm delivery/bounce for this email) * - // (does bouncesByEmail contain this email) * - // (does bouncesByEmail currently say this email has bounced) - emailsArray.forEach((email) => { - if (!validator.isEmail(email)) { - logger.warn({ - message: 'Bounce notification contains value that is not a valid email', - meta: { - action: 'BounceSchema.methods.updateBounceInfo', +BounceSchema.method( + 'updateBounceInfo', + function (snsInfo: IEmailNotification): IBounceSchema { + // Correctly parse the emails from commonHeaders.to + const emailsArray = parseBounceNotificationCommonHeadersToEmails( + snsInfo.mail.commonHeaders.to, + ) + // First, get rid of outdated emails + const latestRecipients = new Set(emailsArray) + this.bounces = this.bounces.filter((bounceInfo) => + latestRecipients.has(bounceInfo.email), + ) + // Reshape this.bounces to avoid O(n^2) computation + const bouncesByEmail = keyBy(this.bounces, 'email') + // The following block needs to work for the cross product of cases: + // (notification type) * + // (does the notification confirm delivery/bounce for this email) * + // (does bouncesByEmail contain this email) * + // (does bouncesByEmail currently say this email has bounced) + emailsArray.forEach((email) => { + if (!validator.isEmail(email)) { + logger.warn({ + message: + 'Bounce notification contains value that is not a valid email', + meta: { + action: 'BounceSchema.methods.updateBounceInfo', + email, + }, + }) + } + if (hasEmailBounced(snsInfo, email)) { + bouncesByEmail[email] = { email, - }, - }) - } - if (hasEmailBounced(snsInfo, email)) { - bouncesByEmail[email] = { - email, - hasBounced: true, - bounceType: snsInfo.bounce.bounceType, + hasBounced: true, + bounceType: snsInfo.bounce.bounceType, + } + } else if ( + hasEmailBeenDelivered(snsInfo, email) || + !bouncesByEmail[email] + ) { + bouncesByEmail[email] = { email, hasBounced: false } } - } else if ( - hasEmailBeenDelivered(snsInfo, email) || - !bouncesByEmail[email] - ) { - bouncesByEmail[email] = { email, hasBounced: false } - } - }) - this.bounces = Object.values(bouncesByEmail) - return this -} + }) + this.bounces = Object.values(bouncesByEmail) + return this + }, +) /** * Returns true if the document indicates a critical bounce (all recipients * bounced), false otherwise. * @returns true if all recipients bounced */ -BounceSchema.methods.isCriticalBounce = function (): boolean { +BounceSchema.method('isCriticalBounce', function (): boolean { return this.bounces.every((emailInfo) => emailInfo.hasBounced) -} +}) /** * Returns true if the document indicates that all recipients bounced and * all bounces were permanent, false otherwise. * @returns true if all bounecs were permanent */ -BounceSchema.methods.areAllPermanentBounces = function (): boolean { - return this.bounces.every( - (emailInfo) => - emailInfo.hasBounced && emailInfo.bounceType === BounceType.Permanent, - ) -} +BounceSchema.method( + 'areAllPermanentBounces', + function (): boolean { + return this.bounces.every( + (emailInfo) => + emailInfo.hasBounced && emailInfo.bounceType === BounceType.Permanent, + ) + }, +) /** * Returns the list of email recipients for this form * @returns Array of email addresses */ -BounceSchema.methods.getEmails = function (): string[] { +BounceSchema.method('getEmails', function (): string[] { // Return a regular array to prevent unexpected bugs with mongoose // CoreDocumentArray return Array.from(this.bounces.map((emailInfo) => emailInfo.email)) -} +}) /** * Sets hasAutoEmailed to true if at least one person has been emailed. From fe335ee0d5828b5116539aa0ca4ac49d2e7639bc Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 20 Oct 2023 18:46:30 +0800 Subject: [PATCH 19/64] fix: form server model, only fixed affected methods --- src/app/models/form.server.model.ts | 129 ++++++++++++++-------------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 1575f8c5be..a053a8cd1c 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -625,23 +625,26 @@ const compileFormModel = (db: Mongoose): IFormModel => { // Methods // Method to return myInfo attributes - FormSchema.methods.getUniqueMyInfoAttrs = function () { - if ( - this.authType !== FormAuthType.MyInfo && - this.authType !== FormAuthType.SGID_MyInfo - ) { - return [] - } + FormSchema.method( + 'getUniqueMyInfoAttrs', + function getUniqueMyInfoAttrs() { + if ( + this.authType !== FormAuthType.MyInfo && + this.authType !== FormAuthType.SGID_MyInfo + ) { + return [] + } - // Compact is used to remove undefined from array - return compact( - uniq( - this.form_fields?.flatMap((field) => { - return getMyInfoAttr(field) - }), - ), - ) - } + // Compact is used to remove undefined from array + return compact( + uniq( + this.form_fields?.flatMap((field) => { + return getMyInfoAttr(field) + }), + ), + ) + }, + ) // Return essential form creation parameters with the given properties FormSchema.methods.getDuplicateParams = function ( @@ -702,14 +705,14 @@ const compileFormModel = (db: Mongoose): IFormModel => { } } - FormDocumentSchema.methods.getSettings = function (): FormSettings { + FormDocumentSchema.method('getSettings', function (): FormSettings { const formSettings = this.responseMode === FormResponseMode.Encrypt ? (pick(this, STORAGE_FORM_SETTINGS_FIELDS) as StorageFormSettings) : (pick(this, EMAIL_FORM_SETTINGS_FIELDS) as EmailFormSettings) return formSettings - } + }) FormDocumentSchema.methods.getWebhookAndResponseModeSettings = function (): FormWebhookSettings { @@ -739,21 +742,21 @@ const compileFormModel = (db: Mongoose): IFormModel => { } // Transfer ownership of the form to another user - FormDocumentSchema.methods.transferOwner = async function ( - currentOwner: IUserSchema, - newOwner: IUserSchema, - ) { - // Update form's admin to new owner's id. - this.admin = newOwner._id + FormDocumentSchema.method( + 'transferOwner', + async function (currentOwner: IUserSchema, newOwner: IUserSchema) { + // Update form's admin to new owner's id. + this.admin = newOwner._id - // Remove new owner from perm list and include previous owner as an editor. - this.permissionList = this.permissionList.filter( - (item) => item.email !== newOwner.email, - ) - this.permissionList.push({ email: currentOwner.email, write: true }) + // Remove new owner from perm list and include previous owner as an editor. + this.permissionList = this.permissionList.filter( + (item) => item.email !== newOwner.email, + ) + this.permissionList.push({ email: currentOwner.email, write: true }) - return this.save() - } + return this.save() + }, + ) // Transfer ownership of multiple forms to another user FormSchema.statics.transferAllFormsToNewOwner = async function ( @@ -830,42 +833,40 @@ const compileFormModel = (db: Mongoose): IFormModel => { return this.save() } - FormDocumentSchema.methods.duplicateFormFieldByIdAndIndex = function ( - fieldId: string, - insertionIndex: number, - ) { - const fieldToDuplicate = getFormFieldById(this.form_fields, fieldId) - if (!fieldToDuplicate) return Promise.resolve(null) - const duplicatedField = omit(fieldToDuplicate, ['_id', 'globalId']) - - // eslint-disable-next-line @typescript-eslint/no-extra-semi - ;(this.form_fields as Types.DocumentArray).splice( - insertionIndex, - 0, - duplicatedField, - ) - return this.save() - } + FormDocumentSchema.method( + 'duplicateFormFieldByIdAndIndex', + function (fieldId: string, insertionIndex: number) { + const fieldToDuplicate = getFormFieldById(this.form_fields, fieldId) + if (!fieldToDuplicate) return Promise.resolve(null) + const duplicatedField = omit(fieldToDuplicate, ['_id', 'globalId']) - FormDocumentSchema.methods.reorderFormFieldById = function ( - fieldId: string, - newPosition: number, - ): Promise { - const existingFieldPosition = this.form_fields.findIndex( - (f) => String(f._id) === fieldId, - ) + this.form_fields.splice(insertionIndex, 0, duplicatedField) + return this.save() + }, + ) - if (existingFieldPosition === -1) return Promise.resolve(null) + FormDocumentSchema.method( + 'reorderFormFieldById', + function ( + fieldId: string, + newPosition: number, + ): Promise { + const existingFieldPosition = this.form_fields.findIndex( + (f) => String(f._id) === fieldId, + ) - // Exist, reorder form fields and save. - const updatedFormFields = reorder( - this.form_fields, - existingFieldPosition, - newPosition, - ) - this.form_fields = updatedFormFields - return this.save() - } + if (existingFieldPosition === -1) return Promise.resolve(null) + + // Exist, reorder form fields and save. + const updatedFormFields = reorder( + this.form_fields, + existingFieldPosition, + newPosition, + ) + this.form_fields = updatedFormFields + return this.save() + }, + ) // Statics // Method to retrieve data for OTP verification From 327250c6cb8de0719b6abf95bdcce232e637623e Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 16:16:38 +0800 Subject: [PATCH 20/64] fix: mongoerror is now mongoservererror --- src/app/models/user.server.model.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/models/user.server.model.ts b/src/app/models/user.server.model.ts index 4bfc391533..88d66dc231 100644 --- a/src/app/models/user.server.model.ts +++ b/src/app/models/user.server.model.ts @@ -114,7 +114,10 @@ const compileUserModel = (db: Mongoose) => { 'save', function (err: Error, _doc: unknown, next: (err?: CallbackError) => void) { if (err) { - if (err.name === 'MongoError' && (err as MongoError)?.code === 11000) { + if ( + ['MongoError', 'MongoServerError'].includes(err.name) && + (err as MongoError)?.code === 11000 + ) { next(new Error('Account already exists with this email')) } else { next(err) From 6a7a9886bebfdd94404e956ce9a9b7f10eb7002e Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 21:23:22 +0800 Subject: [PATCH 21/64] fix: execPopulate no longer required to be called --- src/app/modules/form/admin-form/admin-form.service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/modules/form/admin-form/admin-form.service.ts b/src/app/modules/form/admin-form/admin-form.service.ts index c568c005c5..0ffffb89bd 100644 --- a/src/app/modules/form/admin-form/admin-form.service.ts +++ b/src/app/modules/form/admin-form/admin-form.service.ts @@ -368,9 +368,7 @@ export const transferFormOwnership = ( // Step 4: Populate updated form. .andThen((updatedForm) => ResultAsync.fromPromise( - updatedForm - .populate({ path: 'admin', populate: { path: 'agency' } }) - .execPopulate(), + updatedForm.populate({ path: 'admin', populate: { path: 'agency' } }), (error) => { logger.error({ message: 'Error occurred whilst populating form with admin', From f4722b84511778152f9d036d1cbe56340baff993 Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 21:27:33 +0800 Subject: [PATCH 22/64] fix: verification.model --- src/app/models/form.server.model.ts | 7 ++++-- .../verification/verification.model.ts | 23 +++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index a053a8cd1c..e5f56d0dc2 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -744,7 +744,10 @@ const compileFormModel = (db: Mongoose): IFormModel => { // Transfer ownership of the form to another user FormDocumentSchema.method( 'transferOwner', - async function (currentOwner: IUserSchema, newOwner: IUserSchema) { + async function transferOwner( + currentOwner: IUserSchema, + newOwner: IUserSchema, + ) { // Update form's admin to new owner's id. this.admin = newOwner._id @@ -847,7 +850,7 @@ const compileFormModel = (db: Mongoose): IFormModel => { FormDocumentSchema.method( 'reorderFormFieldById', - function ( + function reorderFormFieldById( fieldId: string, newPosition: number, ): Promise { diff --git a/src/app/modules/verification/verification.model.ts b/src/app/modules/verification/verification.model.ts index d9de5406cb..200de2403c 100644 --- a/src/app/modules/verification/verification.model.ts +++ b/src/app/modules/verification/verification.model.ts @@ -87,16 +87,19 @@ const compileVerificationModel = (db: Mongoose): IVerificationModel => { return pick(this, VERIFICATION_PUBLIC_FIELDS) as PublicTransaction } - VerificationSchema.methods.getField = function ( - isPayment: boolean, - fieldId: string, - ): IVerificationFieldSchema | undefined { - if (isPayment) { - return this.paymentField - } else { - return this.fields.find((field) => field._id === fieldId) - } - } + VerificationSchema.method( + 'getField', + function getField( + isPayment: boolean, + fieldId: string, + ): IVerificationFieldSchema | undefined { + if (isPayment) { + return this.paymentField + } else { + return this.fields.find((field) => field._id === fieldId) + } + }, + ) // Static methods // Method to return non-sensitive fields From 4e1bdb824c37063f732c3de1bf93d47d4d7dec39 Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 21:34:16 +0800 Subject: [PATCH 23/64] fix: replace enforcedocument to hydrateddocument --- src/types/agency.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/agency.ts b/src/types/agency.ts index ab89d011b9..c7e4b2c2eb 100644 --- a/src/types/agency.ts +++ b/src/types/agency.ts @@ -1,4 +1,4 @@ -import { EnforceDocument, Model } from 'mongoose' +import { HydratedDocument, Model } from 'mongoose' import { AgencyBase, PublicAgencyDto } from '../../shared/types' @@ -18,7 +18,7 @@ export interface IAgencyDocument extends IAgencySchema { } // Used to cast created documents whenever needed. -export type AgencyDocument = EnforceDocument< +export type AgencyDocument = HydratedDocument< IAgencyDocument, AgencyInstanceMethods > From 53d376da0785553726d57525262221a07225a591 Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 21:35:09 +0800 Subject: [PATCH 24/64] fix: duplicateFormFieldByIdAndIndex --- src/app/models/form.server.model.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index e5f56d0dc2..fbc18df257 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -49,6 +49,7 @@ import { import { reorder } from '../../../shared/utils/immutable-array-fns' import { getApplicableIfStates } from '../../shared/util/logic' import { + FormFieldSchema, FormLogicSchema, FormOtpData, IEmailFormModel, @@ -841,7 +842,10 @@ const compileFormModel = (db: Mongoose): IFormModel => { function (fieldId: string, insertionIndex: number) { const fieldToDuplicate = getFormFieldById(this.form_fields, fieldId) if (!fieldToDuplicate) return Promise.resolve(null) - const duplicatedField = omit(fieldToDuplicate, ['_id', 'globalId']) + const duplicatedField = omit(fieldToDuplicate, [ + '_id', + 'globalId', + ]) as FormFieldSchema this.form_fields.splice(insertionIndex, 0, duplicatedField) return this.save() From 8763919caf9a83d199b389819e183f2d232f8cf1 Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 21:36:22 +0800 Subject: [PATCH 25/64] fix: util/logic.ts type inference errors --- src/types/form.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/types/form.ts b/src/types/form.ts index 1e63ffe3a7..463a349d39 100644 --- a/src/types/form.ts +++ b/src/types/form.ts @@ -4,7 +4,6 @@ import { LeanDocument, Model, ToObjectOptions, - Types, UpdateWriteOpResult, } from 'mongoose' import { DeepRequired } from 'ts-essentials' @@ -107,8 +106,8 @@ export type PickDuplicateForm = Pick< > export interface IFormSchema extends IForm, Document, PublicView { - form_fields?: Types.DocumentArray | FormFieldSchema[] - form_logics?: Types.DocumentArray | FormLogicSchema[] + form_fields?: FormFieldSchema[] + form_logics?: FormLogicSchema[] created?: Date lastModified?: Date From 4db93cec94ac910c09c2df22dedfe94fef66880b Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 23 Oct 2023 22:07:12 +0800 Subject: [PATCH 26/64] refactor: swap bson with bson-ext --- src/app/modules/form/admin-form/admin-form.controller.ts | 2 +- src/app/modules/issue/issue.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/form/admin-form/admin-form.controller.ts b/src/app/modules/form/admin-form/admin-form.controller.ts index 6f052339f2..bb30baab5d 100644 --- a/src/app/modules/form/admin-form/admin-form.controller.ts +++ b/src/app/modules/form/admin-form/admin-form.controller.ts @@ -1,6 +1,6 @@ import JoiDate from '@joi/date' import axios from 'axios' -import { ObjectId } from 'bson' +import { ObjectId } from 'bson-ext' import { celebrate, Joi as BaseJoi, Segments } from 'celebrate' import { AuthedSessionData } from 'express-session' import { StatusCodes } from 'http-status-codes' diff --git a/src/app/modules/issue/issue.service.ts b/src/app/modules/issue/issue.service.ts index aa55437743..b61c511163 100644 --- a/src/app/modules/issue/issue.service.ts +++ b/src/app/modules/issue/issue.service.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson' +import { ObjectId } from 'bson-ext' import { isEmpty } from 'lodash' import moment from 'moment-timezone' import mongoose, { Cursor as QueryCursor, QueryOptions } from 'mongoose' From 3a1365294b21c72cae52b1aeadf068a774e5a962 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:49:52 +0800 Subject: [PATCH 27/64] chore: update test db configs --- __tests__/e2e/setup/globalSetup.ts | 8 -------- __tests__/e2e/utils/database.ts | 7 ++----- __tests__/setup/database.js | 4 ++-- __tests__/unit/backend/helpers/jest-db.ts | 11 +++-------- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/__tests__/e2e/setup/globalSetup.ts b/__tests__/e2e/setup/globalSetup.ts index 728d7ea183..31f88951f6 100644 --- a/__tests__/e2e/setup/globalSetup.ts +++ b/__tests__/e2e/setup/globalSetup.ts @@ -27,14 +27,6 @@ async function globalSetup(): Promise { // The following is to make sure the database is clean before an test starts await mongoose.connect(process.env.MONGO_URI, { - // Avoid using deprecated URL string parser in MongoDB driver - useNewUrlParser: true, - useUnifiedTopology: true, - // Avoid using deprecated collection.ensureIndex internally - useCreateIndex: true, - // upgrade to mongo driver's native findOneAndUpdate function instead of - // findAndModify. - useFindAndModify: false, promiseLibrary: global.Promise, }) await mongoose.disconnect() diff --git a/__tests__/e2e/utils/database.ts b/__tests__/e2e/utils/database.ts index 8732c82e1b..4083e68c67 100644 --- a/__tests__/e2e/utils/database.ts +++ b/__tests__/e2e/utils/database.ts @@ -11,11 +11,8 @@ const spec = (path: string): any => { /** * Connects to mongo-memory-server instance. */ -export const makeMongooseFixtures = async (): Promise => { - const connection = await mongoose.createConnection(dbUri, { - reconnectTries: 5, - useNewUrlParser: true, - }) +export const makeMongooseFixtures = (): mongoose.Connection => { + const connection = mongoose.createConnection(dbUri) return connection } diff --git a/__tests__/setup/database.js b/__tests__/setup/database.js index bef5ff0b06..a177ed8f2e 100644 --- a/__tests__/setup/database.js +++ b/__tests__/setup/database.js @@ -8,7 +8,6 @@ class MemoryDatabaseServer { checkMD5: true, }, instance: {}, - autoStart: false, }) } @@ -21,7 +20,8 @@ class MemoryDatabaseServer { } getConnectionString() { - return this.mongod.getUri(true) + const randomUri = +new Date() + return this.mongod.getUri(randomUri.toString()) } } diff --git a/__tests__/unit/backend/helpers/jest-db.ts b/__tests__/unit/backend/helpers/jest-db.ts index 60e2946c8b..3d562aaa76 100644 --- a/__tests__/unit/backend/helpers/jest-db.ts +++ b/__tests__/unit/backend/helpers/jest-db.ts @@ -31,14 +31,9 @@ import { * Connect to the in-memory database */ const connect = async (): Promise => { - const dbUrl = await MemoryDatabaseServer.getConnectionString() - - const conn = await mongoose.connect(dbUrl, { - useNewUrlParser: true, - useUnifiedTopology: true, - useCreateIndex: true, - useFindAndModify: false, - }) + await MemoryDatabaseServer.start() + const dbUrl = MemoryDatabaseServer.getConnectionString() + const conn = await mongoose.connect(dbUrl) return conn } From bd87cae4f7d63c3096c4570b0e9e67b6b629bf86 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:52:43 +0800 Subject: [PATCH 28/64] refactor: remove bson reference --- __tests__/e2e/encrypt-submission.spec.ts | 4 +- package-lock.json | 700 ++++++----------------- package.json | 4 +- src/app/models/form.server.model.ts | 36 +- 4 files changed, 191 insertions(+), 553 deletions(-) diff --git a/__tests__/e2e/encrypt-submission.spec.ts b/__tests__/e2e/encrypt-submission.spec.ts index 4d42ce557d..ff9433c303 100644 --- a/__tests__/e2e/encrypt-submission.spec.ts +++ b/__tests__/e2e/encrypt-submission.spec.ts @@ -42,7 +42,7 @@ let FeatureFlags: IFeatureFlagModel test.describe('Storage form submission', () => { test.beforeAll(async () => { // Create models - db = await makeMongooseFixtures() + db = makeMongooseFixtures() Form = makeModel(db, 'form.server.model', 'Form') // TODO(FRM-1232): Remove this once old storage submission endpoint (/submissions/encrypt) is removed // Add feature flag model and set encryption boundary shift to true @@ -54,7 +54,7 @@ test.describe('Storage form submission', () => { }) test.afterAll(async () => { // Clean up db - db.models = {} + await db.dropDatabase() await db.close() }) diff --git a/package-lock.json b/package-lock.json index 9f7ddf2fd9..06ec48c0c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "body-parser": "^1.20.1", "bootstrap": "3.4.1", "boxicons": "1.8.0", - "bson-ext": "^2.0.6", + "bson": "^4.7.2", "busboy": "^1.6.0", "celebrate": "^15.0.1", "compression": "~1.7.2", @@ -75,7 +75,7 @@ "libphonenumber-js": "^1.10.24", "lodash": "^4.17.21", "moment-timezone": "0.5.41", - "mongodb-memory-server-core": "^6.9.6", + "mongodb-memory-server-core": "^7.6.3", "mongodb-uri": "^0.9.7", "mongoose": "^6.12.0", "multiparty": ">=4.2.3", @@ -8805,6 +8805,15 @@ "@types/node": "*" } }, + "node_modules/@types/bson": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.2.0.tgz", + "integrity": "sha512-ELCPqAdroMdcuxqwMgUpifQyRoTpyYCNr1V9xKyF40VsBobsj+BbWNRvwGchMgBPGqkw655ypkjj2MEF5ywVwg==", + "deprecated": "This is a stub types definition. bson provides its own type definitions, so you do not need this installed.", + "dependencies": { + "bson": "*" + } + }, "node_modules/@types/busboy": { "version": "1.5.0", "dev": true, @@ -9113,6 +9122,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mongodb": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz", + "integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==", + "dependencies": { + "@types/bson": "*", + "@types/node": "*" + } + }, "node_modules/@types/mongodb-uri": { "version": "0.9.1", "dev": true, @@ -10141,14 +10159,6 @@ "version": "1.2.0", "license": "ISC" }, - "node_modules/are-we-there-yet": { - "version": "1.1.5", - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "node_modules/arg": { "version": "4.1.3", "dev": true, @@ -10569,6 +10579,19 @@ "node": ">=0.12.0" } }, + "node_modules/async-mutex": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", + "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/async-mutex/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/asynckit": { "version": "0.4.0", "license": "MIT" @@ -11281,6 +11304,7 @@ "node_modules/bindings": { "version": "1.5.0", "license": "MIT", + "optional": true, "dependencies": { "file-uri-to-path": "1.0.0" } @@ -11288,7 +11312,6 @@ "node_modules/bl": { "version": "2.2.1", "license": "MIT", - "optional": true, "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -11569,23 +11592,14 @@ } }, "node_modules/bson": { - "version": "2.0.8", - "license": "Apache-2.0", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/bson-ext": { - "version": "2.0.6", - "hasInstallScript": true, + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", "dependencies": { - "bindings": "^1.3.0", - "bson": "^2.0.2", - "nan": "^2.14.0", - "prebuild-install": "6.1.2" + "buffer": "^5.6.0" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, "node_modules/buffer": { @@ -11907,6 +11921,7 @@ }, "node_modules/chownr": { "version": "1.1.4", + "dev": true, "license": "ISC" }, "node_modules/chrome-remote-interface": { @@ -13389,26 +13404,6 @@ "node": ">=0.10" } }, - "node_modules/decompress-response": { - "version": "4.2.1", - "license": "MIT", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/dedent": { "version": "0.7.0", "dev": true, @@ -13429,13 +13424,6 @@ "node": ">=0.12" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.3", "dev": true, @@ -13676,7 +13664,6 @@ "node_modules/denque": { "version": "1.4.1", "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=0.10" } @@ -13713,16 +13700,6 @@ "node": ">=0.10.0" } }, - "node_modules/detect-libc": { - "version": "1.0.3", - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -16004,13 +15981,6 @@ "dev": true, "license": "MIT" }, - "node_modules/expand-template": { - "version": "2.0.3", - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, "node_modules/expand-tilde": { "version": "2.0.2", "dev": true, @@ -16522,7 +16492,8 @@ }, "node_modules/file-uri-to-path": { "version": "1.0.0", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/filelist": { "version": "1.0.4", @@ -16649,10 +16620,6 @@ "node": ">=6" } }, - "node_modules/find-package-json": { - "version": "1.2.0", - "license": "MIT" - }, "node_modules/find-up": { "version": "4.1.0", "license": "MIT", @@ -17401,20 +17368,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "2.7.4", - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "dev": true, @@ -17553,10 +17506,6 @@ "assert-plus": "^1.0.0" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "license": "MIT" - }, "node_modules/glob": { "version": "7.1.6", "license": "ISC", @@ -18557,6 +18506,7 @@ }, "node_modules/ini": { "version": "1.3.7", + "dev": true, "license": "ISC" }, "node_modules/int64-buffer": { @@ -19066,6 +19016,7 @@ }, "node_modules/isexe": { "version": "2.0.0", + "dev": true, "license": "ISC" }, "node_modules/isobject": { @@ -22408,13 +22359,6 @@ "node": ">=8" } }, - "node_modules/lockfile": { - "version": "1.0.4", - "license": "ISC", - "dependencies": { - "signal-exit": "^3.0.2" - } - }, "node_modules/lodash": { "version": "4.17.21", "license": "MIT" @@ -23474,7 +23418,6 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", - "optional": true, "dependencies": { "bl": "^2.2.1", "bson": "^1.1.4", @@ -23519,31 +23462,31 @@ } }, "node_modules/mongodb-memory-server-core": { - "version": "6.9.6", - "license": "MIT", - "dependencies": { - "@types/tmp": "^0.2.0", - "camelcase": "^6.0.0", - "cross-spawn": "^7.0.3", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/mongodb-memory-server-core/-/mongodb-memory-server-core-7.6.3.tgz", + "integrity": "sha512-5rv79YlPoPvguRfFv1fvR78z69/QohGD+65f9UYWDfD70ykXpf6tAXPpWJ4ww/ues7FIVepkFCr3aiUvu6lA+A==", + "dependencies": { + "@types/mongodb": "^3.6.20", + "@types/tmp": "^0.2.2", + "async-mutex": "^0.3.2", + "camelcase": "^6.1.0", "debug": "^4.2.0", - "find-cache-dir": "^3.3.1", - "find-package-json": "^1.2.0", + "find-cache-dir": "^3.3.2", "get-port": "^5.1.1", "https-proxy-agent": "^5.0.0", - "lockfile": "^1.0.4", "md5-file": "^5.0.0", "mkdirp": "^1.0.4", - "semver": "^7.3.2", + "mongodb": "^3.7.3", + "new-find-package-json": "^1.1.0", + "semver": "^7.3.5", "tar-stream": "^2.1.4", "tmp": "^0.2.1", - "uuid": "^8.3.0", + "tslib": "^2.3.0", + "uuid": "^8.3.1", "yauzl": "^2.10.0" }, "engines": { - "node": ">=10.15.0" - }, - "optionalDependencies": { - "mongodb": "^3.6.2" + "node": ">=12.22.0" } }, "node_modules/mongodb-memory-server-core/node_modules/bl": { @@ -23565,18 +23508,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mongodb-memory-server-core/node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/mongodb-memory-server-core/node_modules/find-cache-dir": { "version": "3.3.2", "license": "MIT", @@ -23622,13 +23553,6 @@ "node": ">=10" } }, - "node_modules/mongodb-memory-server-core/node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/mongodb-memory-server-core/node_modules/pkg-dir": { "version": "4.2.0", "license": "MIT", @@ -23664,23 +23588,6 @@ "node": ">=10" } }, - "node_modules/mongodb-memory-server-core/node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mongodb-memory-server-core/node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/mongodb-memory-server-core/node_modules/tar-stream": { "version": "2.2.0", "license": "MIT", @@ -23695,6 +23602,11 @@ "node": ">=6" } }, + "node_modules/mongodb-memory-server-core/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/mongodb-memory-server-core/node_modules/uuid": { "version": "8.3.2", "license": "MIT", @@ -23702,19 +23614,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/mongodb-memory-server-core/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/mongodb-uri": { "version": "0.9.7", "license": "MIT", @@ -23725,7 +23624,6 @@ "node_modules/mongodb/node_modules/bson": { "version": "1.1.6", "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=0.6.19" } @@ -23733,7 +23631,6 @@ "node_modules/mongodb/node_modules/optional-require": { "version": "1.1.8", "license": "Apache-2.0", - "optional": true, "dependencies": { "require-at": "^1.0.6" }, @@ -23762,17 +23659,6 @@ "url": "https://opencollective.com/mongoose" } }, - "node_modules/mongoose/node_modules/bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", - "dependencies": { - "buffer": "^5.6.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/mongoose/node_modules/mongodb": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.1.tgz", @@ -23962,10 +23848,6 @@ "node": ">=0.10.0" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "license": "MIT" - }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, @@ -24002,6 +23884,23 @@ "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-6.0.0.tgz", "integrity": "sha512-kPZKRs4VkdloCGQXPoP84q4sT/1Z+lYM61AXyV8wWa2hnuo5KpPBF2S3crSFnMrOgUISmEBP8Vo/ngGZX60NhA==" }, + "node_modules/new-find-package-json": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/new-find-package-json/-/new-find-package-json-1.2.0.tgz", + "integrity": "sha512-Z4v/wBxApGh1cCGEhNmq4p8wjDvM6R6vEuYzlAhzOlXBKLJfjyMvwd+ZHR9fyYKVvXfEn4Z3YX6MD470PxpVbQ==", + "dependencies": { + "debug": "^4.3.4", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/new-find-package-json/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/ngrok": { "version": "4.3.3", "dev": true, @@ -24058,13 +23957,6 @@ "node": ">=12.0.0" } }, - "node_modules/node-abi": { - "version": "2.30.1", - "license": "MIT", - "dependencies": { - "semver": "^5.4.1" - } - }, "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", @@ -24345,10 +24237,6 @@ "dev": true, "license": "MIT" }, - "node_modules/noop-logger": { - "version": "0.1.1", - "license": "MIT" - }, "node_modules/nopt": { "version": "5.0.0", "license": "ISC", @@ -24390,16 +24278,6 @@ "node": ">=8" } }, - "node_modules/npmlog": { - "version": "4.1.2", - "license": "ISC", - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, "node_modules/nth-check": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", @@ -25523,32 +25401,6 @@ "resolved": "https://registry.npmjs.org/pprof-format/-/pprof-format-2.0.7.tgz", "integrity": "sha512-1qWaGAzwMpaXJP9opRa23nPnt2Egi7RMNoNBptEE/XwHbcn4fC2b/4U4bKc5arkGkIh2ZabpF2bEb+c5GNHEKA==" }, - "node_modules/prebuild-install": { - "version": "6.1.2", - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/prettier": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", @@ -25990,19 +25842,6 @@ "node": ">= 0.8" } }, - "node_modules/rc": { - "version": "1.2.8", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, "node_modules/react-dev-inspector": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/react-dev-inspector/-/react-dev-inspector-1.8.6.tgz", @@ -26762,7 +26601,6 @@ "node_modules/require-at": { "version": "1.0.6", "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=4" } @@ -27390,33 +27228,6 @@ "node": ">=6" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/simple-swizzle": { "version": "0.2.2", "license": "MIT", @@ -28163,6 +27974,7 @@ }, "node_modules/strip-json-comments": { "version": "2.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -28433,51 +28245,6 @@ "node": ">= 10" } }, - "node_modules/tar-fs": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "node_modules/tar-stream": { - "version": "2.1.3", - "license": "MIT", - "dependencies": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/tar/node_modules/chownr": { "version": "2.0.0", "license": "ISC", @@ -30042,6 +29809,7 @@ }, "node_modules/tunnel-agent": { "version": "0.6.0", + "dev": true, "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" @@ -38942,6 +38710,14 @@ "@types/node": "*" } }, + "@types/bson": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.2.0.tgz", + "integrity": "sha512-ELCPqAdroMdcuxqwMgUpifQyRoTpyYCNr1V9xKyF40VsBobsj+BbWNRvwGchMgBPGqkw655ypkjj2MEF5ywVwg==", + "requires": { + "bson": "*" + } + }, "@types/busboy": { "version": "1.5.0", "dev": true, @@ -39217,6 +38993,15 @@ "version": "3.0.5", "dev": true }, + "@types/mongodb": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz", + "integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, "@types/mongodb-uri": { "version": "0.9.1", "dev": true @@ -39955,13 +39740,6 @@ "aproba": { "version": "1.2.0" }, - "are-we-there-yet": { - "version": "1.1.5", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "arg": { "version": "4.1.3", "dev": true @@ -40228,6 +40006,21 @@ "version": "1.1.2", "dev": true }, + "async-mutex": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", + "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", + "requires": { + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, "asynckit": { "version": "0.4.0" }, @@ -40703,13 +40496,13 @@ }, "bindings": { "version": "1.5.0", + "optional": true, "requires": { "file-uri-to-path": "1.0.0" } }, "bl": { "version": "2.2.1", - "optional": true, "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -40926,15 +40719,11 @@ } }, "bson": { - "version": "2.0.8" - }, - "bson-ext": { - "version": "2.0.6", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", + "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", "requires": { - "bindings": "^1.3.0", - "bson": "^2.0.2", - "nan": "^2.14.0", - "prebuild-install": "6.1.2" + "buffer": "^5.6.0" } }, "buffer": { @@ -41152,7 +40941,8 @@ } }, "chownr": { - "version": "1.1.4" + "version": "1.1.4", + "dev": true }, "chrome-remote-interface": { "version": "0.30.1", @@ -42197,17 +41987,6 @@ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, - "decompress-response": { - "version": "4.2.1", - "requires": { - "mimic-response": "^2.0.0" - }, - "dependencies": { - "mimic-response": { - "version": "2.1.0" - } - } - }, "dedent": { "version": "0.7.0", "dev": true @@ -42222,9 +42001,6 @@ "type-detect": "^4.0.0" } }, - "deep-extend": { - "version": "0.6.0" - }, "deep-is": { "version": "0.1.3", "dev": true @@ -42384,8 +42160,7 @@ "version": "1.0.0" }, "denque": { - "version": "1.4.1", - "optional": true + "version": "1.4.1" }, "depd": { "version": "2.0.0" @@ -42405,9 +42180,6 @@ "version": "1.0.0", "dev": true }, - "detect-libc": { - "version": "1.0.3" - }, "detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -43957,9 +43729,6 @@ } } }, - "expand-template": { - "version": "2.0.3" - }, "expand-tilde": { "version": "2.0.2", "dev": true, @@ -44318,7 +44087,8 @@ "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==" }, "file-uri-to-path": { - "version": "1.0.0" + "version": "1.0.0", + "optional": true }, "filelist": { "version": "1.0.4", @@ -44412,9 +44182,6 @@ "pkg-dir": "^3.0.0" } }, - "find-package-json": { - "version": "1.2.0" - }, "find-up": { "version": "4.1.0", "requires": { @@ -44931,19 +44698,6 @@ "version": "1.2.3", "dev": true }, - "gauge": { - "version": "2.7.4", - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, "gensync": { "version": "1.0.0-beta.2", "dev": true @@ -45032,9 +44786,6 @@ "assert-plus": "^1.0.0" } }, - "github-from-package": { - "version": "0.0.0" - }, "glob": { "version": "7.1.6", "requires": { @@ -45718,7 +45469,8 @@ "version": "2.0.4" }, "ini": { - "version": "1.3.7" + "version": "1.3.7", + "dev": true }, "int64-buffer": { "version": "0.1.10", @@ -46020,7 +45772,8 @@ "version": "1.0.0" }, "isexe": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "isobject": { "version": "3.0.1", @@ -48413,12 +48166,6 @@ "p-locate": "^4.1.0" } }, - "lockfile": { - "version": "1.0.4", - "requires": { - "signal-exit": "^3.0.2" - } - }, "lodash": { "version": "4.17.21" }, @@ -49185,7 +48932,6 @@ "version": "3.7.4", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", - "optional": true, "requires": { "bl": "^2.2.1", "bson": "^1.1.4", @@ -49196,12 +48942,10 @@ }, "dependencies": { "bson": { - "version": "1.1.6", - "optional": true + "version": "1.1.6" }, "optional-require": { "version": "1.1.8", - "optional": true, "requires": { "require-at": "^1.0.6" } @@ -49218,24 +48962,27 @@ } }, "mongodb-memory-server-core": { - "version": "6.9.6", - "requires": { - "@types/tmp": "^0.2.0", - "camelcase": "^6.0.0", - "cross-spawn": "^7.0.3", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/mongodb-memory-server-core/-/mongodb-memory-server-core-7.6.3.tgz", + "integrity": "sha512-5rv79YlPoPvguRfFv1fvR78z69/QohGD+65f9UYWDfD70ykXpf6tAXPpWJ4ww/ues7FIVepkFCr3aiUvu6lA+A==", + "requires": { + "@types/mongodb": "^3.6.20", + "@types/tmp": "^0.2.2", + "async-mutex": "^0.3.2", + "camelcase": "^6.1.0", "debug": "^4.2.0", - "find-cache-dir": "^3.3.1", - "find-package-json": "^1.2.0", + "find-cache-dir": "^3.3.2", "get-port": "^5.1.1", "https-proxy-agent": "^5.0.0", - "lockfile": "^1.0.4", "md5-file": "^5.0.0", "mkdirp": "^1.0.4", - "mongodb": "^3.6.2", - "semver": "^7.3.2", + "mongodb": "^3.7.3", + "new-find-package-json": "^1.1.0", + "semver": "^7.3.5", "tar-stream": "^2.1.4", "tmp": "^0.2.1", - "uuid": "^8.3.0", + "tslib": "^2.3.0", + "uuid": "^8.3.1", "yauzl": "^2.10.0" }, "dependencies": { @@ -49250,14 +48997,6 @@ "camelcase": { "version": "6.3.0" }, - "cross-spawn": { - "version": "7.0.3", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, "find-cache-dir": { "version": "3.3.2", "requires": { @@ -49280,9 +49019,6 @@ "mkdirp": { "version": "1.0.4" }, - "path-key": { - "version": "3.1.1" - }, "pkg-dir": { "version": "4.2.0", "requires": { @@ -49303,15 +49039,6 @@ "lru-cache": "^6.0.0" } }, - "shebang-command": { - "version": "2.0.0", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0" - }, "tar-stream": { "version": "2.2.0", "requires": { @@ -49322,14 +49049,13 @@ "readable-stream": "^3.1.1" } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "uuid": { "version": "8.3.2" - }, - "which": { - "version": "2.0.2", - "requires": { - "isexe": "^2.0.0" - } } } }, @@ -49350,14 +49076,6 @@ "sift": "16.0.1" }, "dependencies": { - "bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", - "requires": { - "buffer": "^5.6.0" - } - }, "mongodb": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.1.tgz", @@ -49503,9 +49221,6 @@ "to-regex": "^3.0.1" } }, - "napi-build-utils": { - "version": "1.0.2" - }, "natural-compare": { "version": "1.4.0", "dev": true @@ -49533,6 +49248,22 @@ "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-6.0.0.tgz", "integrity": "sha512-kPZKRs4VkdloCGQXPoP84q4sT/1Z+lYM61AXyV8wWa2hnuo5KpPBF2S3crSFnMrOgUISmEBP8Vo/ngGZX60NhA==" }, + "new-find-package-json": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/new-find-package-json/-/new-find-package-json-1.2.0.tgz", + "integrity": "sha512-Z4v/wBxApGh1cCGEhNmq4p8wjDvM6R6vEuYzlAhzOlXBKLJfjyMvwd+ZHR9fyYKVvXfEn4Z3YX6MD470PxpVbQ==", + "requires": { + "debug": "^4.3.4", + "tslib": "^2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, "ngrok": { "version": "4.3.3", "dev": true, @@ -49570,12 +49301,6 @@ "nocache": { "version": "3.0.4" }, - "node-abi": { - "version": "2.30.1", - "requires": { - "semver": "^5.4.1" - } - }, "node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", @@ -49788,9 +49513,6 @@ } } }, - "noop-logger": { - "version": "0.1.1" - }, "nopt": { "version": "5.0.0", "requires": { @@ -49817,15 +49539,6 @@ } } }, - "npmlog": { - "version": "4.1.2", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, "nth-check": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", @@ -50592,25 +50305,6 @@ "resolved": "https://registry.npmjs.org/pprof-format/-/pprof-format-2.0.7.tgz", "integrity": "sha512-1qWaGAzwMpaXJP9opRa23nPnt2Egi7RMNoNBptEE/XwHbcn4fC2b/4U4bKc5arkGkIh2ZabpF2bEb+c5GNHEKA==" }, - "prebuild-install": { - "version": "6.1.2", - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, "prettier": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", @@ -50922,15 +50616,6 @@ "unpipe": "1.0.0" } }, - "rc": { - "version": "1.2.8", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, "react-dev-inspector": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/react-dev-inspector/-/react-dev-inspector-1.8.6.tgz", @@ -51485,8 +51170,7 @@ } }, "require-at": { - "version": "1.0.6", - "optional": true + "version": "1.0.6" }, "require-directory": { "version": "2.1.1" @@ -51928,17 +51612,6 @@ "pkg-conf": "^2.1.0" } }, - "simple-concat": { - "version": "1.0.1" - }, - "simple-get": { - "version": "3.1.1", - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "simple-swizzle": { "version": "0.2.2", "requires": { @@ -52482,7 +52155,8 @@ "dev": true }, "strip-json-comments": { - "version": "2.0.1" + "version": "2.0.1", + "dev": true }, "stripe": { "version": "12.5.0", @@ -52687,43 +52361,6 @@ } } }, - "tar-fs": { - "version": "2.1.0", - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "tar-stream": { - "version": "2.1.3", - "requires": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "bl": { - "version": "4.0.3", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "terser": { "version": "4.8.0", "dev": true, @@ -53756,6 +53393,7 @@ }, "tunnel-agent": { "version": "0.6.0", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } diff --git a/package.json b/package.json index 7a8d785464..828927a7ab 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "body-parser": "^1.20.1", "bootstrap": "3.4.1", "boxicons": "1.8.0", - "bson-ext": "^2.0.6", + "bson": "^4.7.2", "busboy": "^1.6.0", "celebrate": "^15.0.1", "compression": "~1.7.2", @@ -121,7 +121,7 @@ "libphonenumber-js": "^1.10.24", "lodash": "^4.17.21", "moment-timezone": "0.5.41", - "mongodb-memory-server-core": "^6.9.6", + "mongodb-memory-server-core": "^7.6.3", "mongodb-uri": "^0.9.7", "mongoose": "^6.12.0", "multiparty": ">=4.2.3", diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index fbc18df257..3f33259c4b 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -1,4 +1,4 @@ -import BSON, { ObjectId } from 'bson-ext' +import { calculateObjectSize, ObjectId } from 'bson' import { compact, omit, pick, uniq } from 'lodash' import mongoose, { ClientSession, @@ -108,22 +108,22 @@ import { isPositiveInteger } from './utils' export const FORM_SCHEMA_ID = 'Form' -const bson = new BSON([ - BSON.Binary, - BSON.Code, - BSON.DBRef, - BSON.Decimal128, - BSON.Double, - BSON.Int32, - BSON.Long, - BSON.Map, - BSON.MaxKey, - BSON.MinKey, - BSON.ObjectId, - BSON.BSONRegExp, - BSON.Symbol, - BSON.Timestamp, -]) +// const bson = new BSON([ +// BSON.Binary, +// BSON.Code, +// BSON.DBRef, +// BSON.Decimal128, +// BSON.Double, +// BSON.Int32, +// BSON.Long, +// BSON.Map, +// BSON.MaxKey, +// BSON.MinKey, +// BSON.ObjectId, +// BSON.BSONRegExp, +// BSON.Symbol, +// BSON.Timestamp, +// ]) const formSchemaOptions: SchemaOptions = { id: false, @@ -1161,7 +1161,7 @@ const compileFormModel = (db: Mongoose): IFormModel => { // Hooks FormSchema.pre('validate', function (next) { // Reject save if form document is too large - if (bson.calculateObjectSize(this) > 10 * MB) { + if (calculateObjectSize(this) > 10 * MB) { const err = new Error('Form size exceeded.') err.name = 'FormSizeError' return next(err) From 5bb42776c462410d2683dadbf1fda1ca3a59f618 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:57:10 +0800 Subject: [PATCH 29/64] refactor: gloal replacement of bson --- src/app/models/__tests__/admin_feedback.server.model.spec.ts | 2 +- .../models/__tests__/encrypt-submission.server.model.spec.ts | 2 +- src/app/models/__tests__/form.server.model.spec.ts | 2 +- src/app/models/__tests__/form_feedback.server.model.spec.ts | 2 +- src/app/models/__tests__/form_issue.server.model.spec.ts | 2 +- .../models/__tests__/form_statistics_total.server.model.spec.ts | 2 +- src/app/models/__tests__/login.server.model.spec.ts | 2 +- .../admin-feedback/__tests__/admin_feedback.service.spec.ts | 2 +- src/app/modules/auth/__tests__/auth.service.spec.ts | 2 +- src/app/modules/billing/__tests__/billing.controller.spec.ts | 2 +- src/app/modules/feedback/__tests__/feedback.service.spec.ts | 2 +- src/app/modules/form/__tests__/form.utils.spec.ts | 2 +- .../form/admin-form/__tests__/admin-form.controller.spec.ts | 2 +- .../admin-form/__tests__/admin-form.issue.controller.spec.ts | 2 +- .../admin-form/__tests__/admin-form.payments.service.spec.ts | 2 +- .../form/admin-form/__tests__/admin-form.service.spec.ts | 2 +- .../modules/form/admin-form/__tests__/admin-form.utils.spec.ts | 2 +- src/app/modules/form/admin-form/admin-form.controller.ts | 2 +- .../form/public-form/__tests__/public-form.controller.spec.ts | 2 +- .../form/public-form/__tests__/public-form.service.spec.ts | 2 +- src/app/modules/issue/__tests__/issue.controller.spec.ts | 2 +- src/app/modules/issue/issue.service.ts | 2 +- src/app/modules/myinfo/__tests__/myinfo.service.spec.ts | 2 +- .../__tests__/encrypt-submission.controller.spec.ts | 2 +- .../__tests__/encrypt-submission.service.spec.ts | 2 +- .../__tests__/encrypt-submission.utils.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts | 2 +- .../admin/forms/__tests__/admin-forms.settings.routes.spec.ts | 2 +- .../v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts | 2 +- .../routes/api/v3/corppass/__tests__/corppass.routes.spec.ts | 2 +- .../api/v3/forms/__tests__/public-forms.auth.routes.spec.ts | 2 +- .../api/v3/forms/__tests__/public-forms.form.routes.spec.ts | 2 +- .../v3/forms/__tests__/public-forms.verification.routes.spec.ts | 2 +- src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts | 2 +- src/app/routes/api/v3/user/__tests__/user.routes.spec.ts | 2 +- src/shared/util/__tests__/logic.spec.ts | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/app/models/__tests__/admin_feedback.server.model.spec.ts b/src/app/models/__tests__/admin_feedback.server.model.spec.ts index 39f497c7fc..4a5ca6a636 100644 --- a/src/app/models/__tests__/admin_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/admin_feedback.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts index 518efda9d9..683e7b0c29 100644 --- a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts +++ b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { pick, times } from 'lodash' import moment from 'moment-timezone' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form.server.model.spec.ts b/src/app/models/__tests__/form.server.model.spec.ts index bd2e6bfe0c..dc3d307e9a 100644 --- a/src/app/models/__tests__/form.server.model.spec.ts +++ b/src/app/models/__tests__/form.server.model.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { cloneDeep, map, merge, omit, orderBy, pick, range } from 'lodash' import mongoose, { Types } from 'mongoose' import { diff --git a/src/app/models/__tests__/form_feedback.server.model.spec.ts b/src/app/models/__tests__/form_feedback.server.model.spec.ts index 9ea95d75a6..bd4403bd72 100644 --- a/src/app/models/__tests__/form_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/form_feedback.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form_issue.server.model.spec.ts b/src/app/models/__tests__/form_issue.server.model.spec.ts index 3b9728680f..524051da29 100644 --- a/src/app/models/__tests__/form_issue.server.model.spec.ts +++ b/src/app/models/__tests__/form_issue.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' diff --git a/src/app/models/__tests__/form_statistics_total.server.model.spec.ts b/src/app/models/__tests__/form_statistics_total.server.model.spec.ts index 69cb200106..b8894f7d56 100644 --- a/src/app/models/__tests__/form_statistics_total.server.model.spec.ts +++ b/src/app/models/__tests__/form_statistics_total.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import getFormStatisticsTotalModel from 'src/app/models/form_statistics_total.server.model' diff --git a/src/app/models/__tests__/login.server.model.spec.ts b/src/app/models/__tests__/login.server.model.spec.ts index 1a0c69348f..c023762114 100644 --- a/src/app/models/__tests__/login.server.model.spec.ts +++ b/src/app/models/__tests__/login.server.model.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import moment from 'moment-timezone' import mongoose from 'mongoose' diff --git a/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts b/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts index cd02b702ad..cf5e1e4fca 100644 --- a/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts +++ b/src/app/modules/admin-feedback/__tests__/admin_feedback.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import getAdminFeedbackModel from 'src/app/models/admin_feedback.server.model' diff --git a/src/app/modules/auth/__tests__/auth.service.spec.ts b/src/app/modules/auth/__tests__/auth.service.spec.ts index c6f70bde94..1b4c989398 100644 --- a/src/app/modules/auth/__tests__/auth.service.spec.ts +++ b/src/app/modules/auth/__tests__/auth.service.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/billing/__tests__/billing.controller.spec.ts b/src/app/modules/billing/__tests__/billing.controller.spec.ts index f699ac4fde..5fb0be655d 100644 --- a/src/app/modules/billing/__tests__/billing.controller.spec.ts +++ b/src/app/modules/billing/__tests__/billing.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import moment from 'moment-timezone' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/app/modules/feedback/__tests__/feedback.service.spec.ts b/src/app/modules/feedback/__tests__/feedback.service.spec.ts index c2b1b49fb6..a24420e4a9 100644 --- a/src/app/modules/feedback/__tests__/feedback.service.spec.ts +++ b/src/app/modules/feedback/__tests__/feedback.service.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { compareAsc } from 'date-fns' import { omit, times } from 'lodash' import moment from 'moment-timezone' diff --git a/src/app/modules/form/__tests__/form.utils.spec.ts b/src/app/modules/form/__tests__/form.utils.spec.ts index 0161c7edad..9eb5e8a047 100644 --- a/src/app/modules/form/__tests__/form.utils.spec.ts +++ b/src/app/modules/form/__tests__/form.utils.spec.ts @@ -1,5 +1,5 @@ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { Types } from 'mongoose' import { FormFieldSchema } from 'src/types' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.controller.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.controller.spec.ts index 293f932fd9..e6447d69a6 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.controller.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.controller.spec.ts @@ -6,7 +6,7 @@ import { } from '__tests__/unit/backend/helpers/generate-form-data' import expressHandler from '__tests__/unit/backend/helpers/jest-express' import { PresignedPost } from 'aws-sdk/clients/s3' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { assignIn, cloneDeep, merge, pick } from 'lodash' import { err, errAsync, ok, okAsync, Result } from 'neverthrow' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts index f1f20fe6e4..69782f62a7 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.issue.controller.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { errAsync, okAsync } from 'neverthrow' import { PassThrough } from 'stream' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts index 87b64c9055..3fd1e0a82b 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.payments.service.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { PaymentsProductUpdateDto, diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts index 6db2a39994..4cb4d9d3ad 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import { PresignedPost } from 'aws-sdk/clients/s3' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { assignIn, cloneDeep, merge, omit, pick } from 'lodash' import mongoose, { ClientSession } from 'mongoose' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts index 7c52b3f791..f31be99ba8 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.utils.spec.ts @@ -1,5 +1,5 @@ import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { cloneDeep, omit, tail } from 'lodash' import { EditFieldActions } from 'src/shared/constants' diff --git a/src/app/modules/form/admin-form/admin-form.controller.ts b/src/app/modules/form/admin-form/admin-form.controller.ts index bb30baab5d..6f052339f2 100644 --- a/src/app/modules/form/admin-form/admin-form.controller.ts +++ b/src/app/modules/form/admin-form/admin-form.controller.ts @@ -1,6 +1,6 @@ import JoiDate from '@joi/date' import axios from 'axios' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { celebrate, Joi as BaseJoi, Segments } from 'celebrate' import { AuthedSessionData } from 'express-session' import { StatusCodes } from 'http-status-codes' diff --git a/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts b/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts index f704f30357..b94e02874d 100644 --- a/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts +++ b/src/app/modules/form/public-form/__tests__/public-form.controller.spec.ts @@ -1,6 +1,6 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' import { IPersonResponse } from '@opengovsg/myinfo-gov-client' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { Request } from 'express' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts b/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts index aae25c0511..fb5defe689 100644 --- a/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts +++ b/src/app/modules/form/public-form/__tests__/public-form.service.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import type { PartialDeep } from 'type-fest' diff --git a/src/app/modules/issue/__tests__/issue.controller.spec.ts b/src/app/modules/issue/__tests__/issue.controller.spec.ts index 60879d5664..d4660740da 100644 --- a/src/app/modules/issue/__tests__/issue.controller.spec.ts +++ b/src/app/modules/issue/__tests__/issue.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { merge, omit } from 'lodash' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/issue/issue.service.ts b/src/app/modules/issue/issue.service.ts index b61c511163..aa55437743 100644 --- a/src/app/modules/issue/issue.service.ts +++ b/src/app/modules/issue/issue.service.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { isEmpty } from 'lodash' import moment from 'moment-timezone' import mongoose, { Cursor as QueryCursor, QueryOptions } from 'mongoose' diff --git a/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts b/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts index 417d8814f4..dccf329a3b 100644 --- a/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts +++ b/src/app/modules/myinfo/__tests__/myinfo.service.spec.ts @@ -2,7 +2,7 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { MyInfoGovClient } from '@opengovsg/myinfo-gov-client' import bcrypt from 'bcrypt' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import jwt from 'jsonwebtoken' import mongoose from 'mongoose' import { v4 as uuidv4 } from 'uuid' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts index 550d330025..12ed0b9806 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { err, errAsync, ok, okAsync } from 'neverthrow' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts index 56002eb66e..f4def4988f 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { clone, omit } from 'lodash' import mongoose from 'mongoose' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts index dd673ec550..7dfdb232c0 100644 --- a/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts +++ b/src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { readFileSync } from 'fs' import { cloneDeep } from 'lodash' import moment from 'moment-timezone' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts index b2040abb37..59a09b4df5 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.logic.routes.spec.ts @@ -1,7 +1,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts index 7b1ce46d32..c31db9d51b 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.presign.routes.spec.ts @@ -3,7 +3,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import SparkMD5 from 'spark-md5' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts index bd0391fcc8..24d240494b 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts @@ -11,7 +11,7 @@ import { } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.settings.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.settings.routes.spec.ts index f00eed60cf..8da8afc174 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.settings.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.settings.routes.spec.ts @@ -3,7 +3,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { merge } from 'lodash' import mongoose from 'mongoose' import { errAsync } from 'neverthrow' diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts index 03334d41a8..28ad725564 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.twilio.routes.spec.ts @@ -4,7 +4,7 @@ import { } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts b/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts index f7a6571501..36beb58b02 100644 --- a/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts +++ b/src/app/routes/api/v3/corppass/__tests__/corppass.routes.spec.ts @@ -1,5 +1,5 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import fs from 'fs' import { JWTVerifyResult } from 'jose' import mongoose from 'mongoose' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts index 63b0df5149..5ad94e5c86 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.auth.routes.spec.ts @@ -2,7 +2,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { StatusCodes } from 'http-status-codes' import { err, errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts index bd998c3034..f9bd606ff6 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.form.routes.spec.ts @@ -1,7 +1,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import MyInfoClient, { IMyInfoConfig } from '@opengovsg/myinfo-gov-client' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import jwt from 'jsonwebtoken' import { errAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts b/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts index 09f671fdf4..f915ce3623 100644 --- a/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts +++ b/src/app/routes/api/v3/forms/__tests__/public-forms.verification.routes.spec.ts @@ -4,7 +4,7 @@ import MockTwilio from '__tests__/integration/helpers/twilio' import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import bcrypt from 'bcrypt' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { subMinutes, subYears } from 'date-fns' import { StatusCodes } from 'http-status-codes' import _ from 'lodash' diff --git a/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts b/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts index 546ec7d196..8171b1c74d 100644 --- a/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts +++ b/src/app/routes/api/v3/singpass/__tests/singpass.routes.spec.ts @@ -1,5 +1,5 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { JWTVerifyResult } from 'jose' import mongoose from 'mongoose' import session, { Session } from 'supertest-session' diff --git a/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts b/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts index 8683c6f2ae..79f7177548 100644 --- a/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts +++ b/src/app/routes/api/v3/user/__tests__/user.routes.spec.ts @@ -2,7 +2,7 @@ import { createAuthedSession } from '__tests__/integration/helpers/express-auth' import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { pick } from 'lodash' import mongoose from 'mongoose' import { errAsync, okAsync } from 'neverthrow' diff --git a/src/shared/util/__tests__/logic.spec.ts b/src/shared/util/__tests__/logic.spec.ts index a659fcf65a..1ab28a0d2c 100644 --- a/src/shared/util/__tests__/logic.spec.ts +++ b/src/shared/util/__tests__/logic.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { getApplicableIfFields, From 95785ffefca096cd9124fc05cb10bc6730736e37 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:58:51 +0800 Subject: [PATCH 30/64] chore: remove execPopulate --- .../__tests__/user.server.model.spec.ts | 5 +-- .../__tests__/bounce.controller.spec.ts | 4 +- .../bounce/__tests__/bounce.service.spec.ts | 44 +++++-------------- .../__tests__/admin-form.service.spec.ts | 15 ++----- .../payments/__tests__/stripe.service.spec.ts | 14 ++---- .../admin-forms.preview.routes.spec.ts | 28 +++++------- 6 files changed, 34 insertions(+), 76 deletions(-) diff --git a/src/app/models/__tests__/user.server.model.spec.ts b/src/app/models/__tests__/user.server.model.spec.ts index 4d8985b7fb..5fd6222401 100644 --- a/src/app/models/__tests__/user.server.model.spec.ts +++ b/src/app/models/__tests__/user.server.model.spec.ts @@ -174,9 +174,8 @@ describe('User Model', () => { agency: agency._id, email: VALID_USER_EMAIL, }) - const populatedUser = await user - .populate({ path: 'agency' }) - .execPopulate() + const populatedUser = await user.populate({ path: 'agency' }) + expect(populatedUser).toBeDefined() // Act diff --git a/src/app/modules/bounce/__tests__/bounce.controller.spec.ts b/src/app/modules/bounce/__tests__/bounce.controller.spec.ts index 9c20af4686..0810417837 100644 --- a/src/app/modules/bounce/__tests__/bounce.controller.spec.ts +++ b/src/app/modules/bounce/__tests__/bounce.controller.spec.ts @@ -88,9 +88,7 @@ describe('handleSns', () => { _id: bounceDoc.formId, admin: user._id, title: 'mockTitle', - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm }) afterAll(async () => await dbHandler.closeDatabase()) diff --git a/src/app/modules/bounce/__tests__/bounce.service.spec.ts b/src/app/modules/bounce/__tests__/bounce.service.spec.ts index bd29d50c06..00eda8453b 100644 --- a/src/app/modules/bounce/__tests__/bounce.service.spec.ts +++ b/src/app/modules/bounce/__tests__/bounce.service.spec.ts @@ -285,9 +285,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [ @@ -314,9 +312,7 @@ describe('BounceService', () => { admin: testUser._id, title: MOCK_FORM_TITLE, permissionList: [{ email: collabEmail, write: true }], - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [ @@ -341,9 +337,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [ @@ -364,9 +358,7 @@ describe('BounceService', () => { admin: testUser._id, title: MOCK_FORM_TITLE, permissionList: [{ email: collabEmail, write: false }], - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [ @@ -402,9 +394,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [], @@ -444,9 +434,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm const bounceDoc = new Bounce({ formId: form._id, bounces: [], @@ -771,9 +759,7 @@ describe('BounceService', () => { { email: MOCK_EMAIL, write: true }, { email: MOCK_EMAIL_2, write: false }, ], - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm MockUserService.findContactsForEmails.mockReturnValueOnce( okAsync([MOCK_CONTACT]), ) @@ -795,9 +781,7 @@ describe('BounceService', () => { { email: MOCK_EMAIL, write: true }, { email: MOCK_EMAIL_2, write: false }, ], - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm MockUserService.findContactsForEmails.mockReturnValueOnce( okAsync([omit(MOCK_CONTACT, 'contact'), MOCK_CONTACT_2]), ) @@ -819,9 +803,7 @@ describe('BounceService', () => { { email: MOCK_EMAIL, write: true }, { email: MOCK_EMAIL_2, write: false }, ], - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm MockUserService.findContactsForEmails.mockReturnValueOnce( errAsync(new DatabaseError()), ) @@ -855,9 +837,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm MockSmsFactory.sendFormDeactivatedSms.mockReturnValue(okAsync(true)) const result = await BounceService.notifyAdminsOfDeactivation(form, [ @@ -889,9 +869,7 @@ describe('BounceService', () => { const form = (await new Form({ admin: testUser._id, title: MOCK_FORM_TITLE, - }) - .populate('admin') - .execPopulate()) as IPopulatedForm + }).populate('admin')) as IPopulatedForm MockSmsFactory.sendFormDeactivatedSms .mockReturnValueOnce(okAsync(true)) .mockReturnValueOnce(errAsync(new SmsSendError())) diff --git a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts index 4cb4d9d3ad..2d78ff912f 100644 --- a/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts +++ b/src/app/modules/form/admin-form/__tests__/admin-form.service.spec.ts @@ -638,9 +638,7 @@ describe('admin-form.service', () => { emails: [MOCK_NEW_OWNER_EMAIL], responseMode: FormResponseMode.Email, title: 'some mock form', - populate: jest.fn().mockReturnValue({ - execPopulate: jest.fn().mockResolvedValue(expectedPopulateResult), - }), + populate: jest.fn().mockResolvedValue(expectedPopulateResult), } as unknown as IFormSchema const mockValidForm = { @@ -815,12 +813,7 @@ describe('admin-form.service', () => { emails: [MOCK_NEW_OWNER_EMAIL], responseMode: FormResponseMode.Email, title: 'some mock form', - populate: jest.fn().mockReturnValue({ - // Mock populate error. - execPopulate: jest - .fn() - .mockRejectedValue(new Error(mockPopulateErrorStr)), - }), + populate: jest.fn().mockRejectedValue(new Error(mockPopulateErrorStr)), } as unknown as IFormSchema const mockValidForm = { @@ -1670,7 +1663,7 @@ describe('admin-form.service', () => { expect(actualResult._unsafeUnwrap()).toEqual(mockEmailForm) expect(UPDATE_SPY).toHaveBeenCalledWith( - mockEmailForm._id, + String(mockEmailForm._id), { $pull: { form_logics: { _id: logicId } }, }, @@ -1707,7 +1700,7 @@ describe('admin-form.service', () => { expect(actualResult._unsafeUnwrap()).toEqual(mockEncryptForm) expect(UPDATE_SPY).toHaveBeenCalledWith( - mockEncryptForm._id, + String(mockEncryptForm._id), { $pull: { form_logics: { _id: logicId } }, }, diff --git a/src/app/modules/payments/__tests__/stripe.service.spec.ts b/src/app/modules/payments/__tests__/stripe.service.spec.ts index 404ecbf4bd..cd015da35c 100644 --- a/src/app/modules/payments/__tests__/stripe.service.spec.ts +++ b/src/app/modules/payments/__tests__/stripe.service.spec.ts @@ -705,9 +705,7 @@ describe('stripe.service', () => { admin: MOCK_USER, title: 'Test Form', publicKey: 'mockPublicKey', - }) - .populate('admin') - .execPopulate()) as IPopulatedEncryptedForm + }).populate('admin')) as IPopulatedEncryptedForm const getFeatureFlagSpy = jest .spyOn(FeatureFlagService, 'getFeatureFlag') @@ -745,9 +743,7 @@ describe('stripe.service', () => { admin: MOCK_USER, title: 'Test Form', publicKey: 'mockPublicKey', - }) - .populate('admin') - .execPopulate()) as IPopulatedEncryptedForm + }).populate('admin')) as IPopulatedEncryptedForm const getFeatureFlagSpy = jest .spyOn(FeatureFlagService, 'getFeatureFlag') @@ -788,7 +784,7 @@ describe('stripe.service', () => { admin: MOCK_USER, title: 'Test Form', publicKey: 'mockPublicKey', - }).execPopulate()) as IPopulatedEncryptedForm + })) as IPopulatedEncryptedForm const addPaymentAccountIdSpy = jest.spyOn(mockForm, 'addPaymentAccountId') const getFeatureFlagSpy = jest @@ -826,9 +822,7 @@ describe('stripe.service', () => { admin: MOCK_USER, title: 'Test Form', publicKey: 'mockPublicKey', - }) - .populate('admin') - .execPopulate()) as IPopulatedEncryptedForm + }).populate('admin')) as IPopulatedEncryptedForm const getFeatureFlagSpy = jest .spyOn(FeatureFlagService, 'getFeatureFlag') diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts index 24d240494b..44f998e846 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.preview.routes.spec.ts @@ -99,14 +99,12 @@ describe('admin-form.preview.routes', () => { // Assert const expectedForm = ( - await formToPreview - .populate({ - path: 'admin', - populate: { - path: 'agency', - }, - }) - .execPopulate() + await formToPreview.populate({ + path: 'admin', + populate: { + path: 'agency', + }, + }) ).getPublicView() expect(response.status).toEqual(200) expect(response.body).toEqual({ @@ -138,14 +136,12 @@ describe('admin-form.preview.routes', () => { // Assert const expectedForm = ( - await collabFormToPreview - .populate({ - path: 'admin', - populate: { - path: 'agency', - }, - }) - .execPopulate() + await collabFormToPreview.populate({ + path: 'admin', + populate: { + path: 'agency', + }, + }) ).getPublicView() expect(response.status).toEqual(200) expect(response.body).toEqual({ form: jsonParseStringify(expectedForm) }) From 822974ee79c6b0340462463af4f634e8bc286501 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 17:59:43 +0800 Subject: [PATCH 31/64] fix: void promise returns --- src/app/modules/payments/stripe.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/payments/stripe.service.ts b/src/app/modules/payments/stripe.service.ts index a3562ad00e..518bb0cae1 100644 --- a/src/app/modules/payments/stripe.service.ts +++ b/src/app/modules/payments/stripe.service.ts @@ -394,11 +394,11 @@ export const processStripeEvent = ( }, ) .andThen(() => { - session.endSession() + void session.endSession() return okAsync(undefined) }) .orElse((err) => { - session.endSession() + void session.endSession() return errAsync(err) }), ) From 2e84a2627246ad615ace5a11a85661d3d8ea74b5 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:00:25 +0800 Subject: [PATCH 32/64] fix: remove bson reference with mongoose --- .../admin-forms.feedback.routes.spec.ts | 27 +++++++++---------- src/types/user.ts | 5 ++-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts index ce2ed456a2..b324408056 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.feedback.routes.spec.ts @@ -6,8 +6,7 @@ import { import { setupApp } from '__tests__/integration/helpers/express-setup' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' -import mongoose, { ObjectID } from 'mongoose' +import mongoose, { Types } from 'mongoose' import supertest, { Session } from 'supertest-session' import { getEncryptedFormModel } from 'src/app/models/form.server.model' @@ -85,13 +84,13 @@ describe('admin-form.feedback.routes', () => { formId: formForFeedback._id, rating: 5, comment: 'nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, { formId: formForFeedback._id, rating: 2, comment: 'not nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, ] await insertFormFeedback(formFeedbacks[0]) @@ -149,7 +148,7 @@ describe('admin-form.feedback.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -179,7 +178,7 @@ describe('admin-form.feedback.routes', () => { it('should return 404 when form cannot be found', async () => { // Act const response = await request.get( - `/admin/forms/${new ObjectId()}/feedback`, + `/admin/forms/${new Types.ObjectId()}/feedback`, ) // Assert @@ -275,13 +274,13 @@ describe('admin-form.feedback.routes', () => { formId: formForFeedback._id, rating: 5, comment: 'nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, { formId: formForFeedback._id, rating: 2, comment: 'not nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, ] await insertFormFeedback(formFeedbacks[0]) @@ -315,7 +314,7 @@ describe('admin-form.feedback.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -345,7 +344,7 @@ describe('admin-form.feedback.routes', () => { it('should return 404 when form cannot be found', async () => { // Act const response = await request.get( - `/admin/forms/${new ObjectId()}/feedback/count`, + `/admin/forms/${new Types.ObjectId()}/feedback/count`, ) // Assert @@ -429,13 +428,13 @@ describe('admin-form.feedback.routes', () => { formId: formForFeedback._id, rating: 5, comment: 'nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, { formId: formForFeedback._id, rating: 2, comment: 'not nice', - submissionId: new ObjectID().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }, ] await insertFormFeedback(formFeedbacks[0]) @@ -492,7 +491,7 @@ describe('admin-form.feedback.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -522,7 +521,7 @@ describe('admin-form.feedback.routes', () => { it('should return 404 when form cannot be found', async () => { // Act const response = await request.get( - `/admin/forms/${new ObjectId()}/feedback/download`, + `/admin/forms/${new Types.ObjectId()}/feedback/download`, ) // Assert diff --git a/src/types/user.ts b/src/types/user.ts index a7a8a4d0fb..718ca49276 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -1,5 +1,4 @@ -import { ObjectId } from 'bson-ext' -import { Document, Model } from 'mongoose' +import { Document, Model, Schema } from 'mongoose' import type { SetOptional } from 'type-fest' import { PublicAgencyDto, UserBase } from '../../shared/types' @@ -8,7 +7,7 @@ import { AgencyDocument, IAgencySchema } from './agency' import { PublicView } from './database' export type PublicUser = { - agency: PublicAgencyDto | ObjectId + agency: PublicAgencyDto | Schema.Types.ObjectId } export type AdminContactOtpData = { From b187deca97f0073889c4debff82a21e32a100d84 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:02:28 +0800 Subject: [PATCH 33/64] fix: replace more bson on admin-forms.form.routes.specs --- .../__tests__/admin-forms.form.routes.spec.ts | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.form.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.form.routes.spec.ts index 8ecf40ca1e..0709f1bef2 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.form.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.form.routes.spec.ts @@ -8,9 +8,8 @@ import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import { generateDefaultField } from '__tests__/unit/backend/helpers/generate-form-data' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' import { omit, pick } from 'lodash' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { err, errAsync, okAsync } from 'neverthrow' import supertest, { Session } from 'supertest-session' @@ -94,7 +93,7 @@ describe('admin-form.form.routes', () => { // Create separate user const collabUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -533,7 +532,7 @@ describe('admin-form.form.routes', () => { // Arrange const newOwner = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'new-owner', shortName: 'newOwner', }) @@ -599,7 +598,7 @@ describe('admin-form.form.routes', () => { // Arrange const newOwner = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'new-owner', shortName: 'newOwner', }) @@ -621,7 +620,7 @@ describe('admin-form.form.routes', () => { // Arrange const newOwner = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'new-owner', shortName: 'newOwner', }) @@ -643,7 +642,7 @@ describe('admin-form.form.routes', () => { // Arrange const newOwner = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'new-owner', shortName: 'newOwner', }) @@ -690,7 +689,7 @@ describe('admin-form.form.routes', () => { .lean() expect(response.status).toEqual(200) expect(response.body).not.toBeNull() - expect(response.body).toEqual({ + expect(response.body).toMatchObject({ form: jsonParseStringify(expected), }) }) @@ -700,7 +699,7 @@ describe('admin-form.form.routes', () => { // Create separate user const collabUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -727,7 +726,7 @@ describe('admin-form.form.routes', () => { .lean() expect(response.status).toEqual(200) expect(response.body).not.toBeNull() - expect(response.body).toEqual({ + expect(response.body).toMatchObject({ form: jsonParseStringify(expected), }) }) @@ -737,7 +736,7 @@ describe('admin-form.form.routes', () => { await logoutSession(request) // Act - const response = await request.get(`/admin/forms/${new ObjectId()}`) + const response = await request.get(`/admin/forms/${new Types.ObjectId()}`) // Assert expect(response.status).toEqual(401) @@ -748,7 +747,7 @@ describe('admin-form.form.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -775,7 +774,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when form cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request.get(`/admin/forms/${invalidFormId}`) @@ -809,7 +808,7 @@ describe('admin-form.form.routes', () => { await dbHandler.clearCollection(UserModel.collection.name) // Act - const response = await request.get(`/admin/forms/${new ObjectId()}`) + const response = await request.get(`/admin/forms/${new Types.ObjectId()}`) // Assert expect(response.status).toEqual(422) @@ -823,7 +822,7 @@ describe('admin-form.form.routes', () => { .mockRejectedValueOnce(new Error('some error')) // Act - const response = await request.get(`/admin/forms/${new ObjectId()}`) + const response = await request.get(`/admin/forms/${new Types.ObjectId()}`) // Assert expect(response.status).toEqual(500) @@ -875,7 +874,7 @@ describe('admin-form.form.routes', () => { // Create separate user const collabUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -900,7 +899,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when form to archive cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId() + const invalidFormId = new Types.ObjectId() // Act const response = await request.delete(`/admin/forms/${invalidFormId}`) @@ -1223,7 +1222,7 @@ describe('admin-form.form.routes', () => { // Create separate user const someUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1254,7 +1253,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when form to duplicate cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId() + const invalidFormId = new Types.ObjectId() // Act const response = await request @@ -1301,7 +1300,7 @@ describe('admin-form.form.routes', () => { // Act const response = await request - .post(`/admin/forms/${new ObjectId()}/duplicate`) + .post(`/admin/forms/${new Types.ObjectId()}/duplicate`) .send({ responseMode: FormResponseMode.Encrypt, title: 'does not matter', @@ -1355,7 +1354,7 @@ describe('admin-form.form.routes', () => { }) const newOwner = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'new-owner', shortName: 'newOwner', }) @@ -1391,7 +1390,7 @@ describe('admin-form.form.routes', () => { it('should return 400 when body.email is missing', async () => { // Arrange - const someFormId = new ObjectId().toHexString() + const someFormId = new Types.ObjectId().toHexString() // Act const response = await request @@ -1408,7 +1407,7 @@ describe('admin-form.form.routes', () => { it('should return 400 when body.email is an invalid email', async () => { // Arrange - const someFormId = new ObjectId().toHexString() + const someFormId = new Types.ObjectId().toHexString() // Act const response = await request @@ -1426,7 +1425,7 @@ describe('admin-form.form.routes', () => { it('should return 400 when body.email contains multiple emails', async () => { // Arrange - const someFormId = new ObjectId().toHexString() + const someFormId = new Types.ObjectId().toHexString() // Act const response = await request @@ -1487,14 +1486,14 @@ describe('admin-form.form.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) ).user const yetAnotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'anotheranother-user', shortName: 'someOtherUser', }) @@ -1521,10 +1520,10 @@ describe('admin-form.form.routes', () => { it('should return 404 when form to transfer cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1553,7 +1552,7 @@ describe('admin-form.form.routes', () => { }) const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1573,7 +1572,7 @@ describe('admin-form.form.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1623,7 +1622,7 @@ describe('admin-form.form.routes', () => { // Create separate user const collabUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -1650,7 +1649,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when form to retrieve cannot be found', async () => { // Arrange const MOCK_FIELD = generateDefaultField(BasicField.Rating) - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request.get( @@ -2148,7 +2147,7 @@ describe('admin-form.form.routes', () => { const expectedOriginalField = { ...omit(fieldToDuplicate, ['getQuestion']), - _id: new ObjectId(fieldToDuplicate._id), + _id: new Types.ObjectId(fieldToDuplicate._id), } const expectedDuplicatedField = { ...omit(fieldToDuplicate, ['_id', 'globalId', 'getQuestion']), // do not compare _id and globalId @@ -2178,7 +2177,7 @@ describe('admin-form.form.routes', () => { expect(actual?.__v).toEqual(1) // mongoose version key should be incremented by one upon save() expect({ ...response.body, - _id: new ObjectId(response.body._id), + _id: new Types.ObjectId(response.body._id), }).toEqual(actual?.form_fields![1]) }) @@ -2210,7 +2209,7 @@ describe('admin-form.form.routes', () => { // Create separate user const collabUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -2240,8 +2239,8 @@ describe('admin-form.form.routes', () => { it('should return 404 when form to update cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId() - const randomFieldId = new ObjectId() + const invalidFormId = new Types.ObjectId() + const randomFieldId = new Types.ObjectId() // Act const response = await request.post( @@ -2262,7 +2261,7 @@ describe('admin-form.form.routes', () => { form_fields: [generateDefaultField(BasicField.Date)], })) as IPopulatedForm - const randomFieldId = new ObjectId() + const randomFieldId = new Types.ObjectId() // Act const response = await request.post( @@ -2393,7 +2392,7 @@ describe('admin-form.form.routes', () => { // Arrange // Create separate user const { user: formOwner } = await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'collab-user', shortName: 'collabUser', }) @@ -2419,7 +2418,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when the form cannot be found', async () => { // Act const resp = await request - .put(`/admin/forms/${new ObjectId().toHexString()}/start-page`) + .put(`/admin/forms/${new Types.ObjectId().toHexString()}/start-page`) .send(MOCK_UPDATED_START_PAGE) const expectedResponse = { message: 'Form not found' } @@ -2747,7 +2746,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when feedbackId cannot be found in database', async () => { // Act const resp = await request - .patch(`/admin/forms/feedback/${new ObjectId().toString()}`) + .patch(`/admin/forms/feedback/${new Types.ObjectId().toString()}`) .send({ rating: MOCK_NEW_RATING, comment: MOCK_NEW_COMMENT }) // Assert @@ -2758,7 +2757,7 @@ describe('admin-form.form.routes', () => { it('should return 404 when userId and feedbackId pair cannot be found in database', async () => { // create new admin feedback with different userId from defaultuser const newFeedback = await AdminFeedbackModel.create({ - userId: new ObjectId().toHexString(), + userId: new Types.ObjectId().toHexString(), rating: MOCK_RATING, comment: MOCK_COMMENT, }) From d864725d97c23814f19a997abcf15cf25122924b Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:15:26 +0800 Subject: [PATCH 34/64] fix: test failures on admin-forms.submissions.routes.spec --- .../admin-forms.submissions.routes.spec.ts | 164 +++++++++--------- 1 file changed, 78 insertions(+), 86 deletions(-) diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts index 93f298767c..1e823afe3d 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ + import { createAuthedSession, logoutSession, @@ -7,10 +8,10 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' import { format, subDays } from 'date-fns' import { times } from 'lodash' -import mongoose from 'mongoose' +import MockDate from 'mockdate' +import mongoose, { Types } from 'mongoose' import supertest, { Session } from 'supertest-session' import { aws } from 'src/app/config/config' @@ -186,7 +187,6 @@ describe('admin-form.submissions.routes', () => { it('should return 200 with counts of submissions made between given start and end dates.', async () => { // Arrange - const expectedSubmissionCount = 3 const newForm = (await EmailFormModel.create({ title: 'new form', responseMode: FormResponseMode.Email, @@ -198,15 +198,12 @@ describe('admin-form.submissions.routes', () => { hash: 'some hash', salt: 'some salt', } - const results = await Promise.all( - times(expectedSubmissionCount, () => - saveSubmissionMetadata(newForm, mockSubmissionHash), - ), + await Promise.all( + times(3, () => saveSubmissionMetadata(newForm, mockSubmissionHash)), ) const now = new Date() - const firstSubmission = results[0]._unsafeUnwrap() - firstSubmission.created = subDays(now, 5) - await firstSubmission.save() + MockDate.set(subDays(now, 5)) + await saveSubmissionMetadata(newForm, mockSubmissionHash) // Act const response = await request @@ -219,6 +216,7 @@ describe('admin-form.submissions.routes', () => { // Assert expect(response.status).toEqual(200) expect(response.body).toEqual(1) + MockDate.reset() }) it('should return 200 with counts of submissions made with same start and end dates', async () => { @@ -235,15 +233,14 @@ describe('admin-form.submissions.routes', () => { hash: 'some hash', salt: 'some salt', } - const results = await Promise.all( + await Promise.all( times(expectedSubmissionCount, () => saveSubmissionMetadata(newForm, mockSubmissionHash), ), ) const expectedDate = '2021-04-04' - const firstSubmission = results[0]._unsafeUnwrap() - firstSubmission.created = new Date(expectedDate) - await firstSubmission.save() + MockDate.set(expectedDate) + await saveSubmissionMetadata(newForm, mockSubmissionHash) // Act const response = await request @@ -256,6 +253,7 @@ describe('admin-form.submissions.routes', () => { // Assert expect(response.status).toEqual(200) expect(response.body).toEqual(1) + MockDate.reset() }) it('should return 400 when query.startDate is missing when query.endDate is provided', async () => { @@ -411,7 +409,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( - `${ADMIN_FORMS_PREFIX}/${new ObjectId()}/submissions/count`, + `${ADMIN_FORMS_PREFIX}/${new Types.ObjectId()}/submissions/count`, ) // Assert @@ -423,7 +421,7 @@ describe('admin-form.submissions.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -452,7 +450,7 @@ describe('admin-form.submissions.routes', () => { it('should return 404 when form to retrieve submission counts for cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request.get( @@ -491,7 +489,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( - `${ADMIN_FORMS_PREFIX}/${new ObjectId()}/submissions/count`, + `${ADMIN_FORMS_PREFIX}/${new Types.ObjectId()}/submissions/count`, ) // Assert @@ -662,30 +660,26 @@ describe('admin-form.submissions.routes', () => { it('should return 200 with stream of encrypted responses when query.startDate is the same as query.endDate', async () => { // Arrange - const submissions = await Promise.all( - times(5, (count) => - createEncryptSubmission({ - form: defaultForm, - encryptedContent: `any encrypted content ${count}`, - verifiedContent: `any verified content ${count}`, - attachmentMetadata: new Map([ - ['fieldId1', `some.attachment.url.${count}`], - ['fieldId2', `some.other.attachment.url.${count}`], - ]), - }), - ), - ) + const saveEncryptedSubmission = async (count: number) => + createEncryptSubmission({ + form: defaultForm, + encryptedContent: `any encrypted content ${count}`, + verifiedContent: `any verified content ${count}`, + attachmentMetadata: new Map([ + ['fieldId1', `some.attachment.url.${count}`], + ['fieldId2', `some.other.attachment.url.${count}`], + ]), + }) + + await Promise.all(times(3, (count) => saveEncryptedSubmission(count))) const expectedDate = '2020-02-03' + MockDate.set(expectedDate) // Set 2 submissions to be submitted with specific date - submissions[2].created = new Date(expectedDate) - submissions[4].created = new Date(expectedDate) - await submissions[2].save() - await submissions[4].save() - const expectedSubmissionIds = [ - String(submissions[2]._id), - String(submissions[4]._id), - ] + + const expectedSubmissions = await Promise.all( + times(2, (count) => saveEncryptedSubmission(count)), + ) // Act const response = await request @@ -704,7 +698,7 @@ describe('admin-form.submissions.routes', () => { }) // Assert - const expectedSorted = submissions + const expectedSorted = expectedSubmissions .map((s) => jsonParseStringify({ _id: s._id, @@ -717,7 +711,6 @@ describe('admin-form.submissions.routes', () => { version: s.version, }), ) - .filter((s) => expectedSubmissionIds.includes(s._id)) .sort((a, b) => String(a._id).localeCompare(String(b._id))) const actualSorted = (response.body as string) @@ -730,35 +723,33 @@ describe('admin-form.submissions.routes', () => { expect(response.status).toEqual(200) expect(actualSorted).toEqual(expectedSorted) + MockDate.reset() }) it('should return 200 with stream of encrypted responses between given query.startDate and query.endDate', async () => { // Arrange - const submissions = await Promise.all( - times(5, (count) => - createEncryptSubmission({ - form: defaultForm, - encryptedContent: `any encrypted content ${count}`, - verifiedContent: `any verified content ${count}`, - attachmentMetadata: new Map([ - ['fieldId1', `some.attachment.url.${count}`], - ['fieldId2', `some.other.attachment.url.${count}`], - ]), - }), - ), - ) + const saveEncryptedSubmission = (count: number) => + createEncryptSubmission({ + form: defaultForm, + encryptedContent: `any encrypted content ${count}`, + verifiedContent: `any verified content ${count}`, + attachmentMetadata: new Map([ + ['fieldId1', `some.attachment.url.${count}`], + ['fieldId2', `some.other.attachment.url.${count}`], + ]), + }) + await Promise.all(times(3, (count) => saveEncryptedSubmission(count))) + + const expectedSubmissions = [] const startDateStr = '2020-02-03' - const endDateStr = '2020-02-04' + // Set 2 submissions to be submitted with specific date - submissions[2].created = new Date(startDateStr) - submissions[4].created = new Date(endDateStr) - await submissions[2].save() - await submissions[4].save() - const expectedSubmissionIds = [ - String(submissions[2]._id), - String(submissions[4]._id), - ] + MockDate.set(startDateStr) + expectedSubmissions.push(await saveEncryptedSubmission(1)) + const endDateStr = '2020-02-04' + MockDate.set(endDateStr) + expectedSubmissions.push(await saveEncryptedSubmission(1)) // Act const response = await request @@ -777,7 +768,7 @@ describe('admin-form.submissions.routes', () => { }) // Assert - const expectedSorted = submissions + const expectedSorted = expectedSubmissions .map((s) => jsonParseStringify({ _id: s._id, @@ -790,7 +781,7 @@ describe('admin-form.submissions.routes', () => { version: s.version, }), ) - .filter((s) => expectedSubmissionIds.includes(s._id)) + // .filter((s) => expectedSubmissionIds.includes(s._id)) .sort((a, b) => String(a._id).localeCompare(String(b._id))) const actualSorted = (response.body as string) @@ -803,6 +794,7 @@ describe('admin-form.submissions.routes', () => { expect(response.status).toEqual(200) expect(actualSorted).toEqual(expectedSorted) + MockDate.reset() }) it('should return 400 when form of given formId is not an encrypt mode form', async () => { @@ -844,7 +836,7 @@ describe('admin-form.submissions.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -873,7 +865,7 @@ describe('admin-form.submissions.routes', () => { it('should return 404 when form to download submissions for cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request.get( @@ -912,7 +904,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( - `${ADMIN_FORMS_PREFIX}/${new ObjectId()}/submissions/download`, + `${ADMIN_FORMS_PREFIX}/${new Types.ObjectId()}/submissions/download`, ) // Assert @@ -1016,7 +1008,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( `${ADMIN_FORMS_PREFIX}/${emailForm._id}/submissions/${String( - new ObjectId(), + new Types.ObjectId(), )}`, ) @@ -1035,7 +1027,7 @@ describe('admin-form.submissions.routes', () => { const response = await request.get( `${ADMIN_FORMS_PREFIX}/${ defaultForm._id - }/adminform/submissions/${String(new ObjectId())}`, + }/adminform/submissions/${String(new Types.ObjectId())}`, ) // Assert @@ -1047,7 +1039,7 @@ describe('admin-form.submissions.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1064,7 +1056,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( `${ADMIN_FORMS_PREFIX}/${inaccessibleForm._id}/submissions/${String( - new ObjectId(), + new Types.ObjectId(), )}`, ) @@ -1081,7 +1073,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( `${ADMIN_FORMS_PREFIX}/${defaultForm._id}/submissions/${String( - new ObjectId(), + new Types.ObjectId(), )}`, ) @@ -1094,12 +1086,12 @@ describe('admin-form.submissions.routes', () => { it('should return 404 when form to retrieve submission for cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request.get( `${ADMIN_FORMS_PREFIX}/${invalidFormId}/submissions/${String( - new ObjectId(), + new Types.ObjectId(), )}`, ) @@ -1121,7 +1113,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( `${ADMIN_FORMS_PREFIX}/${archivedForm._id}/submissions/${String( - new ObjectId(), + new Types.ObjectId(), )}`, ) @@ -1137,8 +1129,8 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request.get( - `${ADMIN_FORMS_PREFIX}/${new ObjectId()}/submissions/${String( - new ObjectId(), + `${ADMIN_FORMS_PREFIX}/${new Types.ObjectId()}/submissions/${String( + new Types.ObjectId(), )}`, ) @@ -1234,10 +1226,10 @@ describe('admin-form.submissions.routes', () => { it('should return 200 with requested page of metadata with payments when payment exists', async () => { // Arrange const createdPayment = await Payment.create({ - _id: new ObjectId(), + _id: new Types.ObjectId(), formId: defaultForm._id, targetAccountId: 'acct_MOCK_ACCOUNT_ID', - pendingSubmissionId: new ObjectId(), + pendingSubmissionId: new Types.ObjectId(), status: PaymentStatus.Succeeded, paymentIntentId: 'somePaymentIntentId', amount: 314159, @@ -1348,10 +1340,10 @@ describe('admin-form.submissions.routes', () => { it('should return 200 with metadata of single submissionId when query.submissionId is provided for submissions with payments', async () => { // Arrange const createdPayment = await Payment.create({ - _id: new ObjectId(), + _id: new Types.ObjectId(), formId: defaultForm._id, targetAccountId: 'acct_MOCK_ACCOUNT_ID', - pendingSubmissionId: new ObjectId(), + pendingSubmissionId: new Types.ObjectId(), status: PaymentStatus.Succeeded, paymentIntentId: 'somePaymentIntentId', amount: 314159, @@ -1449,7 +1441,7 @@ describe('admin-form.submissions.routes', () => { // Arrange const anotherUser = ( await dbHandler.insertFormCollectionReqs({ - userId: new ObjectId(), + userId: new Types.ObjectId(), mailName: 'some-user', shortName: 'someUser', }) @@ -1480,7 +1472,7 @@ describe('admin-form.submissions.routes', () => { it('should return 404 when form to retrieve submission metadata for cannot be found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const response = await request @@ -1523,7 +1515,7 @@ describe('admin-form.submissions.routes', () => { // Act const response = await request - .get(`/admin/forms/${new ObjectId()}/submissions/metadata`) + .get(`/admin/forms/${new Types.ObjectId()}/submissions/metadata`) .query({ page: 10, }) @@ -1563,7 +1555,7 @@ describe('admin-form.submissions.routes', () => { const response = await request .get(`/admin/forms/${defaultForm._id}/submissions/metadata`) .query({ - submissionId: new ObjectId().toHexString(), + submissionId: new Types.ObjectId().toHexString(), }) // Assert From 83819751da9728e998954e57f433785e83b9e9d5 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:33:30 +0800 Subject: [PATCH 35/64] fix: test failures on src/app/models --- .../admin_feedback.server.model.spec.ts | 5 ++-- .../admin_verification.server.model.spec.ts | 15 +++++------ .../encrypt-submission.server.model.spec.ts | 27 +++++++++---------- .../form_feedback.server.model.spec.ts | 11 ++++---- .../__tests__/form_fields.schema.spec.ts | 5 ++-- .../__tests__/user.server.model.spec.ts | 8 +++--- 6 files changed, 33 insertions(+), 38 deletions(-) diff --git a/src/app/models/__tests__/admin_feedback.server.model.spec.ts b/src/app/models/__tests__/admin_feedback.server.model.spec.ts index 4a5ca6a636..96f72f43a4 100644 --- a/src/app/models/__tests__/admin_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/admin_feedback.server.model.spec.ts @@ -1,7 +1,6 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson' import { omit } from 'lodash' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { IAdminFeedback } from 'src/types' @@ -16,7 +15,7 @@ describe('form_feedback.server.model', () => { describe('Schema', () => { const DEFAULT_PARAMS: IAdminFeedback = { - userId: new ObjectId(), + userId: new Types.ObjectId(), rating: 1, comment: 'feedback comment', } diff --git a/src/app/models/__tests__/admin_verification.server.model.spec.ts b/src/app/models/__tests__/admin_verification.server.model.spec.ts index e47623b2a7..46904e3985 100644 --- a/src/app/models/__tests__/admin_verification.server.model.spec.ts +++ b/src/app/models/__tests__/admin_verification.server.model.spec.ts @@ -1,6 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectID } from 'bson' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import getAdminVerificationModel from 'src/app/models/admin_verification.server.model' import { @@ -17,7 +16,7 @@ describe('AdminVerification Model', () => { describe('Schema', () => { const DEFAULT_PARAMS: IAdminVerification = { - admin: new ObjectID(), + admin: new Types.ObjectId(), expireAt: new Date(), hashedContact: 'mockHashedContact', hashedOtp: 'mockHashedOtp', @@ -132,7 +131,7 @@ describe('AdminVerification Model', () => { it('should create successfully when document does not exist', async () => { // Arrange const params: UpsertOtpParams = { - admin: new ObjectID(), + admin: new Types.ObjectId(), expireAt: new Date(), hashedContact: 'mockHashedContact', hashedOtp: 'mockHashedOtp', @@ -154,7 +153,7 @@ describe('AdminVerification Model', () => { it('should update successfully when a document already exists', async () => { // Arrange // Insert mock document into collection. - const adminId = new ObjectID() + const adminId = new Types.ObjectId() const oldExpireAt = new Date() const newExpireAt = new Date(Date.now() + 9000000) const oldNumOtpSent = 3 @@ -196,7 +195,7 @@ describe('AdminVerification Model', () => { // Arrange const invalidParams: UpsertOtpParams = { // Invalid admin parameter. - admin: undefined, + admin: null, expireAt: new Date(), hashedContact: 'mockHashedContact', hashedOtp: 'mockHashedOtp', @@ -218,7 +217,7 @@ describe('AdminVerification Model', () => { it('should increment successfully', async () => { // Arrange // Insert mock document into collection. - const adminId = new ObjectID() + const adminId = new Types.ObjectId() const initialOtpAttempts = 5 const adminVerificationParams = { admin: adminId, @@ -251,7 +250,7 @@ describe('AdminVerification Model', () => { // Arrange // Should have no documents yet. await expect(AdminVerification.countDocuments()).resolves.toEqual(0) - const freshAdminId = new ObjectID() + const freshAdminId = new Types.ObjectId() // Act const actualPromise = diff --git a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts index 683e7b0c29..e234cbacba 100644 --- a/src/app/models/__tests__/encrypt-submission.server.model.spec.ts +++ b/src/app/models/__tests__/encrypt-submission.server.model.spec.ts @@ -1,8 +1,7 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson' import { pick, times } from 'lodash' import moment from 'moment-timezone' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { StorageModeSubmissionMetadata, SubmissionType } from 'shared/types' import getSubmissionModel, { @@ -26,7 +25,7 @@ describe('Encrypt Submission Model', () => { describe('findSingleMetadata', () => { it('should return submission metadata', async () => { // Arrange - const validFormId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() const createdDate = new Date() // Add valid encrypt submission. const validSubmission = await EncryptSubmission.create({ @@ -58,7 +57,7 @@ describe('Encrypt Submission Model', () => { it('should return null when submission is of SubmissionType.Email', async () => { // Arrange - const validFormId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() // Add email submission. const validSubmission = await Submission.create({ form: validFormId, @@ -81,8 +80,8 @@ describe('Encrypt Submission Model', () => { it('should return null if no submission metadata is retrieved', async () => { // Arrange - const validFormId = new ObjectId().toHexString() - const invalidSubmissionId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() + const invalidSubmissionId = new Types.ObjectId().toHexString() // Act const result = await EncryptSubmission.findSingleMetadata( validFormId, @@ -95,7 +94,7 @@ describe('Encrypt Submission Model', () => { }) describe('findAllMetadataByFormId', () => { - const VALID_FORM_ID = new ObjectId().toHexString() + const VALID_FORM_ID = new Types.ObjectId().toHexString() const MOCK_CREATED_DATES_ASC = [ new Date('2020-01-01'), new Date('2020-02-02'), @@ -262,7 +261,7 @@ describe('Encrypt Submission Model', () => { it('should return empty metadata array when formId has no metadata', async () => { // Arrange - const formIdWithNoSubmissions = new ObjectId().toHexString() + const formIdWithNoSubmissions = new Types.ObjectId().toHexString() // Act const actual = await EncryptSubmission.findAllMetadataByFormId( formIdWithNoSubmissions, @@ -282,7 +281,7 @@ describe('Encrypt Submission Model', () => { describe('getSubmissionCursorByFormId', () => { it('should return cursor that contains all the submissions', async () => { // Arrange - const validFormId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() const validSubmission = await EncryptSubmission.create({ submissionType: SubmissionType.Encrypt, form: validFormId, @@ -317,7 +316,7 @@ describe('Encrypt Submission Model', () => { it('should return cursor even if no submissions are found', async () => { // Arrange - const invalidFormId = new ObjectId().toHexString() + const invalidFormId = new Types.ObjectId().toHexString() // Act const actualCursor = EncryptSubmission.getSubmissionCursorByFormId( @@ -339,7 +338,7 @@ describe('Encrypt Submission Model', () => { describe('findEncryptedSubmissionById', () => { it('should return correct submission by its id', async () => { // Arrange - const validFormId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() const validSubmission = await EncryptSubmission.create({ submissionType: SubmissionType.Encrypt, form: validFormId, @@ -371,8 +370,8 @@ describe('Encrypt Submission Model', () => { it('should return null when submission id does not exist', async () => { // Arrange // Form ID does not matter. - const formId = new ObjectId().toHexString() - const invalidSubmissionId = new ObjectId().toHexString() + const formId = new Types.ObjectId().toHexString() + const invalidSubmissionId = new Types.ObjectId().toHexString() // Act const actual = await EncryptSubmission.findEncryptedSubmissionById( @@ -386,7 +385,7 @@ describe('Encrypt Submission Model', () => { it('should return null when type of submission with given id is not SubmissionType.Encrypt', async () => { // Arrange - const validFormId = new ObjectId().toHexString() + const validFormId = new Types.ObjectId().toHexString() const validEmailSubmission = await EmailSubmission.create({ submissionType: SubmissionType.Email, form: validFormId, diff --git a/src/app/models/__tests__/form_feedback.server.model.spec.ts b/src/app/models/__tests__/form_feedback.server.model.spec.ts index bd4403bd72..f129fc5b71 100644 --- a/src/app/models/__tests__/form_feedback.server.model.spec.ts +++ b/src/app/models/__tests__/form_feedback.server.model.spec.ts @@ -1,7 +1,6 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson' import { omit } from 'lodash' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import getFormFeedbackModel from 'src/app/models/form_feedback.server.model' import { IFormFeedback } from 'src/types' @@ -15,8 +14,8 @@ describe('form_feedback.server.model', () => { describe('Schema', () => { const DEFAULT_PARAMS: IFormFeedback = { - formId: new ObjectId(), - submissionId: new ObjectId(), + formId: new Types.ObjectId(), + submissionId: new Types.ObjectId(), rating: 5, comment: 'feedback comment', } @@ -93,8 +92,8 @@ describe('form_feedback.server.model', () => { it('should return cursor to feedback', async () => { // Arrange // Create document - const mockFormId = new ObjectId() - const mockSubmissionId = new ObjectId() + const mockFormId = new Types.ObjectId() + const mockSubmissionId = new Types.ObjectId() const mockFeedbackDoc = await FeedbackModel.create({ formId: mockFormId, submissionId: mockSubmissionId, diff --git a/src/app/models/__tests__/form_fields.schema.spec.ts b/src/app/models/__tests__/form_fields.schema.spec.ts index ecd0305bd9..a0f39c2d77 100644 --- a/src/app/models/__tests__/form_fields.schema.spec.ts +++ b/src/app/models/__tests__/form_fields.schema.spec.ts @@ -1,6 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectID } from 'bson' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { BasicField, FormResponseMode, @@ -15,7 +14,7 @@ import { aws } from '../../config/config' const Form = getFormModel(mongoose) -const MOCK_ADMIN_ID = new ObjectID() +const MOCK_ADMIN_ID = new Types.ObjectId() const MOCK_FORM_PARAMS = { title: 'Test Form', admin: MOCK_ADMIN_ID, diff --git a/src/app/models/__tests__/user.server.model.spec.ts b/src/app/models/__tests__/user.server.model.spec.ts index 5fd6222401..bbff372f13 100644 --- a/src/app/models/__tests__/user.server.model.spec.ts +++ b/src/app/models/__tests__/user.server.model.spec.ts @@ -202,7 +202,7 @@ describe('User Model', () => { const contacts = await User.findContactNumbersByEmails([ VALID_USER_EMAIL, ]) - expect(contacts).toEqual([ + expect(contacts).toMatchObject([ { email: VALID_USER_EMAIL, contact: VALID_CONTACT }, ]) }) @@ -224,11 +224,11 @@ describe('User Model', () => { VALID_USER_EMAIL_2, ]) expect(contacts.length).toBe(2) - expect(contacts).toContainEqual({ + expect(contacts).toPartiallyContain({ email: VALID_USER_EMAIL, contact: VALID_CONTACT, }) - expect(contacts).toContainEqual({ + expect(contacts).toPartiallyContain({ email: VALID_USER_EMAIL_2, contact: VALID_CONTACT_2, }) @@ -245,7 +245,7 @@ describe('User Model', () => { VALID_USER_EMAIL, 'invalid@email.com', ]) - expect(contacts).toEqual([ + expect(contacts).toMatchObject([ { email: VALID_USER_EMAIL, contact: VALID_CONTACT }, ]) }) From 11ee860cd60d3a9e0e1bbc12209e39567484da9a Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:46:50 +0800 Subject: [PATCH 36/64] fix: test failures on src/app/modules/payments --- .../payment-proof.controller.spec.ts | 9 ++++---- .../__tests__/payments.controller.spec.ts | 23 +++++++++++++++++++ .../__tests__/payments.service.spec.ts | 9 ++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/app/modules/payments/__tests__/payment-proof.controller.spec.ts b/src/app/modules/payments/__tests__/payment-proof.controller.spec.ts index 9d0d6a9a68..1ad0710868 100644 --- a/src/app/modules/payments/__tests__/payment-proof.controller.spec.ts +++ b/src/app/modules/payments/__tests__/payment-proof.controller.spec.ts @@ -1,8 +1,7 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' import expressHandler from '__tests__/unit/backend/helpers/jest-express' import axios from 'axios' -import { ObjectId } from 'bson' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { errAsync, ok, okAsync } from 'neverthrow' import { PaymentStatus, SubmissionType } from 'shared/types' @@ -26,7 +25,7 @@ import * as StripeUtils from '../stripe.utils' const Payment = getPaymentModel(mongoose) const EncryptPendingSubmission = getEncryptPendingSubmissionModel(mongoose) -const MOCK_FORM_ID = new ObjectId().toHexString() +const MOCK_FORM_ID = new Types.ObjectId().toHexString() jest.mock('axios') jest.mock('src/app/modules/payments/stripe.utils') @@ -51,7 +50,7 @@ describe('stripe.controller', () => { gstRegNo: 'G123456', } const mockFormTitle = 'Mock Form Title' - const mockSubmissionId = 'MOCK_SUBMISSION_ID' + const mockSubmissionId = new Types.ObjectId().toHexString() const mockForm = { _id: MOCK_FORM_ID, admin: { @@ -85,6 +84,8 @@ describe('stripe.controller', () => { completedPayment: { receiptUrl: 'https://form.gov.sg', submissionId: mockSubmissionId, + transactionFee: 0, + paymentDate: new Date(), }, gstEnabled: false, }) diff --git a/src/app/modules/payments/__tests__/payments.controller.spec.ts b/src/app/modules/payments/__tests__/payments.controller.spec.ts index 901d93149b..7685d04bf7 100644 --- a/src/app/modules/payments/__tests__/payments.controller.spec.ts +++ b/src/app/modules/payments/__tests__/payments.controller.spec.ts @@ -43,6 +43,8 @@ describe('payments.controller', () => { completedPayment: { receiptUrl: 'http://form.gov.sg', paymentDate: new Date(), + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, gstEnabled: false, }) @@ -79,6 +81,9 @@ describe('payments.controller', () => { completedPayment: { receiptUrl: 'http://form.gov.sg', paymentDate: now.toDate(), + + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, gstEnabled: false, }) @@ -93,6 +98,9 @@ describe('payments.controller', () => { completedPayment: { receiptUrl: 'http://form.gov.sg', paymentDate: now.subtract(1, 'hour').toDate(), + + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, gstEnabled: false, }) @@ -126,6 +134,9 @@ describe('payments.controller', () => { completedPayment: { receiptUrl: 'http://form.gov.sg', paymentDate: moment().subtract(31, 'days').toDate(), + + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, gstEnabled: false, }) @@ -155,6 +166,10 @@ describe('payments.controller', () => { email: 'formsg@tech.gov.sg', completedPayment: { receiptUrl: 'http://form.gov.sg', + + submissionId: new ObjectId().toHexString(), + paymentDate: moment().subtract(31, 'days').utc().toDate(), + transactionFee: 0, }, gstEnabled: false, }) @@ -185,6 +200,10 @@ describe('payments.controller', () => { email: 'formsg@tech.gov.sg', completedPayment: { receiptUrl: 'http://form.gov.sg', + + submissionId: new ObjectId().toHexString(), + paymentDate: moment().subtract(31, 'days').utc().toDate(), + transactionFee: 0, }, gstEnabled: false, }) @@ -215,6 +234,10 @@ describe('payments.controller', () => { email: 'formsg@tech.gov.sg', completedPayment: { receiptUrl: 'http://form.gov.sg', + + submissionId: new ObjectId().toHexString(), + paymentDate: moment().subtract(31, 'days').utc().toDate(), + transactionFee: 0, }, gstEnabled: false, }) diff --git a/src/app/modules/payments/__tests__/payments.service.spec.ts b/src/app/modules/payments/__tests__/payments.service.spec.ts index 150c26d379..e9113b8d96 100644 --- a/src/app/modules/payments/__tests__/payments.service.spec.ts +++ b/src/app/modules/payments/__tests__/payments.service.spec.ts @@ -92,6 +92,9 @@ describe('payments.service', () => { gstEnabled: false, completedPayment: { paymentDate: now.toDate(), + receiptUrl: 'https://form.gov.sg', + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, }) }) @@ -122,6 +125,9 @@ describe('payments.service', () => { gstEnabled: false, completedPayment: { paymentDate: now.subtract(1, 'days').toDate(), + receiptUrl: 'https://form.gov.sg', + submissionId: new ObjectId().toHexString(), + transactionFee: 0, }, }) @@ -195,7 +201,10 @@ describe('payments.service', () => { status: PaymentStatus.Succeeded, gstEnabled: false, completedPayment: { + receiptUrl: 'https://form.gov.sg', + submissionId: new ObjectId().toHexString(), paymentDate: moment().subtract(31, 'days').utc().toDate(), + transactionFee: 0, }, }) const result = From 4d12328882b4e2284ae9805b4d3cd9605e0e04a5 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 18:58:14 +0800 Subject: [PATCH 37/64] fix: test failures on src/app/modules/issues --- .../issue/__tests__/issue.service.spec.ts | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/app/modules/issue/__tests__/issue.service.spec.ts b/src/app/modules/issue/__tests__/issue.service.spec.ts index 17eda08ce6..a9ee581925 100644 --- a/src/app/modules/issue/__tests__/issue.service.spec.ts +++ b/src/app/modules/issue/__tests__/issue.service.spec.ts @@ -1,9 +1,8 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson' import { compareAsc } from 'date-fns' import { omit, times } from 'lodash' import moment from 'moment-timezone' -import mongoose from 'mongoose' +import mongoose, { Types } from 'mongoose' import { okAsync } from 'neverthrow' import MailService from 'src/app/services/mail/mail.service' @@ -15,7 +14,7 @@ import { DatabaseError } from '../../core/core.errors' import { FormNotFoundError } from '../../form/form.errors' import * as IssueService from '../issue.service' -const MOCK_FORM_ID = new ObjectId() +const MOCK_FORM_ID = new Types.ObjectId() const MOCK_ISSUE = 'I tried to submit the form, but I keep getting an error message saying that my email address is invalid. I double-checked the email address and it looks correct to me. Can you please help me resolve this issue?' const MOCK_EMAIL = 'test@example.com' @@ -113,7 +112,7 @@ describe('issue.service', () => { describe('getIsFirstIssueForFormToday', () => { let FORM_ISSUE: IFormIssueSchema - const MOCK_ISSUE_ID = ObjectId.createFromTime( + const MOCK_ISSUE_ID = Types.ObjectId.createFromTime( new Date('2023-06-22T23:30:00+08:00').getTime() / 1000, ) beforeEach(async () => { @@ -178,7 +177,7 @@ describe('issue.service', () => { await FormIssueModel.create({ issue: 'I am unable to make a payment', formId: MOCK_FORM_ID, - _id: ObjectId.createFromTime(yesterday.valueOf()), + _id: Types.ObjectId.createFromTime(yesterday.getSeconds()), }) const countDocumentsSpy = jest.spyOn(FormIssueModel, 'countDocuments') @@ -201,7 +200,7 @@ describe('issue.service', () => { await FormIssueModel.create({ issue: 'I am unable to make a payment', formId: MOCK_FORM_ID, - _id: ObjectId.createFromTime(earlier.getSeconds()), + _id: Types.ObjectId.createFromTime(earlier.getSeconds()), }) const countDocumentsSpy = jest.spyOn(FormIssueModel, 'countDocuments') @@ -224,7 +223,7 @@ describe('issue.service', () => { await FormIssueModel.create({ issue: 'I am unable to make a payment', formId: MOCK_FORM_ID, - _id: ObjectId.createFromTime(aSecondAgo.getTime() / 1000), + _id: Types.ObjectId.createFromTime(aSecondAgo.getTime() / 1000), }) const countDocumentsSpy = jest.spyOn(FormIssueModel, 'countDocuments') // Act @@ -241,7 +240,7 @@ describe('issue.service', () => { describe('notifyFormAdmin', () => { let FORM_ISSUE: IFormIssueSchema - const MOCK_ISSUE_ID = ObjectId.createFromTime( + const MOCK_ISSUE_ID = Types.ObjectId.createFromTime( new Date('2023-06-22T12:30:00+08:00').getTime() / 1000, ) beforeEach(async () => { @@ -305,7 +304,7 @@ describe('issue.service', () => { await FormIssueModel.create({ issue: 'I just want to complain', formId: MOCK_FORM_ID, - _id: ObjectId.createFromTime(aSecondAgo.getTime() / 1000), + _id: Types.ObjectId.createFromTime(aSecondAgo.getTime() / 1000), }) const mailSpy = jest.spyOn( MailService, @@ -381,7 +380,7 @@ describe('issue.service', () => { it('should return correct issues', async () => { // Arrange const expectedCount = 3 - const mockFormId = new ObjectId().toHexString() + const mockFormId = new Types.ObjectId().toHexString() const expectedPromises = times(expectedCount, (count) => FormIssueModel.create({ formId: mockFormId, @@ -391,7 +390,7 @@ describe('issue.service', () => { ) // Add another issue with a different form id. await FormIssueModel.create({ - formId: new ObjectId(), + formId: new Types.ObjectId(), issue: 'I cant see anything', email: 'email@example.com', }) @@ -435,7 +434,7 @@ describe('issue.service', () => { it('should return issue response with zero count and empty array when no issue is available', async () => { // Arrange - const mockFormId = new ObjectId().toHexString() + const mockFormId = new Types.ObjectId().toHexString() // Act const actualResult = await IssueService.getFormIssues(mockFormId) @@ -450,7 +449,7 @@ describe('issue.service', () => { it('should return issue response with empty string email if email is undefined', async () => { // Arrange - const mockFormId = new ObjectId().toHexString() + const mockFormId = new Types.ObjectId().toHexString() const issueSchema = await FormIssueModel.create({ formId: mockFormId, // Missing comment key value. @@ -479,7 +478,7 @@ describe('issue.service', () => { it('should return DatabaseError when error occurs whilst querying database', async () => { // Arrange - const mockFormId = new ObjectId().toHexString() + const mockFormId = new Types.ObjectId().toHexString() const sortSpy = jest.fn().mockReturnThis() const findSpy = jest.spyOn(FormIssueModel, 'find').mockImplementationOnce( () => @@ -506,7 +505,7 @@ describe('issue.service', () => { it('should return stream successfully', async () => { // Arrange const mockFormId = 'some form id' - const mockCursor = 'some cursor' as unknown as mongoose.QueryCursor + const mockCursor = 'some cursor' as unknown as mongoose.Cursor const streamSpy = jest .spyOn(FormIssueModel, 'getIssueCursorByFormId') .mockReturnValue(mockCursor) From 3e25025784b3f867c4f0fdeb7e379e8d6449d6d4 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 20:13:13 +0800 Subject: [PATCH 38/64] fix: form model always defaulting to private mode on save --- src/app/models/form.server.model.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 3f33259c4b..4aff163e51 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -479,6 +479,16 @@ const compileFormModel = (db: Mongoose): IFormModel => { }, }, + // This must be before `status` since `status` has setters reliant on + // whether esrvcId is available, and mongoose@v6 now saves objects with keys + // in the order the keys are specifified in the schema instead of the object. + // See https://mongoosejs.com/docs/migrating_to_6.html#schema-defined-document-key-order. + esrvcId: { + type: String, + required: false, + validate: [/^\S*$/i, 'e-service ID must not contain whitespace'], + }, + status: { type: String, enum: Object.values(FormStatus), @@ -509,11 +519,6 @@ const compileFormModel = (db: Mongoose): IFormModel => { type: Boolean, default: true, }, - esrvcId: { - type: String, - required: false, - validate: [/^\S*$/i, 'e-service ID must not contain whitespace'], - }, webhook: { url: { From c7192717347a21814824d152cae25aefb8112848 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 20:14:20 +0800 Subject: [PATCH 39/64] chore: remove bson in jest-db --- __tests__/unit/backend/helpers/jest-db.ts | 29 +++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/__tests__/unit/backend/helpers/jest-db.ts b/__tests__/unit/backend/helpers/jest-db.ts index 3d562aaa76..a712f973d1 100644 --- a/__tests__/unit/backend/helpers/jest-db.ts +++ b/__tests__/unit/backend/helpers/jest-db.ts @@ -1,6 +1,5 @@ import MemoryDatabaseServer from '__tests__/setup/database' -import { ObjectID } from 'bson' -import mongoose from 'mongoose' +import mongoose, { Schema, Types } from 'mongoose' import { FormResponseMode } from 'shared/types' import getAgencyModel from 'src/app/models/agency.server.model' @@ -86,8 +85,8 @@ const insertUser = async ({ mailName = 'test', apiToken, }: { - agencyId: ObjectID - userId?: ObjectID + agencyId: Schema.Types.ObjectId + userId?: Schema.Types.ObjectId mailName?: string mailDomain?: string apiToken?: UserApiToken @@ -117,7 +116,7 @@ const insertFormCollectionReqs = async ({ betaFlags, apiToken, }: { - userId?: ObjectID + userId?: Schema.Types.ObjectId mailName?: string mailDomain?: string shortName?: string @@ -134,7 +133,7 @@ const insertFormCollectionReqs = async ({ const user = await User.create({ email: `${mailName}@${mailDomain}`, - _id: userId ?? new ObjectID(), + _id: userId ?? new Types.ObjectId(), agency: agency._id, flags, betaFlags, @@ -152,8 +151,8 @@ const insertEmailForm = async ({ shortName = 'govtest', formOptions = {}, }: { - formId?: ObjectID - userId?: ObjectID + formId?: Schema.Types.ObjectId + userId?: Schema.Types.ObjectId mailName?: string mailDomain?: string shortName?: string @@ -196,8 +195,8 @@ const insertEncryptForm = async ({ formOptions = {}, userBetaFlags, }: { - formId?: ObjectID - userId?: ObjectID + formId?: Schema.Types.ObjectId + userId?: Schema.Types.ObjectId mailName?: string mailDomain?: string shortName?: string @@ -243,8 +242,8 @@ const insertFormWithMsgSrvcName = async ({ formOptions = {}, msgSrvcName = 'mockMsgSrvcname', }: { - formId?: ObjectID - userId?: ObjectID + formId?: Schema.Types.ObjectId + userId?: Schema.Types.ObjectId mailName?: string mailDomain?: string shortName?: string @@ -289,7 +288,7 @@ const insertFormSubmission = async ({ version = '1', encryptedContent = 'encryptedContent', }: { - formId?: ObjectID + formId?: Schema.Types.ObjectId submissionType?: string version?: string encryptedContent?: string @@ -315,8 +314,8 @@ const insertFormFeedback = async ({ rating = '5', comment = 'FormSG rocks!', }: { - formId?: ObjectID - submissionId?: ObjectID + formId?: Schema.Types.ObjectId + submissionId?: Schema.Types.ObjectId rating?: string comment?: string } = {}): Promise<{ From 448bf6329dff462f8a5a43036a4f7b9212a7d401 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 20:34:58 +0800 Subject: [PATCH 40/64] fix: lint and type errors in loader --- src/app/loaders/express/session.ts | 1 + .../__tests__/submission.service.spec.ts | 15 ++++++++++----- src/app/modules/submission/submission.service.ts | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/app/loaders/express/session.ts b/src/app/loaders/express/session.ts index 707c3a199b..7b70a84994 100644 --- a/src/app/loaders/express/session.ts +++ b/src/app/loaders/express/session.ts @@ -15,6 +15,7 @@ const sessionMiddlewares = (connection: Connection): RequestHandler[] => { cookie: config.cookieSettings, name: 'connect.sid', store: MongoStore.create({ + // @ts-expect-error Property 'isConnected' is missing in type client: connection.getClient(), }), }) diff --git a/src/app/modules/submission/__tests__/submission.service.spec.ts b/src/app/modules/submission/__tests__/submission.service.spec.ts index e52fb42f35..7a667ade2b 100644 --- a/src/app/modules/submission/__tests__/submission.service.spec.ts +++ b/src/app/modules/submission/__tests__/submission.service.spec.ts @@ -781,7 +781,12 @@ describe('submission.service', () => { it('should return DatabaseError when error occurs whilst querying database', async () => { const existSpy = jest.spyOn(Submission, 'exists') - existSpy.mockImplementationOnce(() => Promise.reject(new Error('boom'))) + existSpy.mockImplementationOnce( + () => + ({ + exec: () => Promise.reject(new Error('boom')), + } as unknown as mongoose.Query), + ) const actualResult = await SubmissionService.doesSubmissionIdExist( MOCK_SUBMISSION_ID, @@ -826,7 +831,7 @@ describe('submission.service', () => { MOCK_PENDING_SUBMISSION_ID, session, ) - session.endSession() + void session.endSession() //Assert expect(result.isOk()).toEqual(true) @@ -851,7 +856,7 @@ describe('submission.service', () => { MOCK_PENDING_SUBMISSION_ID, session, ) - session.endSession() + void session.endSession() // Assert expect(result.isOk()).toEqual(true) @@ -872,7 +877,7 @@ describe('submission.service', () => { new ObjectId().toHexString(), session, ) - session.endSession() + void session.endSession() // Assert expect(result.isErr()).toEqual(true) @@ -897,7 +902,7 @@ describe('submission.service', () => { MOCK_PENDING_SUBMISSION_ID, session, ) - session.endSession() + void session.endSession() // Assert expect(findSpy).toHaveBeenCalledWith( diff --git a/src/app/modules/submission/submission.service.ts b/src/app/modules/submission/submission.service.ts index 19e406bb12..a851a3c65d 100644 --- a/src/app/modules/submission/submission.service.ts +++ b/src/app/modules/submission/submission.service.ts @@ -174,7 +174,7 @@ export const doesSubmissionIdExist = ( ResultAsync.fromPromise( SubmissionModel.exists({ _id: submissionId, - }), + }).exec(), (error) => { logger.error({ message: 'Error finding _id from submissions collection in database', From 82f923ebf0a601f6e4011b5027891e9b808c98b0 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 21:35:01 +0800 Subject: [PATCH 41/64] chore: remove unused typedef --- src/types/vendor/bson-ext.d.ts | 509 --------------------------------- 1 file changed, 509 deletions(-) delete mode 100644 src/types/vendor/bson-ext.d.ts diff --git a/src/types/vendor/bson-ext.d.ts b/src/types/vendor/bson-ext.d.ts deleted file mode 100644 index cc9ca0836c..0000000000 --- a/src/types/vendor/bson-ext.d.ts +++ /dev/null @@ -1,509 +0,0 @@ -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable @typescript-eslint/ban-types */ -// Internal type definitions for bson-ext 2.0.3 -// !!! Typings are not verified !!! -// Definitions retrieved from https://www.npmjs.com/package/@types/bson and -// typed to follow bson-ext's exports. -/// - -declare module 'bson-ext' { - interface CommonSerializeOptions { - /** {default:false}, the serializer will check if keys are valid. */ - checkKeys?: boolean - /** {default:false}, serialize the javascript functions. */ - serializeFunctions?: boolean - /** {default:true}, ignore undefined fields. */ - ignoreUndefined?: boolean - } - - export interface SerializeOptions extends CommonSerializeOptions { - /** {default:1024*1024*17}, minimum size of the internal temporary serialization buffer. */ - minInternalBufferSize?: number - } - - export interface SerializeWithBufferAndIndexOptions - extends CommonSerializeOptions { - /** {default:0}, the index in the buffer where we wish to start serializing into. */ - index?: number - } - - export interface DeserializeOptions { - /** {default:false}, evaluate functions in the BSON document scoped to the object deserialized. */ - evalFunctions?: boolean - /** {default:false}, cache evaluated functions for reuse. */ - cacheFunctions?: boolean - /** {default:false}, use a crc32 code for caching, otherwise use the string of the function. */ - cacheFunctionsCrc32?: boolean - /** {default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits. */ - promoteLongs?: boolean - /** {default:false}, deserialize Binary data directly into node.js Buffer object. */ - promoteBuffers?: boolean - /** {default:false}, when deserializing will promote BSON values to their Node.js closest equivalent types. */ - promoteValues?: boolean - /** {default:null}, allow to specify if there what fields we wish to return as unserialized raw buffer. */ - fieldsAsRaw?: { readonly [fieldName: string]: boolean } - /** {default:false}, return BSON regular expressions as BSONRegExp instances. */ - bsonRegExp?: boolean - /** {default:false}, allows the buffer to be larger than the parsed BSON object. */ - allowObjectSmallerThanBufferSize?: boolean - } - - export interface CalculateObjectSizeOptions { - /** {default:false}, serialize the javascript functions */ - serializeFunctions?: boolean - /** {default:true}, ignore undefined fields. */ - ignoreUndefined?: boolean - } - - /** - * Base class for Long and Timestamp. - * In original js-node@1.0.x code 'Timestamp' is a 100% copy-paste of 'Long' - * with 'Long' replaced by 'Timestamp' (changed to inheritance in js-node@2.0.0) - */ - class LongLike { - /** - * @param low The low (signed) 32 bits. - * @param high The high (signed) 32 bits. - */ - constructor(low: number, high: number) - - /** Returns the sum of `this` and the `other`. */ - add(other: T): T - /** Returns the bitwise-AND of `this` and the `other`. */ - and(other: T): T - /** - * Compares `this` with the given `other`. - * @returns 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater. - */ - compare(other: T): number - /** Returns `this` divided by the given `other`. */ - div(other: T): T - /** Return whether `this` equals the `other` */ - equals(other: T): boolean - /** Return the high 32-bits value. */ - getHighBits(): number - /** Return the low 32-bits value. */ - getLowBits(): number - /** Return the low unsigned 32-bits value. */ - getLowBitsUnsigned(): number - /** Returns the number of bits needed to represent the absolute value of `this`. */ - getNumBitsAbs(): number - /** Return whether `this` is greater than the `other`. */ - greaterThan(other: T): boolean - /** Return whether `this` is greater than or equal to the `other`. */ - greaterThanOrEqual(other: T): boolean - /** Return whether `this` value is negative. */ - isNegative(): boolean - /** Return whether `this` value is odd. */ - isOdd(): boolean - /** Return whether `this` value is zero. */ - isZero(): boolean - /** Return whether `this` is less than the `other`. */ - lessThan(other: T): boolean - /** Return whether `this` is less than or equal to the `other`. */ - lessThanOrEqual(other: T): boolean - /** Returns `this` modulo the given `other`. */ - modulo(other: T): T - /** Returns the product of `this` and the given `other`. */ - multiply(other: T): T - /** The negation of this value. */ - negate(): T - /** The bitwise-NOT of this value. */ - not(): T - /** Return whether `this` does not equal to the `other`. */ - notEquals(other: T): boolean - /** Returns the bitwise-OR of `this` and the given `other`. */ - or(other: T): T - /** - * Returns `this` with bits shifted to the left by the given amount. - * @param numBits The number of bits by which to shift. - */ - shiftLeft(numBits: number): T - /** - * Returns `this` with bits shifted to the right by the given amount. - * @param numBits The number of bits by which to shift. - */ - shiftRight(numBits: number): T - /** - * Returns `this` with bits shifted to the right by the given amount, with the new top bits matching the current sign bit. - * @param numBits The number of bits by which to shift. - */ - shiftRightUnsigned(numBits: number): T - /** Returns the difference of `this` and the given `other`. */ - subtract(other: T): T - /** Return the int value (low 32 bits). */ - toInt(): number - /** Return the JSON value. */ - toJSON(): string - /** Returns closest floating-point representation to `this` value */ - toNumber(): number - /** - * Return as a string - * @param radix the radix in which the text should be written. {default:10} - */ - toString(radix?: number): string - /** Returns the bitwise-XOR of `this` and the given `other`. */ - xor(other: T): T - } - - /** A class representation of the BSON Binary type. */ - export class Binary { - static readonly SUBTYPE_DEFAULT: number - static readonly SUBTYPE_FUNCTION: number - static readonly SUBTYPE_BYTE_ARRAY: number - static readonly SUBTYPE_UUID_OLD: number - static readonly SUBTYPE_UUID: number - static readonly SUBTYPE_MD5: number - static readonly SUBTYPE_USER_DEFINED: number - - /** - * @param buffer A buffer object containing the binary data - * @param subType Binary data subtype - */ - constructor(buffer: Buffer, subType?: number) - - /** The underlying Buffer which stores the binary data. */ - readonly buffer: Buffer - /** Binary data subtype */ - readonly sub_type?: number - - /** The length of the binary. */ - length(): number - /** Updates this binary with byte_value */ - put(byte_value: number | string): void - /** Reads length bytes starting at position. */ - read(position: number, length: number): Buffer - /** Returns the value of this binary as a string. */ - value(): string - /** Writes a buffer or string to the binary */ - write(buffer: Buffer | string, offset: number): void - } - - /** A class representation of the BSON Code type. */ - export class Code { - /** - * @param code A string or function. - * @param scope An optional scope for the function. - */ - constructor(code: string | Function, scope?: any) - - readonly code: string | Function - readonly scope?: any - } - - /** - * A class representation of the BSON DBRef type. - */ - export class DBRef { - /** - * @param namespace The collection name. - * @param oid The reference ObjectId. - * @param db Optional db name, if omitted the reference is local to the current db - */ - constructor(namespace: string, oid: ObjectId, db?: string) - namespace: string - oid: ObjectId - db?: string - } - - /** A class representation of the BSON Double type. */ - export class Double { - /** - * @param value The number we want to represent as a double. - */ - constructor(value: number) - - /** - * https://github.com/mongodb/js-bson/blob/master/lib/double.js#L17 - */ - value: number - - valueOf(): number - } - - /** A class representation of the BSON Int32 type. */ - export class Int32 { - /** - * @param value The number we want to represent as an int32. - */ - constructor(value: number) - - valueOf(): number - } - - /** A class representation of the BSON Decimal128 type. */ - export class Decimal128 { - /** Create a Decimal128 instance from a string representation. */ - static fromString(s: string): Decimal128 - - /** - * @param bytes A buffer containing the raw Decimal128 bytes. - */ - constructor(bytes: Buffer) - - /** A buffer containing the raw Decimal128 bytes. */ - readonly bytes: Buffer - - toJSON(): string - toString(): string - } - - /** - * A class representation of the BSON Long type, a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "Long". This - * implementation is derived from LongLib in GWT. - */ - export class Long extends LongLike { - static readonly MAX_VALUE: Long - static readonly MIN_VALUE: Long - static readonly NEG_ONE: Long - static readonly ONE: Long - static readonly ZERO: Long - - /** Returns a Long representing the given (32-bit) integer value. */ - static fromInt(i: number): Long - /** Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. */ - static fromNumber(n: number): Long - /** - * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits. - * @param lowBits The low 32-bits. - * @param highBits The high 32-bits. - */ - static fromBits(lowBits: number, highBits: number): Long - /** - * Returns a Long representation of the given string - * @param opt_radix The radix in which the text is written. {default:10} - */ - static fromString(s: string, opt_radix?: number): Long - } - - /** A class representation of the BSON MaxKey type. */ - export class MaxKey { - constructor() - } - - /** A class representation of the BSON MinKey type. */ - export class MinKey { - constructor() - } - - /** A class representation of the BSON ObjectId type. */ - export class ObjectId { - /** - * Create a new ObjectId instance - * @param {(string|number|ObjectId)} id Can be a 24 byte hex string, 12 byte binary string or a Number. - */ - constructor(id?: string | number | ObjectId) - /** The generation time of this ObjectId instance */ - generationTime: number - /** If true cache the hex string representation of ObjectId */ - static cacheHexString?: boolean - /** - * Creates an ObjectId from a hex string representation of an ObjectId. - * @param {string} hexString create a ObjectId from a passed in 24 byte hexstring. - * @return {ObjectId} return the created ObjectId - */ - static createFromHexString(hexString: string): ObjectId - /** - * Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId. - * @param {number} time an integer number representing a number of seconds. - * @return {ObjectId} return the created ObjectId - */ - static createFromTime(time: number): ObjectId - /** - * Checks if a value is a valid bson ObjectId - * - * @return {boolean} return true if the value is a valid bson ObjectId, return false otherwise. - */ - static isValid(id: string | number | ObjectId): boolean - /** - * Compares the equality of this ObjectId with `otherID`. - * @param {ObjectId|string} otherID ObjectId instance to compare against. - * @return {boolean} the result of comparing two ObjectId's - */ - equals(otherID: ObjectId | string): boolean - /** - * Generate a 12 byte id string used in ObjectId's - * @param {number} time optional parameter allowing to pass in a second based timestamp. - * @return {string} return the 12 byte id binary string. - */ - static generate(time?: number): Buffer - /** - * Returns the generation date (accurate up to the second) that this ID was generated. - * @return {Date} the generation date - */ - getTimestamp(): Date - /** - * Return the ObjectId id as a 24 byte hex string representation - * @return {string} return the 24 byte hex string representation. - */ - toHexString(): string - } - - /** A class representation of the BSON RegExp type. */ - export class BSONRegExp { - constructor(pattern: string, options: string) - - readonly pattern: string - readonly options: string - } - - /** - * A class representation of the BSON Symbol type. - * @deprecated - */ - export class Symbol { - constructor(value: string) - - /** Access the wrapped string value. */ - valueOf(): string - } - - /** A class representation of the BSON Timestamp type. */ - export class Timestamp extends LongLike { - static readonly MAX_VALUE: Timestamp - static readonly MIN_VALUE: Timestamp - static readonly NEG_ONE: Timestamp - static readonly ONE: Timestamp - static readonly ZERO: Timestamp - - /** Returns a Timestamp represented by the given (32-bit) integer value */ - static fromInt(value: number): Timestamp - /** Returns a Timestamp representing the given number value, provided that it is a finite number. */ - static fromNumber(value: number): Timestamp - /** - * Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits. - * @param lowBits The low 32-bits. - * @param highBits The high 32-bits. - */ - static fromBits(lowBits: number, highBits: number): Timestamp - /** - * Returns a Timestamp from the given string. - * @param opt_radix The radix in which the text is written. {default:10} - */ - static fromString(str: string, opt_radix?: number): Timestamp - } - - /** - * A class representation of the BSON Map type. - * @deprecated - */ - export class Map { - constructor() - } - - export default class BSON { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - constructor(types: any[]) {} - - // BSON MAX VALUES - static readonly BSON_INT32_MAX = 0x7fffffff - static readonly BSON_INT32_MIN = -0x80000000 - - static readonly BSON_INT64_MAX = Math.pow(2, 63) - 1 - static readonly BSON_INT64_MIN = -Math.pow(2, 63) - - // JS MAX PRECISE VALUES - static readonly JS_INT_MAX = 0x20000000000000 // Any integer up to 2^53 can be precisely represented by a double. - static readonly JS_INT_MIN = -0x20000000000000 // Any integer down to -2^53 can be precisely represented by a double. - - static Binary = Binary - static Code = Code - static DBRef = DBRef - static Decimal128 = Decimal128 - static Double = Double - static Int32 = Int32 - static Long = Long - /** @deprecated */ - static Map = Map - static MaxKey = MaxKey - static MinKey = MinKey - static ObjectId = ObjectId - // special case for deprecated names - /** @deprecated */ - static ObjectID = ObjectId - static BSONRegExp = BSONRegExp - /** @deprecated */ - static Symbol = Symbol - static Timestamp = Timestamp - - // Just add constants to the Native BSON parser - static readonly BSON_BINARY_SUBTYPE_DEFAULT = 0 - static readonly BSON_BINARY_SUBTYPE_FUNCTION = 1 - static readonly BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2 - static readonly BSON_BINARY_SUBTYPE_UUID = 3 - static readonly BSON_BINARY_SUBTYPE_MD5 = 4 - static readonly BSON_BINARY_SUBTYPE_USER_DEFINED = 128 - - /** - * Calculate the bson size for a passed in Javascript object. - * - * @param {Object} object the Javascript object to calculate the BSON byte size for. - * @param {CalculateObjectSizeOptions} Options - * @return {Number} returns the number of bytes the BSON object will take up. - */ - calculateObjectSize( - object: any, - options?: CalculateObjectSizeOptions, - ): number - - /** - * Serialize a Javascript object. - * - * @param object The Javascript object to serialize. - * @param options Serialize options. - * @return The Buffer object containing the serialized object. - */ - serialize(object: any, options?: SerializeOptions): Buffer - - /** - * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization. - * - * @param object The Javascript object to serialize. - * @param buffer The Buffer you pre-allocated to store the serialized BSON object. - * @param options Serialize options. - * @returns The index pointing to the last written byte in the buffer - */ - serializeWithBufferAndIndex( - object: any, - buffer: Buffer, - options?: SerializeWithBufferAndIndexOptions, - ): number - - /** - * Deserialize data as BSON. - * - * @param buffer The buffer containing the serialized set of BSON documents. - * @param options Deserialize options. - * @returns The deserialized Javascript Object. - */ - deserialize(buffer: Buffer, options?: DeserializeOptions): any - - /** - * Deserialize stream data as BSON documents. - * - * @param data The buffer containing the serialized set of BSON documents. - * @param startIndex The start index in the data Buffer where the deserialization is to start. - * @param numberOfDocuments Number of documents to deserialize - * @param documents An array where to store the deserialized documents - * @param docStartIndex The index in the documents array from where to start inserting documents - * @param options Additional options used for the deserialization - * @returns The next index in the buffer after deserialization of the `numberOfDocuments` - */ - deserializeStream( - data: Buffer, - startIndex: number, - numberOfDocuments: number, - documents: Array, - docStartIndex: number, - options?: DeserializeOptions, - ): number - } - - /** - * ObjectID (with capital "D") is deprecated. Use ObjectId (lowercase "d") - * instead. - * @deprecated - */ - export { ObjectId as ObjectID } -} From 06cc9c026db91b153daba7a392dd4505c328eb82 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 24 Oct 2023 22:47:26 +0800 Subject: [PATCH 42/64] chore: remove commented out BSON code --- src/app/models/form.server.model.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 4aff163e51..63f241c23f 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -108,23 +108,6 @@ import { isPositiveInteger } from './utils' export const FORM_SCHEMA_ID = 'Form' -// const bson = new BSON([ -// BSON.Binary, -// BSON.Code, -// BSON.DBRef, -// BSON.Decimal128, -// BSON.Double, -// BSON.Int32, -// BSON.Long, -// BSON.Map, -// BSON.MaxKey, -// BSON.MinKey, -// BSON.ObjectId, -// BSON.BSONRegExp, -// BSON.Symbol, -// BSON.Timestamp, -// ]) - const formSchemaOptions: SchemaOptions = { id: false, toJSON: { From ff4dffcd256ffd3f67a09ae56f7e4650e2519592 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 25 Oct 2023 11:52:07 +0800 Subject: [PATCH 43/64] fix: playwright mongod init failure --- __tests__/e2e/setup/globalSetup.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/__tests__/e2e/setup/globalSetup.ts b/__tests__/e2e/setup/globalSetup.ts index 31f88951f6..93eb48fa2d 100644 --- a/__tests__/e2e/setup/globalSetup.ts +++ b/__tests__/e2e/setup/globalSetup.ts @@ -14,8 +14,9 @@ async function globalSetup(): Promise { checkMD5: true, }, }) - - const uri = await mongod.getUri(true) + await mongod.start() + const uriPath = +new Date() + const uri = mongod.getUri(uriPath.toString()) // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(global as any).__MONGOINSTANCE = mongod process.env.MONGO_URI = `${uri.slice(0, uri.lastIndexOf('/'))}/${ From 6e9de19319ef507901d7e0a011fbcc6484428abe Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 25 Oct 2023 13:19:52 +0800 Subject: [PATCH 44/64] refactor: rename constants --- __tests__/setup/database.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/setup/database.js b/__tests__/setup/database.js index a177ed8f2e..c6e13d66a4 100644 --- a/__tests__/setup/database.js +++ b/__tests__/setup/database.js @@ -20,8 +20,8 @@ class MemoryDatabaseServer { } getConnectionString() { - const randomUri = +new Date() - return this.mongod.getUri(randomUri.toString()) + const uniqueUri = +new Date() + return this.mongod.getUri(uniqueUri.toString()) } } From 8406b22a93baa3c67d541d4cc275006a6a1276a7 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 25 Oct 2023 13:20:10 +0800 Subject: [PATCH 45/64] fix: mongoose loader --- src/app/loaders/mongoose.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/loaders/mongoose.ts b/src/app/loaders/mongoose.ts index 4ac3348fc7..3368c7cd30 100644 --- a/src/app/loaders/mongoose.ts +++ b/src/app/loaders/mongoose.ts @@ -37,8 +37,10 @@ export default async (): Promise => { }, }) + await mongod.start() // Store the uri to connect to later on - config.db.uri = await mongod.getUri() + const uniqueUri = +new Date() + config.db.uri = mongod.getUri(uniqueUri.toString()) } // Actually connect to the database From 73a7ff58cfddace6818e508a67f6903bd91bc2b1 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 25 Oct 2023 14:12:53 +0800 Subject: [PATCH 46/64] fix: removed form model business field to be required --- src/app/models/form.server.model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 63f241c23f..ac3ea751b5 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -206,8 +206,8 @@ const EncryptedFormSchema = new Schema({ business: { type: { - address: { type: String, required: true, trim: true }, - gstRegNo: { type: String, required: true, trim: true }, + address: { type: String, default: '', trim: true }, + gstRegNo: { type: String, default: '', trim: true }, }, }, }) From 68b2487b7208dd2aaf53d5755045857d5ba66d12 Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 26 Oct 2023 01:51:32 +0800 Subject: [PATCH 47/64] fix: e2e email-submission tests --- __tests__/e2e/email-submission.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/e2e/email-submission.spec.ts b/__tests__/e2e/email-submission.spec.ts index 88e8695495..545dce5b78 100644 --- a/__tests__/e2e/email-submission.spec.ts +++ b/__tests__/e2e/email-submission.spec.ts @@ -48,7 +48,7 @@ test.describe('Email form submission', () => { }) test.afterAll(async () => { // Clean up db - db.models = {} + await db.dropDatabase() await db.close() }) From 00cfaf4d33b2a1d33822aee15e0c70ec95b5837c Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 26 Oct 2023 01:58:58 +0800 Subject: [PATCH 48/64] fix: make mongoose.connect to be async --- __tests__/e2e/encrypt-submission.spec.ts | 2 +- __tests__/e2e/utils/database.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/e2e/encrypt-submission.spec.ts b/__tests__/e2e/encrypt-submission.spec.ts index ff9433c303..9e33306954 100644 --- a/__tests__/e2e/encrypt-submission.spec.ts +++ b/__tests__/e2e/encrypt-submission.spec.ts @@ -42,7 +42,7 @@ let FeatureFlags: IFeatureFlagModel test.describe('Storage form submission', () => { test.beforeAll(async () => { // Create models - db = makeMongooseFixtures() + db = await makeMongooseFixtures() Form = makeModel(db, 'form.server.model', 'Form') // TODO(FRM-1232): Remove this once old storage submission endpoint (/submissions/encrypt) is removed // Add feature flag model and set encryption boundary shift to true diff --git a/__tests__/e2e/utils/database.ts b/__tests__/e2e/utils/database.ts index 4083e68c67..2f34321ccc 100644 --- a/__tests__/e2e/utils/database.ts +++ b/__tests__/e2e/utils/database.ts @@ -11,8 +11,8 @@ const spec = (path: string): any => { /** * Connects to mongo-memory-server instance. */ -export const makeMongooseFixtures = (): mongoose.Connection => { - const connection = mongoose.createConnection(dbUri) +export const makeMongooseFixtures = (): Promise => { + const connection = mongoose.createConnection(dbUri).asPromise() return connection } From 56d302b4f8f6f9aeb7f94be13cf9ccb7587bb894 Mon Sep 17 00:00:00 2001 From: Ken Date: Fri, 27 Oct 2023 15:09:03 +0800 Subject: [PATCH 49/64] fix: add specific db connection uri --- __tests__/e2e/utils/database.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/__tests__/e2e/utils/database.ts b/__tests__/e2e/utils/database.ts index 2f34321ccc..e872243ee9 100644 --- a/__tests__/e2e/utils/database.ts +++ b/__tests__/e2e/utils/database.ts @@ -1,7 +1,5 @@ import mongoose, { Model } from 'mongoose' -const dbUri = 'mongodb://127.0.0.1:3000/formsg' - // Get absolute path of file const spec = (path: string): any => { const fullPath = `${process.env.PWD}/${path}` @@ -12,6 +10,10 @@ const spec = (path: string): any => { * Connects to mongo-memory-server instance. */ export const makeMongooseFixtures = (): Promise => { + const dbUri = process.env.MONGO_URI?.toString() + if (!dbUri) { + return Promise.reject(Error('dbUri is empty')) + } const connection = mongoose.createConnection(dbUri).asPromise() return connection } From 205cbceed72ccc3e2488b75fa7bf22d0af1cd35d Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 00:00:29 +0800 Subject: [PATCH 50/64] fix: restore missing _id in table column --- src/app/models/field/tableField.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/models/field/tableField.ts b/src/app/models/field/tableField.ts index 7e72228b0f..a206382868 100644 --- a/src/app/models/field/tableField.ts +++ b/src/app/models/field/tableField.ts @@ -19,7 +19,7 @@ const createColumnSchema = () => { }, { discriminatorKey: 'columnType', - _id: false, + // _id: false, // this is used in tablefield to identify column ids }, ) From c89f46e8fd928d8c3e102f602312e34edcbe8e4c Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 00:14:52 +0800 Subject: [PATCH 51/64] fix: workspace model support --- src/app/models/workspace.server.model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/models/workspace.server.model.ts b/src/app/models/workspace.server.model.ts index 5504bd85f4..6a14b1c4aa 100644 --- a/src/app/models/workspace.server.model.ts +++ b/src/app/models/workspace.server.model.ts @@ -27,7 +27,7 @@ const compileWorkspaceModel = (db: Mongoose): IWorkspaceModel => { /^[a-zA-Z0-9_\-./() &`;'"]*$/, 'Workspace title cannot contain special characters', ], - required: 'Workspace title cannot be blank', + required: [true, 'Workspace title cannot be blank'], minlength: [ WORKSPACE_MIN_TITLE_LENGTH, `Workspace title must be at least ${WORKSPACE_MIN_TITLE_LENGTH} characters`, @@ -41,7 +41,7 @@ const compileWorkspaceModel = (db: Mongoose): IWorkspaceModel => { admin: { type: Schema.Types.ObjectId, ref: 'User', - required: 'Workspace must have an Admin', + required: [true, 'Workspace must have an Admin'], }, formIds: { type: [Schema.Types.ObjectId], From c1d5598f03546b1bd1c92b8d50cd17d210574816 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 01:10:16 +0800 Subject: [PATCH 52/64] chore: add verbose playwight reporting --- playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index 7098aff312..df42a70499 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -30,7 +30,7 @@ const config: PlaywrightTestConfig = { /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: [['list'], ['html']], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ From 3f66dadfb335de477b411330132920b374325060 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 14:36:37 +0800 Subject: [PATCH 53/64] chore: update bson-ext to bson for workspace-related code --- src/app/models/__tests__/workspace.server.model.spec.ts | 2 +- .../modules/workspace/__tests__/workspace.controller.spec.ts | 2 +- src/app/modules/workspace/__tests__/workspace.routes.spec.ts | 2 +- src/app/modules/workspace/__tests__/workspace.service.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/models/__tests__/workspace.server.model.spec.ts b/src/app/models/__tests__/workspace.server.model.spec.ts index 1c8f562924..f9b2b0b92b 100644 --- a/src/app/models/__tests__/workspace.server.model.spec.ts +++ b/src/app/models/__tests__/workspace.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { omit } from 'lodash' import mongoose from 'mongoose' import { FormStatus } from 'shared/types' diff --git a/src/app/modules/workspace/__tests__/workspace.controller.spec.ts b/src/app/modules/workspace/__tests__/workspace.controller.spec.ts index 2c33562875..cbb1d6a5f2 100644 --- a/src/app/modules/workspace/__tests__/workspace.controller.spec.ts +++ b/src/app/modules/workspace/__tests__/workspace.controller.spec.ts @@ -1,5 +1,5 @@ import expressHandler from '__tests__/unit/backend/helpers/jest-express' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { errAsync, okAsync } from 'neverthrow' import * as WorkspaceService from 'src/app/modules/workspace/workspace.service' diff --git a/src/app/modules/workspace/__tests__/workspace.routes.spec.ts b/src/app/modules/workspace/__tests__/workspace.routes.spec.ts index f46667937a..26283cc0a7 100644 --- a/src/app/modules/workspace/__tests__/workspace.routes.spec.ts +++ b/src/app/modules/workspace/__tests__/workspace.routes.spec.ts @@ -6,7 +6,7 @@ import { setupApp } from '__tests__/integration/helpers/express-setup' import { buildCelebrateError } from '__tests__/unit/backend/helpers/celebrate' import dbHandler from '__tests__/unit/backend/helpers/jest-db' import { jsonParseStringify } from '__tests__/unit/backend/helpers/serialize-data' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { UserId } from 'shared/types' import { Workspace, WorkspaceId } from 'shared/types/workspace' diff --git a/src/app/modules/workspace/__tests__/workspace.service.spec.ts b/src/app/modules/workspace/__tests__/workspace.service.spec.ts index 60f0bacb8e..ab193e7148 100644 --- a/src/app/modules/workspace/__tests__/workspace.service.spec.ts +++ b/src/app/modules/workspace/__tests__/workspace.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import mongoose from 'mongoose' import { FormId, FormStatus, UserId } from 'shared/types' import { WorkspaceDto, WorkspaceId } from 'shared/types/workspace' From 7e33c914d22af06113b8130a9733f9d503cb2371 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 14:59:08 +0800 Subject: [PATCH 54/64] fix: dburi should not be random --- __tests__/e2e/setup/globalSetup.ts | 4 ++-- __tests__/e2e/utils/database.ts | 6 ++---- __tests__/setup/database.js | 3 +-- src/app/loaders/mongoose.ts | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/__tests__/e2e/setup/globalSetup.ts b/__tests__/e2e/setup/globalSetup.ts index 93eb48fa2d..29f59fd90b 100644 --- a/__tests__/e2e/setup/globalSetup.ts +++ b/__tests__/e2e/setup/globalSetup.ts @@ -15,8 +15,8 @@ async function globalSetup(): Promise { }, }) await mongod.start() - const uriPath = +new Date() - const uri = mongod.getUri(uriPath.toString()) + + const uri = mongod.getUri() // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(global as any).__MONGOINSTANCE = mongod process.env.MONGO_URI = `${uri.slice(0, uri.lastIndexOf('/'))}/${ diff --git a/__tests__/e2e/utils/database.ts b/__tests__/e2e/utils/database.ts index e872243ee9..af9bf32ad8 100644 --- a/__tests__/e2e/utils/database.ts +++ b/__tests__/e2e/utils/database.ts @@ -10,10 +10,8 @@ const spec = (path: string): any => { * Connects to mongo-memory-server instance. */ export const makeMongooseFixtures = (): Promise => { - const dbUri = process.env.MONGO_URI?.toString() - if (!dbUri) { - return Promise.reject(Error('dbUri is empty')) - } + const dbUri = 'mongodb://127.0.0.1:3000/test' // TODO: hardcoding uri as the port and path are fixed and doesn't respect values in __tests__/e2e/setup/setupConfig.ts + const connection = mongoose.createConnection(dbUri).asPromise() return connection } diff --git a/__tests__/setup/database.js b/__tests__/setup/database.js index c6e13d66a4..dca8bcd048 100644 --- a/__tests__/setup/database.js +++ b/__tests__/setup/database.js @@ -20,8 +20,7 @@ class MemoryDatabaseServer { } getConnectionString() { - const uniqueUri = +new Date() - return this.mongod.getUri(uniqueUri.toString()) + return this.mongod.getUri() } } diff --git a/src/app/loaders/mongoose.ts b/src/app/loaders/mongoose.ts index 3368c7cd30..99b14aa467 100644 --- a/src/app/loaders/mongoose.ts +++ b/src/app/loaders/mongoose.ts @@ -39,8 +39,7 @@ export default async (): Promise => { await mongod.start() // Store the uri to connect to later on - const uniqueUri = +new Date() - config.db.uri = mongod.getUri(uniqueUri.toString()) + config.db.uri = mongod.getUri() } // Actually connect to the database From b1ea692d7ca75a7be1b1744fa067ad45a20971c2 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 15:06:40 +0800 Subject: [PATCH 55/64] fix: drop form collection instead of the whole db --- __tests__/e2e/email-submission.spec.ts | 2 +- __tests__/e2e/encrypt-submission.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/e2e/email-submission.spec.ts b/__tests__/e2e/email-submission.spec.ts index 545dce5b78..8fcc03bfbe 100644 --- a/__tests__/e2e/email-submission.spec.ts +++ b/__tests__/e2e/email-submission.spec.ts @@ -48,7 +48,7 @@ test.describe('Email form submission', () => { }) test.afterAll(async () => { // Clean up db - await db.dropDatabase() + await db.dropCollection(Form.collection.name) await db.close() }) diff --git a/__tests__/e2e/encrypt-submission.spec.ts b/__tests__/e2e/encrypt-submission.spec.ts index 9e33306954..6635ffa86f 100644 --- a/__tests__/e2e/encrypt-submission.spec.ts +++ b/__tests__/e2e/encrypt-submission.spec.ts @@ -54,7 +54,7 @@ test.describe('Storage form submission', () => { }) test.afterAll(async () => { // Clean up db - await db.dropDatabase() + await db.dropCollection(Form.collection.name) await db.close() }) From e5db0250be6027b7253c4e3ef328e821a786acb6 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 31 Oct 2023 15:07:51 +0800 Subject: [PATCH 56/64] chore: update hosting port from 5000 to 5001 for playwright --- __tests__/setup/.test-env | 2 +- playwright.config.ts | 4 ++-- src/app/config/schema.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/setup/.test-env b/__tests__/setup/.test-env index 1016731644..5a658e54e5 100644 --- a/__tests__/setup/.test-env +++ b/__tests__/setup/.test-env @@ -74,7 +74,7 @@ AWS_SECRET_ACCESS_KEY=fakeSecretAccessKey AWS_ENDPOINT=http://localhost:4566 -APP_URL=http://localhost:5000 +APP_URL=http://localhost:5001 SECRET_ENV=development INTRANET_IP_LIST_PATH=__tests__/setup/mock-intranet-ips.txt diff --git a/playwright.config.ts b/playwright.config.ts index df42a70499..80265bd79b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -36,7 +36,7 @@ const config: PlaywrightTestConfig = { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://localhost:5000', + baseURL: 'http://localhost:5001', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -102,7 +102,7 @@ const config: PlaywrightTestConfig = { webServer: [ { command: 'npm run test:e2e-v2:server', - url: 'http://localhost:5000/analytics/statistics', + url: 'http://localhost:5001/analytics/statistics', timeout: 120 * 1000, reuseExistingServer: !process.env.CI, }, diff --git a/src/app/config/schema.ts b/src/app/config/schema.ts index 5f8cde55c5..b63d1b817e 100644 --- a/src/app/config/schema.ts +++ b/src/app/config/schema.ts @@ -296,7 +296,7 @@ export const optionalVarsSchema: Schema = { port: { doc: 'Application Port', format: 'port', - default: 5000, + default: 5001, env: 'PORT', }, otpLifeSpan: { From d5ff12819254799b095aed6d76cc8247f7e214d2 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 2 Jan 2024 22:09:59 +0800 Subject: [PATCH 57/64] fix: replace bson-ext with bson --- .../__tests__/multirespondent-submission.server.model.spec.ts | 2 +- .../__tests__/multirespondent-submission.utils.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/models/__tests__/multirespondent-submission.server.model.spec.ts b/src/app/models/__tests__/multirespondent-submission.server.model.spec.ts index c5fff86ad9..7e8dfed3de 100644 --- a/src/app/models/__tests__/multirespondent-submission.server.model.spec.ts +++ b/src/app/models/__tests__/multirespondent-submission.server.model.spec.ts @@ -1,5 +1,5 @@ import dbHandler from '__tests__/unit/backend/helpers/jest-db' -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import { pick, times } from 'lodash' import moment from 'moment-timezone' import mongoose from 'mongoose' diff --git a/src/app/modules/submission/multirespondent-submission/__tests__/multirespondent-submission.utils.spec.ts b/src/app/modules/submission/multirespondent-submission/__tests__/multirespondent-submission.utils.spec.ts index cc5abb7b37..1f05cc1a2c 100644 --- a/src/app/modules/submission/multirespondent-submission/__tests__/multirespondent-submission.utils.spec.ts +++ b/src/app/modules/submission/multirespondent-submission/__tests__/multirespondent-submission.utils.spec.ts @@ -1,4 +1,4 @@ -import { ObjectId } from 'bson-ext' +import { ObjectId } from 'bson' import moment from 'moment-timezone' import { SubmissionType } from 'shared/types' From e7fb8f91fd467610edcc6ca7681497828b2f7fd2 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 2 Jan 2024 22:11:01 +0800 Subject: [PATCH 58/64] Revert "chore: update hosting port from 5000 to 5001 for playwright" This reverts commit e5db0250be6027b7253c4e3ef328e821a786acb6. --- __tests__/setup/.test-env | 2 +- playwright.config.ts | 4 ++-- src/app/config/schema.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/setup/.test-env b/__tests__/setup/.test-env index 5a658e54e5..1016731644 100644 --- a/__tests__/setup/.test-env +++ b/__tests__/setup/.test-env @@ -74,7 +74,7 @@ AWS_SECRET_ACCESS_KEY=fakeSecretAccessKey AWS_ENDPOINT=http://localhost:4566 -APP_URL=http://localhost:5001 +APP_URL=http://localhost:5000 SECRET_ENV=development INTRANET_IP_LIST_PATH=__tests__/setup/mock-intranet-ips.txt diff --git a/playwright.config.ts b/playwright.config.ts index 80265bd79b..df42a70499 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -36,7 +36,7 @@ const config: PlaywrightTestConfig = { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://localhost:5001', + baseURL: 'http://localhost:5000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -102,7 +102,7 @@ const config: PlaywrightTestConfig = { webServer: [ { command: 'npm run test:e2e-v2:server', - url: 'http://localhost:5001/analytics/statistics', + url: 'http://localhost:5000/analytics/statistics', timeout: 120 * 1000, reuseExistingServer: !process.env.CI, }, diff --git a/src/app/config/schema.ts b/src/app/config/schema.ts index b63d1b817e..5f8cde55c5 100644 --- a/src/app/config/schema.ts +++ b/src/app/config/schema.ts @@ -296,7 +296,7 @@ export const optionalVarsSchema: Schema = { port: { doc: 'Application Port', format: 'port', - default: 5001, + default: 5000, env: 'PORT', }, otpLifeSpan: { From 4647e20d926f3a657b4cb2759c4302725ce1b189 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 3 Jan 2024 11:57:42 +0800 Subject: [PATCH 59/64] fix: workspace spec, exists returning null and doc instead of boolean --- src/app/models/__tests__/workspace.server.model.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/models/__tests__/workspace.server.model.spec.ts b/src/app/models/__tests__/workspace.server.model.spec.ts index f9b2b0b92b..766626f37f 100644 --- a/src/app/models/__tests__/workspace.server.model.spec.ts +++ b/src/app/models/__tests__/workspace.server.model.spec.ts @@ -210,7 +210,7 @@ describe('Workspace Model', () => { }) const actual = await Workspace.exists({ _id: MOCK_WORKSPACE_ID }) - expect(actual).toEqual(false) + expect(actual).toBeNull() }) it('should not archive forms when workspace is deleted', async () => { @@ -229,9 +229,9 @@ describe('Workspace Model', () => { status: FormStatus.Archived, }) - expect(actual).toEqual(false) - expect(doesFormExist).toEqual(true) - expect(isFormArchived).toEqual(false) + expect(actual).toBeNull() + expect(doesFormExist).toBeTruthy() + expect(isFormArchived).toBeNull() }) }) From 71db04259a20a798dcf6883e784c6ac36d243007 Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 4 Jan 2024 15:49:08 +0800 Subject: [PATCH 60/64] chore: remove commented code --- src/app/models/form.server.model.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index 3064c5422c..0ee9999d2b 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -696,14 +696,6 @@ const compileFormModel = (db: Mongoose): IFormModel => { } } - // FormDocumentSchema.method('getSettings', function (): FormSettings { - // const formSettings = - // this.responseMode === FormResponseMode.Encrypt - // ? (pick(this, STORAGE_FORM_SETTINGS_FIELDS) as StorageFormSettings) - // : (pick(this, EMAIL_FORM_SETTINGS_FIELDS) as EmailFormSettings) - - // return formSettings - // }) FormDocumentSchema.method( 'getSettings', function (): FormSettings { From 609439f64113940cf514ba5cc22ccb554a07a13b Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 4 Jan 2024 15:50:56 +0800 Subject: [PATCH 61/64] chore: remove confusing statement --- src/app/models/field/tableField.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/models/field/tableField.ts b/src/app/models/field/tableField.ts index a206382868..53309c6d32 100644 --- a/src/app/models/field/tableField.ts +++ b/src/app/models/field/tableField.ts @@ -19,7 +19,6 @@ const createColumnSchema = () => { }, { discriminatorKey: 'columnType', - // _id: false, // this is used in tablefield to identify column ids }, ) From 32c33493cdc6b41a98759d2d269e879e16255cd7 Mon Sep 17 00:00:00 2001 From: Ken Lee Shu Ming Date: Thu, 4 Jan 2024 16:54:47 +0800 Subject: [PATCH 62/64] chore: remove unneeded comments --- .../admin/forms/__tests__/admin-forms.submissions.routes.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts index c3652f7c8c..670b25b8a6 100644 --- a/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts +++ b/src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts @@ -781,7 +781,6 @@ describe('admin-form.submissions.routes', () => { version: s.version, }), ) - // .filter((s) => expectedSubmissionIds.includes(s._id)) .sort((a, b) => String(a._id).localeCompare(String(b._id))) const actualSorted = (response.body as string) From 66f638fee2b0be1257023a44790f8388021d8e8a Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 4 Jan 2024 17:12:13 +0800 Subject: [PATCH 63/64] chore: remove duplicated typedef --- src/types/form_logic.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/types/form_logic.ts b/src/types/form_logic.ts index f8e49f1f9b..1d884216a3 100644 --- a/src/types/form_logic.ts +++ b/src/types/form_logic.ts @@ -27,8 +27,6 @@ export interface IShowFieldsLogicSchema extends ILogicSchema, ShowFieldLogic, Document { - // overwriting field id type in show to reflect mongoose Id type - show: IFieldSchema['_id'][] logicType: LogicType.ShowFields conditions: IConditionSchema[] } From 2215ac247788b26a6089ff7bf79dbb3917e12611 Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 4 Jan 2024 17:45:34 +0800 Subject: [PATCH 64/64] Revert "chore: remove duplicated typedef" This reverts commit 66f638fee2b0be1257023a44790f8388021d8e8a. --- src/types/form_logic.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/form_logic.ts b/src/types/form_logic.ts index 1d884216a3..f8e49f1f9b 100644 --- a/src/types/form_logic.ts +++ b/src/types/form_logic.ts @@ -27,6 +27,8 @@ export interface IShowFieldsLogicSchema extends ILogicSchema, ShowFieldLogic, Document { + // overwriting field id type in show to reflect mongoose Id type + show: IFieldSchema['_id'][] logicType: LogicType.ShowFields conditions: IConditionSchema[] }