From 9fc9167d3472044d646557a9ebc93cc015274b8d Mon Sep 17 00:00:00 2001 From: Lasana Murray Date: Tue, 8 Oct 2024 22:59:55 -0400 Subject: [PATCH] chore: update potoo etc --- .prettierrc | 11 + package-lock.json | 2711 +++++++++++++---- package.json | 21 +- src/app/api/control/actor.ts | 131 +- src/app/api/control/index.ts | 69 +- src/app/api/csrf.ts | 13 +- src/app/api/index.ts | 53 +- src/app/api/pool.ts | 19 +- src/app/api/request.ts | 127 +- src/app/api/response/index.ts | 144 +- src/app/api/storage/cookie.ts | 57 +- src/app/api/storage/index.ts | 20 +- src/app/api/storage/prs.ts | 83 +- src/app/api/storage/session.ts | 304 +- src/app/boot/stage/body-parser.ts | 70 +- src/app/boot/stage/connections.ts | 21 +- src/app/boot/stage/cookie-parser.ts | 50 +- src/app/boot/stage/csrf-token.ts | 100 +- src/app/boot/stage/index.ts | 26 +- src/app/boot/stage/init.ts | 10 +- src/app/boot/stage/listen.ts | 33 +- src/app/boot/stage/log.ts | 36 +- src/app/boot/stage/middleware.ts | 116 +- src/app/boot/stage/routing.ts | 45 +- src/app/boot/stage/session.ts | 132 +- src/app/boot/stage/static.ts | 146 +- src/app/connection.ts | 45 +- src/app/hooks.ts | 89 +- src/app/index.ts | 151 +- src/app/middleware/index.ts | 4 +- .../session/store/connection/index.ts | 17 +- .../session/store/connection/memory.ts | 22 +- src/app/module/conf/app.ts | 62 +- src/app/module/conf/connection.ts | 10 +- src/app/module/conf/hooks.ts | 14 +- src/app/module/conf/middleware.ts | 10 +- src/app/module/conf/modules.ts | 4 +- src/app/module/conf/show.ts | 6 +- src/app/module/data.ts | 79 +- src/app/module/index.ts | 309 +- src/app/module/template.ts | 67 +- src/app/show.ts | 4 +- src/net/http/server.ts | 90 +- src/tsconfig.json | 3 +- test/feat/api/control/index_test.ts | 82 +- test/feat/api/csrf_test.ts | 83 +- test/feat/api/response_test.ts | 130 +- test/feat/api/storage/session_test.ts | 57 +- test/feat/app_test.ts | 181 +- test/feat/boot/stage/csrf-token_test.ts | 122 +- test/feat/boot/stage/routing_test.ts | 104 +- test/feat/boot/stage/static/index_test.ts | 88 +- test/feat/fixtures/agent.ts | 31 +- test/fixtures/child.ts | 12 +- test/fixtures/ledger/index.ts | 45 +- .../ledger/modules/accounts/handlers.ts | 11 +- .../fixtures/ledger/modules/accounts/index.ts | 43 +- .../accounts/modules/reports/filters.ts | 11 +- .../accounts/modules/reports/handlers.ts | 9 +- .../modules/accounts/modules/reports/index.ts | 34 +- .../fixtures/ledger/modules/admin/handlers.ts | 65 +- test/fixtures/ledger/modules/admin/index.ts | 106 +- .../ledger/modules/analytics/index.ts | 25 +- test/fixtures/ledger/show.ts | 12 +- test/fixtures/ledger/static/style.css | 5 +- test/fixtures/memgodb.ts | 74 +- test/fixtures/pong.ts | 24 +- test/fixtures/spawnable.ts | 6 - test/register.js | 5 +- test/tsconfig.json | 2 +- test/unit/app/api/storage/prs_test.ts | 47 +- test/unit/app/api/storage/session_test.ts | 88 +- test/unit/app/index_test.ts | 65 - test/unit/net/http/server_test.ts | 101 +- 74 files changed, 3842 insertions(+), 3360 deletions(-) create mode 100644 .prettierrc delete mode 100644 test/unit/app/index_test.ts diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c1c804e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "singleQuote": true, + "trailingComma": "none", + "semi": true, + "bracketSpacing": true, + "tabWidth": 4, + "arrowParens": "avoid", + "useTabs": false, + "printWidth": 80, + "quoteProps": "as-needed" +} diff --git a/package-lock.json b/package-lock.json index f2b679e..30a2faf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.44.1", "license": "Apache-2.0", "dependencies": { - "@quenk/noni": "^1.42.0", - "@quenk/potoo": "^3.1.7-0", + "@quenk/noni": "^1.52.12", + "@quenk/potoo": "^4.0.11", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/csurf": "^1.9.36", @@ -28,16 +28,184 @@ "@types/bluebird": "^3.5.29", "@types/express": "^4.17.11", "@types/express-session": "^1.17.3", - "@types/mocha": "^8.2.1", + "@types/mocha": "^10.0.7", "@types/morgan": "^1.9.2", - "@types/node": "^14.18.5", - "@types/superagent": "^4.1.4", + "@types/node": "^20.14.12", + "@types/superagent": "^8.1.7", + "@typescript-eslint/eslint-plugin": "^5.53.0", "bluebird": "^3.7.2", "body-parser": "^1.19.0", - "mocha": "^8.3.2", + "eslint": "^8.34.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.7.0", + "prettier": "^3.2.5", "superagent": "^5.1.3", - "ts-node": "^8.9.1", - "typescript": "^4.2.3" + "ts-node": "^10.9.2", + "typescript": "^5.5.4" + } + }, + "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/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "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/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, "node_modules/@quenk/assert-async": { @@ -61,29 +229,52 @@ } }, "node_modules/@quenk/noni": { - "version": "1.52.1", - "resolved": "https://registry.npmjs.org/@quenk/noni/-/noni-1.52.1.tgz", - "integrity": "sha512-7p9bEl80uPoa3EhH+5uWzeW8ocWlM7ADUfq66dD4uebHsls1mpYcBT8myuzf7CcKncnaMSDpAs2jxH+p19WOjw==" + "version": "1.52.15", + "resolved": "https://registry.npmjs.org/@quenk/noni/-/noni-1.52.15.tgz", + "integrity": "sha512-bF/A9cGLbHmP7Z0G0sCKmxljWuUEuwF0Ge6ux/h25R+ALLczSXbldkacQEib08xz9NsHM4P0fqDGJFABroglgg==" }, "node_modules/@quenk/potoo": { - "version": "3.1.7-0", - "resolved": "https://registry.npmjs.org/@quenk/potoo/-/potoo-3.1.7-0.tgz", - "integrity": "sha512-zMTuAv8VZFVSOeWGgEVs1gMvBv+MP2kBXE6o2COjdRx9sxtynQ6BS6m8qIfRfRISLDufihMb0n7wEPbgn9i5NA==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/@quenk/potoo/-/potoo-4.0.11.tgz", + "integrity": "sha512-eJjbJgQBP06hI7itlIU8rOgADDQELxM9oxOcvf5lLhkFoKYC4vnV0uB2TaEuwfzD+UQKZlmzRIXfdX1D4/noTw==", "dependencies": { - "@quenk/noni": "^1.43.3" + "@quenk/noni": "^1.52.15" } }, "node_modules/@quenk/test": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@quenk/test/-/test-2.5.0.tgz", - "integrity": "sha512-D0gUb7M/KumFRmJZIrnQdRlT01DMqEFdS3eKRp7r7lHGj2JeVqgJpnw5Kne7zZnd5KpCQqzIuKKheegaRujFUg==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@quenk/test/-/test-2.6.2.tgz", + "integrity": "sha512-yqzw00cmYpoD6vwqVNZhuniImv8SmG9UIG0yEmnMPDJMr7LQPBU5xY+gwtJXiqp1Yk9zY2IbWIknxOd1gvXtbA==", "dev": true, "dependencies": { - "@types/deep-equal": "^1.0.1", - "deep-equal": "^1.1.1", + "deep-equal": "^2.2.3", "json-stringify-safe": "^5.0.1" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "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.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/bluebird": { "version": "3.5.42", "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", @@ -108,9 +299,9 @@ } }, "node_modules/@types/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-KoooCrD56qlLskXPLGUiJxOMnv5l/8m7cQD2OxJ73NPMhuSz9PmvwRD6EpjDyKBVrdJDdQ4bQK7JFNHnNmax0w==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.7.tgz", + "integrity": "sha512-Fvuyi354Z+uayxzIGCwYTayFKocfV7TuDYZClCdIP9ckhvAu/ixDtCB6qx2TT0FKjPLf1f3P/J1rgf6lPs64mw==", "dependencies": { "@types/express": "*" } @@ -129,12 +320,6 @@ "@types/express-serve-static-core": "*" } }, - "node_modules/@types/deep-equal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/deep-equal/-/deep-equal-1.0.4.tgz", - "integrity": "sha512-tqdiS4otQP4KmY0PR3u6KbZ5EWvhNdUoS/jc93UuK23C220lOZ/9TvjfxdPcKvqwwDVtmtSCrnr0p/2dirAxkA==", - "dev": true - }, "node_modules/@types/express": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", @@ -147,9 +332,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.41", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", - "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", + "version": "4.19.5", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz", + "integrity": "sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -158,9 +343,9 @@ } }, "node_modules/@types/express-session": { - "version": "1.17.10", - "resolved": "https://registry.npmjs.org/@types/express-session/-/express-session-1.17.10.tgz", - "integrity": "sha512-U32bC/s0ejXijw5MAzyaV4tuZopCh/K7fPoUDyNbsRXHvPSeymygYD1RFL99YOLhF5PNOkzswvOTRaVHdL1zMw==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@types/express-session/-/express-session-1.18.0.tgz", + "integrity": "sha512-27JdDRgor6PoYlURY+Y5kCakqp5ulC0kmf7y+QwaY+hv9jEFuQOThgkjyA53RP3jmKuBsH5GR6qEfFmvb8mwOA==", "dev": true, "dependencies": { "@types/express": "*" @@ -171,15 +356,27 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/methods": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/methods/-/methods-1.1.4.tgz", + "integrity": "sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==", + "dev": true + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, "node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", + "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", "dev": true }, "node_modules/@types/morgan": { @@ -192,20 +389,29 @@ } }, "node_modules/@types/node": { - "version": "14.18.63", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", - "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==" + "version": "20.14.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.12.tgz", + "integrity": "sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/qs": { - "version": "6.9.10", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz", - "integrity": "sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==" + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -216,29 +422,220 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/@types/superagent": { - "version": "4.1.24", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.24.tgz", - "integrity": "sha512-mEafCgyKiMFin24SDzWN7yAADt4gt6YawFiNMp0QS5ZPboORfyxFt0s3VzJKhTaKg9py/4FUmrHLTNfJKt9Rbw==", + "version": "8.1.8", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.8.tgz", + "integrity": "sha512-nTqHJ2OTa7PFEpLahzSEEeFeqbMpmcN7OeayiOc7v+xk+/vyTKljRe+o4MPqSnPeRCMvtxuLG+5QqluUVQJOnA==", "dev": true, "dependencies": { - "@types/cookiejar": "*", - "@types/node": "*" + "@types/cookiejar": "^2.1.5", + "@types/methods": "^1.1.4", + "@types/node": "*", + "form-data": "^4.0.0" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/accepts": { @@ -253,22 +650,71 @@ "node": ">= 0.6" } }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/ansi-styles": { @@ -311,17 +757,57 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -345,12 +831,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bluebird": { @@ -363,7 +852,6 @@ "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -383,6 +871,19 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -394,12 +895,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -411,12 +912,6 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -426,18 +921,32 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -466,37 +975,40 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/cliui": { @@ -510,50 +1022,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -649,6 +1117,26 @@ "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", "dev": true }, + "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", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/csrf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/csrf/-/csrf-3.1.0.tgz", @@ -730,11 +1218,20 @@ } }, "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/decamelize": { @@ -750,17 +1247,29 @@ } }, "node_modules/deep-equal": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", - "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dev": true, "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", "is-date-object": "^1.0.5", "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", "object-is": "^1.1.5", "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.5.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -769,17 +1278,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { @@ -826,14 +1344,38 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -853,10 +1395,49 @@ "node": ">= 0.8" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -879,6 +1460,221 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -888,16 +1684,16 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -929,12 +1725,12 @@ } }, "node_modules/express-session": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz", - "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz", + "integrity": "sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ==", "dependencies": { - "cookie": "0.4.2", - "cookie-signature": "1.0.6", + "cookie": "0.6.0", + "cookie-signature": "1.0.7", "debug": "2.6.9", "depd": "~2.0.0", "on-headers": "~1.0.2", @@ -947,68 +1743,135 @@ } }, "node_modules/express-session/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, - "node_modules/express/node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "node_modules/express-session/node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==" + }, + "node_modules/express-session/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "ms": "2.0.0" } }, + "node_modules/express-session/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } }, - "node_modules/express/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">= 0.8" + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "dev": true }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -1034,6 +1897,19 @@ "node": ">= 0.8" } }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -1059,10 +1935,39 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -1146,49 +2051,109 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gopd": { @@ -1202,13 +2167,19 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "engines": { - "node": ">=4.x" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { @@ -1221,20 +2192,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -1254,12 +2225,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -1269,9 +2240,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -1314,10 +2285,45 @@ "node": ">=0.10.0" } }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", @@ -1329,6 +2335,20 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -1353,6 +2373,34 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1365,6 +2413,34 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -1390,12 +2466,12 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/is-glob": { @@ -1410,6 +2486,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1419,6 +2507,30 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1444,6 +2556,109 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1451,9 +2666,9 @@ "dev": true }, "node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { "argparse": "^2.0.1" @@ -1462,12 +2677,52 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1483,28 +2738,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { "node": ">=10" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" }, - "engines": { - "node": ">=10" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/make-error": { @@ -1526,6 +2779,15 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -1534,6 +2796,19 @@ "node": ">= 0.6" } }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -1565,9 +2840,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -1577,78 +2852,82 @@ } }, "node_modules/mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", + "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 10.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">= 14.0.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "ms": "2.1.2" + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=10" } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/morgan": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", @@ -1664,6 +2943,19 @@ "node": ">= 0.8.0" } }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/morgan/node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -1676,21 +2968,22 @@ } }, "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, - "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", @@ -1710,21 +3003,24 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -1742,6 +3038,24 @@ "node": ">= 0.4" } }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -1770,6 +3084,23 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1800,6 +3131,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -1826,11 +3169,29 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1843,6 +3204,51 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -1855,6 +3261,15 @@ "node": ">= 0.10" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -1869,6 +3284,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/random-bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", @@ -1898,7 +3333,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -1924,9 +3358,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { "picomatch": "^2.2.1" @@ -1936,14 +3370,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -1961,11 +3396,90 @@ "node": ">=0.10.0" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rndm": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", "integrity": "sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==" }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1991,13 +3505,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, "bin": { "semver": "bin/semver.js" }, @@ -2028,15 +3539,28 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -2057,28 +3581,31 @@ } }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2089,36 +3616,51 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "shebang-regex": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/statuses": { @@ -2129,6 +3671,18 @@ "node": ">= 0.8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -2139,28 +3693,29 @@ } }, "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-json-comments": { @@ -2179,7 +3734,7 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.3.1.tgz", "integrity": "sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==", - "deprecated": "Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .", + "deprecated": "Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net", "dev": true, "dependencies": { "component-emitter": "^1.3.0", @@ -2198,21 +3753,18 @@ "node": ">= 7.0.0" } }, - "node_modules/superagent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/superagent/node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "dependencies": { - "ms": "2.1.2" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 6" } }, "node_modules/superagent/node_modules/mime": { @@ -2227,27 +3779,24 @@ "node": ">=4.0.0" } }, - "node_modules/superagent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2269,28 +3818,46 @@ } }, "node_modules/ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "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", - "source-map-support": "^0.5.17", + "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" }, - "engines": { - "node": ">=6.0.0" - }, "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/ts-node/node_modules/diff": { @@ -2302,6 +3869,12 @@ "node": ">=0.3.1" } }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tsscmp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", @@ -2310,6 +3883,45 @@ "node": ">=0.6.x" } }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -2323,16 +3935,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uid-safe": { @@ -2346,6 +3958,11 @@ "node": ">= 0.8" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -2354,6 +3971,15 @@ "node": ">= 0.8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -2368,6 +3994,12 @@ "node": ">= 0.4.0" } }, + "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/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -2391,80 +4023,89 @@ "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, "dependencies": { - "string-width": "^1.0.2 || 2" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { @@ -2482,12 +4123,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2507,9 +4142,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -2530,50 +4165,6 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 75d22f0..bac63ec 100644 --- a/package.json +++ b/package.json @@ -20,20 +20,25 @@ "@types/bluebird": "^3.5.29", "@types/express": "^4.17.11", "@types/express-session": "^1.17.3", - "@types/mocha": "^8.2.1", + "@types/mocha": "^10.0.7", "@types/morgan": "^1.9.2", - "@types/node": "^14.18.5", - "@types/superagent": "^4.1.4", + "@types/node": "^20.14.12", + "@types/superagent": "^8.1.7", + "@typescript-eslint/eslint-plugin": "^5.53.0", "bluebird": "^3.7.2", "body-parser": "^1.19.0", - "mocha": "^8.3.2", + "eslint": "^8.34.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.7.0", + "prettier": "^3.2.5", "superagent": "^5.1.3", - "ts-node": "^8.9.1", - "typescript": "^4.2.3" + "ts-node": "^10.9.2", + "typescript": "^5.5.4" }, "dependencies": { - "@quenk/noni": "^1.42.0", - "@quenk/potoo": "^3.1.7-0", + "@quenk/noni": "^1.52.12", + "@quenk/potoo": "^4.0.11", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/csurf": "^1.9.36", diff --git a/src/app/api/control/actor.ts b/src/app/api/control/actor.ts index a730a71..6dff4a2 100644 --- a/src/app/api/control/actor.ts +++ b/src/app/api/control/actor.ts @@ -3,17 +3,11 @@ import { resolve } from 'path'; import { liftF } from '@quenk/noni/lib/control/monad/free'; import { Future, Run, pure } from '@quenk/noni/lib/control/monad/future'; import { compose, identity } from '@quenk/noni/lib/data/function'; -import { Constructor } from '@quenk/noni/lib/data/type/constructor'; -import { generateV4} from '@quenk/noni/lib/crypto/uuid'; +import { generateV4 } from '@quenk/noni/lib/crypto/uuid'; -import { - Callback as ResidentCallback -} from '@quenk/potoo/lib/actor/resident/immutable/callback'; import { Address } from '@quenk/potoo/lib/actor/address'; -import { Message } from '@quenk/potoo/lib/actor/message'; -import { Case } from '@quenk/potoo/lib/actor/resident/case'; +import { Message } from '@quenk/potoo/lib/actor'; -import { App } from '../../../app'; import { Api, Action, Context } from '../'; /** @@ -21,66 +15,41 @@ import { Api, Action, Context } from '../'; * @private */ export class Self extends Api { - - constructor(public next: (a: any) => A) { super(next); } + constructor(public next: (a: any) => A) { + super(next); + } map(f: (a: A) => B): Self { - return new Self(compose(this.next, f)); - } exec(ctx: Context): Future { - - return pure(this.next(ctx.module.self())); - + return pure(this.next(ctx.module.self)); } - } /** - * Tell + * Tell * @private */ -export class Tell extends Api{ - +export class Tell extends Api { constructor( public to: Address, public message: Message, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (a: A) => B): Tell { - return new Tell(this.to, this.message, f(this.next)); - } exec(ctx: Context): Future { - - return pure(ctx.module.tell(this.to, this.message)) - .map(() => this.next); - - } - -} - -class Callback extends ResidentCallback { - - constructor( - public pattern: Constructor, - public f: (a: A) => void, - public app: App) { super(app); } - - receive() { - - return [new Case(this.pattern, (a: A) => { this.f(a); }) ]; - - } - - run() { - + return pure(ctx.module.tell(this.to, this.message)).map( + () => this.next + ); } - } /** @@ -88,20 +57,17 @@ class Callback extends ResidentCallback { * expected. */ export class Request { - constructor( public from: Address, - public message: T) { } - + public message: T + ) {} } /** * Response to a Request */ export class Response { - - constructor(public value: T) { } - + constructor(public value: T) {} } /** @@ -109,42 +75,52 @@ export class Response { * @private */ export class Ask extends Api { - constructor( public to: Address, public message: Message, - public next: (a: any) => A) { super(next); } + public next: (a: any) => A + ) { + super(next); + } map(f: (a: A) => B): Ask { - return new Ask(this.to, this.message, compose(this.next, f)); - } exec(ctx: Context): Future { - let { to, message, next } = this; - return (>new Run(()=> new Promise((onSuccess) => { - - let id = generateV4(); - let cb = (t: Message) => onSuccess(t.value); - - ctx.module.spawn({ - id, - create: a => new Callback(Response, cb, a) - }); - - ctx.module.tell(to, - new Request(resolve(`${ctx.module.self()}/${id}`), message)); - - return () => { } - - }))) - .chain(v => pure(next(v))); - + return (>new Run( + () => + new Promise(onSuccess => { + let id = generateV4(); + + ctx.module.spawn({ + id, + run: async runtime => { + while (runtime.isValid()) { + let msg = await runtime.receive(); + + if (msg instanceof Response) { + onSuccess(msg.value); + break; + } + } + } + }); + + ctx.module.tell( + to, + new Request( + resolve(`${ctx.module.self}/${id}`), + message + ) + ); + + return () => {}; + }) + )).chain(v => pure(next(v))); } - } /** @@ -159,8 +135,7 @@ export const ask = (to: Address, m: Message): Action => /** * self provides the address of the module. */ -export const self = (): Action
=> - liftF(new Self(identity)); +export const self = (): Action
=> liftF(new Self(identity)); /** * tell sends a message to another actor. diff --git a/src/app/api/control/index.ts b/src/app/api/control/index.ts index 86601c0..0f6926d 100644 --- a/src/app/api/control/index.ts +++ b/src/app/api/control/index.ts @@ -11,49 +11,43 @@ import { Action, Api, Context } from '../'; * @private */ export class Value extends Api { - constructor( public value: Type, - public next: (a: Type) => A) { super(next); } + public next: (a: Type) => A + ) { + super(next); + } map(f: (a: A) => B): Value { - return new Value(this.value, compose(this.next, f)); - } exec(_: Context): Future { - return pure(this.next(this.value)); - } - } /** * Fork * @private */ -export class Fork extends Api{ - +export class Fork extends Api { constructor( public f: Future, - public next: (a: Type) => A) { super(next); } + public next: (a: Type) => A + ) { + super(next); + } map(f: (a: A) => B): Fork { - return new Fork(this.f, compose(this.next, f)); - } exec(_: Context): Future { - let { f, next } = this; return f.map(next); - } - } /** @@ -61,22 +55,21 @@ export class Fork extends Api{ * @private */ export class Next extends Api { - - constructor(public request: Request, public next: A) { super(next); } + constructor( + public request: Request, + public next: A + ) { + super(next); + } map(f: (n: A) => B): Next { - return new Next(this.request, f(this.next)); - } exec(ctx: Context): Future> { - ctx.request = this.request; return ctx.next(); - } - } /** @@ -84,21 +77,17 @@ export class Next extends Api { * @private */ export class Noop extends Api { - - constructor(public next: A) { super(next); } + constructor(public next: A) { + super(next); + } map(f: (n: A) => B): Noop { - return new Noop(f(this.next)); - } exec(_: Context): Future { - return pure(this.next); - } - } /** @@ -106,25 +95,21 @@ export class Noop extends Api { * @private */ export class Abort extends Api { - - constructor(public next: A) { super(next); } + constructor(public next: A) { + super(next); + } map(f: (n: A) => B): Abort { - return new Abort(f(this.next)); - } exec(c: Context): Future> { - return c.abort(); - } - } /** - * next gives the go ahead to interpret the + * next gives the go ahead to interpret the * actions of the next Filter chain. * * This action allows the Request in the context to be modified and @@ -136,11 +121,10 @@ export const next = (r: Request): Action => /** * noop (does nothing). */ -export const noop = (): Action => - liftF(new Noop(undefined)); +export const noop = (): Action => liftF(new Noop(undefined)); /** - * value wraps a value so that it is available to the next value in the + * value wraps a value so that it is available to the next value in the * chain. */ export const value = (value: A): Action => @@ -156,8 +140,7 @@ export const fork = (f: Future): Action => * abort ends the processing of the current filter chain. * * This halts the Context's chain and any chain it is directly part of. - * Note: If this API is used, then a response should be sent to the client + * Note: If this API is used, then a response should be sent to the client * first to avoid the browser waiting for a response. */ -export const abort = (): Action => - liftF(new Abort(undefined)); +export const abort = (): Action => liftF(new Abort(undefined)); diff --git a/src/app/api/csrf.ts b/src/app/api/csrf.ts index 75c1f3f..42945c2 100644 --- a/src/app/api/csrf.ts +++ b/src/app/api/csrf.ts @@ -10,26 +10,21 @@ import { Action, Api, Context } from './'; * @private */ export class GetToken extends Api { - - constructor(public next: (a: Type) => A) { super(next); } + constructor(public next: (a: Type) => A) { + super(next); + } map(f: (a: A) => B): GetToken { - return new GetToken(compose(this.next, f)); - } exec({ request }: Context): Future { - let token = request.toExpress().csrfToken(); return pure(this.next(token)); - } - } /** * getToken provides the current CSRF token. */ -export const getToken = (): Action => - liftF(new GetToken(identity)); +export const getToken = (): Action => liftF(new GetToken(identity)); diff --git a/src/app/api/index.ts b/src/app/api/index.ts index 9002f70..1207f38 100644 --- a/src/app/api/index.ts +++ b/src/app/api/index.ts @@ -1,11 +1,11 @@ /** - * In tendril, web requests are handled by executing a sequence of one or more + * In tendril, web requests are handled by executing a sequence of one or more * operations called actions. This is implemented in such a way that users - * of the framework do not directly respond to requests but rather give + * of the framework do not directly respond to requests but rather give * instructions to the framework on what to do which the framework will * figure out by interpreting the API results. * - * The flexibility of this approach allows us to introduce new features and + * The flexibility of this approach allows us to introduce new features and * APIs to tendril without having to modify the Request object or drastically * changing the design of the framework. Actions are returned from handler * functions which are executed based on the routing configuration of @@ -38,65 +38,61 @@ export type Action = Free, A>; /** * Context represents the context of the http request. - * + * * This is an internal API not directly exposed to request handlers. It * stores lower level APIs used to execute the work of the higher level [[Api]] * objects. */ export class Context { - constructor( public module: Module, public request: Request, public response: express.Response, public onError: express.NextFunction, - public filters: Filter[]) { } - - /** - * abort the processing of filters for this Context. - */ - abort() : Future>{ + public filters: Filter[] + ) {} + /** + * abort the processing of filters for this Context. + */ + abort(): Future> { this.filters = []; return pure(freePure(undefined)); - - } + } /** * next provides the next Action to be interpreted. */ next(): Future> { - - return (this.filters.length > 0) ? - pure((>this.filters.shift())(this.request)) : - raise(new Error(`${this.module.self()}: No more filters!`)); - + return this.filters.length > 0 + ? pure((>this.filters.shift())(this.request)) + : raise(new Error(`${this.module.self}: No more filters!`)); } /** * run processes the next filter or action in the chain. */ run(): void { - - this - .next() - .chain(n => n.foldM(() => pure(undefined), n => n.exec(this))) - .fork(this.onError, () => { }); - + this.next() + .chain(n => + n.foldM( + () => pure(undefined), + n => n.exec(this) + ) + ) + .fork(this.onError, () => {}); } - } /** * Api represents an instruction to the tendril framework to carry out. * - * An Api is usually an instruction to send a response to the requesting client + * An Api is usually an instruction to send a response to the requesting client * but are also used to interact with other APIs to do things like retrieve * a database connection from the connection pool for example. */ export abstract class Api implements Functor { - - constructor(public next: A | ((a: X) => A)) { } + constructor(public next: A | ((a: X) => A)) {} abstract map(f: (n: A) => B): Api; @@ -104,7 +100,6 @@ export abstract class Api implements Functor { * exec the steps needed to produce the Api. */ abstract exec(ctx: Context): Future | Future>; - } /** diff --git a/src/app/api/pool.ts b/src/app/api/pool.ts index b914810..a261169 100644 --- a/src/app/api/pool.ts +++ b/src/app/api/pool.ts @@ -8,31 +8,32 @@ import { Future, raise } from '@quenk/noni/lib/control/monad/future'; import { liftF } from '@quenk/noni/lib/control/monad/free'; import { compose, identity } from '@quenk/noni/lib/data/function'; -import { Api, Action,Context } from './'; +import { Api, Action, Context } from './'; /** * Checkout action. */ export class Checkout extends Api { - - constructor(public name: string, public next: (x: any) => A) { super(next); } + constructor( + public name: string, + public next: (x: any) => A + ) { + super(next); + } map(f: (n: A) => B): Checkout { - return new Checkout(this.name, compose(this.next, f)); - } exec({ module }: Context): Future { - return >module.app.pool .get(this.name) .map(c => c.checkout().map(this.next)) - .orJust(() => raise(new Error(`Unknown connection:"${this.name}"!`))) + .orJust(() => + raise(new Error(`Unknown connection:"${this.name}"!`)) + ) .get(); - } - } /** diff --git a/src/app/api/request.ts b/src/app/api/request.ts index a022b24..b19584c 100644 --- a/src/app/api/request.ts +++ b/src/app/api/request.ts @@ -13,7 +13,11 @@ import { import { PRSStorage } from './storage/prs'; import { Action } from './'; import { RouteConf } from '../module'; -import { CookieManager, CookieStorage, MapCookieManager } from './storage/cookie'; +import { + CookieManager, + CookieStorage, + MapCookieManager +} from './storage/cookie'; /** * Method @@ -22,7 +26,7 @@ export type Method = 'get' | 'post' | 'put' | 'patch' | 'delete'; /** * Filter functions are applied to the request. - * + * * These can either transform the request or terminate. */ export type Filter = (r: Request) => Action; @@ -37,116 +41,112 @@ export type ErrorFilter = (e: Error, r: Request) => Action; * a new Request instance from partial data. */ export interface PartialRequest extends Partial { - /** * routeConf specifies the route configuration that would have yielded this * request. */ - routeConf?: RouteConf + routeConf?: RouteConf; /** - * prsData specifies the PRSStorage instance to use or an object that will + * prsData specifies the PRSStorage instance to use or an object that will * be used as initial data. */ - prsData?: PRSStorage | Object, + prsData?: PRSStorage | Object; /** * sessionStorage specifies the SessionStorage instance to use or an object * that will be used as initial data. */ - sessionData?: SessionStorage | Object + sessionData?: SessionStorage | Object; /** * cookieManager for setting and clearing cookies. */ - cookieManager?: CookieManager - + cookieManager?: CookieManager; } /** * Request represents a client request. */ export interface Request { - /** * method of the request. */ - method: string, + method: string; /** * path of the request. */ - path: string, + path: string; /** * url of the request. */ - url: string, + url: string; /** * params is an object containing properties mapped the named route * “parameters”. */ - params: Record, + params: Record; /** * query string of the request parsed into an object. * - * This should NEVER be used directly without first proper validating + * This should NEVER be used directly without first proper validating * because it is based on user input. Object is used here so middleware and * filters can shape it as needed. * * Empty object if query string parsing is disabled. */ - query: Object + query: Object; /** * body of the request. - * + * * The actual value depends on the body parser middleware enabled. */ - body: Value, + body: Value; /** * cookies sent with the request if the cookie parser is enabled. */ - cookies: CookieStorage, + cookies: CookieStorage; /** * hostname derived from the Host HTTP header. */ - hostname: string, + hostname: string; /** * remoteAddress of the request originator. */ - remoteAddress: string, + remoteAddress: string; /** * protocol of the request. */ - protocol: string, + protocol: string; /** * prs storage instance for the Request. */ - prs: PRSStorage, + prs: PRSStorage; /** * session storage instance for the Request. */ - session: SessionStorage, + session: SessionStorage; /** * route is the RouteConf object that was used to generate the Request. */ - route: RouteConf, + route: RouteConf; /** * toExpress provides the **express** framework request object. */ - toExpress(): express.Request - + toExpress(): express.Request; } const defaults: PartialRequest = { @@ -154,7 +154,7 @@ const defaults: PartialRequest = { method: 'get', path: '/', filters: [], - tags: {}, + tags: {} }, method: 'GET', path: '/', @@ -168,14 +168,13 @@ const defaults: PartialRequest = { ip: '127.0.0.1', protocol: 'http', prsData: {}, - sessionData: {}, -} + sessionData: {} +}; /** * ClientRequest class. */ export class ClientRequest implements Request { - constructor( public route: RouteConf, public method: string, @@ -190,7 +189,8 @@ export class ClientRequest implements Request { public protocol: string, public prs: PRSStorage, public session: SessionStorage, - public expressRequest: express.Request) { } + public expressRequest: express.Request + ) {} /** * fromExpress constructs a ClientRequest from the express framework's @@ -199,8 +199,8 @@ export class ClientRequest implements Request { static fromExpress( req: express.Request, res: express.Response, - route: RouteConf): ClientRequest { - + route: RouteConf + ): ClientRequest { return new ClientRequest( route, req.method, @@ -215,36 +215,46 @@ export class ClientRequest implements Request { req.protocol, new PRSStorage(clone({ tags: route.tags })), EnabledSessionStorage.fromExpress(req), - req); - + req + ); } /** - * fromPartial produces a ClientRequest using defaults merged with the + * fromPartial produces a ClientRequest using defaults merged with the * specified PartialRequest. * * This method exists mainly for testing and should not be use in production. */ static fromPartial(req: PartialRequest): ClientRequest { - let opts = merge(defaults, req); - opts.prsData = (isObject(opts.prsData) && - (opts.prsData instanceof PRSStorage)) ? - opts.prsData : - new PRSStorage(rmerge({ tags: (opts.routeConf).tags }, - opts.prsData || {})) - - opts.sessionData = isObject(opts.sessionData) && - (opts.sessionData instanceof EnabledSessionStorage) || - (opts.sessionData instanceof DisabledSessionStorage) ? - opts.sessionData : - new EnabledSessionStorage({ - [SESSION_DATA]: opts.sessionData || {} - }); - - let cookies = new CookieStorage(opts.signedCookies, opts.cookieManager ? - opts.cookieManager: new MapCookieManager(opts.signedCookies)); + opts.prsData = + isObject(opts.prsData) && opts.prsData instanceof PRSStorage + ? opts.prsData + : new PRSStorage( + rmerge( + { tags: (opts.routeConf).tags }, + opts.prsData || {} + ) + ); + + opts.sessionData = + (isObject(opts.sessionData) && + opts.sessionData instanceof EnabledSessionStorage) || + opts.sessionData instanceof DisabledSessionStorage + ? opts.sessionData + : new EnabledSessionStorage({ + [SESSION_DATA]: opts.sessionData || {} + }); + + let signedCookies = opts.signedCookies ?? {}; + + let cookies = new CookieStorage( + signedCookies, + opts.cookieManager + ? opts.cookieManager + : new MapCookieManager(signedCookies) + ); let r = opts; @@ -256,20 +266,17 @@ export class ClientRequest implements Request { r.params, >r.query, r.body, - cookies, + cookies, r.hostname, r.ip || '', r.protocol, opts.prsData, opts.sessionData, - r); - + r + ); } toExpress() { - return this.expressRequest; - } - } diff --git a/src/app/api/response/index.ts b/src/app/api/response/index.ts index cbbac46..0503003 100644 --- a/src/app/api/response/index.ts +++ b/src/app/api/response/index.ts @@ -27,289 +27,245 @@ export const PRS_VIEW_CONTEXT = '$view.context'; * Headers map. */ export interface Headers { - - [key: string]: string - + [key: string]: string; } /** * Response terminates the http request with an actual HTTP response. */ export abstract class Response extends Api { - constructor( public body: Maybe, public abort: boolean, - public next: A) { super(next); } + public next: A + ) { + super(next); + } abstract status: status.Status; abstract map(f: (a: A) => AA): Response; marshal(body: B): Type { - return body; - } exec(ctx: Context): Future { - let that = this; let { status, body, next } = that; - return doFuture(function*() { - + return doFuture(function* () { yield attempt(() => ctx.response.status(status)); - if (body.isJust()) - ctx.response.send(that.marshal(body.get())); + if (body.isJust()) ctx.response.send(that.marshal(body.get())); ctx.response.end(); return >(that.abort ? ctx.abort() : pure(next)); - }); - } - } /** * Header sets header values to send out. */ export class Header extends Api { - - constructor(public headers: Headers, public next: A) { super(next); } + constructor( + public headers: Headers, + public next: A + ) { + super(next); + } map(f: (a: A) => B): Header { - return new Header(this.headers, f(this.next)); - } exec(ctx: Context): Future { - ctx.response.set(this.headers); return pure(this.next); - } - } /** * Accepted response. */ export class Accepted extends Response { - status = status.ACCEPTED; map(f: (a: A) => AA): Accepted { - return new Accepted(this.body, this.abort, f(this.next)); - } - } /** * BadRequest response. */ export class BadRequest extends Response { - status = status.BAD_REQUEST; map(f: (a: A) => AA): BadRequest { - return new BadRequest(this.body, this.abort, f(this.next)); - } - } /** * Conflict response. */ export class Conflict extends Response { - status = status.CONFLICT; map(f: (a: A) => AA): Conflict { - return new Conflict(this.body, this.abort, f(this.next)); - } - } /** * Created response. */ export class Created extends Response { - status = status.CREATED; map(f: (a: A) => AA): Created { - return new Created(this.body, this.abort, f(this.next)); - } - } /** * InternalServerError response. */ export class InternalServerError extends Response { - status = status.INTERNAL_SERVER_ERROR; marshal(value: B) { - - if ((value instanceof Error) && - !process.env.TENDRIL_DISABLE_500_ERROR_LOG) + if ( + value instanceof Error && + !process.env.TENDRIL_DISABLE_500_ERROR_LOG + ) console.error(value); return process.env.TENDRIL_SEND_500_ERRORS ? value : ''; - } map(f: (a: A) => C): InternalServerError { - return new InternalServerError(this.body, this.abort, f(this.next)); - } - } /** * Forbiddden response. */ export class Forbidden extends Response { - status = status.FORBIDDEN; map(f: (a: A) => AA): Forbidden { - return new Forbidden(this.body, this.abort, f(this.next)); - } - } /** * NoContent response. */ export class NoContent extends Response { - constructor( public abort: boolean, - public next: A) { super(nothing(), abort, next); } + public next: A + ) { + super(nothing(), abort, next); + } status = status.NO_CONTENT; map(f: (a: A) => B): NoContent { - return new NoContent(this.abort, f(this.next)); - } - } /** * NotFound response. */ export class NotFound extends Response { - status = status.NOT_FOUND; map(f: (a: A) => AA): NotFound { - return new NotFound(this.body, this.abort, f(this.next)); - } - } /** * Ok action. */ export class Ok extends Response { - status = status.OK; map(f: (a: A) => AA): Ok { - return new Ok(this.body, this.abort, f(this.next)); - } - } /** * Redirect action. */ export class Redirect extends Api { - constructor( public url: string, public code: number, public abort: boolean, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (a: A) => B): Redirect { - return new Redirect(this.url, this.code, this.abort, f(this.next)); - } exec(ctx: Context): Future { - - return attempt(() => ctx.response.redirect(this.url, this.code)) - .chain(() => >(this.abort ? ctx.abort() : pure(this.next))); - + return attempt(() => ctx.response.redirect(this.url, this.code)).chain( + () => >(this.abort ? ctx.abort() : pure(this.next)) + ); } - } /** * Unauthorized response. */ export class Unauthorized extends Response { - status = status.UNAUTHORIZED; map(f: (a: A) => AA): Unauthorized { - return new Unauthorized(this.body, this.abort, f(this.next)); - } - } /** * Show action. */ export class Show extends Api { - constructor( public view: string, public context: Maybe, public status: status.Status, public abort: boolean, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (a: A) => B): Show { - - return new Show(this.view, this.context, this.status, this.abort, - f(this.next)); - + return new Show( + this.view, + this.context, + this.status, + this.abort, + f(this.next) + ); } exec(ctx: Context): Future { - let that = this; let { response, module, request } = ctx; - let self = module.self(); + let self = module.self; let mModule = getModule(module.app.modules, self); if (mModule.isNothing()) @@ -318,8 +274,9 @@ export class Show extends Api { let mshow = mModule.get().show; if (mshow.isNothing()) - return raise(new Error(`${module.self()}: ` + - `No view engine configured!`)); + return raise( + new Error(`${module.self}: ` + `No view engine configured!`) + ); let f = mshow.get(); let ctx0 = request.prs.getOrElse(PRS_VIEW_CONTEXT, {}); @@ -327,19 +284,15 @@ export class Show extends Api { let { view, status, next } = this; - return doFuture(function*() { - + return doFuture(function* () { let c = yield f(view, merge(ctx0, Object(ctx1))); response.set(headers.CONTENT_TYPE, c.type); response.status(status); response.write(c.content); response.end(); return >(that.abort ? ctx.abort() : pure(next)); - }); - } - } /** @@ -362,7 +315,8 @@ export const show = ( view: string, context?: C, status = 200, - abort = true): Action => + abort = true +): Action => liftF(new Show(view, fromNullable(context), status, abort, undefined)); /** @@ -423,7 +377,7 @@ export const unauthorized = (body?: A, abort = true): Action => export const internalError = (body?: object, abort = true): Action => liftF(new InternalServerError(fromNullable(body), abort, undefined)); -export { internalError as error } +export { internalError as error }; /** * forbidden sends the "FORBIDDEN" status to the client with optional body. @@ -472,5 +426,5 @@ export const ok = (body?: A, abort = true): Action => export const redirect = ( url: string, code: number, - abort = true): Action => - liftF(new Redirect(url, code, abort, undefined)); + abort = true +): Action => liftF(new Redirect(url, code, abort, undefined)); diff --git a/src/app/api/storage/cookie.ts b/src/app/api/storage/cookie.ts index 1650e5a..28f7efb 100644 --- a/src/app/api/storage/cookie.ts +++ b/src/app/api/storage/cookie.ts @@ -21,7 +21,7 @@ export type CookieName = string; */ export type CookieValue = string; -/** +/** * CookieOptions type. */ export type CookieOptions = express.CookieOptions; @@ -30,17 +30,19 @@ export type CookieOptions = express.CookieOptions; * CookieManager is the Response API with all the extra stuff removed. */ export interface CookieManager { - /** * cookie sets a cookie */ - cookie(key: CookieName, value: CookieValue, opts: CookieOptions): CookieManager + cookie( + key: CookieName, + value: CookieValue, + opts: CookieOptions + ): CookieManager; /** * clearCookie clears a cookie. */ - clearCookie(key: CookieName, opts?: CookieOptions): CookieManager - + clearCookie(key: CookieName, opts?: CookieOptions): CookieManager; } /** @@ -50,82 +52,71 @@ export interface CookieManager { * Only signed cookies are supported. */ export class CookieStorage { - - constructor(public data: Record, public manager: CookieManager) { } + constructor( + public data: Record, + public manager: CookieManager + ) {} /** * get the value of a cookie if it exists. */ get(key: CookieName): Maybe { - return fromNullable(this.data[key]); - } /** * getOrElse returns a cookies value if set or the alternative. */ getOrElse(key: CookieName, alt: CookieValue): CookieValue { - - return this.get(key).orJust(() => alt).get(); - + return this.get(key) + .orJust(() => alt) + .get(); } /** * exists tests if a cookie is set and has a value. */ exists(key: CookieName): boolean { - return this.get(key).isJust(); - } /** * set a cookie. */ set(key: CookieName, value: CookieValue, opts: express.CookieOptions = {}) { - this.manager.cookie(key, value, opts); return this; - } /** * remove a cookie. */ remove(key: CookieName) { - this.manager.clearCookie(key); return this; - } - } /** * @private */ export class MapCookieManager { - - constructor( - public data:Record, - public opts:Record ={}){} + constructor( + public data: Record, + public opts: Record = {} + ) {} cookie(key: CookieName, value: CookieValue, opts: CookieOptions) { - - this.data[key] = value; - this.opts[key] = opts; - return this; - + this.data[key] = value; + this.opts[key] = opts; + return this; } clearCookie(key: CookieName, _?: CookieOptions): CookieManager { - - delete this.data[key]; - delete this.opts[key]; - return this; - + delete this.data[key]; + delete this.opts[key]; + return this; } } diff --git a/src/app/api/storage/index.ts b/src/app/api/storage/index.ts index 287c685..e681bfc 100644 --- a/src/app/api/storage/index.ts +++ b/src/app/api/storage/index.ts @@ -1,45 +1,43 @@ -import { Object,Value } from '@quenk/noni/lib/data/jsonx'; +import { Object, Value } from '@quenk/noni/lib/data/jsonx'; import { Maybe } from '@quenk/noni/lib/data/maybe'; /** * Storage API for persisting variable data between handlers. */ export interface Storage { - /** * get a value from storage. */ - get(key: string): Maybe + get(key: string): Maybe; /** - * getOrElse provides a value from storage or the alternative if not + * getOrElse provides a value from storage or the alternative if not * found. */ - getOrElse(key: string, alt: Value): Value + getOrElse(key: string, alt: Value): Value; /** * getAll returns a copy of all the values in storage. */ - getAll(): Object + getAll(): Object; /** * set the value of a key in storage. */ - set(key: string, value: Value): Storage + set(key: string, value: Value): Storage; /** * exists tests whether a key exists in storage. */ - exists(key: string): boolean + exists(key: string): boolean; /** * remove a key from storage. */ - remove(key: string): Storage + remove(key: string): Storage; /** * reset the storage. */ - reset(): Storage - + reset(): Storage; } diff --git a/src/app/api/storage/prs.ts b/src/app/api/storage/prs.ts index aa1b3a7..a46ad77 100644 --- a/src/app/api/storage/prs.ts +++ b/src/app/api/storage/prs.ts @@ -1,5 +1,5 @@ /** - * The Per Request Storage module (PRS) provides an API for storing small + * The Per Request Storage module (PRS) provides an API for storing small * amounts of data that exist only for the duration of a request. * * This APIs primary purpose is to provide a way for filters to share data @@ -25,22 +25,20 @@ import { Storage } from './'; * @private */ export class Get extends Api { - - constructor(public key: path.Path, - public next: (v: Type) => A) { super(next); } + constructor( + public key: path.Path, + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): Get { - return new Get(this.key, compose(this.next, f)); - } exec(ctx: Context): Future { - return pure(this.next(ctx.request.prs.get(this.key))); - } - } /** @@ -48,27 +46,21 @@ export class Get extends Api { * @private */ export class GetOrElse extends Api { - constructor( public key: path.Path, public value: Value, - public next: (v: Type) => A) { super(next); } + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): GetOrElse { - return new GetOrElse(this.key, this.value, compose(this.next, f)); - } exec(ctx: Context): Future { - - return pure(this.next(ctx.request.prs.getOrElse( - this.key, - this.value - ))); - + return pure(this.next(ctx.request.prs.getOrElse(this.key, this.value))); } - } /** @@ -76,25 +68,22 @@ export class GetOrElse extends Api { * @private */ export class Set extends Api { - constructor( public key: path.Path, public value: Value, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (n: A) => B): Set { - return new Set(this.key, this.value, f(this.next)); - } exec(ctx: Context): Future { - ctx.request.prs.set(this.key, this.value); return pure(this.next); - } - } /** @@ -102,24 +91,21 @@ export class Set extends Api { * @private */ export class Remove extends Api { - constructor( public key: path.Path, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (n: A) => B): Remove { - return new Remove(this.key, f(this.next)); - } exec(ctx: Context): Future { - ctx.request.prs.remove(this.key); return pure(this.next); - } - } /** @@ -127,23 +113,20 @@ export class Remove extends Api { * @private */ export class Exists extends Api { - constructor( public key: path.Path, - public next: (v: Type) => A) { super(next); } + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): Exists { - return new Exists(this.key, compose(this.next, f)); - } exec(ctx: Context): Future { - return pure(this.next(ctx.request.prs.exists(this.key))); - } - } /** @@ -152,42 +135,30 @@ export class Exists extends Api { * This is used behind the scens to provide the prs api. */ export class PRSStorage implements Storage { - - constructor(public data: Object = {}) { } + constructor(public data: Object = {}) {} get(key: string): Maybe { - return path.get(key, this.data); } getOrElse(key: string, alt: Value): Value { - return path.getDefault(key, this.data, alt); - } getAll(): Object { - return clone(this.data); - - } exists(key: string): boolean { - return path.get(key, this.data).isJust(); - } set(key: string, value: Value): PRSStorage { - this.data = path.set(key, value, this.data); return this; - } remove(key: string): PRSStorage { - let prs = path.flatten(this.data); delete prs[key]; @@ -195,16 +166,12 @@ export class PRSStorage implements Storage { this.data = path.unflatten(prs); return this; - } reset(): PRSStorage { - this.data = {}; return this; - } - } /** diff --git a/src/app/api/storage/session.ts b/src/app/api/storage/session.ts index c1e386c..6738c71 100644 --- a/src/app/api/storage/session.ts +++ b/src/app/api/storage/session.ts @@ -35,41 +35,39 @@ export const SESSION_DESCRIPTORS = 'tendril.$descriptors'; * property. */ export interface Descriptor { - /** * ttl if set is the number of requests a session value should be retained * for. When this reaches zero the propety will be automatically removed. */ - ttl?: number - + ttl?: number; } /** - * SessionStorage acts as a bridge between the tendril applications and + * SessionStorage acts as a bridge between the tendril applications and * the underlying express session store API. */ export interface SessionStorage extends Storage { - /** * isEnabled returns true if session storage is enabled, false otherwise. */ - isEnabled(): boolean + isEnabled(): boolean; /** - * setWithDescriptor sets the value of a key in session storage along with + * setWithDescriptor sets the value of a key in session storage along with * a descriptor. */ setWithDescriptor( key: string, value: Value, - desc: Descriptor): SessionStorage + desc: Descriptor + ): SessionStorage; /** * save the session data. * * Call this method to immediately persist any data written to the session. */ - save(): Future + save(): Future; /** * regenerate the session. @@ -78,15 +76,14 @@ export interface SessionStorage extends Storage { * supplied by the client and issue a new one. All data stored in the * session will be lost, including data not set through this API. */ - regenerate(): Future + regenerate(): Future; /** * destroy the session. * * Everything comes to an end here. */ - destroy(): Future - + destroy(): Future; } /** @@ -94,23 +91,20 @@ export interface SessionStorage extends Storage { * @private */ export class Get extends Api { - constructor( public key: path.Path, - public next: (v: Type) => A) { super(next); } + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): Get { - return new Get(this.key, compose(this.next, f)); - } exec(ctx: Context): Future { - return pure(this.next(ctx.request.session.get(this.key))); - } - } /** @@ -118,26 +112,23 @@ export class Get extends Api { * @private */ export class GetOrElse extends Api { - constructor( public key: path.Path, public value: Value, - public next: (v: Type) => A) { super(next); } + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): GetOrElse { - return new GetOrElse(this.key, this.value, compose(this.next, f)); - } exec(ctx: Context): Future { - - return pure(this.next( - ctx.request.session.getOrElse(this.key, this.value) - )); - + return pure( + this.next(ctx.request.session.getOrElse(this.key, this.value)) + ); } - } /** @@ -145,26 +136,23 @@ export class GetOrElse extends Api { * @private */ export class Set extends Api { - constructor( public key: path.Path, public value: Value, public desc: Descriptor, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (n: A) => B): Set { - return new Set(this.key, this.value, this.desc, f(this.next)); - } exec(ctx: Context): Future { - ctx.request.session.setWithDescriptor(this.key, this.value, this.desc); return pure(this.next); - } - } /** @@ -172,24 +160,21 @@ export class Set extends Api { * @private */ export class Remove extends Api { - constructor( public key: path.Path, - public next: A) { super(next); } + public next: A + ) { + super(next); + } map(f: (n: A) => B): Remove { - return new Remove(this.key, f(this.next)); - } exec(ctx: Context): Future { - ctx.request.session.remove(this.key); return pure(this.next); - } - } /** @@ -197,22 +182,20 @@ export class Remove extends Api { * @private */ export class Exists extends Api { - - constructor(public key: path.Path, - public next: (v: Type) => A) { super(next); } + constructor( + public key: path.Path, + public next: (v: Type) => A + ) { + super(next); + } map(f: (n: A) => B): Exists { - return new Exists(this.key, compose(this.next, f)); - } exec(ctx: Context): Future { - return pure(this.next(ctx.request.session.exists(this.key))); - } - } /** @@ -220,25 +203,17 @@ export class Exists extends Api { * @private */ export class Regenerate extends Api { - - constructor(public next: A) { super(next); } + constructor(public next: A) { + super(next); + } map(f: (n: A) => B): Regenerate { - return new Regenerate(f(this.next)); - } exec(ctx: Context): Future { - - return ctx - .request - .session - .regenerate() - .chain(() => pure(this.next)); - + return ctx.request.session.regenerate().chain(() => pure(this.next)); } - } /** @@ -246,25 +221,17 @@ export class Regenerate extends Api { * @private */ export class Destroy extends Api { - - constructor(public next: A) { super(next); } + constructor(public next: A) { + super(next); + } map(f: (n: A) => B): Destroy { - return new Destroy(f(this.next)); - } exec(ctx: Context): Future { - - return ctx - .request - .session - .destroy() - .chain(() => pure(this.next)); - + return ctx.request.session.destroy().chain(() => pure(this.next)); } - } /** @@ -272,137 +239,101 @@ export class Destroy extends Api { * @private */ export class Save extends Api { - - constructor(public next: A) { super(next); } + constructor(public next: A) { + super(next); + } map(f: (n: A) => B): Save { - return new Save(f(this.next)); - } exec(ctx: Context): Future { - - return ctx - .request - .session - .save() - .chain(() => pure(this.next)); - + return ctx.request.session.save().chain(() => pure(this.next)); } - } /** * @private */ export class DisabledSessionStorage implements SessionStorage { - warn(method: string) { - console.warn( `[DisabledSessionStorage#${method}]: session storage is not enabled!` ); - } isEnabled() { - return false; - } get(_key: string): Maybe { - this.warn('get'); return nothing(); - } getOrElse(_key: string, alt: Value): Value { - this.warn('getOrElse'); return alt; - } getAll(): Object { - this.warn('getAll'); return {}; - } exists(_key: string): boolean { - this.warn('exists'); return false; - } set(_key: string, _value: Value): DisabledSessionStorage { - this.warn('set'); return this; - } setWithDescriptor( _key: string, _value: Value, - _desc: Descriptor): DisabledSessionStorage { - + _desc: Descriptor + ): DisabledSessionStorage { this.warn('setWithDescriptor'); return this; - } remove(_: string): DisabledSessionStorage { - this.warn('remove'); return this; - } reset(): DisabledSessionStorage { - this.warn('reset'); return this; - } save(): Future { - this.warn('save'); return pure(undefined); - } regenerate(): Future { - this.warn('regenerate'); return pure(undefined); - } destroy(): Future { - this.warn('destroy'); return pure(undefined); - } - } /** * EnabledSessionStorage class. */ export class EnabledSessionStorage implements SessionStorage { - /** * @private */ - constructor(public data: Object) { } + constructor(public data: Object) {} /** * fromExpress constructs a SessionStorage instance from an express @@ -412,72 +343,54 @@ export class EnabledSessionStorage implements SessionStorage { * provided instead. */ static fromExpress(r: express.Request): SessionStorage { - - return isObject(r.session) ? - new EnabledSessionStorage(r.session) : - new DisabledSessionStorage(); - + return isObject(r.session) + ? new EnabledSessionStorage((r.session)) + : new DisabledSessionStorage(); } /** * @private */ target(): Object { - - return (this.data && this.data[SESSION_DATA] || {}); - + return ((this.data && this.data[SESSION_DATA]) || {}); } /** * @private */ descriptors(): Object { - - return (this.data && this.data[SESSION_DESCRIPTORS] || {}); - + return ((this.data && this.data[SESSION_DESCRIPTORS]) || {}); } isEnabled(): boolean { - return isObject(this.data); - } get(key: string): Maybe { - return path.get(key, this.target()); - } getOrElse(key: string, alt: Value): Value { - return path.getDefault(key, this.target(), alt); - } - getAll() : Object { - - return clone(this.target()); - + getAll(): Object { + return clone(this.target()); } exists(key: string): boolean { - return path.get(key, this.target()).isJust(); - } set(key: string, value: Value): EnabledSessionStorage { - return this.setWithDescriptor(key, value, {}); - } setWithDescriptor( key: string, value: Value, - desc: Descriptor): EnabledSessionStorage { - + desc: Descriptor + ): EnabledSessionStorage { let target = this.target(); let descs = this.descriptors(); @@ -488,120 +401,105 @@ export class EnabledSessionStorage implements SessionStorage { this.data[SESSION_DESCRIPTORS] = descs; return this; - } remove(key: string): EnabledSessionStorage { - let target = this.target(); let descs = this.descriptors(); - this.data[SESSION_DATA] = - rcompact(path.set(key, undefined, target)); + this.data[SESSION_DATA] = rcompact( + path.set(key, undefined, target) + ); delete descs[key]; this.data[SESSION_DESCRIPTORS] = descs; return this; - } reset(): EnabledSessionStorage { - this.data[SESSION_DATA] = {}; return this; - } save(): Future { - - return isFunction(this.data.save) ? - fromCallback(cb => (this.data.save)(cb)) : - pure(undefined); - + return isFunction(this.data.save) + ? fromCallback(cb => ((this.data.save))(cb)) + : pure(undefined); } regenerate(): Future { - - return isFunction(this.data.regenerate) ? - fromCallback(cb => (this.data.regenerate)(cb)) : - pure(undefined); - + return isFunction(this.data.regenerate) + ? fromCallback(cb => ((this.data.regenerate))(cb)) + : pure(undefined); } destroy(): Future { - - return isFunction(this.data.destroy) ? - fromCallback(cb => (this.data.destroy)(cb)) : - pure(undefined); - + return isFunction(this.data.destroy) + ? fromCallback(cb => ((this.data.destroy))(cb)) + : pure(undefined); } - } /** * @private */ export const getSessionValue = (session: Object, key: string) => { - let data = (session[SESSION_DATA] || {}); return path.get(key, data); - -} +}; /** * @private */ export const getSessionValueAsString = (session: Object, key: string) => { - let data = (session[SESSION_DATA] || {}); return path.getString(key, data); - -} +}; /** * @private */ -export const getSessionValueOrElse = - (session: Object, key: string, other: Value) => { - - let data = (session[SESSION_DATA] || {}); - return path.getDefault(key, data, other); - - } +export const getSessionValueOrElse = ( + session: Object, + key: string, + other: Value +) => { + let data = (session[SESSION_DATA] || {}); + return path.getDefault(key, data, other); +}; /** * @private */ -export const setSessionValue = - (session: Object, key: string, value: Value, desc: Descriptor) => { +export const setSessionValue = ( + session: Object, + key: string, + value: Value, + desc: Descriptor +) => { + let data = (session[SESSION_DATA] || {}); + let descs = (session[SESSION_DESCRIPTORS] || {}); - let data = (session[SESSION_DATA] || {}); - let descs = (session[SESSION_DESCRIPTORS] || {}); + session[SESSION_DATA] = path.set(key, value, data); - session[SESSION_DATA] = path.set(key, value, data); - - descs[key] = desc; - session[SESSION_DESCRIPTORS] = descs; - - } + descs[key] = desc; + session[SESSION_DESCRIPTORS] = descs; +}; /** * @private */ export const deleteSessionKey = (session: Object, key: string) => { - let data = (session[SESSION_DATA] || {}); let descs = (session[SESSION_DESCRIPTORS] || {}); - session[SESSION_DATA] = - rcompact(path.set(key, undefined, data)); + session[SESSION_DATA] = rcompact(path.set(key, undefined, data)); delete descs[key]; session[SESSION_DESCRIPTORS] = descs; - -} +}; /** * get a value from session by key. @@ -621,9 +519,11 @@ export const getOrElse = (key: path.Path, value: Value): Action => /** * set a value for a key in the session. */ -export const set = - (key: path.Path, value: Value, desc: Descriptor = {}): Action => - liftF(new Set(key, value, desc, undefined)); +export const set = ( + key: path.Path, + value: Value, + desc: Descriptor = {} +): Action => liftF(new Set(key, value, desc, undefined)); /** * remove a value from the session. @@ -646,8 +546,7 @@ export const regenerate = (): Action => /** * destroy the session. */ -export const destroy = (): Action => - liftF(new Destroy(undefined)); +export const destroy = (): Action => liftF(new Destroy(undefined)); /** * Save session data. @@ -655,5 +554,4 @@ export const destroy = (): Action => * This causes session data to be stored immediately instead of at the end * of the request. */ -export const save = (): Action => - liftF(new Save(undefined)); +export const save = (): Action => liftF(new Save(undefined)); diff --git a/src/app/boot/stage/body-parser.ts b/src/app/boot/stage/body-parser.ts index 08320ea..7486b96 100644 --- a/src/app/boot/stage/body-parser.ts +++ b/src/app/boot/stage/body-parser.ts @@ -1,119 +1,102 @@ import * as parser from 'body-parser'; -import { Future, fromCallback } from '@quenk/noni/lib/control/monad/future'; -import { map,merge } from '@quenk/noni/lib/data/record'; +import { map, merge } from '@quenk/noni/lib/data/record'; import { ModuleDatas } from '../../module/data'; import { Stage } from './'; /** - * BodyParserConf can be configured to enabled various request body parsing + * BodyParserConf can be configured to enabled various request body parsing * algorithims. */ export interface BodyParserConf { - /** * json configures parsing for json body types. */ json?: { - /** * enable this parser. */ - enable?: boolean, + enable?: boolean; /** * options for the parser. */ - options?: parser.OptionsJson - - }, + options?: parser.OptionsJson; + }; /** * raw configures parsing of the body into a Buffer. */ raw?: { - /** * enable this parser. */ - enable?: boolean, + enable?: boolean; /** * options for this parser. */ - options?: parser.Options - - }, + options?: parser.Options; + }; /** * text configures parsing of the body as text. */ text?: { - /** * enable this parser. */ - enable?: boolean, + enable?: boolean; /** * options for this parser. */ - options?: parser.OptionsText - - }, + options?: parser.OptionsText; + }; /** * urlencoded configures parsing the body as url-encoded text. */ urlencoded?: { - /** * enable this parser. */ - enable?: boolean, + enable?: boolean; /** * options for this parser. */ - options?: parser.OptionsUrlencoded - - } - + options?: parser.OptionsUrlencoded; + }; } const defaults = { - - urlencoded: { enable: true } - -} + urlencoded: { enable: true } +}; /** * BodyParserStage configures middleware for parsing request bodies into desired * values. */ export class BodyParserStage implements Stage { - - constructor(public modules: ModuleDatas) { } + constructor(public modules: ModuleDatas) {} name = 'body-parser'; - execute(): Future { - + async execute() { let { modules } = this; - return fromCallback(cb => { - map(modules, m => { - let { app } = m; - if (m.template && + if ( + m.template && m.template.app && m.template.app.parsers && - m.template.app.parsers.body) { - - let body = merge (defaults, m.template.app.parsers.body); + m.template.app.parsers.body + ) { + let body = merge(defaults, m.template.app.parsers.body); if (body.json && body.json.enable) app.use(parser.json(body.json.options)); @@ -126,14 +109,7 @@ export class BodyParserStage implements Stage { if (body.urlencoded && body.urlencoded.enable) app.use(parser.urlencoded(body.urlencoded.options)); - } - }); - - cb(null); - - }); - } } diff --git a/src/app/boot/stage/connections.ts b/src/app/boot/stage/connections.ts index 4668ac5..e40b1b3 100644 --- a/src/app/boot/stage/connections.ts +++ b/src/app/boot/stage/connections.ts @@ -1,4 +1,3 @@ -import { Future } from '@quenk/noni/lib/control/monad/future'; import { reduce, map } from '@quenk/noni/lib/data/record'; import { Pool, Connection } from '../../connection'; @@ -8,7 +7,7 @@ import { App } from '../../'; import { Stage } from './'; /** - * ConnectionsStage opens all the connections configured for all the modules of + * ConnectionsStage opens all the connections configured for all the modules of * the Application. * * Connections are opened sequentially at the Application level but in parallel @@ -16,27 +15,23 @@ import { Stage } from './'; * Issue #28 is tracking this. */ export class ConnectionsStage implements Stage { - constructor( public pool: Pool, public modules: ModuleDatas, - public hooks: Dispatcher) { } + public hooks: Dispatcher + ) {} name = 'connections'; - execute(): Future { - + async execute() { let { modules, pool, hooks } = this; - return reduce(modules, pool, (p, m) => { - + let conns = reduce(modules, pool, (p, m) => { map(m.connections, (c: Connection, k) => p.add(k, c)); return p; + }); - }) - .open() - .chain(() => hooks.connected()); - + await conns.open(); + hooks.connected(); } - } diff --git a/src/app/boot/stage/cookie-parser.ts b/src/app/boot/stage/cookie-parser.ts index f7900c7..b472150 100644 --- a/src/app/boot/stage/cookie-parser.ts +++ b/src/app/boot/stage/cookie-parser.ts @@ -1,6 +1,5 @@ import * as parser from 'cookie-parser'; -import { Future, fromCallback } from '@quenk/noni/lib/control/monad/future'; import { map } from '@quenk/noni/lib/data/record'; import { ModuleDatas } from '../../module/data'; @@ -15,11 +14,10 @@ will not be valid if the application restarts!'; * CookieParserConf can be configured to enabled parsing of the Cookie header. */ export interface CookieParserConf { - /** * enable this parser. */ - enable?: boolean, + enable?: boolean; /** * secret used to sign cookies. @@ -32,58 +30,46 @@ export interface CookieParserConf { * If the 3rd option is used, cookies will not be valid after the * application restarts! */ - secret?: string, + secret?: string; /** * options for the parser. */ - options?: parser.CookieParseOptions - + options?: parser.CookieParseOptions; } /** * CookieParserStage configures middleware for parsing cookies. */ export class CookieParserStage implements Stage { - - constructor(public modules: ModuleDatas) { } + constructor(public modules: ModuleDatas) {} name = 'cookie-parser'; - execute(): Future { - + async execute() { let { modules } = this; - return fromCallback(cb => { - - map(modules, m => { - - if (m.template && + map(modules, m => { + if ( + m.template && m.template.app && m.template.app.parsers && m.template.app.parsers.cookie && - m.template.app.parsers.cookie.enable) { - + m.template.app.parsers.cookie.enable + ) { let { cookie } = m.template.app.parsers; - let secret = cookie.secret || + let secret = + cookie.secret || process.env.COOKIE_SECRET || process.env.SECRET || randomSecret; - if (secret === randomSecret) - console.warn(WARN_NO_SECRET); + if (secret === randomSecret) console.warn(WARN_NO_SECRET); m.app.use(parser(secret, cookie.options)); - } - - }); - - cb(null); - }); - } } @@ -91,11 +77,5 @@ export class CookieParserStage implements Stage { * @private */ export const randomSecret = - (Math - .random() - .toString(36) - .substring(2, 15)) + - (Math - .random() - .toString(36) - .substring(2, 15)); + Math.random().toString(36).substring(2, 15) + + Math.random().toString(36).substring(2, 15); diff --git a/src/app/boot/stage/csrf-token.ts b/src/app/boot/stage/csrf-token.ts index 341285d..25ce828 100644 --- a/src/app/boot/stage/csrf-token.ts +++ b/src/app/boot/stage/csrf-token.ts @@ -1,7 +1,6 @@ import * as csurf from 'csurf'; import * as prs from '../../api/storage/prs'; -import { Future, fromCallback } from '@quenk/noni/lib/control/monad/future'; import { map, merge } from '@quenk/noni/lib/data/record'; import { Type } from '@quenk/noni/lib/data/type'; @@ -19,27 +18,24 @@ export const PRS_CSRF_TOKEN = '$csrf.token'; export const PRS_VIEW_CSRF_TOKEN = `${PRS_VIEW_CONTEXT}.csrf.token`; const defaultOptions = { - send_cookie: false, send_cookie_name: DEFAULT_SEND_COOKIE_NAME, options: {} - -} +}; const readMethods = ['GET', 'HEAD', 'OPTIONS']; /** - * CSRFTokenConf can be configured to enabled cross-site request forgery + * CSRFTokenConf can be configured to enabled cross-site request forgery * protection. */ export interface CSRFTokenConf { - /** * enable if true will enable csrf protection. */ - enable?: boolean, + enable?: boolean; /** * send_cookie if true will send a cookie to the client on each read @@ -47,7 +43,7 @@ export interface CSRFTokenConf { * Note: This is not the double submit pattern but rather a way for XHR * requests to retrieve the token. */ - send_cookie?: boolean, + send_cookie?: boolean; /** * send_cookie_name if set will be used as the name of the cookie used @@ -55,26 +51,23 @@ export interface CSRFTokenConf { * * Defaults to DEFAULT_SEND_COOKIE_NAME. */ - send_cookie_name?: string, + send_cookie_name?: string; /** * options passed on to the middleware. */ - options?: object, + options?: object; /** * on hooks. */ on?: { - /** * failure if specified will be invoked whenever a request fails CSRF * token validation. */ - failure?: Filter - - } - + failure?: Filter; + }; } /** @@ -83,72 +76,55 @@ export interface CSRFTokenConf { * This requires app.session.enable to be set to true. */ export class CSRFTokenStage implements Stage { - - constructor(public modules: ModuleDatas) { } + constructor(public modules: ModuleDatas) {} name = 'csrf-token'; - execute(): Future { - + async execute() { let { modules } = this; - return fromCallback(cb => { - - map(modules, m => { - - if (m.template && - m.template.app && - m.template.app.csrf && - m.template.app.csrf.token && - m.template.app.csrf.token.enable) { - - let conf = merge(defaultOptions, m.template.app.csrf.token); - - m.app.use(csurf(conf.options)); - - if (conf.send_cookie) { - - m.app.all('*', (req, res, next) => { - - if (readMethods.indexOf(req.method) > -1) - res.cookie(conf.send_cookie_name, - req.csrfToken()); - - next(); - - }); - - } - - if (conf.on && conf.on.failure) - m.app.use(m.module.runInCSRFErrorContext( - [conf.on.failure])); - + map(modules, m => { + if ( + m.template && + m.template.app && + m.template.app.csrf && + m.template.app.csrf.token && + m.template.app.csrf.token.enable + ) { + let conf = merge(defaultOptions, m.template.app.csrf.token); + + m.app.use(csurf(conf.options)); + + if (conf.send_cookie) { + m.app.all('*', (req, res, next) => { + if (readMethods.indexOf(req.method) > -1) + res.cookie(conf.send_cookie_name, req.csrfToken()); + + next(); + }); } - if (getValue(m, isEnabled) === true) - m.module.addBefore(setCSRFToken); - - }); - - return cb(null); + if (conf.on && conf.on.failure) + m.app.use( + m.module.runInCSRFErrorContext([conf.on.failure]) + ); + } + if (getValue(m, isEnabled) === true) + m.module.addBefore(setCSRFToken); }); - } } // Ensures the csrf token is available via prs and to views. const setCSRFToken = (r: Request): Action => - doAction(function*() { - + doAction(function* () { let token = yield getToken(); yield prs.set(PRS_CSRF_TOKEN, token); yield prs.set(PRS_VIEW_CSRF_TOKEN, token); return next(r); - }); const isEnabled = (m: ModuleData) => @@ -156,4 +132,4 @@ const isEnabled = (m: ModuleData) => m.template.app && m.template.app.csrf && m.template.app.csrf.token && - m.template.app.csrf.token.enable + m.template.app.csrf.token.enable; diff --git a/src/app/boot/stage/index.ts b/src/app/boot/stage/index.ts index 12fb5da..98eb761 100644 --- a/src/app/boot/stage/index.ts +++ b/src/app/boot/stage/index.ts @@ -1,5 +1,3 @@ -import { Future, sequential } from '@quenk/noni/lib/control/monad/future'; - /** * State represents a single step in the boot process of an Applicaiton. * @@ -8,19 +6,17 @@ import { Future, sequential } from '@quenk/noni/lib/control/monad/future'; * included as part of another one. */ export interface Stage { - /** * name of the Stage. * * Used for debugging. */ - name: string + name: string; /** * execute this Stage. */ - execute(): Future - + execute(): Promise; } /** @@ -31,20 +27,14 @@ export interface Stage { * updating the name property each time one completes. */ export class StageBundle implements Stage { - name = ''; - constructor(public stages: Stage[]) { } - - execute(): Future { - - let stages = this.stages.map(s => - s - .execute() - .map(() => { this.name = s.name; })); - - return >>sequential(stages); + constructor(public stages: Stage[]) {} + async execute() { + for (let stage of this.stages) { + this.name = stage.name; + await stage.execute(); + } } - } diff --git a/src/app/boot/stage/init.ts b/src/app/boot/stage/init.ts index c6f78df..2d508fe 100644 --- a/src/app/boot/stage/init.ts +++ b/src/app/boot/stage/init.ts @@ -1,5 +1,3 @@ -import { Future } from '@quenk/noni/lib/control/monad/future'; - import { Dispatcher } from '../../hooks'; import { Stage } from './'; import { App } from '../..'; @@ -10,15 +8,11 @@ import { App } from '../..'; * Invokes the init hooks of all modules. */ export class InitStage implements Stage { - - constructor(public hooks: Dispatcher) { } + constructor(public hooks: Dispatcher) {} name = 'init'; - execute(): Future { - + async execute() { return this.hooks.init(); - } - } diff --git a/src/app/boot/stage/listen.ts b/src/app/boot/stage/listen.ts index a3f14db..35cdcdb 100644 --- a/src/app/boot/stage/listen.ts +++ b/src/app/boot/stage/listen.ts @@ -1,10 +1,3 @@ -import { - Future, - pure, - parallel -} from '@quenk/noni/lib/control/monad/future'; -import { DoFn, doN } from '@quenk/noni/lib/control/monad'; - import { Server } from '../../../net/http/server'; import { ModuleData } from '../../module/data'; import { Dispatcher } from '../../hooks'; @@ -17,31 +10,23 @@ import { Stage } from './'; * This will also dispatch the "started" event. */ export class ListenStage implements Stage { - constructor( public server: Server, public hooks: Dispatcher, - public mainProvider: () => ModuleData) { } + public mainProvider: () => ModuleData, + public app: any + ) {} name = 'listen'; - execute(): Future { - + async execute() { let { mainProvider, server, hooks } = this; - return doN(>>function*() { - - let module = mainProvider(); - - yield parallel([ - server.listen(module.app).map(() => { }), - hooks.started() - ]); - - return pure(undefined); - - }); + let module = mainProvider(); + await Promise.allSettled([ + server.listen(module.app).map(() => {}), + hooks.started() + ]); } - } diff --git a/src/app/boot/stage/log.ts b/src/app/boot/stage/log.ts index 331a5d0..fbe423f 100644 --- a/src/app/boot/stage/log.ts +++ b/src/app/boot/stage/log.ts @@ -1,7 +1,6 @@ import * as express from 'express'; import * as morgan from 'morgan'; -import { Future, fromCallback } from '@quenk/noni/lib/control/monad/future'; import { merge, map } from '@quenk/noni/lib/data/record'; import { ModuleDatas } from '../../module/data'; @@ -11,64 +10,49 @@ import { Stage } from './'; * LogConf can be configured to log each HTTP request as they come in. */ export interface LogConf { - /** * enable if true will enable the logging middleware. */ - enable?: boolean, + enable?: boolean; /** * format is a valid format string the morgan middleware can use for logging * HTTP requests. */ - format?: string, + format?: string; /** * options that can be additionally passed to the morgan middleware. */ - options?: morgan.Options - + options?: morgan.Options; } const defaultOptions = { - format: 'combined' - -} +}; /** * LogStage configures the morgan middleware to log incomming requests. */ export class LogStage implements Stage { - - constructor(public modules: ModuleDatas) { } + constructor(public modules: ModuleDatas) {} name = 'log'; - execute(): Future { - + async execute() { let { modules } = this; - return fromCallback(cb => { - map(modules, m => { - - if (m.template && + if ( + m.template && m.template.app && m.template.app.log && - m.template.app.log.enable) { - + m.template.app.log.enable + ) { let conf = merge(defaultOptions, m.template.app.log); m.app.use(morgan(conf.format, conf.options)); - } - }); - - cb(null); - - }); - } } diff --git a/src/app/boot/stage/middleware.ts b/src/app/boot/stage/middleware.ts index f86d998..c66ff48 100644 --- a/src/app/boot/stage/middleware.ts +++ b/src/app/boot/stage/middleware.ts @@ -1,6 +1,5 @@ import * as express from 'express'; -import { Future, fromCallback } from '@quenk/noni/lib/control/monad/future'; import { reduce } from '@quenk/noni/lib/data/record'; import { Either, left, right } from '@quenk/noni/lib/data/either'; import { Maybe, fromNullable } from '@quenk/noni/lib/data/maybe'; @@ -11,109 +10,92 @@ import { App } from '../../'; import { Stage } from './'; /** - * MiddlewareStage installs the express middleware configured for + * MiddlewareStage installs the express middleware configured for * each module. */ export class MiddlewareStage implements Stage { - constructor( public app: App, - public modules: ModuleDatas) { } + public modules: ModuleDatas + ) {} name = 'middleware'; - execute(): Future { - + async execute() { let { modules } = this; - return fromCallback(cb => { - - let init: Either = right(undefined); - - let result = reduce(modules, init, (prev, mData) => { - - if (prev.isLeft()) return prev; - - let exApp = mData.app; - - exApp.use(beforeMiddleware(mData)); + let init: Either = right(undefined); - let emwares = getMiddlewareByNames( - mData, - mData.middleware.enabled - ); + let result = reduce(modules, init, (prev, mData) => { + if (prev.isLeft()) return prev; - if (emwares.isLeft()) - return left(emwares.takeLeft()); + let exApp = mData.app; - emwares.takeRight().forEach(mware => exApp.use(mware)); + exApp.use(beforeMiddleware(mData)); - return prev; + let emwares = getMiddlewareByNames(mData, mData.middleware.enabled); - }); + if (emwares.isLeft()) return left(emwares.takeLeft()); - result.isLeft() ? cb(result.takeLeft()) : cb(null); + emwares.takeRight().forEach(mware => exApp.use(mware)); + return prev; }); + if (result.isLeft()) throw result.takeLeft(); } - } // Ensures disabled and redirecting Modules are respected. -const beforeMiddleware = (mData: ModuleData) => +const beforeMiddleware = + (mData: ModuleData) => (_: express.Request, res: express.Response, next: express.NextFunction) => { - if (mData.disabled === true) { - // TODO: hook into app 404 handling res.sendStatus(404); - } else if (mData.redirect.isJust()) { - let r = mData.redirect.get(); res.redirect(r.status, r.location); - } else { - next(); - } + }; - } - -const getMiddlewareByNames = - (mData: ModuleData, names: string[]): Either => { - - let results = names.map(name => getMiddlewareByName(mData, name)); - - let allFound = results.map(r => r.isJust()); +const getMiddlewareByNames = ( + mData: ModuleData, + names: string[] +): Either => { + let results = names.map(name => getMiddlewareByName(mData, name)); - if (allFound) - return right(results.map(r => r.get())); + let allFound = results.map(r => r.isJust()); - let missing = results.map((r, idx) => r.isNothing() ? names[idx] : ''); + if (allFound) return right(results.map(r => r.get())); - return left(namesNotFoundErr(mData.path, missing.filter(name => name))); + let missing = results.map((r, idx) => (r.isNothing() ? names[idx] : '')); - } + return left( + namesNotFoundErr( + mData.path, + missing.filter(name => name) + ) + ); +}; // TODO: Migrate to App. See issue #45 -const getMiddlewareByName = - (mData: ModuleData, name: string): Maybe => { - - let result = fromNullable(mData.middleware.available[name]); - - if (result.isJust()) - return result; - else if (mData.parent.isJust()) - return getMiddlewareByName(mData.parent.get(), name) - else - return result; - - } - -const namesNotFoundErr = (path: string, names: string[]) => new Error( - `${path}: The following middleware could not be found: ` + - `${names.join()}!` -); +const getMiddlewareByName = ( + mData: ModuleData, + name: string +): Maybe => { + let result = fromNullable(mData.middleware.available[name]); + + if (result.isJust()) return result; + else if (mData.parent.isJust()) + return getMiddlewareByName(mData.parent.get(), name); + else return result; +}; + +const namesNotFoundErr = (path: string, names: string[]) => + new Error( + `${path}: The following middleware could not be found: ` + + `${names.join()}!` + ); diff --git a/src/app/boot/stage/routing.ts b/src/app/boot/stage/routing.ts index ccf02ec..cb0c7e6 100644 --- a/src/app/boot/stage/routing.ts +++ b/src/app/boot/stage/routing.ts @@ -1,7 +1,6 @@ import { join } from 'path'; -import { Future, attempt } from '@quenk/noni/lib/control/monad/future'; -import { empty, map } from '@quenk/noni/lib/data/record'; +import { empty } from '@quenk/noni/lib/data/record'; import { just, Maybe } from '@quenk/noni/lib/data/maybe'; import { Filter } from '../../api/request'; @@ -12,17 +11,14 @@ import { Stage } from './'; * RoutingStage sets up all the Application routing in one go. */ export class RoutingStage implements Stage { - - constructor(public modules: ModuleDatas) { } + constructor(public modules: ModuleDatas) {} name = 'routing'; - execute(): Future { - + async execute() { let { modules } = this; - return >attempt(() => map(modules, mconf => { - + for (let mconf of Object.values(modules)) { let mod = mconf.module; let exApp = mconf.app; let routes = mconf.routes(mod); @@ -30,20 +26,16 @@ export class RoutingStage implements Stage { let filters = getConfFilters(just(mconf)); if (!empty(filters)) { - // Add the module level filters before each filter. - mod.addRoutes(routes.map(r => ({ - - ...r, - - filters: []>[...filters, ...r.filters], - - }))); + mod.addRoutes( + routes.map(r => ({ + ...r, + filters: []>[...filters, ...r.filters] + })) + ); } else { - mod.addRoutes(routes); - } exApp.use(mod.getRouter()); @@ -55,34 +47,27 @@ export class RoutingStage implements Stage { exApp.use(mod.runInContextWithError(temp.app.on.internalError)); if (mconf.parent.isJust()) { - let parentExpApp = mconf.parent.get().app; let path = temp?.app?.path || mconf.path; parentExpApp.use(join('/', path), exApp); - } - - })).map(() => undefined); - + } } - } /** - * getConfFilters provides all the filters declared at the configuration - * level. + * getConfFilters provides all the filters declared at the configuration + * level. * * Filters from parent modules are inherited and are first in the list. */ const getConfFilters = (mdata: Maybe): Filter[] => { - let filters = []>[]; let current = mdata; while (current.isJust()) { - let target = current.get(); let temp = target.template; @@ -90,9 +75,7 @@ const getConfFilters = (mdata: Maybe): Filter[] => { filters = [...temp.app.filters, ...filters]; current = target.parent; - } return filters; - -} +}; diff --git a/src/app/boot/stage/session.ts b/src/app/boot/stage/session.ts index d82d76a..e55f646 100644 --- a/src/app/boot/stage/session.ts +++ b/src/app/boot/stage/session.ts @@ -1,21 +1,12 @@ import * as session from 'express-session'; import * as express from 'express'; -import { - Future, - pure, - sequential, - doFuture -} from '@quenk/noni/lib/control/monad/future'; -import { Record, merge, map, mapTo } from '@quenk/noni/lib/data/record'; -import { noop } from '@quenk/noni/lib/data/function'; +import { Record, merge, map } from '@quenk/noni/lib/data/record'; import { isObject, isNumber } from '@quenk/noni/lib/data/type'; import { Object } from '@quenk/noni/lib/data/jsonx'; import { Provider } from '../../middleware/session/store/connection'; -import { - MemoryConnection -} from '../../middleware/session/store/connection/memory'; +import { MemoryConnection } from '../../middleware/session/store/connection/memory'; import { Descriptor, SESSION_DESCRIPTORS, @@ -36,73 +27,63 @@ A random string will be generated and used however this means user sessions\ will not be valid if the application restarts!'; const defaultOptions = { - enable: false, options: { - name: SESSION_COOKIE_NAME, saveUnitialized: false, resave: false - }, store: { - provider: () => new MemoryConnection(), options: {} - } - -} +}; /** * SessionConf contains settings for configuring session usage. */ export interface SessionConf { - /** * enable if true, will turn on session support. * * Defaults to true. */ - enable?: boolean, + enable?: boolean; /** * options configurable for the session module. */ - options?: session.SessionOptions, + options?: session.SessionOptions; /** * store configuration for the session. */ store?: { - /** * provider used to create the SessionStoreConnection object. * * If unspecified, the inefficient in memory store will be used. */ - provider: Provider, + provider: Provider; /** * options passed to the Provider */ - options?: object - - } - + options?: object; + }; } /** * SessionStage configures session middleware automtically if enabled. * - * This will configure session support for EACH module that declares - * "app.session.enable = true". A app.session.options.secret SHOULD be provided - * for sigining cookies (to detect tampering). If it is not supplied the + * This will configure session support for EACH module that declares + * "app.session.enable = true". A app.session.options.secret SHOULD be provided + * for sigining cookies (to detect tampering). If it is not supplied the * following takes place: * * 1. The value is read from process.env.SESSION_SECRET or @@ -111,53 +92,48 @@ export interface SessionConf { * 4. a random string is generated (sessions will not survive app restarts). */ export class SessionStage implements Stage { - - constructor(public modules: ModuleDatas, public pool: Pool) { } + constructor( + public modules: ModuleDatas, + public pool: Pool + ) {} name = 'session'; - execute(): Future { - + async execute() { let { modules, pool } = this; - return sequential(mapTo(modules, m => doFuture(function*() { - - if (m.template && + for (let m of Object.values(modules)) { + if ( + m.template && m.template.app && m.template.app.session && - m.template.app.session.enable) { - + m.template.app.session.enable + ) { let conf = merge(defaultOptions, m.template.app.session); if (!conf.options.secret) { - if (process.env.SESSION_SECRET) { conf.options.secret = process.env.SESSION_SECRET; } else if (process.env.COOKIE_SECRET) { - conf.options.secret = process.env.COOKIE_SECRET + conf.options.secret = process.env.COOKIE_SECRET; } else if (process.env.SECRET) { conf.options.secret = process.env.SECRET; } else { console.warn(WARN_NO_SECRET); conf.options.secret = randomSecret; } - } let conn = conf.store.provider(session, conf.store.options); - yield conn.open(); + await conn.open(); - let store = yield conn.checkout(); + let store = await conn.checkout(); pool.add(POOL_KEY_SESSION, conn); m.app.use(session(merge(conf.options, { store }))); m.app.use(handleSessionTTL); - } - - return pure(undefined); - - }))).map(noop); + } } } @@ -167,39 +143,33 @@ export class SessionStage implements Stage { * 2. Decrementing session values that have their TTL set. * @private */ -export const handleSessionTTL = - (req: express.Request, _: express.Response, next: express.NextFunction) => { - if (req.session && - isObject((req.session)[SESSION_DATA]) && - isObject((req.session)[SESSION_DESCRIPTORS])) { - - let session = req.session; - let descs = >session[SESSION_DESCRIPTORS]; - - descs = map(descs, (d: Descriptor, k: string) => { - - if ((d.ttl != null) && isNumber(d.ttl)) { - - if (d.ttl === 0) { - - deleteSessionKey(session, k); - - } else { - - d.ttl = d.ttl - 1; - - } - +export const handleSessionTTL = ( + req: express.Request, + _: express.Response, + next: express.NextFunction +) => { + if ( + req.session && + isObject(((req.session))[SESSION_DATA]) && + isObject(((req.session))[SESSION_DESCRIPTORS]) + ) { + let session = (req.session); + let descs = >session[SESSION_DESCRIPTORS]; + + descs = map(descs, (d: Descriptor, k: string) => { + if (d.ttl != null && isNumber(d.ttl)) { + if (d.ttl === 0) { + deleteSessionKey(session, k); + } else { + d.ttl = d.ttl - 1; } + } - return d; - - }); - - (>session[SESSION_DESCRIPTORS]) = descs; - - } - - next(); + return d; + }); + (>session[SESSION_DESCRIPTORS]) = descs; } + + next(); +}; diff --git a/src/app/boot/stage/static.ts b/src/app/boot/stage/static.ts index b625903..51aae54 100644 --- a/src/app/boot/stage/static.ts +++ b/src/app/boot/stage/static.ts @@ -2,14 +2,7 @@ import * as express from 'express'; import { isAbsolute, resolve, join } from 'path'; -import { - Future, - doFuture, - pure, - sequential, - parallel -} from '@quenk/noni/lib/control/monad/future'; -import { Record, map, mapTo, merge } from '@quenk/noni/lib/data/record'; +import { Record, map, merge } from '@quenk/noni/lib/data/record'; import { isObject, isString } from '@quenk/noni/lib/data/type'; import { isDirectory } from '@quenk/noni/lib/io/file'; @@ -24,27 +17,21 @@ export type DirPath = string; /** * StaticConf is the configuration for one or more */ -export type StaticConf - = DirPath - | StaticConfMap - | (DirPath | StaticDirConf)[] - ; +export type StaticConf = DirPath | StaticConfMap | (DirPath | StaticDirConf)[]; /** * StaticDirConf is the configuration for a single static directory. */ export interface StaticDirConf { - /** * dir path to serve. */ - dir: DirPath, + dir: DirPath; /** * options passed directly to the serve-static middleware. */ - options?: object - + options?: object; } /** @@ -52,15 +39,11 @@ export interface StaticDirConf { * files. */ export interface StaticConfMap { - - [key: string]: DirPath | StaticDirConf - + [key: string]: DirPath | StaticDirConf; } interface FlatStaticConfMap { - - [key: string]: StaticDirConf - + [key: string]: StaticDirConf; } /** @@ -80,106 +63,89 @@ interface FlatStaticConfMap { * of the working directory. */ export class StaticStage implements Stage { - constructor( public mainProvider: () => ModuleData, - public modules: ModuleDatas) { } + public modules: ModuleDatas + ) {} name = 'static'; - execute(): Future { - + async execute() { let { mainProvider, modules, name } = this; let main = mainProvider(); - return doFuture(function*() { - - yield sequential(mapTo(modules, m => doFuture(function*() { - - let prefix = ''; - let mconfs: FlatStaticConfMap = { 'public': { dir: 'public' } }; - - if (m.template) { - - let dirs = m.template.app && m.template.app.dirs || {}; - - prefix = getPrefix(dirs.self); - - mconfs = merge(mconfs, - normalizeConf(dirs.public || {})); - - } - - let normalizedConfs = normalizeDirs(prefix, mconfs); + for (let m of Object.values(modules)) { + let prefix = ''; - if (process.env.TENDRIL_STATIC_WARN_MISSING) { + let mconfs: FlatStaticConfMap = { public: { dir: 'public' } }; - // Check that the specified directory actually exists. - - yield parallel(mapTo(normalizedConfs, conf => - doFuture(function*() { + if (m.template) { + let dirs = (m.template.app && m.template.app.dirs) || {}; - let yes = yield isDirectory(conf.dir); + prefix = getPrefix(dirs.self); - if (!yes) - console.warn(`${name}: The directory ` + - `"${conf.dir}" does not exist!`); + mconfs = merge( + mconfs, + normalizeConf(dirs.public || {}) + ); + } - main.app.use(express.static(conf.dir, conf.options)); + let normalizedConfs = normalizeDirs(prefix, mconfs); - return pure(undefined); + if (process.env.TENDRIL_STATIC_WARN_MISSING) { + // Check that the specified directory actually exists. - }))); - - } else { - - map(normalizedConfs, conf => - main.app.use(express.static(conf.dir, conf.options))); + for (let conf of Object.values(normalizedConfs)) { + let yes = await isDirectory(conf.dir); + if (!yes) + console.warn( + `${name}: The directory ` + + `"${conf.dir}" does not exist!` + ); + main.app.use(express.static(conf.dir, conf.options)); } - - return pure(undefined); - - }))); - - return pure(undefined); - - }); + } else { + map(normalizedConfs, conf => + main.app.use(express.static(conf.dir, conf.options)) + ); + } + } } - } const normalizeConf = (conf: StaticConf): FlatStaticConfMap => { - if (Array.isArray(conf)) { - - return conf.reduce((p: FlatStaticConfMap, c) => { - - let obj = normalize(c); - return merge(p, { [obj.dir]: obj }); - - }, {}); - + return conf.reduce( + (p: FlatStaticConfMap, c) => { + let obj = normalize(c); + return merge(p, { [obj.dir]: obj }); + }, + {} + ); } else if (isString(conf)) { - return { [conf]: { dir: conf } }; - } return map(>conf, normalize); - -} +}; const normalize = (conf: DirPath | StaticDirConf): StaticDirConf => isObject(conf) ? conf : { dir: conf }; -const normalizeDirs = - (prefix: string, confs: FlatStaticConfMap): FlatStaticConfMap => - map(confs, c => isAbsolute(c.dir) ? c : merge(c, { - dir: resolve(prefix, c.dir) - })); +const normalizeDirs = ( + prefix: string, + confs: FlatStaticConfMap +): FlatStaticConfMap => + map(confs, c => + isAbsolute(c.dir) + ? c + : merge(c, { + dir: resolve(prefix, c.dir) + }) + ); const getPrefix = (prefix?: string) => isString(prefix) ? join(process.cwd(), prefix) : ''; diff --git a/src/app/connection.ts b/src/app/connection.ts index 3a247c0..d852851 100644 --- a/src/app/connection.ts +++ b/src/app/connection.ts @@ -12,18 +12,14 @@ import { noop } from '@quenk/noni/lib/data/function'; * Connections map. */ export interface Connections { - - [key: string]: Connection - + [key: string]: Connection; } /** * ConnectionStore */ export interface ConnectionStore { - - [key: string]: Connection - + [key: string]: Connection; } /** @@ -34,11 +30,10 @@ export interface ConnectionStore { * to. */ export interface Connection { - /** * open the connection. * - * When called this method can initialize a new connection/pool or + * When called this method can initialize a new connection/pool or * simply lie for connections that are not meant to be kept open. */ open(): Future; @@ -61,14 +56,13 @@ export interface Connection { * close the connection. */ close(): Future; - } /** * Pool provides a simple storage medium for persistent * remote resources used in an application. * - * These resources may be databases, other http servers or + * These resources may be databases, other http servers or * some low level resource the application uses. * * The Pool class itself does not actually implement connection @@ -79,57 +73,45 @@ export interface Connection { * individual ones when needed. Tendril relies on this to cleanly shutdown. */ export class Pool { + constructor(public conns: ConnectionStore) {} - constructor(public conns: ConnectionStore) { } - - /** - * getInstance provides the singleton instance of the connection pool. - */ + /** + * getInstance provides the singleton instance of the connection pool. + */ static getInstance() { - return pool; - } /** * add a new Connection to the pool. */ add(key: string, conn: Connection): Pool { - this.conns[key] = conn; return this; - } /** - * get a Connection from the pool. + * get a Connection from the pool. **/ get(key: string): Maybe { - return fromNullable(this.conns[key]); - } /** * open all the connections in the pool. */ open(): Future { - return parallel(mapTo(this.conns, c => c.open())).map(noop); - } /** * close all the connections in the pool. */ close(): Future { - return parallel(mapTo(this.conns, c => c.close())).map(() => { this.conns = {}; }); - } - } // store connections in one place. @@ -144,22 +126,19 @@ export const getInstance = (): Pool => pool; * getUserConnection provides the underlying user connection by name if found. */ export const getUserConnection = (name: string): Future> => - doFuture(function*() { - + doFuture(function* () { let mConn = pool.get(name); - if (mConn.isNothing()) - return pure(mConn); + if (mConn.isNothing()) return pure(mConn); let conn = yield mConn.get().checkout(); return pure(just(conn)); - }); /** * unsafeGetUserConnection is like getUserConnection but assumes the connection - * exists. + * exists. * * If the the connection does not exist, the Future will raise an exception. */ diff --git a/src/app/hooks.ts b/src/app/hooks.ts index 666a94f..bd4062c 100644 --- a/src/app/hooks.ts +++ b/src/app/hooks.ts @@ -5,7 +5,7 @@ import { Future, pure, parallel, - sequential, + sequential } from '@quenk/noni/lib/control/monad/future'; import { ModuleData } from './module/data'; @@ -17,34 +17,30 @@ import { App } from './'; * Hooks are dispatched in parallel at the app level but sequentially * at the module level. */ -export class Dispatcher { - - constructor(public app: S) { } +export class Dispatcher { + constructor(public app: S) {} /** * init fires the "init" hook. */ init(): Future { - let { app } = this; - return parallel(values>(map(app.modules, - (m: ModuleData) => { - - let mHooks = fromNullable(m.hooks.init); - - if (mHooks.isNothing()) return pure(undefined); + return parallel( + values>( + map(app.modules, (m: ModuleData) => { + let mHooks = fromNullable(m.hooks.init); - let hooks = mHooks.get(); + if (mHooks.isNothing()) return pure(undefined); - return Array.isArray(hooks) ? - sequential(hooks.map(f => f(app))) - .map(noop) : - hooks(app); - - }))) - .map(noop); + let hooks = mHooks.get(); + return Array.isArray(hooks) + ? sequential(hooks.map(f => f(app))).map(noop) + : hooks(app); + }) + ) + ).map(noop); } /** @@ -52,26 +48,23 @@ export class Dispatcher { * have been established. */ connected(): Future { - let { app } = this; - return parallel(values(map(app.modules, - (m: ModuleData) => { - - let mHooks = fromNullable(m.hooks.connected); + return parallel( + values( + map(app.modules, (m: ModuleData) => { + let mHooks = fromNullable(m.hooks.connected); - if (mHooks.isNothing()) return pure(undefined); + if (mHooks.isNothing()) return pure(undefined); - let hooks = mHooks.get(); - - return (Array.isArray(hooks)) ? - sequential(hooks.map(f => f(app))) - .map(() => { }) : - hooks(app); - - }))) - .map(noop); + let hooks = mHooks.get(); + return Array.isArray(hooks) + ? sequential(hooks.map(f => f(app))).map(() => {}) + : hooks(app); + }) + ) + ).map(noop); } /** @@ -79,26 +72,22 @@ export class Dispatcher { * for requests. */ started(): Future { - let { app } = this; - return parallel(values(map(app.modules, - (m: ModuleData) => { - - let mHooks = fromNullable(m.hooks.started); + return parallel( + values( + map(app.modules, (m: ModuleData) => { + let mHooks = fromNullable(m.hooks.started); - if (mHooks.isNothing()) return pure(undefined); + if (mHooks.isNothing()) return pure(undefined); - let hooks = mHooks.get(); - - return Array.isArray(hooks) ? - sequential(hooks.map(f => f(app))) - .map(() => { }) : - hooks(app); - - }))) - .map(noop); + let hooks = mHooks.get(); + return Array.isArray(hooks) + ? sequential(hooks.map(f => f(app))).map(() => {}) + : hooks(app); + }) + ) + ).map(noop); } - } diff --git a/src/app/index.ts b/src/app/index.ts index 394ddab..e662d28 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -1,20 +1,7 @@ import * as express from 'express'; -import { merge, mapTo } from '@quenk/noni/lib/data/record'; -import { - Maybe, - just, - nothing -} from '@quenk/noni/lib/data/maybe'; -import { - Future, - pure, - sequential -} from '@quenk/noni/lib/control/monad/future'; +import { Maybe, nothing } from '@quenk/noni/lib/data/maybe'; import { PVM } from '@quenk/potoo/lib/actor/system/vm'; -import { System } from '@quenk/potoo/lib/actor/system'; -import { Template as PotooTemplate } from '@quenk/potoo/lib/actor/template'; -import { Address } from '@quenk/potoo/lib/actor/address'; import { Server } from '../net/http/server'; import { getInstance } from './connection'; @@ -46,22 +33,24 @@ import { Module } from './module'; const defaultServConf = { port: 2407, host: '0.0.0.0' }; -const dconf = { log: { level: 3 } } +const dconf = { log: { level: 'error' } }; /** * App is the main entry point to the framework. * - * An App serves as an actor system for all the modules of the application. - * It configures routing of requests for each module and makes whatever services - * the user desires available via child actors. + * App makes an actor system available to all its modules via the potoo + * framework. This allows module code to communicate with each other when + * needed to trigger effects that may not rely on http requests. + * + * Module code includes the routes declared for a module but also its services, + * handlers and whatever logic configureed to be executed. */ -export class App implements System { - - constructor(public provider: (s: App) => Template) { } +export class App { + constructor(public provider: (s: App) => Template) {} main =