diff --git a/package-lock.json b/package-lock.json index 9f94a91..ae6504f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ ], "devDependencies": { "@serverless/compose": "^1.3.0", + "@serverless/typescript": "^3.21.0", "@typescript-eslint/eslint-plugin": "^5.40.0", "@typescript-eslint/parser": "^5.40.0", "eslint": "^8.25.0", @@ -23,6 +24,8 @@ "npm-run-all": "^4.1.5", "prettier": "2.7.1", "serverless": "^3.22.0", + "ts-node": "^10.4.0", + "tsconfig-paths": "^3.9.0", "typescript": "^4.8.4" }, "engines": { @@ -1918,6 +1921,28 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@cush/relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@cush/relative/-/relative-1.0.0.tgz", @@ -2070,9 +2095,9 @@ "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==" }, "node_modules/@esbuild/android-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.10.tgz", - "integrity": "sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz", + "integrity": "sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==", "cpu": [ "arm" ], @@ -2085,9 +2110,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", - "integrity": "sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.11.tgz", + "integrity": "sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw==", "cpu": [ "loong64" ], @@ -2148,6 +2173,10 @@ "resolved": "commons", "link": true }, + "node_modules/@guria.dev/aws-js-practitioner-products-api": { + "resolved": "services/products-api", + "link": true + }, "node_modules/@guria.dev/aws-js-practitioner-shop-frontend": { "resolved": "services/shop-frontend-app", "link": true @@ -2156,6 +2185,10 @@ "resolved": "plugins/log-output-values", "link": true }, + "node_modules/@guria.dev/serverless-scriptable": { + "resolved": "plugins/scriptable", + "link": true + }, "node_modules/@humanwhocodes/config-array": { "version": "0.10.7", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", @@ -2319,6 +2352,44 @@ "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", "dev": true }, + "node_modules/@middy/core": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-3.6.1.tgz", + "integrity": "sha512-nxVJxLlrRkSpodNG2VBLQvPD2L0gZsS5sg32Vz9TZpyQIe98xHAaAnp6XQ2DcuF0UHpo7ZWqhIoOvVSrbGk7BA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@middy/http-cors": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/http-cors/-/http-cors-3.6.1.tgz", + "integrity": "sha512-goRPnFtU1aGk9WLjuaguISpzq1RujRYExvu1Q2TbPTgC9UXDb6StlgneQqcARkVoFBMVEloIKqNcubDNUhmEXw==", + "dependencies": { + "@middy/util": "3.6.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@middy/http-json-body-parser": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/http-json-body-parser/-/http-json-body-parser-3.6.1.tgz", + "integrity": "sha512-MkN1qHS/BdMvE9sS6uh9WG634QHfyjz28KYqJxNkEyazSlN61219/Y8RSHdnejoghGszpYjYHExhrPSNcTS2ew==", + "dependencies": { + "@middy/util": "3.6.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@middy/util": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/util/-/util-3.6.1.tgz", + "integrity": "sha512-gaTRf/3IMzXi6+8OfkzQs6iGCwhyB+CHe5zYe+HwA2Gd0vg1X6dp2U07/pwjgqC1XW4KS3FKhgGtl535I3eo2A==", + "engines": { + "node": ">=14" + } + }, "node_modules/@mswjs/cookies": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz", @@ -2883,6 +2954,12 @@ "integrity": "sha512-86GgN2vzfUu7m9Wcj63iUkuDzFNYFVmjeDm2GzWpUk+opB0pEpMsw6ePCMrhYkumz2C1ihqtZzOMAg7FiXcNoQ==", "dev": true }, + "node_modules/@serverless/typescript": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@serverless/typescript/-/typescript-3.21.0.tgz", + "integrity": "sha512-SiGqgBbE1npu4wMCKsN+sF5pH3RIsQvjvtzhnr6ZYuDDX1r1I1lVR0uLk12v2vAIywVUmKym7Z3cKUTc7NIioA==", + "dev": true + }, "node_modules/@serverless/utils": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/@serverless/utils/-/utils-6.7.0.tgz", @@ -2988,6 +3065,7 @@ "os": [ "android" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.122" }, @@ -3007,6 +3085,7 @@ "os": [ "android" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.130" }, @@ -3019,7 +3098,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@swc/core-darwin-arm64": { "version": "1.3.6", @@ -3033,6 +3113,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -3049,6 +3130,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -3065,6 +3147,7 @@ "os": [ "freebsd" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.130" }, @@ -3077,7 +3160,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@swc/core-linux-arm-gnueabihf": { "version": "1.3.6", @@ -3091,6 +3175,7 @@ "os": [ "linux" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.130" }, @@ -3103,7 +3188,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@swc/core-linux-arm64-gnu": { "version": "1.3.6", @@ -3117,6 +3203,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3133,6 +3220,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3149,6 +3237,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3165,6 +3254,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3181,6 +3271,7 @@ "os": [ "win32" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.130" }, @@ -3193,7 +3284,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@swc/core-win32-ia32-msvc": { "version": "1.3.6", @@ -3207,6 +3299,7 @@ "os": [ "win32" ], + "peer": true, "dependencies": { "@swc/wasm": "1.2.130" }, @@ -3219,7 +3312,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@swc/core-win32-x64-msvc": { "version": "1.3.6", @@ -3233,6 +3327,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -3242,7 +3337,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz", "integrity": "sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", @@ -3368,12 +3464,42 @@ "node": ">= 10" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, "node_modules/@types/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", "dev": true }, + "node_modules/@types/aws-lambda": { + "version": "8.10.107", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.107.tgz", + "integrity": "sha512-UTI9ZPw4VzvgYUJ7gUU77/ovGrIniRRWiMWxms5dP+1fsxNPeP/cOopQ0mxXPc9NvbeROcDUDN34m8eEhdEitg==", + "dev": true + }, "node_modules/@types/cacheable-request": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", @@ -3497,6 +3623,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -3839,9 +3971,9 @@ } }, "node_modules/@vitest/ui": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.24.1.tgz", - "integrity": "sha512-7baeu1+XspO+eAOsygPNL1k8EQRpn7Mj8fhwgyzsTzoYAkqP62mOPO+sqa+TdVaE3241sbAniIzHD1mVMJp70A==", + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.24.3.tgz", + "integrity": "sha512-f5agYA/sdkiipq42TZayJoeUGjWx+opDjIVeNnb1SG2BNxqObFqh6GuJlzpGHerg4a2+ZSoVo4f4p2+dEyXPmg==", "devOptional": true, "dependencies": { "sirv": "^2.0.2" @@ -3939,6 +4071,19 @@ "node": ">= 6.0.0" } }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -4140,6 +4285,12 @@ "node": ">=6" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -4389,6 +4540,25 @@ } ] }, + "node_modules/bestzip": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bestzip/-/bestzip-2.2.1.tgz", + "integrity": "sha512-XdAb87RXqOqF7C6UgQG9IqpEHJvS6IOUo0bXWEAebjSSdhDjsbcqFKdHpn5Q7QHz2pGr3Zmw4wgG3LlzdyDz7w==", + "dev": true, + "dependencies": { + "archiver": "^5.3.0", + "async": "^3.2.0", + "glob": "^7.1.6", + "which": "^2.0.2", + "yargs": "^16.2.0" + }, + "bin": { + "bestzip": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -4420,8 +4590,7 @@ "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/bowser": { "version": "2.11.0", @@ -4885,6 +5054,15 @@ "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", "dev": true }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/cli-color": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", @@ -5190,6 +5368,12 @@ "node": ">= 10" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5728,6 +5912,15 @@ "wrappy": "1" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", @@ -5979,9 +6172,9 @@ } }, "node_modules/esbuild": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.10.tgz", - "integrity": "sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.11.tgz", + "integrity": "sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -5990,34 +6183,34 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" + "@esbuild/android-arm": "0.15.11", + "@esbuild/linux-loong64": "0.15.11", + "esbuild-android-64": "0.15.11", + "esbuild-android-arm64": "0.15.11", + "esbuild-darwin-64": "0.15.11", + "esbuild-darwin-arm64": "0.15.11", + "esbuild-freebsd-64": "0.15.11", + "esbuild-freebsd-arm64": "0.15.11", + "esbuild-linux-32": "0.15.11", + "esbuild-linux-64": "0.15.11", + "esbuild-linux-arm": "0.15.11", + "esbuild-linux-arm64": "0.15.11", + "esbuild-linux-mips64le": "0.15.11", + "esbuild-linux-ppc64le": "0.15.11", + "esbuild-linux-riscv64": "0.15.11", + "esbuild-linux-s390x": "0.15.11", + "esbuild-netbsd-64": "0.15.11", + "esbuild-openbsd-64": "0.15.11", + "esbuild-sunos-64": "0.15.11", + "esbuild-windows-32": "0.15.11", + "esbuild-windows-64": "0.15.11", + "esbuild-windows-arm64": "0.15.11" } }, "node_modules/esbuild-android-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz", - "integrity": "sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.11.tgz", + "integrity": "sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw==", "cpu": [ "x64" ], @@ -6030,9 +6223,9 @@ } }, "node_modules/esbuild-android-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz", - "integrity": "sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.11.tgz", + "integrity": "sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ==", "cpu": [ "arm64" ], @@ -6045,9 +6238,9 @@ } }, "node_modules/esbuild-darwin-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz", - "integrity": "sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.11.tgz", + "integrity": "sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA==", "cpu": [ "x64" ], @@ -6060,9 +6253,9 @@ } }, "node_modules/esbuild-darwin-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz", - "integrity": "sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.11.tgz", + "integrity": "sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ==", "cpu": [ "arm64" ], @@ -6075,9 +6268,9 @@ } }, "node_modules/esbuild-freebsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz", - "integrity": "sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.11.tgz", + "integrity": "sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg==", "cpu": [ "x64" ], @@ -6090,9 +6283,9 @@ } }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz", - "integrity": "sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.11.tgz", + "integrity": "sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ==", "cpu": [ "arm64" ], @@ -6105,9 +6298,9 @@ } }, "node_modules/esbuild-linux-32": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz", - "integrity": "sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.11.tgz", + "integrity": "sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA==", "cpu": [ "ia32" ], @@ -6120,9 +6313,9 @@ } }, "node_modules/esbuild-linux-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz", - "integrity": "sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.11.tgz", + "integrity": "sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA==", "cpu": [ "x64" ], @@ -6135,9 +6328,9 @@ } }, "node_modules/esbuild-linux-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz", - "integrity": "sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.11.tgz", + "integrity": "sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A==", "cpu": [ "arm" ], @@ -6150,9 +6343,9 @@ } }, "node_modules/esbuild-linux-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz", - "integrity": "sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.11.tgz", + "integrity": "sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw==", "cpu": [ "arm64" ], @@ -6165,9 +6358,9 @@ } }, "node_modules/esbuild-linux-mips64le": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz", - "integrity": "sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.11.tgz", + "integrity": "sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA==", "cpu": [ "mips64el" ], @@ -6180,9 +6373,9 @@ } }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz", - "integrity": "sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.11.tgz", + "integrity": "sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg==", "cpu": [ "ppc64" ], @@ -6195,9 +6388,9 @@ } }, "node_modules/esbuild-linux-riscv64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz", - "integrity": "sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.11.tgz", + "integrity": "sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw==", "cpu": [ "riscv64" ], @@ -6210,9 +6403,9 @@ } }, "node_modules/esbuild-linux-s390x": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz", - "integrity": "sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.11.tgz", + "integrity": "sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg==", "cpu": [ "s390x" ], @@ -6225,9 +6418,9 @@ } }, "node_modules/esbuild-netbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz", - "integrity": "sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.11.tgz", + "integrity": "sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A==", "cpu": [ "x64" ], @@ -6240,9 +6433,9 @@ } }, "node_modules/esbuild-openbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz", - "integrity": "sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.11.tgz", + "integrity": "sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ==", "cpu": [ "x64" ], @@ -6255,9 +6448,9 @@ } }, "node_modules/esbuild-sunos-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz", - "integrity": "sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.11.tgz", + "integrity": "sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw==", "cpu": [ "x64" ], @@ -6270,9 +6463,9 @@ } }, "node_modules/esbuild-windows-32": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz", - "integrity": "sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.11.tgz", + "integrity": "sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q==", "cpu": [ "ia32" ], @@ -6285,9 +6478,9 @@ } }, "node_modules/esbuild-windows-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz", - "integrity": "sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.11.tgz", + "integrity": "sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ==", "cpu": [ "x64" ], @@ -6300,9 +6493,9 @@ } }, "node_modules/esbuild-windows-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz", - "integrity": "sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.11.tgz", + "integrity": "sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw==", "cpu": [ "arm64" ], @@ -9289,6 +9482,12 @@ "semver": "bin/semver.js" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/match-sorter": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/match-sorter/-/match-sorter-6.3.1.tgz", @@ -10252,6 +10451,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-timeout": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", @@ -11586,6 +11800,37 @@ "node": ">=4" } }, + "node_modules/serverless-esbuild": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/serverless-esbuild/-/serverless-esbuild-1.33.0.tgz", + "integrity": "sha512-lXG3HZ7Qn6KptSFNvw9xthTsZ9lEOaKE/W03/TJ81+xmq6ONKUuAs+2dFLofEnHCWfbdfagaaiX9Nf0fttqXMg==", + "dev": true, + "dependencies": { + "acorn": "^8.7.1", + "acorn-walk": "^8.2.0", + "anymatch": "^3.1.2", + "archiver": "^5.3.0", + "bestzip": "^2.2.0", + "chokidar": "^3.4.3", + "fs-extra": "^10.1.0", + "globby": "^11.0.1", + "p-map": "^4.0.0", + "ramda": "^0.27.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.8 <0.16" + } + }, + "node_modules/serverless-esbuild/node_modules/ramda": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", + "integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==", + "dev": true + }, "node_modules/serverless-s3-sync": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/serverless-s3-sync/-/serverless-s3-sync-3.1.0.tgz", @@ -12507,18 +12752,71 @@ "node": ">=0.8.0" } }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/tsconfig-paths": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz", - "integrity": "sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "dependencies": { - "json5": "^2.2.1", + "@types/json5": "^0.0.29", + "json5": "^1.0.1", "minimist": "^1.2.6", "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" }, - "engines": { - "node": ">=6" + "bin": { + "json5": "lib/cli.js" } }, "node_modules/tslib": { @@ -12768,6 +13066,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -12801,9 +13105,9 @@ } }, "node_modules/vite": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.7.tgz", - "integrity": "sha512-5vCAmU4S8lyVdFCInu9M54f/g8qbOMakVw5xJ4pjoaDy5wgy9sLLZkGdSLN52dlsBqh0tBqxjaqqa8LgPqwRAA==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz", + "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==", "dependencies": { "esbuild": "^0.15.9", "postcss": "^8.4.16", @@ -12867,6 +13171,20 @@ "vite": ">2.0.0-0" } }, + "node_modules/vite-tsconfig-paths/node_modules/tsconfig-paths": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz", + "integrity": "sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==", + "dev": true, + "dependencies": { + "json5": "^2.2.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/vite/node_modules/resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -13302,6 +13620,15 @@ "pend": "~1.2.0" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -13351,27 +13678,40 @@ "node": ">=16.0.0" } }, + "plugins/scriptable": { + "name": "@guria.dev/serverless-scriptable", + "version": "1.0.0", + "dependencies": { + "bluebird": "^3.7.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "services/products-api": { "name": "@guria.dev/aws-js-practitioner-products-api", "version": "1.0.0", - "extraneous": true, "dependencies": { - "@middy/core": "^3.5.0", - "@middy/http-json-body-parser": "^3.5.0" + "@middy/core": "^3.6.1", + "@middy/http-cors": "^3.6.1", + "@middy/http-json-body-parser": "^3.6.1" }, "devDependencies": { - "@types/aws-lambda": "^8.10.106", + "@types/aws-lambda": "^8.10.107", "@types/node": "^16.11.65", - "esbuild": "^0.15.10", - "json-schema-to-ts": "^2.5.5", - "serverless-esbuild": "^1.33.0", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.1.0" + "esbuild": "^0.15.11", + "serverless-esbuild": "^1.33.0" }, "engines": { "node": ">=16.0.0" } }, + "services/products-api/node_modules/@types/node": { + "version": "16.11.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.66.tgz", + "integrity": "sha512-+xvMrGl3eAygKcf5jm+4zA4tbfEgmKM9o6/glTmN0RFVdu2VuFXMYYtRmuv3zTGCgAYMnEZLde3B7BTp+Yxcig==", + "dev": true + }, "services/shop-frontend-app": { "name": "@guria.dev/aws-js-practitioner-shop-frontend", "version": "1.0.0", @@ -13387,8 +13727,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-query": "^3.39.2", - "react-router-dom": "^6.4.2", - "yup": "^0.32.11" + "react-router-dom": "^6.4.2" }, "devDependencies": { "@testing-library/jest-dom": "^5.16.5", @@ -13397,16 +13736,16 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", - "@vitest/ui": "^0.24.1", + "@vitest/ui": "^0.24.3", "jsdom": "^20.0.1", "msw": "^0.47.4", "serverless-cloudfront-invalidate": "^1.12.2", "serverless-s3-sync": "^3.1.0", "terser": "^5.15.1", - "vite": "^3.1.7", + "vite": "^3.1.8", "vite-plugin-top-level-await": "^1.1.1", "vite-tsconfig-paths": "^3.5.1", - "vitest": "^0.24.1" + "vitest": "^0.24.3" }, "engines": { "node": ">=16.0.0" @@ -14975,6 +15314,27 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@cush/relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@cush/relative/-/relative-1.0.0.tgz", @@ -15097,15 +15457,15 @@ "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==" }, "@esbuild/android-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.10.tgz", - "integrity": "sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz", + "integrity": "sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==", "optional": true }, "@esbuild/linux-loong64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", - "integrity": "sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.11.tgz", + "integrity": "sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw==", "optional": true }, "@eslint/eslintrc": { @@ -15151,6 +15511,26 @@ "yup": "^0.32.11" } }, + "@guria.dev/aws-js-practitioner-products-api": { + "version": "file:services/products-api", + "requires": { + "@middy/core": "^3.6.1", + "@middy/http-cors": "^3.6.1", + "@middy/http-json-body-parser": "^3.6.1", + "@types/aws-lambda": "^8.10.107", + "@types/node": "^16.11.65", + "esbuild": "^0.15.11", + "serverless-esbuild": "^1.33.0" + }, + "dependencies": { + "@types/node": { + "version": "16.11.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.66.tgz", + "integrity": "sha512-+xvMrGl3eAygKcf5jm+4zA4tbfEgmKM9o6/glTmN0RFVdu2VuFXMYYtRmuv3zTGCgAYMnEZLde3B7BTp+Yxcig==", + "dev": true + } + } + }, "@guria.dev/aws-js-practitioner-shop-frontend": { "version": "file:services/shop-frontend-app", "requires": { @@ -15166,7 +15546,7 @@ "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", "@vitest/coverage-c8": "^0.24.3", - "@vitest/ui": "^0.24.1", + "@vitest/ui": "^0.24.3", "axios": "^1.1.3", "formik": "^2.2.9", "jsdom": "^20.0.1", @@ -15178,11 +15558,10 @@ "serverless-cloudfront-invalidate": "^1.12.2", "serverless-s3-sync": "^3.1.0", "terser": "^5.15.1", - "vite": "^3.1.7", + "vite": "^3.1.8", "vite-plugin-top-level-await": "^1.1.1", "vite-tsconfig-paths": "^3.5.1", - "vitest": "^0.24.1", - "yup": "^0.32.11" + "vitest": "^0.24.3" }, "dependencies": { "axios": { @@ -15200,6 +15579,12 @@ "@guria.dev/serverless-log-output-values": { "version": "file:plugins/log-output-values" }, + "@guria.dev/serverless-scriptable": { + "version": "file:plugins/scriptable", + "requires": { + "bluebird": "^3.7.2" + } + }, "@humanwhocodes/config-array": { "version": "0.10.7", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", @@ -15331,6 +15716,32 @@ "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", "dev": true }, + "@middy/core": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-3.6.1.tgz", + "integrity": "sha512-nxVJxLlrRkSpodNG2VBLQvPD2L0gZsS5sg32Vz9TZpyQIe98xHAaAnp6XQ2DcuF0UHpo7ZWqhIoOvVSrbGk7BA==" + }, + "@middy/http-cors": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/http-cors/-/http-cors-3.6.1.tgz", + "integrity": "sha512-goRPnFtU1aGk9WLjuaguISpzq1RujRYExvu1Q2TbPTgC9UXDb6StlgneQqcARkVoFBMVEloIKqNcubDNUhmEXw==", + "requires": { + "@middy/util": "3.6.1" + } + }, + "@middy/http-json-body-parser": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/http-json-body-parser/-/http-json-body-parser-3.6.1.tgz", + "integrity": "sha512-MkN1qHS/BdMvE9sS6uh9WG634QHfyjz28KYqJxNkEyazSlN61219/Y8RSHdnejoghGszpYjYHExhrPSNcTS2ew==", + "requires": { + "@middy/util": "3.6.1" + } + }, + "@middy/util": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@middy/util/-/util-3.6.1.tgz", + "integrity": "sha512-gaTRf/3IMzXi6+8OfkzQs6iGCwhyB+CHe5zYe+HwA2Gd0vg1X6dp2U07/pwjgqC1XW4KS3FKhgGtl535I3eo2A==" + }, "@mswjs/cookies": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz", @@ -15708,6 +16119,12 @@ } } }, + "@serverless/typescript": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@serverless/typescript/-/typescript-3.21.0.tgz", + "integrity": "sha512-SiGqgBbE1npu4wMCKsN+sF5pH3RIsQvjvtzhnr6ZYuDDX1r1I1lVR0uLk12v2vAIywVUmKym7Z3cKUTc7NIioA==", + "dev": true + }, "@serverless/utils": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/@serverless/utils/-/utils-6.7.0.tgz", @@ -15787,6 +16204,7 @@ "integrity": "sha512-FQk/4cRRDoMPLgSm/1WvEqRqlSgBb6Twd5W13NYUbXJpzPGoPHhzwaCEbpGjPKG/OvAqA2NVrWquuJjhDvQyVQ==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.122" } @@ -15797,6 +16215,7 @@ "integrity": "sha512-6qjZYatlFAN0IKhhYFsN+BaywooHFpK9/A/jMkjgIfbUoDz3wPJWZc2MDvcttgqZ+cfsSCcGeNw++H894z1zfw==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.130" }, @@ -15806,7 +16225,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true } } }, @@ -15815,14 +16235,16 @@ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.6.tgz", "integrity": "sha512-2qjaABxA7cloVTkS+uDEcVQ5buSi8de7qEv6P6InDE/iCjnI5ALyDxn7eauJJsVKimh9DyqN9sSZJ/z9U4FDUQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-darwin-x64": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.6.tgz", "integrity": "sha512-+OtW18d2o3RUuXodB41ZDj0iRCeXNL0OxVU0jTl7iyCWDypmCzhalbaQXD/ZJxgnpGRB7/s2ZwNR/gzjXgz9VA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-freebsd-x64": { "version": "1.3.6", @@ -15830,6 +16252,7 @@ "integrity": "sha512-f+ePNodn7ET9qEa93VMfnsPNnubWKIkn0EfxmfzJCt/abNVZ7+DyCSABfWKkexOZ8OuNyxnBCdKLL6nlizxkhQ==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.130" }, @@ -15839,7 +16262,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true } } }, @@ -15849,6 +16273,7 @@ "integrity": "sha512-JwdJmqKzsdq7Itg5ssKDEY9mP3AkQ+XENF6WXXlaNu1U/InqQhD0DqsFzw4TQ4LzB7lB7Wj+dv3JjKIhnHNNag==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.130" }, @@ -15858,7 +16283,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true } } }, @@ -15867,28 +16293,32 @@ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.6.tgz", "integrity": "sha512-sRoPnwYFX+t95S7khi4KL2lZMZwbuzvPUf8NYmtTzfqVIseo8HD6IMgyeaQHYDfwDGF5elQGi4ALjRx2huSi0Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-linux-arm64-musl": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.6.tgz", "integrity": "sha512-XT8vRcxGaKujiplFfuMtGRgZ3Nx611TMVLUg91alzEIe2Adtrpaumzrwv2vqVdMr4X4GBK9z0rHsqkDLPhmuaw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-linux-x64-gnu": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.6.tgz", "integrity": "sha512-nip81Ngcx8cory+FtapKhXb/rgh/pTAlvTiwJjMhsE3xcKRsbnJEPMVIoArCBV0BmYJBLWvOtpHf8B62JS7L5w==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-linux-x64-musl": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.6.tgz", "integrity": "sha512-IzrQB67BY/rSZPJXWU3XzpkJqh4vYkYuOUmz1yrV/vxgPjJp/kUllfBYsHCiIedb7sjvfTt409SIN0FlPJY2+Q==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/core-win32-arm64-msvc": { "version": "1.3.6", @@ -15896,6 +16326,7 @@ "integrity": "sha512-gLsE/4qgqTxy0OOFJKi9QRs9mVYv4yOXSwPB2Rb+grOmNnG+Ds2LWqGEaABKDErnUtTQiOzLpdwesNZxeJgMhA==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.130" }, @@ -15905,7 +16336,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true } } }, @@ -15915,6 +16347,7 @@ "integrity": "sha512-0Jr7KMGEPapYGni+97oNOeVP7edBwjMGQ9HsJUUN1uIE7fALQ+zVGuwbc+22myql2Uhh5V5hZx5xtVraqLVMHw==", "dev": true, "optional": true, + "peer": true, "requires": { "@swc/wasm": "1.2.130" }, @@ -15924,7 +16357,8 @@ "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "optional": true + "optional": true, + "peer": true } } }, @@ -15933,14 +16367,16 @@ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.6.tgz", "integrity": "sha512-O3F/jxqaFwGq9XxYeCIVRCDIR4+GdSBu/5io6TkN8O5QLqB3/KOJVDn6TALtbL6ClwjUwZt66HKnYeSx19j2Ow==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@swc/wasm": { "version": "1.2.122", "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz", "integrity": "sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@szmarczak/http-timer": { "version": "4.0.6", @@ -16035,12 +16471,42 @@ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "devOptional": true }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, "@types/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", "dev": true }, + "@types/aws-lambda": { + "version": "8.10.107", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.107.tgz", + "integrity": "sha512-UTI9ZPw4VzvgYUJ7gUU77/ovGrIniRRWiMWxms5dP+1fsxNPeP/cOopQ0mxXPc9NvbeROcDUDN34m8eEhdEitg==", + "dev": true + }, "@types/cacheable-request": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", @@ -16157,6 +16623,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -16401,9 +16873,9 @@ } }, "@vitest/ui": { - "version": "0.24.1", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.24.1.tgz", - "integrity": "sha512-7baeu1+XspO+eAOsygPNL1k8EQRpn7Mj8fhwgyzsTzoYAkqP62mOPO+sqa+TdVaE3241sbAniIzHD1mVMJp70A==", + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.24.3.tgz", + "integrity": "sha512-f5agYA/sdkiipq42TZayJoeUGjWx+opDjIVeNnb1SG2BNxqObFqh6GuJlzpGHerg4a2+ZSoVo4f4p2+dEyXPmg==", "devOptional": true, "requires": { "sirv": "^2.0.2" @@ -16481,6 +16953,16 @@ "debug": "4" } }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, "ajv": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", @@ -16639,6 +17121,12 @@ } } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -16822,6 +17310,19 @@ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, + "bestzip": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bestzip/-/bestzip-2.2.1.tgz", + "integrity": "sha512-XdAb87RXqOqF7C6UgQG9IqpEHJvS6IOUo0bXWEAebjSSdhDjsbcqFKdHpn5Q7QHz2pGr3Zmw4wgG3LlzdyDz7w==", + "dev": true, + "requires": { + "archiver": "^5.3.0", + "async": "^3.2.0", + "glob": "^7.1.6", + "which": "^2.0.2", + "yargs": "^16.2.0" + } + }, "big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -16847,8 +17348,7 @@ "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "bowser": { "version": "2.11.0", @@ -17188,6 +17688,12 @@ "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", "dev": true }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cli-color": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", @@ -17425,6 +17931,12 @@ "readable-stream": "^3.4.0" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -17857,6 +18369,12 @@ "wrappy": "1" } }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "diff-sequences": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", @@ -18071,152 +18589,152 @@ } }, "esbuild": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.10.tgz", - "integrity": "sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==", - "requires": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.11.tgz", + "integrity": "sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg==", + "requires": { + "@esbuild/android-arm": "0.15.11", + "@esbuild/linux-loong64": "0.15.11", + "esbuild-android-64": "0.15.11", + "esbuild-android-arm64": "0.15.11", + "esbuild-darwin-64": "0.15.11", + "esbuild-darwin-arm64": "0.15.11", + "esbuild-freebsd-64": "0.15.11", + "esbuild-freebsd-arm64": "0.15.11", + "esbuild-linux-32": "0.15.11", + "esbuild-linux-64": "0.15.11", + "esbuild-linux-arm": "0.15.11", + "esbuild-linux-arm64": "0.15.11", + "esbuild-linux-mips64le": "0.15.11", + "esbuild-linux-ppc64le": "0.15.11", + "esbuild-linux-riscv64": "0.15.11", + "esbuild-linux-s390x": "0.15.11", + "esbuild-netbsd-64": "0.15.11", + "esbuild-openbsd-64": "0.15.11", + "esbuild-sunos-64": "0.15.11", + "esbuild-windows-32": "0.15.11", + "esbuild-windows-64": "0.15.11", + "esbuild-windows-arm64": "0.15.11" } }, "esbuild-android-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz", - "integrity": "sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.11.tgz", + "integrity": "sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw==", "optional": true }, "esbuild-android-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz", - "integrity": "sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.11.tgz", + "integrity": "sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ==", "optional": true }, "esbuild-darwin-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz", - "integrity": "sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.11.tgz", + "integrity": "sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA==", "optional": true }, "esbuild-darwin-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz", - "integrity": "sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.11.tgz", + "integrity": "sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ==", "optional": true }, "esbuild-freebsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz", - "integrity": "sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.11.tgz", + "integrity": "sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg==", "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz", - "integrity": "sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.11.tgz", + "integrity": "sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ==", "optional": true }, "esbuild-linux-32": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz", - "integrity": "sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.11.tgz", + "integrity": "sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA==", "optional": true }, "esbuild-linux-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz", - "integrity": "sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.11.tgz", + "integrity": "sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA==", "optional": true }, "esbuild-linux-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz", - "integrity": "sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.11.tgz", + "integrity": "sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A==", "optional": true }, "esbuild-linux-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz", - "integrity": "sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.11.tgz", + "integrity": "sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw==", "optional": true }, "esbuild-linux-mips64le": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz", - "integrity": "sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.11.tgz", + "integrity": "sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA==", "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz", - "integrity": "sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.11.tgz", + "integrity": "sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg==", "optional": true }, "esbuild-linux-riscv64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz", - "integrity": "sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.11.tgz", + "integrity": "sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw==", "optional": true }, "esbuild-linux-s390x": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz", - "integrity": "sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.11.tgz", + "integrity": "sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg==", "optional": true }, "esbuild-netbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz", - "integrity": "sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.11.tgz", + "integrity": "sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A==", "optional": true }, "esbuild-openbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz", - "integrity": "sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.11.tgz", + "integrity": "sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ==", "optional": true }, "esbuild-sunos-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz", - "integrity": "sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.11.tgz", + "integrity": "sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw==", "optional": true }, "esbuild-windows-32": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz", - "integrity": "sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.11.tgz", + "integrity": "sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q==", "optional": true }, "esbuild-windows-64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz", - "integrity": "sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.11.tgz", + "integrity": "sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ==", "optional": true }, "esbuild-windows-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz", - "integrity": "sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==", + "version": "0.15.11", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.11.tgz", + "integrity": "sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw==", "optional": true }, "escalade": { @@ -20484,6 +21002,12 @@ } } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "match-sorter": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/match-sorter/-/match-sorter-6.3.1.tgz", @@ -21190,6 +21714,15 @@ "p-limit": "^3.0.2" } }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-timeout": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", @@ -22175,6 +22708,33 @@ } } }, + "serverless-esbuild": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/serverless-esbuild/-/serverless-esbuild-1.33.0.tgz", + "integrity": "sha512-lXG3HZ7Qn6KptSFNvw9xthTsZ9lEOaKE/W03/TJ81+xmq6ONKUuAs+2dFLofEnHCWfbdfagaaiX9Nf0fttqXMg==", + "dev": true, + "requires": { + "acorn": "^8.7.1", + "acorn-walk": "^8.2.0", + "anymatch": "^3.1.2", + "archiver": "^5.3.0", + "bestzip": "^2.2.0", + "chokidar": "^3.4.3", + "fs-extra": "^10.1.0", + "globby": "^11.0.1", + "p-map": "^4.0.0", + "ramda": "^0.27.0", + "semver": "^7.3.5" + }, + "dependencies": { + "ramda": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", + "integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==", + "dev": true + } + } + }, "serverless-s3-sync": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/serverless-s3-sync/-/serverless-s3-sync-3.1.0.tgz", @@ -22915,15 +23475,48 @@ } } }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, "tsconfig-paths": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz", - "integrity": "sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "requires": { - "json5": "^2.2.1", + "@types/json5": "^0.0.29", + "json5": "^1.0.1", "minimist": "^1.2.6", "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } } }, "tslib": { @@ -23117,6 +23710,12 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -23147,9 +23746,9 @@ } }, "vite": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.7.tgz", - "integrity": "sha512-5vCAmU4S8lyVdFCInu9M54f/g8qbOMakVw5xJ4pjoaDy5wgy9sLLZkGdSLN52dlsBqh0tBqxjaqqa8LgPqwRAA==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz", + "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==", "requires": { "esbuild": "^0.15.9", "fsevents": "~2.3.2", @@ -23189,6 +23788,19 @@ "globrex": "^0.1.2", "recrawl-sync": "^2.0.3", "tsconfig-paths": "^4.0.0" + }, + "dependencies": { + "tsconfig-paths": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz", + "integrity": "sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==", + "dev": true, + "requires": { + "json5": "^2.2.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + } } }, "vitest": { @@ -23493,6 +24105,12 @@ } } }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 1a10032..c223231 100755 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "devDependencies": { "@serverless/compose": "^1.3.0", + "@serverless/typescript": "^3.21.0", "@typescript-eslint/eslint-plugin": "^5.40.0", "@typescript-eslint/parser": "^5.40.0", "eslint": "^8.25.0", @@ -24,6 +25,8 @@ "npm-run-all": "^4.1.5", "prettier": "2.7.1", "serverless": "^3.22.0", + "ts-node": "^10.4.0", + "tsconfig-paths": "^3.9.0", "typescript": "^4.8.4" }, "engines": { diff --git a/plugins/scriptable/index.js b/plugins/scriptable/index.js new file mode 100644 index 0000000..bb250db --- /dev/null +++ b/plugins/scriptable/index.js @@ -0,0 +1,138 @@ +"use strict"; + +const vm = require("vm"); +const fs = require("fs"); +const Module = require("module"); +const path = require("path"); +const Bluebird = require("bluebird"); +const { execSync } = require("child_process"); + +// same as https://github.com/weixu365/serverless-scriptable-plugin +// but without legacy config namespace support and with proper interpolation of parameters in scripts +class Scriptable { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + this.hooks = {}; + this.commands = {}; + + this.stdin = process.stdin; + this.stdout = process.stdout; + this.stderr = process.stderr; + this.showCommands = true; + + const scriptable = this.getScripts("scriptable") || {}; + + if (this.isFalse(scriptable.showCommands)) { + this.showCommands = false; + } + + if (this.isFalse(scriptable.showStdoutOutput)) { + console.log( + "Not showing command output because showStdoutOutput is false" + ); + this.stdout = "ignore"; + } + + if (this.isFalse(scriptable.showStderrOutput)) { + console.log( + "Not showing command error output because showStderrOutput is false" + ); + this.stderr = "ignore"; + } + + this.setupHooks(scriptable.hooks); + this.setupCustomCommands(scriptable.commands); + } + + setupHooks(hooks = {}) { + // Hooks are run at serverless lifecycle events. + Object.keys(hooks).forEach((event) => { + this.hooks[event] = this.runScript("hooks", event); + }, this); + } + + setupCustomCommands(commands = {}) { + // Custom Serverless commands would run by `npx serverless ` + Object.keys(commands).forEach((name) => { + this.hooks[`${name}:command`] = this.runScript("commands", name); + + this.commands[name] = { + usage: `Run ${commands[name]}`, + lifecycleEvents: ["command"], + }; + }, this); + } + + isFalse(val) { + return val != null && !val; + } + + getScripts(namespace) { + const { custom } = this.serverless.service; + return custom && custom[namespace]; + } + + runScript(type, event) { + return () => { + const eventScript = this.getScripts("scriptable")[type][event]; + const scripts = Array.isArray(eventScript) ? eventScript : [eventScript]; + + return Bluebird.each(scripts, (script) => { + if (fs.existsSync(script) && path.extname(script) === ".js") { + return this.runJavascriptFile(script); + } + + return this.runCommand(script); + }); + }; + } + + runCommand(script) { + if (this.showCommands) { + console.log(`Running command: ${script}`); + } + + return execSync(script, { stdio: [this.stdin, this.stdout, this.stderr] }); + } + + runJavascriptFile(scriptFile) { + if (this.showCommands) { + console.log(`Running javascript file: ${scriptFile}`); + } + + const buildModule = () => { + const m = new Module(scriptFile, module.parent); + m.exports = exports; + m.filename = scriptFile; + m.paths = Module._nodeModulePaths(path.dirname(scriptFile)).concat( + module.paths + ); + + return m; + }; + + const sandbox = { + module: buildModule(), + require: (id) => sandbox.module.require(id), + console, + process, + serverless: this.serverless, + options: this.options, + __filename: scriptFile, + __dirname: path.dirname(fs.realpathSync(scriptFile)), + }; + + // See: https://github.com/nodejs/node/blob/7c452845b8d44287f5db96a7f19e7d395e1899ab/lib/internal/modules/cjs/helpers.js#L14 + sandbox.require.resolve = (req) => + Module._resolveFilename(req, sandbox.module); + + const scriptCode = fs.readFileSync(scriptFile); + const script = vm.createScript(scriptCode, scriptFile); + const context = vm.createContext(sandbox); + + return script.runInContext(context); + } +} + +module.exports = Scriptable; diff --git a/plugins/scriptable/package.json b/plugins/scriptable/package.json new file mode 100755 index 0000000..4fec614 --- /dev/null +++ b/plugins/scriptable/package.json @@ -0,0 +1,12 @@ +{ + "name": "@guria.dev/serverless-scriptable", + "version": "1.0.0", + "private": true, + "main": "index.js", + "dependencies": { + "bluebird": "^3.7.2" + }, + "engines": { + "node": ">=16.0.0" + } +} diff --git a/serverless-compose.yml b/serverless-compose.yml index a517852..59132d8 100644 --- a/serverless-compose.yml +++ b/serverless-compose.yml @@ -1,3 +1,14 @@ services: + api-gw: + path: ./services/api-gateway + + products-api: + path: ./services/products-api + params: + apiGatewayRestApiId: ${api-gw.apiGatewayRestApiId} + apiGatewayRestApiRootResourceId: ${api-gw.apiGatewayRestApiRootResourceId} + shop-frontend-app: path: ./services/shop-frontend-app + params: + productsApiServiceEndpoint: ${products-api.ServiceEndpoint} diff --git a/services/api-gateway/serverless.yml b/services/api-gateway/serverless.yml new file mode 100644 index 0000000..98bc65d --- /dev/null +++ b/services/api-gateway/serverless.yml @@ -0,0 +1,25 @@ +service: aws-js-practitioner-api + +provider: + name: aws + runtime: nodejs16.x + +custom: + vars: + prefix: ${self:service}-${sls:stage} + +resources: + Resources: + ApiGW: + Type: AWS::ApiGateway::RestApi + Properties: + Name: ${self:custom.vars.prefix} + Description: API Gateway for the AWS JS Practitioner course + + Outputs: + apiGatewayRestApiId: + Value: !Ref ApiGW + + apiGatewayRestApiRootResourceId: + Value: + Fn::GetAtt: [ApiGW, RootResourceId] diff --git a/services/products-api/.eslintrc.js b/services/products-api/.eslintrc.js new file mode 100644 index 0000000..e29a79f --- /dev/null +++ b/services/products-api/.eslintrc.js @@ -0,0 +1,42 @@ +const path = require("path"); +const projectFilesPaths = [ + path.resolve(__dirname, "tsconfig.json"), + path.resolve(__dirname, "tsconfig.eslint.json"), +]; + +module.exports = { + root: true, + parser: "@typescript-eslint/parser", + env: { + node: true, + browser: false, + }, + overrides: [ + { + files: ["*.ts", "*.tsx"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: projectFilesPaths, + }, + extends: [ + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + "prettier", + ], + plugins: ["@typescript-eslint", "react", "prettier"], + settings: { + react: { + version: "detect", + }, + }, + }, + { + files: [".eslintrc.js"], + plugins: ["prettier"], + parserOptions: { + ecmaVersion: 2018, + sourceType: "commonjs", + }, + }, + ], +}; diff --git a/services/products-api/.gitignore b/services/products-api/.gitignore new file mode 100644 index 0000000..8615e6d --- /dev/null +++ b/services/products-api/.gitignore @@ -0,0 +1,11 @@ +# package directories +node_modules +jspm_packages + +# Serverless directories +.serverless + +# esbuild directories +.esbuild + +lib diff --git a/services/products-api/package.json b/services/products-api/package.json new file mode 100644 index 0000000..c72875d --- /dev/null +++ b/services/products-api/package.json @@ -0,0 +1,21 @@ +{ + "name": "@guria.dev/aws-js-practitioner-products-api", + "version": "1.0.0", + "scripts": { + "lint": "eslint ." + }, + "engines": { + "node": ">=16.0.0" + }, + "dependencies": { + "@middy/core": "^3.6.1", + "@middy/http-cors": "^3.6.1", + "@middy/http-json-body-parser": "^3.6.1" + }, + "devDependencies": { + "@types/aws-lambda": "^8.10.107", + "@types/node": "^16.11.65", + "esbuild": "^0.15.11", + "serverless-esbuild": "^1.33.0" + } +} diff --git a/services/products-api/serverless.ts b/services/products-api/serverless.ts new file mode 100644 index 0000000..fecfcfb --- /dev/null +++ b/services/products-api/serverless.ts @@ -0,0 +1,39 @@ +import type { AWS } from "@serverless/typescript"; + +import getProductsList from "@functions/getProductsList"; + +const serverlessConfiguration: AWS = { + service: "products-api", + frameworkVersion: "3", + plugins: ["serverless-esbuild"], + provider: { + name: "aws", + runtime: "nodejs16.x", + apiGateway: { + minimumCompressionSize: 1024, + shouldStartNameWithService: true, + restApiId: "${param:apiGatewayRestApiId}", + restApiRootResourceId: "${param:apiGatewayRestApiRootResourceId}", + }, + environment: { + AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1", + NODE_OPTIONS: "--enable-source-maps --stack-trace-limit=1000", + }, + }, + functions: { getProductsList }, + package: { individually: true }, + custom: { + esbuild: { + bundle: true, + minify: false, + sourcemap: true, + exclude: ["aws-sdk"], + target: "node16", + define: { "require.resolve": undefined }, + platform: "node", + concurrency: 10, + }, + }, +}; + +module.exports = serverlessConfiguration; diff --git a/services/products-api/src/functions/getProductsList/handler.ts b/services/products-api/src/functions/getProductsList/handler.ts new file mode 100644 index 0000000..97323e8 --- /dev/null +++ b/services/products-api/src/functions/getProductsList/handler.ts @@ -0,0 +1,9 @@ +import { formatJSONResponse, middyfy } from "@libs/api-gateway"; +import { products } from "@guria.dev/aws-js-practitioner-commons/mocks"; +import type { APIGatewayProxyHandler } from "aws-lambda"; + +const handler: APIGatewayProxyHandler = async () => { + return formatJSONResponse(await products); +}; + +export const main = middyfy(handler); diff --git a/services/products-api/src/functions/getProductsList/index.ts b/services/products-api/src/functions/getProductsList/index.ts new file mode 100644 index 0000000..b31cba0 --- /dev/null +++ b/services/products-api/src/functions/getProductsList/index.ts @@ -0,0 +1,17 @@ +import type { AWS } from "@serverless/typescript"; +import { handlerPath } from "@libs/handler-resolver"; +import { PRODUCTS_API_PATH } from "@guria.dev/aws-js-practitioner-commons/constants/api-paths"; + +const handler: AWS["functions"][string] = { + handler: handlerPath(__dirname, "handler.main"), + events: [ + { + http: { + method: "get", + path: PRODUCTS_API_PATH, + }, + }, + ], +}; + +export default handler; diff --git a/services/products-api/src/libs/api-gateway.ts b/services/products-api/src/libs/api-gateway.ts new file mode 100644 index 0000000..d8278dd --- /dev/null +++ b/services/products-api/src/libs/api-gateway.ts @@ -0,0 +1,16 @@ +import middy from "@middy/core"; +import middyJsonBodyParser from "@middy/http-json-body-parser"; +import middyCors from "@middy/http-cors"; + +export const middyfy = (handler) => { + return middy(handler) + .use(middyJsonBodyParser()) + .use(middyCors({ origin: "*" })); +}; + +export const formatJSONResponse = (response: unknown) => { + return { + statusCode: 200, + body: JSON.stringify(response), + }; +}; diff --git a/services/products-api/src/libs/handler-resolver.ts b/services/products-api/src/libs/handler-resolver.ts new file mode 100644 index 0000000..05debf6 --- /dev/null +++ b/services/products-api/src/libs/handler-resolver.ts @@ -0,0 +1,6 @@ +export const handlerPath = (context: string, path: string) => { + return `${context + .split(process.cwd())[1] + .substring(1) + .replace(/\\/g, "/")}/${path}`; +}; diff --git a/services/products-api/src/services/products.ts b/services/products-api/src/services/products.ts new file mode 100644 index 0000000..602a131 --- /dev/null +++ b/services/products-api/src/services/products.ts @@ -0,0 +1,12 @@ +import { Product } from "@guria.dev/aws-js-practitioner-commons/models/Product"; +import { products } from "@guria.dev/aws-js-practitioner-commons/mocks"; + +class ProductsService { + constructor(private products: Product[]) {} + + public getProducts(): Product[] { + return this.products; + } +} + +export default new ProductsService(products); diff --git a/services/products-api/tsconfig.eslint.json b/services/products-api/tsconfig.eslint.json new file mode 100644 index 0000000..2c2d094 --- /dev/null +++ b/services/products-api/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "node" + }, + "include": ["serverless.ts", ".eslintrc.js", "src"] +} diff --git a/services/products-api/tsconfig.json b/services/products-api/tsconfig.json new file mode 100644 index 0000000..7f790ce --- /dev/null +++ b/services/products-api/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "./tsconfig.paths.json", + "compilerOptions": { + "lib": ["ESNext"], + "moduleResolution": "node", + "noUnusedLocals": true, + "noUnusedParameters": true, + "removeComments": true, + "sourceMap": true, + "target": "ES2020", + "outDir": "lib" + }, + "include": ["src", "serverless.ts"], + "exclude": [ + "node_modules/**/*", + ".serverless/**/*", + ".webpack/**/*", + "_warmup/**/*", + ".vscode/**/*" + ], + "ts-node": { + "require": ["tsconfig-paths/register"] + } +} diff --git a/services/products-api/tsconfig.paths.json b/services/products-api/tsconfig.paths.json new file mode 100644 index 0000000..2e66463 --- /dev/null +++ b/services/products-api/tsconfig.paths.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@functions/*": ["src/functions/*"], + "@libs/*": ["src/libs/*"] + } + } +} diff --git a/services/shop-frontend-app/.gitignore b/services/shop-frontend-app/.gitignore new file mode 100644 index 0000000..7c2e47d --- /dev/null +++ b/services/shop-frontend-app/.gitignore @@ -0,0 +1 @@ +public/config.js diff --git a/services/shop-frontend-app/index.html b/services/shop-frontend-app/index.html index 6176ddf..4c4aceb 100644 --- a/services/shop-frontend-app/index.html +++ b/services/shop-frontend-app/index.html @@ -8,6 +8,7 @@
+ diff --git a/services/shop-frontend-app/package.json b/services/shop-frontend-app/package.json index 31c19f3..fa11a78 100755 --- a/services/shop-frontend-app/package.json +++ b/services/shop-frontend-app/package.json @@ -11,8 +11,7 @@ "test:coverage": "vitest run --coverage", "lint": "eslint .", "lint:fix": "run-s 'lint --fix src'", - "build:deploy": "run-s build deploy", - "prepare": "run-s build" + "build:deploy": "run-s build deploy" }, "dependencies": { "@emotion/react": "^11.10.4", @@ -26,8 +25,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-query": "^3.39.2", - "react-router-dom": "^6.4.2", - "yup": "^0.32.11" + "react-router-dom": "^6.4.2" }, "devDependencies": { "@testing-library/jest-dom": "^5.16.5", @@ -36,16 +34,16 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", - "@vitest/ui": "^0.24.1", + "@vitest/ui": "^0.24.3", "jsdom": "^20.0.1", "msw": "^0.47.4", "serverless-cloudfront-invalidate": "^1.12.2", "serverless-s3-sync": "^3.1.0", "terser": "^5.15.1", - "vite": "^3.1.7", + "vite": "^3.1.8", "vite-plugin-top-level-await": "^1.1.1", "vite-tsconfig-paths": "^3.5.1", - "vitest": "^0.24.1" + "vitest": "^0.24.3" }, "msw": { "workerDirectory": "public" diff --git a/services/shop-frontend-app/serverless.yml b/services/shop-frontend-app/serverless.yml index 01bad42..ddaaf7a 100644 --- a/services/shop-frontend-app/serverless.yml +++ b/services/shop-frontend-app/serverless.yml @@ -10,6 +10,7 @@ provider: plugins: - serverless-s3-sync - serverless-cloudfront-invalidate + - "@guria.dev/serverless-scriptable" - "@guria.dev/serverless-log-output-values" custom: @@ -17,10 +18,10 @@ custom: prefix: ${self:service}-${sls:stage} domainName: ${self:custom.vars.prefix}.${env:HOSTED_ZONE_DOMAIN} log-output-values: - - template: - "Web App deployed to Cloudfront and available at following addresses:\n - * https://{WebAppDistributionOutput}\n - * https://{WebAppCustomDomainOutput}" + - template: | + Web App deployed to Cloudfront and available at following addresses: + * https://{WebAppDistributionOutput} + * https://{WebAppCustomDomainOutput} s3Sync: - bucketName: ${self:custom.vars.prefix} localDir: dist @@ -30,6 +31,11 @@ custom: autoInvalidate: true items: - "/index.html" + scriptable: + hooks: + before:package:createDeploymentArtifacts: | + echo "_CONFIG_ = {BASE_URL: \"${param:productsApiServiceEndpoint}\"}" > public/config.js + npm run build resources: Resources: diff --git a/services/shop-frontend-app/src/components/App/App.test.tsx b/services/shop-frontend-app/src/components/App/App.test.tsx index d7abaad..b97649b 100755 --- a/services/shop-frontend-app/src/components/App/App.test.tsx +++ b/services/shop-frontend-app/src/components/App/App.test.tsx @@ -28,7 +28,7 @@ test("Renders products list", async () => { }, ]; server.use( - rest.get(`${API_PATHS.products}/available`, (req, res, ctx) => { + rest.get(`${API_PATHS.products}`, (req, res, ctx) => { return res( ctx.status(200), ctx.delay(), diff --git a/services/shop-frontend-app/src/components/pages/PageProducts/components/Products.tsx b/services/shop-frontend-app/src/components/pages/PageProducts/components/Products.tsx index 323f302..0e3b136 100755 --- a/services/shop-frontend-app/src/components/pages/PageProducts/components/Products.tsx +++ b/services/shop-frontend-app/src/components/pages/PageProducts/components/Products.tsx @@ -4,12 +4,14 @@ import CardContent from "@mui/material/CardContent"; import CardMedia from "@mui/material/CardMedia"; import Grid from "@mui/material/Grid"; import Typography from "@mui/material/Typography"; +import Link from "@mui/material/Link"; import { formatAsPrice } from "~/utils/utils"; import AddProductToCart from "~/components/AddProductToCart/AddProductToCart"; -import { useAvailableProducts } from "~/queries/products"; +import { useProducts } from "~/queries/products"; +import { Link as RouterLink } from "react-router-dom"; export default function Products() { - const { data = [], isLoading } = useAvailableProducts(); + const { data = [], isLoading } = useProducts(); if (isLoading) { return Loading...; @@ -17,8 +19,7 @@ export default function Products() { return ( - {/* eslint-disable-next-line @typescript-eslint/no-unused-vars */} - {data.map(({ count, ...product }, index) => ( + {data.map((product, index) => ( + + Product details + diff --git a/services/shop-frontend-app/src/constants/apiPaths.ts b/services/shop-frontend-app/src/constants/apiPaths.ts index 5bce31f..111e2f3 100755 --- a/services/shop-frontend-app/src/constants/apiPaths.ts +++ b/services/shop-frontend-app/src/constants/apiPaths.ts @@ -1,6 +1,7 @@ import { PRODUCTS_API_PATH } from "@commons/constants/api-paths"; -const BASE_URL = "https://.execute-api.eu-west-1.amazonaws.com/dev"; +declare let _CONFIG_: { BASE_URL: string }; +const BASE_URL = _CONFIG_.BASE_URL; const API_PATHS = { order: BASE_URL, diff --git a/services/shop-frontend-app/src/queries/dehydrated.json b/services/shop-frontend-app/src/queries/dehydrated.json index fd456d9..06fa371 100644 --- a/services/shop-frontend-app/src/queries/dehydrated.json +++ b/services/shop-frontend-app/src/queries/dehydrated.json @@ -37,67 +37,6 @@ }, "queryKey": "cart", "queryHash": "[\"cart\"]" - }, - { - "state": { - "data": [ - { - "description": "Short Product Description1", - "id": "7567ec4b-b10c-48c5-9345-fc73c48a80aa", - "price": 24, - "title": "ProductOne", - "count": 1 - }, - { - "description": "Short Product Description7", - "id": "7567ec4b-b10c-48c5-9345-fc73c48a80a1", - "price": 15, - "title": "ProductTitle", - "count": 2 - }, - { - "description": "Short Product Description2", - "id": "7567ec4b-b10c-48c5-9345-fc73c48a80a3", - "price": 23, - "title": "Product", - "count": 3 - }, - { - "description": "Short Product Description4", - "id": "7567ec4b-b10c-48c5-9345-fc73348a80a1", - "price": 15, - "title": "ProductTest", - "count": 4 - }, - { - "description": "Short Product Descriptio1", - "id": "7567ec4b-b10c-48c5-9445-fc73c48a80a2", - "price": 23, - "title": "Product2", - "count": 5 - }, - { - "description": "Short Product Description7", - "id": "7567ec4b-b10c-45c5-9345-fc73c48a80a1", - "price": 15, - "title": "ProductName", - "count": 6 - } - ], - "dataUpdateCount": 1, - "dataUpdatedAt": 1664476472590, - "error": null, - "errorUpdateCount": 0, - "errorUpdatedAt": 0, - "fetchFailureCount": 0, - "fetchMeta": null, - "isFetching": false, - "isInvalidated": false, - "isPaused": false, - "status": "success" - }, - "queryKey": "available-products", - "queryHash": "[\"available-products\"]" } ] } diff --git a/services/shop-frontend-app/src/queries/products.ts b/services/shop-frontend-app/src/queries/products.ts index db8c4d5..148259b 100644 --- a/services/shop-frontend-app/src/queries/products.ts +++ b/services/shop-frontend-app/src/queries/products.ts @@ -1,9 +1,29 @@ import axios, { AxiosError } from "axios"; import API_PATHS from "~/constants/apiPaths"; -import { AvailableProduct } from "@commons/models/Product"; +import { Product, AvailableProduct } from "@commons/models/Product"; import { useQuery, useQueryClient, useMutation } from "react-query"; import React from "react"; +export function useProducts() { + return useQuery("products", async () => { + const res = await axios.get(API_PATHS.products); + return res.data; + }); +} + +export function useProduct(id?: string) { + return useQuery( + ["product", { id }], + async () => { + const res = await axios.get(`${API_PATHS.products}/${id}`); + return res.data; + }, + { enabled: !!id } + ); +} + +// TODO: rework available* endpoints to be scoped in admin + export function useAvailableProducts() { return useQuery( "available-products", diff --git a/services/shop-frontend-app/src/setupTests.ts b/services/shop-frontend-app/src/setupTests.ts index 5251906..e5c4e6c 100755 --- a/services/shop-frontend-app/src/setupTests.ts +++ b/services/shop-frontend-app/src/setupTests.ts @@ -8,3 +8,5 @@ import { server } from "~/mocks/server"; beforeAll(() => server.listen({ onUnhandledRequest: "error" })); afterAll(() => server.close()); afterEach(() => server.resetHandlers()); + +(global as any)._CONFIG_ = { BASE_URL: "" };