diff --git a/config/default.yaml b/config/default.yaml index 4fb2166c..7511fb57 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -32,4 +32,7 @@ email: { }, dataManagementEmail: 'fakeemail@fakemail.com' } +validations: { + maxFileSize: 100000000 +} diff --git a/package-lock.json b/package-lock.json index 3afc6f36..3a90d370 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,6 +78,8 @@ }, "node_modules/@aws-crypto/crc32": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^5.2.0", @@ -90,6 +92,8 @@ }, "node_modules/@aws-crypto/crc32c": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz", + "integrity": "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^5.2.0", @@ -143,6 +147,8 @@ }, "node_modules/@aws-crypto/sha256-browser": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", @@ -156,6 +162,8 @@ }, "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -166,6 +174,8 @@ }, "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^2.2.0", @@ -177,6 +187,8 @@ }, "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^2.2.0", @@ -188,6 +200,8 @@ }, "node_modules/@aws-crypto/sha256-js": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^5.2.0", @@ -247,64 +261,66 @@ } }, "node_modules/@aws-sdk/client-s3": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.637.0.tgz", + "integrity": "sha512-y6UC94fsMvhKbf0dzfnjVP1HePeGjplfcYfilZU1COIJLyTkMcUv4XcT4I407CGIrvgEafONHkiC09ygqUauNA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha1-browser": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.614.0", - "@aws-sdk/client-sts": "3.614.0", - "@aws-sdk/core": "3.614.0", - "@aws-sdk/credential-provider-node": "3.614.0", - "@aws-sdk/middleware-bucket-endpoint": "3.614.0", - "@aws-sdk/middleware-expect-continue": "3.609.0", - "@aws-sdk/middleware-flexible-checksums": "3.614.0", - "@aws-sdk/middleware-host-header": "3.609.0", + "@aws-sdk/client-sso-oidc": "3.637.0", + "@aws-sdk/client-sts": "3.637.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.637.0", + "@aws-sdk/middleware-bucket-endpoint": "3.620.0", + "@aws-sdk/middleware-expect-continue": "3.620.0", + "@aws-sdk/middleware-flexible-checksums": "3.620.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-location-constraint": "3.609.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.609.0", - "@aws-sdk/middleware-sdk-s3": "3.614.0", - "@aws-sdk/middleware-signing": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-sdk-s3": "3.635.0", "@aws-sdk/middleware-ssec": "3.609.0", - "@aws-sdk/middleware-user-agent": "3.614.0", + "@aws-sdk/middleware-user-agent": "3.637.0", "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/signature-v4-multi-region": "3.614.0", + "@aws-sdk/signature-v4-multi-region": "3.635.0", "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-endpoints": "3.637.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@aws-sdk/xml-builder": "3.609.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.6", - "@smithy/eventstream-serde-browser": "^3.0.4", + "@smithy/core": "^2.4.0", + "@smithy/eventstream-serde-browser": "^3.0.6", "@smithy/eventstream-serde-config-resolver": "^3.0.3", - "@smithy/eventstream-serde-node": "^3.0.4", - "@smithy/fetch-http-handler": "^3.2.1", + "@smithy/eventstream-serde-node": "^3.0.5", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-blob-browser": "^3.1.2", "@smithy/hash-node": "^3.0.3", "@smithy/hash-stream-node": "^3.1.2", "@smithy/invalid-dependency": "^3.0.3", "@smithy/md5-js": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.3", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.9", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.2", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.9", - "@smithy/util-defaults-mode-node": "^3.0.9", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", - "@smithy/util-stream": "^3.0.6", + "@smithy/util-stream": "^3.1.3", "@smithy/util-utf8": "^3.0.0", "@smithy/util-waiter": "^3.1.2", "tslib": "^2.6.2" @@ -314,42 +330,44 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.637.0.tgz", + "integrity": "sha512-+KjLvgX5yJYROWo3TQuwBJlHCY0zz9PsLuEolmXQn0BVK1L/m9GteZHtd+rEdAoDGBpE0Xqjy1oz5+SmtsaRUw==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.614.0", - "@aws-sdk/middleware-host-header": "3.609.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.609.0", - "@aws-sdk/middleware-user-agent": "3.614.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.637.0", "@aws-sdk/region-config-resolver": "3.614.0", "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-endpoints": "3.637.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.6", - "@smithy/fetch-http-handler": "^3.2.1", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.3", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.9", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.2", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.9", - "@smithy/util-defaults-mode-node": "^3.0.9", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -361,43 +379,45 @@ } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.637.0.tgz", + "integrity": "sha512-27bHALN6Qb6m6KZmPvRieJ/QRlj1lyac/GT2Rn5kJpre8Mpp+yxrtvp3h9PjNBty4lCeFEENfY4dGNSozBuBcw==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.614.0", - "@aws-sdk/credential-provider-node": "3.614.0", - "@aws-sdk/middleware-host-header": "3.609.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.637.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.609.0", - "@aws-sdk/middleware-user-agent": "3.614.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.637.0", "@aws-sdk/region-config-resolver": "3.614.0", "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-endpoints": "3.637.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.6", - "@smithy/fetch-http-handler": "^3.2.1", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.3", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.9", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.2", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.9", - "@smithy/util-defaults-mode-node": "^3.0.9", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -408,48 +428,50 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.614.0" + "@aws-sdk/client-sts": "^3.637.0" } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.637.0.tgz", + "integrity": "sha512-xUi7x4qDubtA8QREtlblPuAcn91GS/09YVEY/RwU7xCY0aqGuFwgszAANlha4OUIqva8oVj2WO4gJuG+iaSnhw==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.614.0", - "@aws-sdk/core": "3.614.0", - "@aws-sdk/credential-provider-node": "3.614.0", - "@aws-sdk/middleware-host-header": "3.609.0", + "@aws-sdk/client-sso-oidc": "3.637.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.637.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.609.0", - "@aws-sdk/middleware-user-agent": "3.614.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.637.0", "@aws-sdk/region-config-resolver": "3.614.0", "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-endpoints": "3.637.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.6", - "@smithy/fetch-http-handler": "^3.2.1", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.3", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.9", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.2", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.9", - "@smithy/util-defaults-mode-node": "^3.0.9", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -461,15 +483,20 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.614.0", + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.635.0.tgz", + "integrity": "sha512-i1x/E/sgA+liUE1XJ7rj1dhyXpAKO1UKFUcTTHXok2ARjWTvszHnSXMOsB77aPbmn0fUp1JTx2kHUAZ1LVt5Bg==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^2.2.6", - "@smithy/protocol-http": "^4.0.3", - "@smithy/signature-v4": "^3.1.2", - "@smithy/smithy-client": "^3.1.7", + "@smithy/core": "^2.4.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", - "fast-xml-parser": "4.2.5", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", "tslib": "^2.6.2" }, "engines": { @@ -477,7 +504,9 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.609.0", + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", + "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -490,17 +519,19 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.614.0", + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.635.0.tgz", + "integrity": "sha512-iJyRgEjOCQlBMXqtwPLIKYc7Bsc6nqjrZybdMDenPDa+kmLg7xh8LxHsu9088e+2/wtLicE34FsJJIfzu3L82g==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/fetch-http-handler": "^3.2.1", - "@smithy/node-http-handler": "^3.1.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", "@smithy/property-provider": "^3.1.3", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.0.6", + "@smithy/util-stream": "^3.1.3", "tslib": "^2.6.2" }, "engines": { @@ -508,16 +539,18 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.637.0.tgz", + "integrity": "sha512-h+PFCWfZ0Q3Dx84SppET/TFpcQHmxFW8/oV9ArEvMilw4EBN+IlxgbL0CnHwjHW64szcmrM0mbebjEfHf4FXmw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "3.609.0", - "@aws-sdk/credential-provider-http": "3.614.0", - "@aws-sdk/credential-provider-process": "3.614.0", - "@aws-sdk/credential-provider-sso": "3.614.0", - "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.635.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.637.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/credential-provider-imds": "^3.2.0", "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", "@smithy/types": "^3.3.0", @@ -527,21 +560,23 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.614.0" + "@aws-sdk/client-sts": "^3.637.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.637.0.tgz", + "integrity": "sha512-yoEhoxJJfs7sPVQ6Is939BDQJZpZCoUgKr/ySse4YKOZ24t4VqgHA6+wV7rYh+7IW24Rd91UTvEzSuHYTlxlNA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "3.609.0", - "@aws-sdk/credential-provider-http": "3.614.0", - "@aws-sdk/credential-provider-ini": "3.614.0", - "@aws-sdk/credential-provider-process": "3.614.0", - "@aws-sdk/credential-provider-sso": "3.614.0", - "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.635.0", + "@aws-sdk/credential-provider-ini": "3.637.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.637.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/credential-provider-imds": "^3.2.0", "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", "@smithy/types": "^3.3.0", @@ -552,7 +587,9 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.614.0", + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", + "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -566,10 +603,12 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.637.0.tgz", + "integrity": "sha512-Mvz+h+e62/tl+dVikLafhv+qkZJ9RUb8l2YN/LeKMWkxQylPT83CPk9aimVhCV89zth1zpREArl97+3xsfgQvA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/client-sso": "3.614.0", + "@aws-sdk/client-sso": "3.637.0", "@aws-sdk/token-providers": "3.614.0", "@aws-sdk/types": "3.609.0", "@smithy/property-provider": "^3.1.3", @@ -582,7 +621,9 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.609.0", + "version": "3.621.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", + "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -594,17 +635,19 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.609.0" + "@aws-sdk/client-sts": "^3.621.0" } }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.614.0", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.620.0.tgz", + "integrity": "sha512-eGLL0W6L3HDb3OACyetZYOWpHJ+gLo0TehQKeQyy2G8vTYXqNTeqYhuI6up9HVjBzU9eQiULVQETmgQs7TFaRg==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", "@aws-sdk/util-arn-parser": "3.568.0", "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "@smithy/util-config-provider": "^3.0.0", "tslib": "^2.6.2" @@ -614,11 +657,13 @@ } }, "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.609.0", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.620.0.tgz", + "integrity": "sha512-QXeRFMLfyQ31nAHLbiTLtk0oHzG9QLMaof5jIfqcUwnOkO8YnQdeqzakrg1Alpy/VQ7aqzIi8qypkBe2KXZz0A==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -627,14 +672,16 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.614.0", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.620.0.tgz", + "integrity": "sha512-ftz+NW7qka2sVuwnnO1IzBku5ccP+s5qZGeRTPgrKB7OzRW85gthvIo1vQR2w+OwHFk7WJbbhhWwbCbktnP4UA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "5.2.0", "@aws-crypto/crc32c": "5.2.0", "@aws-sdk/types": "3.609.0", "@smithy/is-array-buffer": "^3.0.0", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" @@ -644,11 +691,13 @@ } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.609.0", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", + "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -670,6 +719,8 @@ }, "node_modules/@aws-sdk/middleware-logger": { "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", + "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -681,11 +732,13 @@ } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.609.0", + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", + "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -694,33 +747,24 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.614.0", + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.635.0.tgz", + "integrity": "sha512-RLdYJPEV4JL/7NBoFUs7VlP90X++5FlJdxHz0DzCjmiD3qCviKy+Cym3qg1gBgHwucs5XisuClxDrGokhAdTQw==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/core": "3.635.0", "@aws-sdk/types": "3.609.0", "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/core": "^2.4.0", "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.0.3", - "@smithy/signature-v4": "^3.1.2", - "@smithy/smithy-client": "^3.1.7", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/util-config-provider": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing": { - "version": "3.609.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/protocol-http": "^4.0.3", - "@smithy/signature-v4": "^3.1.2", - "@smithy/types": "^3.3.0", "@smithy/util-middleware": "^3.0.3", + "@smithy/util-stream": "^3.1.3", + "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, "engines": { @@ -740,12 +784,14 @@ } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.637.0.tgz", + "integrity": "sha512-EYo0NE9/da/OY8STDsK2LvM4kNa79DBsf4YVtaG4P5pZ615IeFsD8xOHZeuJmUrSMlVQ8ywPRX7WMucUybsKug==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@smithy/protocol-http": "^4.0.3", + "@aws-sdk/util-endpoints": "3.637.0", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -755,6 +801,8 @@ }, "node_modules/@aws-sdk/region-config-resolver": { "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz", + "integrity": "sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -769,13 +817,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.614.0", + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.635.0.tgz", + "integrity": "sha512-J6QY4/invOkpogCHjSaDON1hF03viPpOnsrzVuCvJMmclS/iG62R4EY0wq1alYll0YmSdmKlpJwHMWwGtqK63Q==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/middleware-sdk-s3": "3.614.0", + "@aws-sdk/middleware-sdk-s3": "3.635.0", "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.3", - "@smithy/signature-v4": "^3.1.2", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -785,6 +835,8 @@ }, "node_modules/@aws-sdk/token-providers": { "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", + "integrity": "sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -813,6 +865,8 @@ }, "node_modules/@aws-sdk/util-arn-parser": { "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.568.0.tgz", + "integrity": "sha512-XUKJWWo+KOB7fbnPP0+g/o5Ulku/X53t7i/h+sPHr5xxYTJJ9CYnbToo95mzxe7xWvkLrsNtJ8L+MnNn9INs2w==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -822,7 +876,9 @@ } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.614.0", + "version": "3.637.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.637.0.tgz", + "integrity": "sha512-pAqOKUHeVWHEXXDIp/qoMk/6jyxIb6GGjnK1/f8dKHtKIEs4tKsnnL563gceEvdad53OPXIt86uoevCcCzmBnw==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -846,6 +902,8 @@ }, "node_modules/@aws-sdk/util-user-agent-browser": { "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz", + "integrity": "sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -856,6 +914,8 @@ }, "node_modules/@aws-sdk/util-user-agent-node": { "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz", + "integrity": "sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "3.609.0", @@ -1984,6 +2044,8 @@ }, "node_modules/@smithy/config-resolver": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", + "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", @@ -1997,16 +2059,20 @@ } }, "node_modules/@smithy/core": { - "version": "2.2.6", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.4.0.tgz", + "integrity": "sha512-cHXq+FneIF/KJbt4q4pjN186+Jf4ZB0ZOqEaZMBhT79srEyGDDBV31NqBRBjazz8ppQ1bJbDJMY9ba5wKFV36w==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", "@smithy/middleware-serde": "^3.0.3", - "@smithy/protocol-http": "^4.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", + "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-middleware": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, "engines": { @@ -2014,7 +2080,9 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "3.1.4", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", + "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", @@ -2029,6 +2097,8 @@ }, "node_modules/@smithy/eventstream-codec": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-3.1.2.tgz", + "integrity": "sha512-0mBcu49JWt4MXhrhRAlxASNy0IjDRFU+aWNDRal9OtUJvJNiwDuyKMUONSOjLjSCeGwZaE0wOErdqULer8r7yw==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "5.2.0", @@ -2038,10 +2108,12 @@ } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "3.0.4", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.6.tgz", + "integrity": "sha512-2hM54UWQUOrki4BtsUI1WzmD13/SeaqT/AB3EUJKbcver/WgKNaiJ5y5F5XXuVe6UekffVzuUDrBZVAA3AWRpQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/eventstream-serde-universal": "^3.0.4", + "@smithy/eventstream-serde-universal": "^3.0.5", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -2061,10 +2133,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "3.0.4", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.5.tgz", + "integrity": "sha512-+upXvnHNyZP095s11jF5dhGw/Ihzqwl5G+/KtMnoQOpdfC3B5HYCcDVG9EmgkhJMXJlM64PyN5gjJl0uXFQehQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/eventstream-serde-universal": "^3.0.4", + "@smithy/eventstream-serde-universal": "^3.0.5", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -2073,7 +2147,9 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "3.0.4", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.5.tgz", + "integrity": "sha512-5u/nXbyoh1s4QxrvNre9V6vfyoLWuiVvvd5TlZjGThIikc3G+uNiG9uOTCWweSRjv1asdDIWK7nOmN7le4RYHQ==", "license": "Apache-2.0", "dependencies": { "@smithy/eventstream-codec": "^3.1.2", @@ -2085,10 +2161,12 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "3.2.1", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", + "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/querystring-builder": "^3.0.3", "@smithy/types": "^3.3.0", "@smithy/util-base64": "^3.0.0", @@ -2107,6 +2185,8 @@ }, "node_modules/@smithy/hash-node": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", + "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2132,6 +2212,8 @@ }, "node_modules/@smithy/invalid-dependency": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", + "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2158,10 +2240,12 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "3.0.3", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", + "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -2170,7 +2254,9 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "3.0.5", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", + "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", "license": "Apache-2.0", "dependencies": { "@smithy/middleware-serde": "^3.0.3", @@ -2186,13 +2272,15 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "3.0.9", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.15.tgz", + "integrity": "sha512-iTMedvNt1ApdvkaoE8aSDuwaoc+BhvHqttbA/FO4Ty+y/S5hW6Ci/CTScG7vam4RYJWZxdTElc3MEfHRVH6cgQ==", "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/service-error-classification": "^3.0.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -2205,6 +2293,8 @@ }, "node_modules/@smithy/middleware-serde": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2216,6 +2306,8 @@ }, "node_modules/@smithy/middleware-stack": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2227,6 +2319,8 @@ }, "node_modules/@smithy/node-config-provider": { "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", + "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", "license": "Apache-2.0", "dependencies": { "@smithy/property-provider": "^3.1.3", @@ -2239,11 +2333,13 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "3.1.2", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", + "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^3.1.1", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/querystring-builder": "^3.0.3", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" @@ -2254,6 +2350,8 @@ }, "node_modules/@smithy/property-provider": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2264,7 +2362,9 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "4.0.3", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", + "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2276,6 +2376,8 @@ }, "node_modules/@smithy/querystring-builder": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2288,6 +2390,8 @@ }, "node_modules/@smithy/querystring-parser": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2299,6 +2403,8 @@ }, "node_modules/@smithy/service-error-classification": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", + "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0" @@ -2309,6 +2415,8 @@ }, "node_modules/@smithy/shared-ini-file-loader": { "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", + "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2319,10 +2427,13 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "3.1.2", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", + "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "@smithy/util-hex-encoding": "^3.0.0", "@smithy/util-middleware": "^3.0.3", @@ -2335,14 +2446,16 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "3.1.7", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.2.0.tgz", + "integrity": "sha512-pDbtxs8WOhJLJSeaF/eAbPgXg4VVYFlRcL/zoNYA5WbG3wBL06CHtBSg53ppkttDpAJ/hdiede+xApip1CwSLw==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-endpoint": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.0.3", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.0.6", + "@smithy/util-stream": "^3.1.3", "tslib": "^2.6.2" }, "engines": { @@ -2361,6 +2474,8 @@ }, "node_modules/@smithy/url-parser": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", "license": "Apache-2.0", "dependencies": { "@smithy/querystring-parser": "^3.0.3", @@ -2382,6 +2497,8 @@ }, "node_modules/@smithy/util-body-length-browser": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", + "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2389,6 +2506,8 @@ }, "node_modules/@smithy/util-body-length-node": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", + "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2410,6 +2529,8 @@ }, "node_modules/@smithy/util-config-provider": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", + "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2419,11 +2540,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "3.0.9", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.15.tgz", + "integrity": "sha512-FZ4Psa3vjp8kOXcd3HJOiDPBCWtiilLl57r0cnNtq/Ga9RSDrM5ERL6xt+tO43+2af6Pn5Yp92x2n5vPuduNfg==", "license": "Apache-2.0", "dependencies": { "@smithy/property-provider": "^3.1.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "bowser": "^2.11.0", "tslib": "^2.6.2" @@ -2433,14 +2556,16 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "3.0.9", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.15.tgz", + "integrity": "sha512-KSyAAx2q6d0t6f/S4XB2+3+6aQacm3aLMhs9aLMqn18uYGUepbdssfogW5JQZpc6lXNBnp0tEnR5e9CEKmEd7A==", "license": "Apache-2.0", "dependencies": { "@smithy/config-resolver": "^3.0.5", - "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/credential-provider-imds": "^3.2.0", "@smithy/node-config-provider": "^3.1.4", "@smithy/property-provider": "^3.1.3", - "@smithy/smithy-client": "^3.1.7", + "@smithy/smithy-client": "^3.2.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -2450,6 +2575,8 @@ }, "node_modules/@smithy/util-endpoints": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", + "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", "license": "Apache-2.0", "dependencies": { "@smithy/node-config-provider": "^3.1.4", @@ -2462,6 +2589,8 @@ }, "node_modules/@smithy/util-hex-encoding": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2472,6 +2601,8 @@ }, "node_modules/@smithy/util-middleware": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.3.0", @@ -2483,6 +2614,8 @@ }, "node_modules/@smithy/util-retry": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", + "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", "license": "Apache-2.0", "dependencies": { "@smithy/service-error-classification": "^3.0.3", @@ -2494,11 +2627,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "3.0.6", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", + "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^3.2.1", - "@smithy/node-http-handler": "^3.1.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", "@smithy/types": "^3.3.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", @@ -2512,6 +2647,8 @@ }, "node_modules/@smithy/util-uri-escape": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2652,24 +2789,6 @@ "@types/ssh2": "*" } }, - "node_modules/@types/eslint": { - "version": "8.56.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "dev": true, @@ -3835,7 +3954,9 @@ } }, "node_modules/axios": { - "version": "1.7.2", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", + "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -4014,6 +4135,8 @@ }, "node_modules/bowser": { "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", "license": "MIT" }, "node_modules/brace-expansion": { @@ -5668,7 +5791,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.0", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "license": "MIT", "dependencies": { @@ -6720,15 +6845,17 @@ "license": "MIT" }, "node_modules/fast-xml-parser": { - "version": "4.2.5", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - }, { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" } ], "license": "MIT", @@ -9046,7 +9173,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -11964,6 +12093,8 @@ }, "node_modules/strnum": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", "license": "MIT" }, "node_modules/superagent": { @@ -12086,6 +12217,8 @@ }, "node_modules/tapable": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, "license": "MIT", "engines": { @@ -13201,11 +13334,12 @@ } }, "node_modules/webpack": { - "version": "5.93.0", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", @@ -13214,7 +13348,7 @@ "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", diff --git a/readme.md b/readme.md index 6985288c..793bb503 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ This is the frontend for the LPA Data Validator application. It is a nodeJS expr - Install the node packages ``` npm install - ``` + ``` - setup husky pre-commit hooks ``` npm run prepare @@ -19,6 +19,16 @@ This is the frontend for the LPA Data Validator application. It is a nodeJS expr ``` ## Running the application + +**Prerequisite**: Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) + +```sh +docker-compose -f docker-compose-real-backend-minus-frontend.yml up -d; + +npm run start:local; +``` + +### Alternative methods of starting application - Run the application ``` npm run start @@ -27,11 +37,30 @@ This is the frontend for the LPA Data Validator application. It is a nodeJS expr ``` npm run start ``` -- run the application, using a local api +- Run the application, using a local api ``` npm run start:local ``` -- run the application, using a local api in watch mode +- Run the application, using a local api in watch mode ``` npm run start:local:watch - ``` \ No newline at end of file + ``` +- Run the application using docker + ``` + docker-compose -f docker-compose-real-backend.yml up + ``` +- Run the application (without the frontend) using docker + ``` + docker-compose -f docker-compose-real-backend-minus-frontend.yml up + ``` + +## Mac users only + +If you are a Mac user, please note that port 5000 is used by AirPlay Receiver. In order to use the application, you will need to switch off AirPlay Receiver. + +To switch off AirPlay Receiver, follow these steps: +1. Open System Preferences on your Mac. +2. Search for "AirDrop & Handoff". +3. In the "AirPlay Receiver" toggle, select "Off". + +Once you have switched off AirPlay Receiver, you should be able to use the application without any issues. diff --git a/src/controllers/OrganisationsController.js b/src/controllers/OrganisationsController.js index e7634ee9..339dd2d3 100644 --- a/src/controllers/OrganisationsController.js +++ b/src/controllers/OrganisationsController.js @@ -4,6 +4,9 @@ import logger from '../utils/logger.js' import { types } from '../utils/logging.js' import { dataSubjects } from '../utils/utils.js' import { statusToTagClass } from '../filters/filters.js' +import { render } from '../utils/custom-renderer.js' +import { templateSchema } from '../routes/schemas.js' +import * as v from 'valibot' // get a list of available datasets const availableDatasets = Object.values(dataSubjects) @@ -13,6 +16,12 @@ const availableDatasets = Object.values(dataSubjects) .map(dataset => dataset.value) ) +function validateAndRender (res, name, params) { + const schema = templateSchema.get(name) ?? v.any() + logger.info(`rendering '${name}' with schema=<${schema ? 'defined' : 'any'}>`, { type: types.App }) + return render(res, name, schema, params) +} + /** * Returns a status tag object with a text label and a CSS class based on the status. * @@ -94,7 +103,7 @@ const organisationsController = { datasetsWithErrors } - res.render('organisations/overview.html', params) + validateAndRender(res, 'organisations/overview.html', params) } catch (error) { logger.warn('organisationsController.getOverview(): ' + error.message ?? error.errorMessage, { type: types.App }) next(error) @@ -124,7 +133,7 @@ const organisationsController = { return acc }, {}) - res.render('organisations/find.html', { alphabetisedOrgs }) + validateAndRender(res, 'organisations/find.html', { alphabetisedOrgs }) } catch (err) { logger.warn('organisationsController.getOrganisations(): ' + err.message ?? err.errorMessage, { type: types.App }) next(err) @@ -144,7 +153,7 @@ const organisationsController = { try { // get the organisation name const lpa = req.params.lpa - const organisationResult = await datasette.runQuery(`SELECT name FROM organisation WHERE organisation = '${lpa}'`) + const organisationResult = await datasette.runQuery(`SELECT name, organisation FROM organisation WHERE organisation = '${lpa}'`) const organisation = organisationResult.formattedData[0] // get the dataset name @@ -157,9 +166,15 @@ const organisationsController = { dataset } - res.render('organisations/get-started.html', params) + validateAndRender(res, 'organisations/get-started.html', params) } catch (err) { - logger.error(err) + logger.warn({ + message: `OrganisationsController.getStarted(): ${err.message}`, + endpoint: req.originalUrl, + errorStack: err.stack, + errorMessage: err.message, + type: types.App + }) next(err) } }, @@ -203,9 +218,14 @@ const organisationsController = { dataset } - res.render('organisations/datasetTaskList.html', params) + validateAndRender(res, 'organisations/datasetTaskList.html', params) } catch (e) { - logger.warn(`getDAtasetTaskList() failed for lpa='${lpa}', datasetId='${datasetId}'`, { type: types.App }) + logger.warn(`getDatasetTaskList() failed for lpa='${lpa}', datasetId='${datasetId}'`, + { + type: types.App, + errorMessage: e.message, + errorStack: e.stack + }) next(e) } }, @@ -235,7 +255,7 @@ const organisationsController = { latest_200_date: last200Datetime } } - res.render('organisations/http-error.html', params) + validateAndRender(res, 'organisations/http-error.html', params) } catch (e) { logger.warn(`conditionalTaskListHandler() failed for lpa='${lpa}', datasetId='${datasetId}'`, { type: types.App }) next(e) @@ -373,7 +393,7 @@ const organisationsController = { issueType } - res.render('organisations/issueDetails.html', params) + validateAndRender(res, 'organisations/issueDetails.html', params) } catch (e) { logger.warn(`getIssueDetails() failed for lpa='${lpa}', datasetId='${datasetId}', issue=${issueType}, entityNumber=${entityNumber}, resourceId=${resourceId}`, { type: types.App }) next(e) diff --git a/src/controllers/submitUrlController.js b/src/controllers/submitUrlController.js index 72847907..f4eeb8bc 100644 --- a/src/controllers/submitUrlController.js +++ b/src/controllers/submitUrlController.js @@ -2,8 +2,10 @@ import UploadController from './uploadController.js' import { postUrlRequest } from '../services/asyncRequestApi.js' import { URL } from 'url' import logger from '../utils/logger.js' +import { types } from '../utils/logging.js' import axios from 'axios' import { allowedFileTypes } from '../utils/utils.js' +import config from '../../config/index.js' class SubmitUrlController extends UploadController { async post (req, res, next) { @@ -17,7 +19,12 @@ class SubmitUrlController extends UploadController { const errors = { url: new SubmitUrlController.Error(error.key, error, req, res) } - logger.warn('SubmitUrlController: local validation failed during url submission', error) + logger.warn({ + message: 'SubmitUrlController: local validation failed during url submission', + error: JSON.stringify(error), + submittedUrl: `${req.body.url ?? ''}`, + type: types.DataValidation + }) return next(errors) } @@ -91,10 +98,7 @@ class SubmitUrlController extends UploadController { try { const contentLength = response.headers['content-length'] - // Convert content length to MB - const sizeInMB = contentLength / (1024 * 1024) - - return sizeInMB <= 10 + return contentLength <= config.validations.maxFileSize } catch (err) { console.warn(err) return true // for now we will allow this file as we can't be sure diff --git a/src/controllers/uploadFileController.js b/src/controllers/uploadFileController.js index bcbe7d00..674cbc04 100644 --- a/src/controllers/uploadFileController.js +++ b/src/controllers/uploadFileController.js @@ -47,7 +47,10 @@ class UploadFileController extends UploadController { const errors = { datafile: new UploadFileController.Error(error.key, error, req, res) } - logger.warn('UploadFileController: local validation failed during file upload', error) + logger.info('UploadFileController: local validation failed during file upload', { + type: types.App, + fileValidationError: error + }) return next(errors) } @@ -123,9 +126,7 @@ class UploadFileController extends UploadController { } static sizeIsValid (datafile) { - const maxSize = 10 * 1024 * 1024 // 10MB - - if (datafile.size > maxSize) { + if (datafile.size > config.validations.maxFileSize) { return false } diff --git a/src/filters/makeDatasetSlugToReadableNameFilter.js b/src/filters/makeDatasetSlugToReadableNameFilter.js index 9114555a..1388d07a 100644 --- a/src/filters/makeDatasetSlugToReadableNameFilter.js +++ b/src/filters/makeDatasetSlugToReadableNameFilter.js @@ -18,9 +18,8 @@ export const makeDatasetSlugToReadableNameFilter = (datasetNameMapping) => { return (slug) => { const name = datasetNameMapping.get(slug) if (!name) { - // throw new Error(`Can't find a name for ${slug}`) // ToDo: work out what to do here? potentially update it with data from datasette - logger.warn(`can't find a name for ${slug}`) + logger.debug(`can't find a name for ${slug}`) return slug } return name diff --git a/src/filters/validationMessageLookup.js b/src/filters/validationMessageLookup.js index f57a76d4..9ac128da 100644 --- a/src/filters/validationMessageLookup.js +++ b/src/filters/validationMessageLookup.js @@ -17,7 +17,7 @@ const validationMessages = { datafile: { required: 'Select a file', fileType: 'The selected file must be a CSV, GeoJSON, GML or GeoPackage file', - fileSize: 'The selected file must be smaller than 10MB', + fileSize: 'The selected file must be smaller than 100MB', fileNameTooLong: 'The selected file name must be less than 100 characters', fileNameInvalidCharacters: 'The selected file name must not contain any of the following characters: / \\ : * ? " < > |', fileNameDoubleExtension: 'The selected file name must not contain two file extensions', @@ -30,7 +30,7 @@ const validationMessages = { length: 'The URL must be less than 2048 characters', exists: 'The URL does not exist', filetype: 'The file referenced by URL must be a CSV, GeoJSON, GML or GeoPackage file', - size: 'The file referenced by URL must be smaller than 10MB' + size: 'The file referenced by URL must be smaller than 100MB' }, validationResult: { required: 'Unable to contact the API' diff --git a/src/models/requestData.js b/src/models/requestData.js index 3ad503c6..689cecf1 100644 --- a/src/models/requestData.js +++ b/src/models/requestData.js @@ -29,7 +29,7 @@ export default class RequestData { getErrorSummary () { if (!this.response || !this.response.data || !this.response.data['error-summary']) { - logger.warn('trying to get error summary when there is none: request id: ' + this.id) + logger.warn('trying to get error summary when there is none', { requestId: this.id }) return [] } return this.response.data['error-summary'] @@ -45,7 +45,7 @@ export default class RequestData { getError () { if (!this.response) { - logger.warn('trying to get error when there are none: request id: ' + this.id) + logger.warn('trying to get error when there are none', { requestId: this.id }) return { message: 'An unknown error occurred.' } } @@ -54,11 +54,11 @@ export default class RequestData { hasErrors () { if (!this.response || !this.response.data) { - logger.warn('trying to check for errors when there are none: request id: ' + this.id) + logger.warn('trying to check for errors when there are none', { requestId: this.id }) return true } if (this.response.data['error-summary'] == null) { - logger.warn('trying to check for errors but there is no error-summary: request id: ' + this.id) + logger.warn('trying to check for errors but there is no error-summary', { requestId: this.id }) return true } return this.response.data['error-summary'].length > 0 @@ -71,7 +71,7 @@ export default class RequestData { getColumnFieldLog () { if (!this.response || !this.response.data || !this.response.data['column-field-log']) { - logger.warn('trying to get column field log when there is none: request id: ' + this.id) + logger.warn('trying to get column field log when there is none', { requestId: this.id }) return [] } return this.response.data['column-field-log'] diff --git a/src/models/responseDetails.js b/src/models/responseDetails.js index 028b037a..3e046855 100644 --- a/src/models/responseDetails.js +++ b/src/models/responseDetails.js @@ -11,7 +11,7 @@ export default class ResponseDetails { getRows () { if (!this.response) { - logger.warn('trying to get response details when there are none: request id: ' + this.id) + logger.warn('trying to get response details when there are none', { requestId: this.id }) return [] } return this.response @@ -19,7 +19,7 @@ export default class ResponseDetails { getColumnFieldLog () { if (!this.columnFieldLog) { - logger.warn('trying to get column field log when there is none: request id: ' + this.id) + logger.warn('trying to get column field log when there is none', { requestId: this.id }) return [] } return this.columnFieldLog @@ -69,7 +69,7 @@ export default class ResponseDetails { // This function returns an array of rows with verbose columns getRowsWithVerboseColumns (filterNonErrors = false) { if (!this.response) { - logger.warn('trying to get response details when there are none: request id: ' + this.id) + logger.warn('trying to get response details when there are none', { requestId: this.id }) return [] } @@ -105,7 +105,7 @@ export default class ResponseDetails { getGeometries () { if (!this.response) { - logger.warn('trying to get response details when there are none: request id: ' + this.id) + logger.warn('trying to get response details when there are none', { requestId: this.id }) return undefined } diff --git a/src/routes/schemas.js b/src/routes/schemas.js new file mode 100644 index 00000000..fecb893f --- /dev/null +++ b/src/routes/schemas.js @@ -0,0 +1,181 @@ +/** + * This module provides code a set of schemas for params passed to + * the nunjuck templates in `./src/views` + */ + +import * as v from 'valibot' + +export const EmptyParams = v.object({}) +export const UptimeParams = v.object({ + upTime: v.string() +}) + +export const ErrorParams = v.strictObject({ + err: v.object({}) +}) + +const NonEmptyString = v.pipe(v.string(), v.nonEmpty()) + +export const Base = v.object({ + // serviceName: NonEmptyString, + // pageTitle: NonEmptyString, + pageName: v.optional(NonEmptyString) +}) + +export const StartPage = v.object({ + ...Base.entries +}) + +/** + * The values of this enum should match values of the 'status' column + * in the query in `performanceDbApi.getLpaOverview()` + */ +const datasetStatusEnum = { + Live: 'Live', + 'Needs fixing': 'Needs fixing', + Warning: 'Warning', + Error: 'Error', + 'Not submitted': 'Not submitted' +} + +const OrgField = v.strictObject({ name: NonEmptyString, organisation: NonEmptyString }) +const DatasetNameField = v.strictObject({ name: NonEmptyString }) + +export const OrgOverviewPage = v.strictObject({ + organisation: OrgField, + datasets: v.array(v.strictObject({ + endpoint: v.optional(v.url()), + status: v.enum(datasetStatusEnum), + slug: NonEmptyString, + issue_count: v.optional(v.number()), + error: v.optional(v.nullable(NonEmptyString)), + http_error: v.optional(NonEmptyString), + issue: v.optional(NonEmptyString) + })), + totalDatasets: v.integer(), + datasetsWithEndpoints: v.integer(), + datasetsWithIssues: v.integer(), + datasetsWithErrors: v.integer() +}) + +export const OrgFindPage = v.strictObject({ + alphabetisedOrgs: v.record(NonEmptyString, v.array(OrgField)) +}) + +export const OrgGetStarted = v.strictObject({ + organisation: OrgField, + dataset: DatasetNameField +}) + +export const OrgDatasetTaskList = v.strictObject({ + taskList: v.array(v.strictObject({ + title: v.strictObject({ text: NonEmptyString }), + href: v.url(), + status: v.strictObject({ + tag: v.strictObject({ + classes: NonEmptyString, + text: NonEmptyString + }) + }) + })), + organisation: OrgField, + dataset: v.strictObject({ + name: NonEmptyString + }) +}) + +export const OrgEndpointError = v.strictObject({ + organisation: OrgField, + dataset: DatasetNameField, + errorData: v.strictObject({ + endpoint_url: v.url(), + http_status: v.integer(), + latest_log_entry_date: v.isoDateTime(), + latest_200_date: v.isoDateTime() + }) +}) + +export const OrgIssueDetails = v.strictObject({ + organisation: OrgField, + dataset: v.object({ + name: NonEmptyString, + dataset: v.string() + }), + errorHeading: NonEmptyString, + issueItems: v.array(v.strictObject({ + html: v.string(), + href: v.url() + })), + issueType: NonEmptyString, + entry: v.strictObject({ + title: NonEmptyString, + fields: v.array(v.strictObject({ + key: v.strictObject({ text: NonEmptyString }), + value: v.strictObject({ html: v.string() }), + classes: v.string() + })) + }) +}) + +export const CheckAnswers = v.strictObject({ + values: v.strictObject({ + lpa: NonEmptyString, + name: NonEmptyString, + email: v.pipe(v.string(), v.email()), + dataset: NonEmptyString, + 'endpoint-url': v.url(), + 'documentation-url': v.url(), + hasLicence: NonEmptyString + }) +}) + +export const ChooseDataset = v.strictObject({ + errors: v.strictObject({ + dataset: v.optional(v.strictObject({ + type: v.enum({ + required: 'required' + }) + })) + }) +}) + +export const DatasetDetails = v.strictObject({ + organisation: OrgField, + dataset: v.strictObject({ + name: NonEmptyString, + dataset: NonEmptyString + }), + values: v.strictObject({ + dataset: NonEmptyString + }), + errors: v.record(NonEmptyString, v.strictObject({ + type: NonEmptyString + })) +}) + +/** + * This acts as a registry of template -> schema for convenience. + */ +export const templateSchema = new Map([ + ['dataset-details.html', DatasetDetails], + ['check-answers.html', CheckAnswers], + ['choose-dataset.html', ChooseDataset], + ['lpa-details.html', v.any()], + + ['submit/confirmation.html', v.any()], + + ['organisations/overview.html', OrgOverviewPage], + ['organisations/find.html', OrgFindPage], + ['organisations/get-started.html', OrgGetStarted], + ['organisations/datasetTaskList.html', OrgDatasetTaskList], + ['organisations/http-error.html', OrgEndpointError], + ['organisations/issueDetails.html', OrgIssueDetails], + + ['errorPages/503', UptimeParams], + ['errorPages/500', ErrorParams], + ['errorPages/404', EmptyParams], + ['privacy-notice.html', EmptyParams], + ['start.html', EmptyParams], + ['cookies.html', EmptyParams], + ['accessibility.html', EmptyParams] +]) diff --git a/src/serverSetup/nunjucks.js b/src/serverSetup/nunjucks.js index c9c26875..4caee7a5 100644 --- a/src/serverSetup/nunjucks.js +++ b/src/serverSetup/nunjucks.js @@ -1,24 +1,49 @@ import nunjucks from 'nunjucks' import config from '../../config/index.js' import addFilters from '../filters/filters.js' +import logger from '../utils/logger.js' +import * as customRenderer from '../utils/custom-renderer.js' +import * as schemas from '../routes/schemas.js' +import * as v from 'valibot' +/** + * We wanto to override nunjucks.render() with a function that + * validates the params against a schema. + */ +const proto = { + render (name, context) { + const schema = schemas.templateSchema.get(name) + logger.info(`rendering: ${name} with schema=<${schema ? 'defined' : 'any'}>`) + return customRenderer.render(nunjucks, name, schema ?? v.any(), context) + }, + configure (paths, options) { + return nunjucks.configure(paths, options) + } +} + +/** + * + * @param {{datasetNameMapping, app: object?}} param0 + * @returns + */ export function setupNunjucks ({ app, datasetNameMapping }) { + const options = { dev: true, noCache: true, watch: true } if (app) { - app.set('view engine', 'html') + options.express = app } - const nunjucksEnv = nunjucks.configure([ + const customNunjucks = Object.create(proto) + const nunjucksEnv = customNunjucks.configure([ 'src/views', 'src/views/check', 'src/views/submit', 'node_modules/govuk-frontend/dist/', 'node_modules/@x-govuk/govuk-prototype-components/' - ], { - express: app, - dev: true, - noCache: true, - watch: true - }) + ], options) + + if (app) { + app.set('view engine', 'html') + } const globalValues = { serviceName: config.serviceNames.submit, @@ -35,5 +60,5 @@ export function setupNunjucks ({ app, datasetNameMapping }) { }) addFilters(nunjucksEnv, { datasetNameMapping }) - return nunjucks + return customNunjucks } diff --git a/src/utils/custom-renderer.js b/src/utils/custom-renderer.js new file mode 100644 index 00000000..07a88940 --- /dev/null +++ b/src/utils/custom-renderer.js @@ -0,0 +1,68 @@ +import * as v from 'valibot' +import config from '../../config/index.js' +import logger from './logger.js' +import { types } from './logging.js' + +/** + * @param {ValiError} error + * @returns {[string][]} + */ +export const invalidSchemaPaths = (error) => { + if (error instanceof v.ValiError) { + return error.issues.map((issue) => issue.path.flatMap((p) => p.key)) + } + throw new TypeError(`error is not a validation error: ${error.name}`) +} + +/** + * Depending on the config, validates the params against the given schema before rendering the template. + * + * If validation error is raised, it's logged and re-thrown. + * + * Motivation: we want to ensure in developmen/test environments, that the data passed to + * our templates is valid. This will help us ensure that we're testing the right thing. + * + * Note: Relies on {@link config.environment} + * + * @param {Response | { render: (template: string, params: object) => string} } renderer + * @param {string} template path to template + * @param {object} schema valibot schema + * @param {object} params + * @returns {string} + */ +export const render = (renderer, template, schema, params) => { + let parsed = params + if (config.environment !== 'production' && config.environment !== 'staging') { + try { + parsed = v.parse(schema, params) + } catch (error) { + if (error instanceof v.ValiError) { + // the below will only show up in the terminal when testing + console.debug({ params, message: 'failed validation input' }) + logger.warn( + validationErrorMessage(error, template), + { + errorMessage: `${error.message}`, + pathsWithIssues: invalidSchemaPaths(error), + type: types.App + } + ) + } + throw error + } + } + return renderer.render(template, parsed) +} + +/** + * Creates an error message from the given error + * + * @param {ValiError} error validation error + * @param {string} template template name + * @returns string + */ +function validationErrorMessage (error, template) { + const numIssues = error.issues.length + const message = `Found ${numIssues} validation issue${numIssues === 1 ? '' : 's'} in template params for '${template}'` + return message +} diff --git a/src/utils/utils.js b/src/utils/utils.js index 5e429735..0484a209 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -88,6 +88,7 @@ export const allowedFileTypes = { csv: ['text/csv', 'text/plain', 'application/octet-stream', 'binary/octet-stream'], xls: ['application/vnd.ms-excel', 'application/octet-stream', 'binary/octet-stream'], xlsx: ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/octet-stream', 'binary/octet-stream'], + xml: ['application/xml', 'text/xml'], json: ['application/json', 'application/octet-stream', 'binary/octet-stream'], geojson: ['application/vnd.geo+json', 'application/octet-stream', 'binary/octet-stream', 'application/geo+json'], gml: ['application/gml+xml', 'application/octet-stream', 'binary/octet-stream'], diff --git a/src/views/layouts/main.html b/src/views/layouts/main.html index 3181102e..e518e7f3 100644 --- a/src/views/layouts/main.html +++ b/src/views/layouts/main.html @@ -95,7 +95,6 @@

Get help

{{ super()}} {%block scripts %} - ...