diff --git a/package-lock.json b/package-lock.json index b9524cbe..dc7ebc50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,28 +36,6 @@ "node": ">=6.0.0" } }, - "node_modules/@antfu/install-pkg": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.4.1.tgz", - "integrity": "sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==", - "dev": true, - "dependencies": { - "package-manager-detector": "^0.2.0", - "tinyexec": "^0.3.0" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@antfu/utils": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz", - "integrity": "sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/@apidevtools/json-schema-ref-parser": { "version": "9.0.6", "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", @@ -869,51 +847,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@braintree/sanitize-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz", - "integrity": "sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg==", - "dev": true - }, - "node_modules/@chevrotain/cst-dts-gen": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", - "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", - "dev": true, - "dependencies": { - "@chevrotain/gast": "11.0.3", - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/@chevrotain/gast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", - "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", - "dev": true, - "dependencies": { - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/@chevrotain/regexp-to-ast": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", - "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", - "dev": true - }, - "node_modules/@chevrotain/types": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", - "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", - "dev": true - }, - "node_modules/@chevrotain/utils": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", - "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", - "dev": true - }, "node_modules/@commitlint/config-validator": { "version": "19.5.0", "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.5.0.tgz", @@ -1495,9 +1428,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", + "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", "dev": true, "dependencies": { "@eslint/object-schema": "^2.1.4", @@ -1531,18 +1464,18 @@ } }, "node_modules/@eslint/core": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", - "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", + "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1607,9 +1540,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", - "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1625,9 +1558,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", - "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "dependencies": { "levn": "^0.4.1" @@ -1752,27 +1685,6 @@ "node": ">=10.13.0" } }, - "node_modules/@iconify/types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", - "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", - "dev": true - }, - "node_modules/@iconify/utils": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.33.tgz", - "integrity": "sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==", - "dev": true, - "dependencies": { - "@antfu/install-pkg": "^0.4.0", - "@antfu/utils": "^0.7.10", - "@iconify/types": "^2.0.0", - "debug": "^4.3.6", - "kolorist": "^1.8.0", - "local-pkg": "^0.5.0", - "mlly": "^1.7.1" - } - }, "node_modules/@inquirer/checkbox": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-3.0.1.tgz", @@ -3330,56 +3242,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@mermaid-js/mermaid-cli": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-11.4.0.tgz", - "integrity": "sha512-NNLhoW4o9y3bYCd44f4Uk/APXRuq/qrtAet3oHXtVAqYiO6NlvYF/RdLW/pIQPljX+BQ/oXXotXHckmjgriWWQ==", - "dev": true, - "dependencies": { - "chalk": "^5.0.1", - "commander": "^12.1.0", - "mermaid": "^11.0.2" - }, - "bin": { - "mmdc": "src/cli.js" - }, - "engines": { - "node": "^18.19 || >=20.0" - }, - "peerDependencies": { - "puppeteer": "^23" - } - }, - "node_modules/@mermaid-js/mermaid-cli/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@mermaid-js/mermaid-cli/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@mermaid-js/parser": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.3.0.tgz", - "integrity": "sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA==", - "dev": true, - "dependencies": { - "langium": "3.0.0" - } - }, "node_modules/@mole-inc/bin-wrapper": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", @@ -4085,9 +3947,9 @@ } }, "node_modules/@nx/devkit": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.1.0.tgz", - "integrity": "sha512-TDWT3d7nei+FtqoZscR7KtbQ9BXzV1c1Wvk9UUejo7eXbrQ/+YnHVVze8EMuIgTXaHxNIBTKGUPcRi3cibmCDw==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.1.4.tgz", + "integrity": "sha512-Opz7eRPmpt3e4SGkbwZbE9Bg3MhKeivh1QTNCj4tQVAB4gucz0lW/F3mdtRDFdj6gUbqIc5rRrbO/DGlNaEzYw==", "dev": true, "dependencies": { "ejs": "^3.1.7", @@ -4128,9 +3990,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.1.0.tgz", - "integrity": "sha512-fel9LpSWuwY0cGAsRFEPxLp6J5VcK/5sjeWA0lZWrFf1oQJCOlKBfkxzi384Nd7eK5JSjxIXrpYfRLaqSbp+IA==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.1.4.tgz", + "integrity": "sha512-afyDOZbIyHi6BgKk+Bb4RI1t8dZ6/oIbOY89z4mBPNNevZkbGqUfMwO2vjKnaOoThcjT93SEMJfCLGL8i857ww==", "cpu": [ "arm64" ], @@ -4144,9 +4006,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.1.0.tgz", - "integrity": "sha512-l1DB8dk2rCLGgXW26HmFOKYpUCF259LRus8z+z7dsFv5vz9TeN+fk5m9aAdiENgMA2cGlndQQW+E8UIo3yv+9g==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.1.4.tgz", + "integrity": "sha512-aiYklAt95aX0EinepJRryMna8K53G52ngYOFuac1G8iLlguinJvg/YgSKCf7GOAzec8b7Hm7KauPjSJE/P3/iw==", "cpu": [ "x64" ], @@ -4160,9 +4022,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.1.0.tgz", - "integrity": "sha512-f8uMRIhiOA/73cIjiyS3gpKvaAtsHgyUkkoCOPc4xdxoSLAjlxb6VOUPIFj9rzLA6qQXImVpsiNPG+p1sJ1GAQ==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.1.4.tgz", + "integrity": "sha512-WUh4bsLK+e7wuN3lE3ZQUj+xQKdWU4P4RymutfLQQnPYiilCMtFwITcvDmazmOHFWI2vPhzSyYJRbOu+YMIR3A==", "cpu": [ "x64" ], @@ -4176,9 +4038,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.1.0.tgz", - "integrity": "sha512-M7pay8hFJQZ3uJHlr5hZK/8o1BcHt95hy/SU7Azt7+LKQGOy42tXhHO30As9APzXqRmvoA2Iq1IyrJJicrz+Ew==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.1.4.tgz", + "integrity": "sha512-9vPMw5s89v3od7aw3enTWjdMSCAmQ0tIA89Uz7xbbjB2kX2mAdihSzAKd9woi/cj+ROnY+ynNXzU9UjqhfxdBg==", "cpu": [ "arm" ], @@ -4192,9 +4054,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.1.0.tgz", - "integrity": "sha512-A5+Kpk1uwYIj6CPm0DWLVz5wNTN4ewNl7ajLS9YJOi4yHx/FhfMMyPj4ZnbTpc4isuvgZwBZNl8kwFb2RdXq4w==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.1.4.tgz", + "integrity": "sha512-JUE4l8utr9KmQSG9tO2Qw5R5i/bZ16s1+J5xnEar7UfcSOfOLqxGHS7HCBUZcfr46dmtv6KjIC83uHMs19AwDQ==", "cpu": [ "arm64" ], @@ -4208,9 +4070,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.1.0.tgz", - "integrity": "sha512-pWIQPt9Fst1O4dgrWHdU1b+5wpfLmsmaSeRvLQ9b2VFp3tKGko4ie0skme62TuMgpcqMWDBFKs8KgbHESOi7vw==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.1.4.tgz", + "integrity": "sha512-EaPUDqXvnPc/ure0x7N+5lRYvk5zqOQ3LzFOTRPWdqnFXejyTkGjZEYWbLFIJTFrvyEdpfaPTHyNmCHUrEz9TQ==", "cpu": [ "arm64" ], @@ -4224,9 +4086,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.1.0.tgz", - "integrity": "sha512-sOpeGOHznk2ztCXzKhRPAKG3WtwaQUsfQ/3aYDXE6z+rSfyZTGY29M/a9FbdjI4cLJX+NdLAAMj15c3VecJ65g==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.1.4.tgz", + "integrity": "sha512-vaWV37ZayfyckVI/faWdQWIV9XQb06ZT8jHQnwgSd9tKbGz37vN30eYtgZlFL0P4bHfhjtmMXnLvADmfyO/KOw==", "cpu": [ "x64" ], @@ -4240,9 +4102,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.1.0.tgz", - "integrity": "sha512-SxnQJhjOvuOfUZnF4Wt4/O/l1e21qpACZzfMaPIvmiTLk9zPJZWtfgbqlKtTXHKWq9DfIUZQqZXRIpHPM1sDZQ==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.1.4.tgz", + "integrity": "sha512-wjq4Ea1oweBsIA9jq+jDT6BALxv/uac0aFykwoN23dOiwwSMFWMxbXUuBrxp0LjMFGV49S62kVDoRezukvkiZA==", "cpu": [ "x64" ], @@ -4256,9 +4118,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.1.0.tgz", - "integrity": "sha512-Z/KoaAA+Rg9iqqOPkKZV61MejPoJBOHlecFpq0G4TgKMJEJ/hEsjojq5usO1fUGAbvQT/SXL3pYWgZwhD3VEHw==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.1.4.tgz", + "integrity": "sha512-d9jN8biyEJh4Mjdc3RU1j/+WIOjrO9mCDxYuERXP2ELaNsOk0tJgcXE1xsa9AF88AHGpOkCOS2rxy61DKBtFKg==", "cpu": [ "arm64" ], @@ -4272,9 +4134,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.1.0.tgz", - "integrity": "sha512-pbxacjLsW9vXD9FibvU8Pal/r5+Yq6AaW6I57CDi7jsLt+K6jcS0fP4FlfXT8QFWdx9+bOKNfOsKEIwpirMN1w==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.1.4.tgz", + "integrity": "sha512-s3RwOkkWKzOflbTmc5MRc4EH2mk1AkJ/V8Gu3Qi2QncF9r1GrR7hDxROpu0MEoHfIhRG+d+n8OGX31nC9GZWUg==", "cpu": [ "x64" ], @@ -4540,29 +4402,6 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, - "node_modules/@puppeteer/browsers": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.1.tgz", - "integrity": "sha512-0kdAbmic3J09I6dT8e9vE2JOCSt13wHCW5x/ly8TSt2bDtuIWe2TgLZZDHdcziw9AVCzflMAXCrVyRIhIs44Ng==", - "dev": true, - "peer": true, - "dependencies": { - "debug": "^4.3.7", - "extract-zip": "^2.0.1", - "progress": "^2.0.3", - "proxy-agent": "^6.4.0", - "semver": "^7.6.3", - "tar-fs": "^3.0.6", - "unbzip2-stream": "^1.4.3", - "yargs": "^17.7.2" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@scarf/scarf": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz", @@ -4714,14 +4553,14 @@ } }, "node_modules/@swc/core": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.9.2.tgz", - "integrity": "sha512-dYyEkO6mRYtZFpnOsnYzv9rY69fHAHoawYOjGOEcxk9WYtaJhowMdP/w6NcOKnz2G7GlZaenjkzkMa6ZeQeMsg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.9.3.tgz", + "integrity": "sha512-oRj0AFePUhtatX+BscVhnzaAmWjpfAeySpM1TCbxA1rtBDeH/JDhi5yYzAKneDYtVtBvA7ApfeuzhMC9ye4xSg==", "dev": true, "hasInstallScript": true, "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.15" + "@swc/types": "^0.1.17" }, "engines": { "node": ">=10" @@ -4731,16 +4570,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.9.2", - "@swc/core-darwin-x64": "1.9.2", - "@swc/core-linux-arm-gnueabihf": "1.9.2", - "@swc/core-linux-arm64-gnu": "1.9.2", - "@swc/core-linux-arm64-musl": "1.9.2", - "@swc/core-linux-x64-gnu": "1.9.2", - "@swc/core-linux-x64-musl": "1.9.2", - "@swc/core-win32-arm64-msvc": "1.9.2", - "@swc/core-win32-ia32-msvc": "1.9.2", - "@swc/core-win32-x64-msvc": "1.9.2" + "@swc/core-darwin-arm64": "1.9.3", + "@swc/core-darwin-x64": "1.9.3", + "@swc/core-linux-arm-gnueabihf": "1.9.3", + "@swc/core-linux-arm64-gnu": "1.9.3", + "@swc/core-linux-arm64-musl": "1.9.3", + "@swc/core-linux-x64-gnu": "1.9.3", + "@swc/core-linux-x64-musl": "1.9.3", + "@swc/core-win32-arm64-msvc": "1.9.3", + "@swc/core-win32-ia32-msvc": "1.9.3", + "@swc/core-win32-x64-msvc": "1.9.3" }, "peerDependencies": { "@swc/helpers": "*" @@ -4752,9 +4591,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.9.2.tgz", - "integrity": "sha512-nETmsCoY29krTF2PtspEgicb3tqw7Ci5sInTI03EU5zpqYbPjoPH99BVTjj0OsF53jP5MxwnLI5Hm21lUn1d6A==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.9.3.tgz", + "integrity": "sha512-hGfl/KTic/QY4tB9DkTbNuxy5cV4IeejpPD4zo+Lzt4iLlDWIeANL4Fkg67FiVceNJboqg48CUX+APhDHO5G1w==", "cpu": [ "arm64" ], @@ -4769,9 +4608,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.9.2.tgz", - "integrity": "sha512-9gD+bwBz8ZByjP6nZTXe/hzd0tySIAjpDHgkFiUrc+5zGF+rdTwhcNrzxNHJmy6mw+PW38jqII4uspFHUqqxuQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.9.3.tgz", + "integrity": "sha512-IaRq05ZLdtgF5h9CzlcgaNHyg4VXuiStnOFpfNEMuI5fm5afP2S0FHq8WdakUz5WppsbddTdplL+vpeApt/WCQ==", "cpu": [ "x64" ], @@ -4786,9 +4625,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.9.2.tgz", - "integrity": "sha512-kYq8ief1Qrn+WmsTWAYo4r+Coul4dXN6cLFjiPZ29Cv5pyU+GFvSPAB4bEdMzwy99rCR0u2P10UExaeCjurjvg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.9.3.tgz", + "integrity": "sha512-Pbwe7xYprj/nEnZrNBvZfjnTxlBIcfApAGdz2EROhjpPj+FBqBa3wOogqbsuGGBdCphf8S+KPprL1z+oDWkmSQ==", "cpu": [ "arm" ], @@ -4803,9 +4642,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.9.2.tgz", - "integrity": "sha512-n0W4XiXlmEIVqxt+rD3ZpkogsEWUk1jJ+i5bQNgB+1JuWh0fBE8c/blDgTQXa0GB5lTPVDZQussgdNOCnAZwiA==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.9.3.tgz", + "integrity": "sha512-AQ5JZiwNGVV/2K2TVulg0mw/3LYfqpjZO6jDPtR2evNbk9Yt57YsVzS+3vHSlUBQDRV9/jqMuZYVU3P13xrk+g==", "cpu": [ "arm64" ], @@ -4820,9 +4659,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.9.2.tgz", - "integrity": "sha512-8xzrOmsyCC1zrx2Wzx/h8dVsdewO1oMCwBTLc1gSJ/YllZYTb04pNm6NsVbzUX2tKddJVRgSJXV10j/NECLwpA==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.9.3.tgz", + "integrity": "sha512-tzVH480RY6RbMl/QRgh5HK3zn1ZTFsThuxDGo6Iuk1MdwIbdFYUY034heWUTI4u3Db97ArKh0hNL0xhO3+PZdg==", "cpu": [ "arm64" ], @@ -4837,9 +4676,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.9.2.tgz", - "integrity": "sha512-kZrNz/PjRQKcchWF6W292jk3K44EoVu1ad5w+zbS4jekIAxsM8WwQ1kd+yjUlN9jFcF8XBat5NKIs9WphJCVXg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.9.3.tgz", + "integrity": "sha512-ivXXBRDXDc9k4cdv10R21ccBmGebVOwKXT/UdH1PhxUn9m/h8erAWjz5pcELwjiMf27WokqPgaWVfaclDbgE+w==", "cpu": [ "x64" ], @@ -4854,9 +4693,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.9.2.tgz", - "integrity": "sha512-TTIpR4rjMkhX1lnFR+PSXpaL83TrQzp9znRdp2TzYrODlUd/R20zOwSo9vFLCyH6ZoD47bccY7QeGZDYT3nlRg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.9.3.tgz", + "integrity": "sha512-ILsGMgfnOz1HwdDz+ZgEuomIwkP1PHT6maigZxaCIuC6OPEhKE8uYna22uU63XvYcLQvZYDzpR3ms47WQPuNEg==", "cpu": [ "x64" ], @@ -4871,9 +4710,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.9.2.tgz", - "integrity": "sha512-+Eg2d4icItKC0PMjZxH7cSYFLWk0aIp94LNmOw6tPq0e69ax6oh10upeq0D1fjWsKLmOJAWEvnXlayZcijEXDw==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.9.3.tgz", + "integrity": "sha512-e+XmltDVIHieUnNJHtspn6B+PCcFOMYXNJB1GqoCcyinkEIQNwC8KtWgMqUucUbEWJkPc35NHy9k8aCXRmw9Kg==", "cpu": [ "arm64" ], @@ -4888,9 +4727,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.9.2.tgz", - "integrity": "sha512-nLWBi4vZDdM/LkiQmPCakof8Dh1/t5EM7eudue04V1lIcqx9YHVRS3KMwEaCoHLGg0c312Wm4YgrWQd9vwZ5zQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.9.3.tgz", + "integrity": "sha512-rqpzNfpAooSL4UfQnHhkW8aL+oyjqJniDP0qwZfGnjDoJSbtPysHg2LpcOBEdSnEH+uIZq6J96qf0ZFD8AGfXA==", "cpu": [ "ia32" ], @@ -4905,9 +4744,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.9.2.tgz", - "integrity": "sha512-ik/k+JjRJBFkXARukdU82tSVx0CbExFQoQ78qTO682esbYXzjdB5eLVkoUbwen299pnfr88Kn4kyIqFPTje8Xw==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.9.3.tgz", + "integrity": "sha512-3YJJLQ5suIEHEKc1GHtqVq475guiyqisKSoUnoaRtxkDaW5g1yvPt9IoSLOe2mRs7+FFhGGU693RsBUSwOXSdQ==", "cpu": [ "x64" ], @@ -4954,9 +4793,9 @@ } }, "node_modules/@swc/types": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.15.tgz", - "integrity": "sha512-XKaZ+dzDIQ9Ot9o89oJQ/aluI17+VvUnIpYJTcZtvv1iYX6MzHh3Ik2CSR7MdPKpPwfZXHBeCingb2b4PoDVdw==", + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", + "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", "dev": true, "dependencies": { "@swc/counter": "^0.1.3" @@ -4980,13 +4819,6 @@ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", "dev": true }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", - "dev": true, - "peer": true - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", @@ -5019,9 +4851,9 @@ } }, "node_modules/@types/aws-lambda": { - "version": "8.10.145", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.145.tgz", - "integrity": "sha512-dtByW6WiFk5W5Jfgz1VM+YPA21xMXTuSFoLYIDY0L44jDLLflVPtZkYuu3/YxpGcvjzKFBZLU+GyKjR0HOYtyw==" + "version": "8.10.146", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.146.tgz", + "integrity": "sha512-3BaDXYTh0e6UCJYL/jwV/3+GRslSc08toAiZSmleYtkAUyV5rtvdPYxrG/88uqvTuT6sb27WE9OS90ZNTIuQ0g==" }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -5104,268 +4936,15 @@ "integrity": "sha512-1tBhmVUeso3+ahfyaKluXe38p+94lovUZdoVfQ3OnJo9uJC42JT7CBoN3k9HYhAae+GwiBYmHu+N9FZhOG+2Pg==" }, "node_modules/@types/conventional-commits-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", - "integrity": "sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.1.tgz", + "integrity": "sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==", "dev": true, "optional": true, "dependencies": { "@types/node": "*" } }, - "node_modules/@types/d3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", - "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", - "dev": true, - "dependencies": { - "@types/d3-array": "*", - "@types/d3-axis": "*", - "@types/d3-brush": "*", - "@types/d3-chord": "*", - "@types/d3-color": "*", - "@types/d3-contour": "*", - "@types/d3-delaunay": "*", - "@types/d3-dispatch": "*", - "@types/d3-drag": "*", - "@types/d3-dsv": "*", - "@types/d3-ease": "*", - "@types/d3-fetch": "*", - "@types/d3-force": "*", - "@types/d3-format": "*", - "@types/d3-geo": "*", - "@types/d3-hierarchy": "*", - "@types/d3-interpolate": "*", - "@types/d3-path": "*", - "@types/d3-polygon": "*", - "@types/d3-quadtree": "*", - "@types/d3-random": "*", - "@types/d3-scale": "*", - "@types/d3-scale-chromatic": "*", - "@types/d3-selection": "*", - "@types/d3-shape": "*", - "@types/d3-time": "*", - "@types/d3-time-format": "*", - "@types/d3-timer": "*", - "@types/d3-transition": "*", - "@types/d3-zoom": "*" - } - }, - "node_modules/@types/d3-array": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz", - "integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==", - "dev": true - }, - "node_modules/@types/d3-axis": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", - "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", - "dev": true, - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-brush": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", - "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", - "dev": true, - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-chord": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", - "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", - "dev": true - }, - "node_modules/@types/d3-color": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", - "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", - "dev": true - }, - "node_modules/@types/d3-contour": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", - "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", - "dev": true, - "dependencies": { - "@types/d3-array": "*", - "@types/geojson": "*" - } - }, - "node_modules/@types/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", - "dev": true - }, - "node_modules/@types/d3-dispatch": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz", - "integrity": "sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ==", - "dev": true - }, - "node_modules/@types/d3-drag": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", - "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", - "dev": true, - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-dsv": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", - "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", - "dev": true - }, - "node_modules/@types/d3-ease": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", - "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", - "dev": true - }, - "node_modules/@types/d3-fetch": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", - "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", - "dev": true, - "dependencies": { - "@types/d3-dsv": "*" - } - }, - "node_modules/@types/d3-force": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", - "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", - "dev": true - }, - "node_modules/@types/d3-format": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", - "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", - "dev": true - }, - "node_modules/@types/d3-geo": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", - "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", - "dev": true, - "dependencies": { - "@types/geojson": "*" - } - }, - "node_modules/@types/d3-hierarchy": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", - "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==", - "dev": true - }, - "node_modules/@types/d3-interpolate": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", - "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", - "dev": true, - "dependencies": { - "@types/d3-color": "*" - } - }, - "node_modules/@types/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ==", - "dev": true - }, - "node_modules/@types/d3-polygon": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", - "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", - "dev": true - }, - "node_modules/@types/d3-quadtree": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", - "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", - "dev": true - }, - "node_modules/@types/d3-random": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", - "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", - "dev": true - }, - "node_modules/@types/d3-scale": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz", - "integrity": "sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==", - "dev": true, - "dependencies": { - "@types/d3-time": "*" - } - }, - "node_modules/@types/d3-scale-chromatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", - "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", - "dev": true - }, - "node_modules/@types/d3-selection": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", - "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", - "dev": true - }, - "node_modules/@types/d3-shape": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.6.tgz", - "integrity": "sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==", - "dev": true, - "dependencies": { - "@types/d3-path": "*" - } - }, - "node_modules/@types/d3-time": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", - "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", - "dev": true - }, - "node_modules/@types/d3-time-format": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", - "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", - "dev": true - }, - "node_modules/@types/d3-timer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", - "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", - "dev": true - }, - "node_modules/@types/d3-transition": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", - "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", - "dev": true, - "dependencies": { - "@types/d3-selection": "*" - } - }, - "node_modules/@types/d3-zoom": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", - "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", - "dev": true, - "dependencies": { - "@types/d3-interpolate": "*", - "@types/d3-selection": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -5404,12 +4983,6 @@ "@types/node": "*" } }, - "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==", - "dev": true - }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -5558,11 +5131,11 @@ "integrity": "sha512-JkXTOdKs5MF086b/pt8C3+yVp3iDUwG635L7oCH6HvJvvr6lSUU5oe/gLXnPEfYRROHjJIPgCV6cuAg8gGkntQ==" }, "node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/node-fetch": { @@ -5653,13 +5226,6 @@ "@types/node": "*" } }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", - "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", - "dev": true, - "optional": true - }, "node_modules/@types/wrap-ansi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", @@ -5680,17 +5246,6 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", @@ -5949,13 +5504,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", - "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz", + "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.14.0", - "@typescript-eslint/visitor-keys": "8.14.0" + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6102,9 +5657,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", - "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz", + "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6115,13 +5670,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", - "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz", + "integrity": "sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.14.0", - "@typescript-eslint/visitor-keys": "8.14.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/visitor-keys": "8.16.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -6143,15 +5698,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", - "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.16.0.tgz", + "integrity": "sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.14.0", - "@typescript-eslint/types": "8.14.0", - "@typescript-eslint/typescript-estree": "8.14.0" + "@typescript-eslint/scope-manager": "8.16.0", + "@typescript-eslint/types": "8.16.0", + "@typescript-eslint/typescript-estree": "8.16.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6162,16 +5717,21 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", - "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz", + "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.14.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.16.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6181,18 +5741,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/visitor-keys/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/@whook/authorization": { "resolved": "packages/whook-authorization", "link": true @@ -6679,22 +6227,15 @@ } }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, - "node_modules/b4a": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", - "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", - "dev": true, - "peer": true - }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -6819,57 +6360,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/bare-events": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", - "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/bare-fs": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", - "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "bare-events": "^2.0.0", - "bare-path": "^2.0.0", - "bare-stream": "^2.0.0" - } - }, - "node_modules/bare-os": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", - "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/bare-path": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", - "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "bare-os": "^2.1.0" - } - }, - "node_modules/bare-stream": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.4.2.tgz", - "integrity": "sha512-XZ4ln/KV4KT+PXdIWTKjsLY+quqCaEtqqtgGJVPw9AoM73By03ij64YjepK0aQvHSWDb6AfAZwqKaFu68qkrdA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "streamx": "^2.20.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -6890,16 +6380,6 @@ } ] }, - "node_modules/basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/before-after-hook": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", @@ -7116,6 +6596,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -7202,16 +6696,6 @@ "ieee754": "^1.1.13" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "peer": true, - "engines": { - "node": "*" - } - }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -7436,9 +6920,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001680", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", - "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "version": "1.0.30001685", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001685.tgz", + "integrity": "sha512-e/kJN1EMyHQzgcMEEgoo+YTCO1NGCmIYHk5Qk8jT6AazWemS5QFKJ5ShCJlH3GZrNIdZofcNCEwZqbMjjKzmnA==", "dev": true, "funding": [ { @@ -7505,32 +6989,6 @@ "node": ">=4.0.0" } }, - "node_modules/chevrotain": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", - "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", - "dev": true, - "dependencies": { - "@chevrotain/cst-dts-gen": "11.0.3", - "@chevrotain/gast": "11.0.3", - "@chevrotain/regexp-to-ast": "11.0.3", - "@chevrotain/types": "11.0.3", - "@chevrotain/utils": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/chevrotain-allstar": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", - "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", - "dev": true, - "dependencies": { - "lodash-es": "^4.17.21" - }, - "peerDependencies": { - "chevrotain": "^11.0.0" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -7576,21 +7034,6 @@ "node": ">=10" } }, - "node_modules/chromium-bidi": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", - "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", - "dev": true, - "peer": true, - "dependencies": { - "mitt": "3.0.1", - "urlpattern-polyfill": "10.0.0", - "zod": "3.23.8" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -7998,13 +7441,18 @@ } }, "node_modules/common-services/node_modules/@types/node": { - "version": "20.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", - "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", + "version": "20.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", + "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", "dependencies": { "undici-types": "~6.19.2" } }, + "node_modules/common-services/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -8035,12 +7483,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/confbox": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", - "dev": true - }, "node_modules/config-master": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", @@ -8619,9 +8061,9 @@ "dev": true }, "node_modules/cookie": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.1.tgz", - "integrity": "sha512-Xd8lFX4LM9QEEwxQpF9J9NTUh8pmdJO0cyRJhFiDoLTk2eH8FXlRv2IFGYVadZpqI3j8fhNrSdKCeYPxiAhLXw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", "engines": { "node": ">=18" } @@ -8649,15 +8091,6 @@ "node": ">= 0.10" } }, - "node_modules/cose-base": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", - "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==", - "dev": true, - "dependencies": { - "layout-base": "^1.0.0" - } - }, "node_modules/cosmiconfig": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", @@ -8761,9 +8194,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", - "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -8785,54 +8218,6 @@ "node": ">=4" } }, - "node_modules/cytoscape": { - "version": "3.30.4", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.4.tgz", - "integrity": "sha512-OxtlZwQl1WbwMmLiyPSEBuzeTIQnwZhJYYWFzZ2PhEHVFwpeaqNIkUzSiso00D98qk60l8Gwon2RP304d3BJ1A==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/cytoscape-cose-bilkent": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz", - "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==", - "dev": true, - "dependencies": { - "cose-base": "^1.0.0" - }, - "peerDependencies": { - "cytoscape": "^3.2.0" - } - }, - "node_modules/cytoscape-fcose": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", - "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", - "dev": true, - "dependencies": { - "cose-base": "^2.2.0" - }, - "peerDependencies": { - "cytoscape": "^3.2.0" - } - }, - "node_modules/cytoscape-fcose/node_modules/cose-base": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", - "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", - "dev": true, - "dependencies": { - "layout-base": "^2.0.0" - } - }, - "node_modules/cytoscape-fcose/node_modules/layout-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", - "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", - "dev": true - }, "node_modules/cz-conventional-changelog": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", @@ -8924,478 +8309,6 @@ "node": ">=4" } }, - "node_modules/d3": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", - "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", - "dev": true, - "dependencies": { - "d3-array": "3", - "d3-axis": "3", - "d3-brush": "3", - "d3-chord": "3", - "d3-color": "3", - "d3-contour": "4", - "d3-delaunay": "6", - "d3-dispatch": "3", - "d3-drag": "3", - "d3-dsv": "3", - "d3-ease": "3", - "d3-fetch": "3", - "d3-force": "3", - "d3-format": "3", - "d3-geo": "3", - "d3-hierarchy": "3", - "d3-interpolate": "3", - "d3-path": "3", - "d3-polygon": "3", - "d3-quadtree": "3", - "d3-random": "3", - "d3-scale": "4", - "d3-scale-chromatic": "3", - "d3-selection": "3", - "d3-shape": "3", - "d3-time": "3", - "d3-time-format": "4", - "d3-timer": "3", - "d3-transition": "3", - "d3-zoom": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-array": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", - "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", - "dev": true, - "dependencies": { - "internmap": "1 - 2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-axis": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", - "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-brush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", - "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", - "dev": true, - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "3", - "d3-transition": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-chord": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", - "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", - "dev": true, - "dependencies": { - "d3-path": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-contour": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", - "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", - "dev": true, - "dependencies": { - "d3-array": "^3.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", - "dev": true, - "dependencies": { - "delaunator": "5" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dispatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", - "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-drag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", - "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", - "dev": true, - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-selection": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", - "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", - "dev": true, - "dependencies": { - "commander": "7", - "iconv-lite": "0.6", - "rw": "1" - }, - "bin": { - "csv2json": "bin/dsv2json.js", - "csv2tsv": "bin/dsv2dsv.js", - "dsv2dsv": "bin/dsv2dsv.js", - "dsv2json": "bin/dsv2json.js", - "json2csv": "bin/json2dsv.js", - "json2dsv": "bin/json2dsv.js", - "json2tsv": "bin/json2dsv.js", - "tsv2csv": "bin/dsv2dsv.js", - "tsv2json": "bin/dsv2json.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/d3-dsv/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", - "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", - "dev": true, - "dependencies": { - "d3-dsv": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-force": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", - "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", - "dev": true, - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-quadtree": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-geo": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", - "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", - "dev": true, - "dependencies": { - "d3-array": "2.5.0 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-hierarchy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", - "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", - "dev": true, - "dependencies": { - "d3-color": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-polygon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", - "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-quadtree": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", - "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-random": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", - "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-sankey": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", - "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", - "dev": true, - "dependencies": { - "d3-array": "1 - 2", - "d3-shape": "^1.2.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-array": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", - "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", - "dev": true, - "dependencies": { - "internmap": "^1.0.0" - } - }, - "node_modules/d3-sankey/node_modules/d3-path": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", - "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", - "dev": true - }, - "node_modules/d3-sankey/node_modules/d3-shape": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", - "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", - "dev": true, - "dependencies": { - "d3-path": "1" - } - }, - "node_modules/d3-sankey/node_modules/internmap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", - "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", - "dev": true - }, - "node_modules/d3-scale": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", - "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", - "dev": true, - "dependencies": { - "d3-array": "2.10.0 - 3", - "d3-format": "1 - 3", - "d3-interpolate": "1.2.0 - 3", - "d3-time": "2.1.1 - 3", - "d3-time-format": "2 - 4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-scale-chromatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", - "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", - "dev": true, - "dependencies": { - "d3-color": "1 - 3", - "d3-interpolate": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-selection": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", - "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", - "dev": true, - "dependencies": { - "d3-path": "^3.1.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", - "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", - "dev": true, - "dependencies": { - "d3-array": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time-format": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", - "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", - "dev": true, - "dependencies": { - "d3-time": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-timer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", - "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-transition": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", - "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", - "dev": true, - "dependencies": { - "d3-color": "1 - 3", - "d3-dispatch": "1 - 3", - "d3-ease": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "d3-selection": "2 - 3" - } - }, - "node_modules/d3-zoom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", - "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", - "dev": true, - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "2 - 3", - "d3-transition": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/dagre-d3-es": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz", - "integrity": "sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw==", - "dev": true, - "dependencies": { - "d3": "^7.9.0", - "lodash-es": "^4.17.21" - } - }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -9405,16 +8318,6 @@ "node": ">=8" } }, - "node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -9424,12 +8327,6 @@ "node": "*" } }, - "node_modules/dayjs": { - "version": "1.11.13", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", - "dev": true - }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -9707,43 +8604,6 @@ "node": ">=8" } }, - "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", - "dev": true, - "peer": true, - "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/degenerator/node_modules/ast-types": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", - "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", - "dev": true, - "peer": true, - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/delaunator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", - "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", - "dev": true, - "dependencies": { - "robust-predicates": "^3.0.2" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -9802,13 +8662,6 @@ "node": ">=8" } }, - "node_modules/devtools-protocol": { - "version": "0.0.1367902", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", - "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==", - "dev": true, - "peer": true - }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", @@ -9862,15 +8715,6 @@ "node": ">=12" } }, - "node_modules/dompurify": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.2.tgz", - "integrity": "sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw==", - "dev": true, - "optionalDependencies": { - "@types/trusted-types": "^2.0.7" - } - }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -9967,9 +8811,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.58", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.58.tgz", - "integrity": "sha512-al2l4r+24ZFL7WzyPTlyD0fC33LLzvxqLCwurtBibVPghRGO9hSTl+tis8t1kD7biPiH/en4U0I7o/nQbYeoVA==", + "version": "1.5.67", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz", + "integrity": "sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==", "dev": true }, "node_modules/emittery": { @@ -10187,60 +9031,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "peer": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/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==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", - "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.7.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.14.0", - "@eslint/plugin-kit": "^0.2.0", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.0", + "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", @@ -10259,8 +9070,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -10694,11 +9504,25 @@ "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/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/express/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -10737,43 +9561,6 @@ "node": ">=4" } }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "peer": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "peer": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -10785,13 +9572,6 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true, - "peer": true - }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -10855,16 +9635,6 @@ "bser": "2.1.1" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "peer": true, - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -11163,9 +9933,9 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, "node_modules/follow-redirects": { @@ -11539,37 +10309,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/get-uri": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", - "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", - "dev": true, - "peer": true, - "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4", - "fs-extra": "^11.2.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, - "peer": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/git-raw-commits": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-5.0.0.tgz", @@ -11798,11 +10537,14 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.1.0.tgz", + "integrity": "sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==", "dependencies": { - "get-intrinsic": "^1.1.3" + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11867,12 +10609,6 @@ "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/hachure-fill": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", - "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==", - "dev": true - }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -11933,9 +10669,12 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", + "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", + "dependencies": { + "call-bind": "^1.0.7" + }, "engines": { "node": ">= 0.4" }, @@ -12435,15 +11174,6 @@ "url": "https://github.com/sindresorhus/internal-ip?sponsor=1" } }, - "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -13969,22 +12699,6 @@ "node": ">=20.11.1" } }, - "node_modules/katex": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", - "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", - "dev": true, - "funding": [ - "https://opencollective.com/katex", - "https://github.com/sponsors/katex" - ], - "dependencies": { - "commander": "^8.3.0" - }, - "bin": { - "katex": "cli.js" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -13994,12 +12708,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/khroma": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", - "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==", - "dev": true - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -14028,9 +12736,9 @@ } }, "node_modules/knifecycle": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.0.tgz", - "integrity": "sha512-4b8887ZvDcnMaDXyTD+pPTdMHgrdaIY1zugRXActqEjjRqRNRuu0HxoQkUvz//G60m2XwGccrG+ZZLwK5fkQ1Q==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.3.0.tgz", + "integrity": "sha512-C4Q4/fqm553XNNeaJQBxlbe1fgf94LFKHin4f89FgGBMuNZs4k4zfI43Hdh/vkO2xIPyVOUsLJEXoIzF/ncaGA==", "dependencies": { "debug": "^4.3.5", "yerror": "^8.0.0" @@ -14039,34 +12747,6 @@ "node": ">=20.11.1" } }, - "node_modules/kolorist": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", - "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", - "dev": true - }, - "node_modules/langium": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/langium/-/langium-3.0.0.tgz", - "integrity": "sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg==", - "dev": true, - "dependencies": { - "chevrotain": "~11.0.3", - "chevrotain-allstar": "~0.3.0", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.11", - "vscode-uri": "~3.0.8" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/layout-base": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", - "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==", - "dev": true - }, "node_modules/lerna": { "version": "8.1.9", "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.9.tgz", @@ -14979,22 +13659,6 @@ "node": ">=8" } }, - "node_modules/local-pkg": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", - "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", - "dev": true, - "dependencies": { - "mlly": "^1.7.3", - "pkg-types": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -15015,12 +13679,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true - }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -15341,59 +13999,6 @@ "node": ">= 8" } }, - "node_modules/mermaid": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.4.1.tgz", - "integrity": "sha512-Mb01JT/x6CKDWaxigwfZYuYmDZ6xtrNwNlidKZwkSrDaY9n90tdrJTV5Umk+wP1fZscGptmKFXHsXMDEVZ+Q6A==", - "dev": true, - "dependencies": { - "@braintree/sanitize-url": "^7.0.1", - "@iconify/utils": "^2.1.32", - "@mermaid-js/parser": "^0.3.0", - "@types/d3": "^7.4.3", - "cytoscape": "^3.29.2", - "cytoscape-cose-bilkent": "^4.1.0", - "cytoscape-fcose": "^2.2.0", - "d3": "^7.9.0", - "d3-sankey": "^0.12.3", - "dagre-d3-es": "7.0.11", - "dayjs": "^1.11.10", - "dompurify": "^3.2.1", - "katex": "^0.16.9", - "khroma": "^2.1.0", - "lodash-es": "^4.17.21", - "marked": "^13.0.2", - "roughjs": "^4.6.6", - "stylis": "^4.3.1", - "ts-dedent": "^2.2.0", - "uuid": "^9.0.1" - } - }, - "node_modules/mermaid/node_modules/marked": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", - "integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==", - "dev": true, - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mermaid/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/metapak": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/metapak/-/metapak-6.0.1.tgz", @@ -15852,13 +14457,6 @@ "node": ">=8" } }, - "node_modules/mitt": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", - "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", - "dev": true, - "peer": true - }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -15879,18 +14477,6 @@ "integrity": "sha512-xOE9xbICroUDmG1ye2h4bZ8WBie9EGmACaco8K8cx6RlkJJrxGIqjGqztAI+NMhexXBcdGbSEzI6N3EJPevxZw==", "dev": true }, - "node_modules/mlly": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.3.tgz", - "integrity": "sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==", - "dev": true, - "dependencies": { - "acorn": "^8.14.0", - "pathe": "^1.1.2", - "pkg-types": "^1.2.1", - "ufo": "^1.5.4" - } - }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -15972,16 +14558,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, - "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/node-abort-controller": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", @@ -16258,9 +14834,9 @@ } }, "node_modules/nx": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.1.0.tgz", - "integrity": "sha512-d8Ywh1AvG3szYqWEHg2n9DHh/hF0jtVhMZKxwsr7n+kSVxp7gE/rHCCfOo8H+OmP030qXoox5e4Ovp7H9CEJnA==", + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.1.4.tgz", + "integrity": "sha512-hyvGYxTzBkPxSXAB2tuqdv9TpVde5xOdGalsIdhF7j7PI3nwPpqtc3y28YTgRgpxtOE1Y6BfDNkXMO1SW0xu2w==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -16302,16 +14878,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.1.0", - "@nx/nx-darwin-x64": "20.1.0", - "@nx/nx-freebsd-x64": "20.1.0", - "@nx/nx-linux-arm-gnueabihf": "20.1.0", - "@nx/nx-linux-arm64-gnu": "20.1.0", - "@nx/nx-linux-arm64-musl": "20.1.0", - "@nx/nx-linux-x64-gnu": "20.1.0", - "@nx/nx-linux-x64-musl": "20.1.0", - "@nx/nx-win32-arm64-msvc": "20.1.0", - "@nx/nx-win32-x64-msvc": "20.1.0" + "@nx/nx-darwin-arm64": "20.1.4", + "@nx/nx-darwin-x64": "20.1.4", + "@nx/nx-freebsd-x64": "20.1.4", + "@nx/nx-linux-arm-gnueabihf": "20.1.4", + "@nx/nx-linux-arm64-gnu": "20.1.4", + "@nx/nx-linux-arm64-musl": "20.1.4", + "@nx/nx-linux-x64-gnu": "20.1.4", + "@nx/nx-linux-x64-musl": "20.1.4", + "@nx/nx-win32-arm64-msvc": "20.1.4", + "@nx/nx-win32-x64-msvc": "20.1.4" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -16868,52 +15444,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pac-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", - "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", - "dev": true, - "peer": true, - "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.5", - "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", - "dev": true, - "peer": true, - "dependencies": { - "degenerator": "^5.0.0", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, - "node_modules/package-manager-detector": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.6.tgz", - "integrity": "sha512-9vPH3qooBlYRJdmdYP00nvjZOulm40r5dhtal8st18ctf+6S1k7pi5yIHLvI4w5D70x0Y+xdVD9qITH0QO/A8A==", - "dev": true - }, "node_modules/pacote": { "version": "18.0.6", "resolved": "https://registry.npmjs.org/pacote/-/pacote-18.0.6.tgz", @@ -17036,12 +15572,6 @@ "node": ">= 0.8" } }, - "node_modules/path-data-parser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", - "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -17103,12 +15633,6 @@ "node": ">=8" } }, - "node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true - }, "node_modules/peek-readable": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.3.1.tgz", @@ -17122,13 +15646,6 @@ "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true, - "peer": true - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -17188,33 +15705,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pkg-types": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", - "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", - "dev": true, - "dependencies": { - "confbox": "^0.1.8", - "mlly": "^1.7.2", - "pathe": "^1.1.2" - } - }, - "node_modules/points-on-curve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", - "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==", - "dev": true - }, - "node_modules/points-on-path": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", - "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", - "dev": true, - "dependencies": { - "path-data-parser": "0.1.0", - "points-on-curve": "0.2.0" - } - }, "node_modules/portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", @@ -17278,9 +15768,9 @@ } }, "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==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -17354,16 +15844,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise-all-reject-late": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", @@ -17444,36 +15924,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-agent": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", - "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", - "dev": true, - "peer": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.3", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.1", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.2" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -17504,53 +15954,13 @@ "node": ">=6" } }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/puppeteer": { - "version": "23.9.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.9.0.tgz", - "integrity": "sha512-WfB8jGwFV+qrD9dcJJVvWPFJBU6kxeu2wxJz9WooDGfM3vIiKLgzImEDBxUQnCBK/2cXB3d4dV6gs/LLpgfLDg==", - "dev": true, - "hasInstallScript": true, - "peer": true, - "dependencies": { - "@puppeteer/browsers": "2.4.1", - "chromium-bidi": "0.8.0", - "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1367902", - "puppeteer-core": "23.9.0", - "typed-query-selector": "^2.12.0" - }, - "bin": { - "puppeteer": "lib/cjs/puppeteer/node/cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/puppeteer-core": { - "version": "23.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.9.0.tgz", - "integrity": "sha512-hLVrav2HYMVdK0YILtfJwtnkBAwNOztUdR4aJ5YKDvgsbtagNr6urUJk9HyjRA9e+PaLI3jzJ0wM7A4jSZ7Qxw==", + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true, - "peer": true, - "dependencies": { - "@puppeteer/browsers": "2.4.1", - "chromium-bidi": "0.8.0", - "debug": "^4.3.7", - "devtools-protocol": "0.0.1367902", - "typed-query-selector": "^2.12.0", - "ws": "^8.18.0" - }, "engines": { - "node": ">=18" + "node": ">=6" } }, "node_modules/pure-rand": { @@ -17570,9 +15980,9 @@ ] }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", + "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", "dependencies": { "side-channel": "^1.0.6" }, @@ -17603,13 +16013,6 @@ } ] }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true, - "peer": true - }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -18328,24 +16731,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/robust-predicates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", - "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", - "dev": true - }, - "node_modules/roughjs": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", - "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", - "dev": true, - "dependencies": { - "hachure-fill": "^0.5.2", - "path-data-parser": "^0.1.0", - "points-on-curve": "^0.2.0", - "points-on-path": "^0.2.1" - } - }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -18378,12 +16763,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", - "dev": true - }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", @@ -18976,21 +17355,6 @@ "node": ">=10.19.0" } }, - "node_modules/streamx": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", - "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", - "dev": true, - "peer": true, - "dependencies": { - "fast-fifo": "^1.3.2", - "queue-tick": "^1.0.1", - "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, "node_modules/strict-qs": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/strict-qs/-/strict-qs-8.0.3.tgz", @@ -19179,12 +17543,6 @@ "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/stylis": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", - "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==", - "dev": true - }, "node_modules/super-regex": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/super-regex/-/super-regex-0.2.0.tgz", @@ -19294,33 +17652,6 @@ "node": ">=10" } }, - "node_modules/tar-fs": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", - "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", - "dev": true, - "peer": true, - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^2.1.1", - "bare-path": "^2.1.0" - } - }, - "node_modules/tar-fs/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, - "peer": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -19482,13 +17813,6 @@ "node": ">=4" } }, - "node_modules/text-decoder": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", - "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", - "dev": true, - "peer": true - }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -19498,12 +17822,6 @@ "node": ">=0.10" } }, - "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/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -19564,12 +17882,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tinyexec": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", - "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", - "dev": true - }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -19672,9 +17984,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", - "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "engines": { "node": ">=16" @@ -19683,15 +17995,6 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-dedent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", - "integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==", - "dev": true, - "engines": { - "node": ">=6.10" - } - }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -20198,9 +18501,9 @@ } }, "node_modules/type-fest": { - "version": "4.26.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.1.tgz", - "integrity": "sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.29.1.tgz", + "integrity": "sha512-Y1zUveI92UYM/vo1EFlQSsNf74+hfKH+7saZJslF0Fw92FRaiTAnHPIvo9d7SLxXt/gAYqA4RXyDTioMQCCp0A==", "engines": { "node": ">=16" }, @@ -20220,13 +18523,6 @@ "node": ">= 0.6" } }, - "node_modules/typed-query-selector": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", - "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", - "dev": true, - "peer": true - }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -20234,9 +18530,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -20392,12 +18688,6 @@ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, - "node_modules/ufo": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", - "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", - "dev": true - }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -20422,17 +18712,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "peer": true, - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, "node_modules/underscore": { "version": "1.13.7", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", @@ -20440,9 +18719,9 @@ "dev": true }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "node_modules/unicorn-magic": { "version": "0.1.0", @@ -20556,13 +18835,6 @@ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" }, - "node_modules/urlpattern-polyfill": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", - "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", - "dev": true, - "peer": true - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -20638,55 +18910,6 @@ "node": ">= 0.8" } }, - "node_modules/vscode-jsonrpc": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/vscode-languageserver": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", - "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", - "dev": true, - "dependencies": { - "vscode-languageserver-protocol": "3.17.5" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", - "dev": true, - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "dev": true - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "dev": true - }, - "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true - }, "node_modules/walk-back": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-5.1.1.tgz", @@ -20988,28 +19211,6 @@ "node": ">=6" } }, - "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xmlcreate": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", @@ -21066,17 +19267,6 @@ "node": ">=12" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "peer": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "node_modules/yerror": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/yerror/-/yerror-8.0.0.tgz", @@ -21119,16 +19309,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "dev": true, - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "packages/whook": { "name": "@whook/whook", "version": "17.0.2", @@ -21147,7 +19327,7 @@ "ignore": "^5.3.1", "inquirer": "^11.1.0", "internal-ip": "^8.0.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "miniquery": "^1.1.2", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", @@ -21203,7 +19383,7 @@ "@whook/whook": "^17.0.2", "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "yerror": "^8.0.0", "yhttperror": "^8.0.0" }, @@ -21230,18 +19410,6 @@ "node": ">=20.11.1" } }, - "packages/whook-authorization/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-aws-lambda": { "name": "@whook/aws-lambda", "version": "17.1.1", @@ -21260,7 +19428,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cpr": "3.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", "qs": "^6.13.0", @@ -21293,18 +19461,6 @@ "node": ">=20.11.1" } }, - "packages/whook-aws-lambda/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-cors": { "name": "@whook/cors", "version": "17.0.2", @@ -21313,7 +19469,7 @@ "@apidevtools/swagger-parser": "^10.1.0", "@whook/http-router": "^17.0.2", "@whook/whook": "^17.0.2", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "yhttperror": "^8.0.0" }, @@ -21340,18 +19496,6 @@ "node": ">=20.11.1" } }, - "packages/whook-cors/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-create": { "name": "@whook/create", "version": "17.0.2", @@ -21363,7 +19507,7 @@ "debug": "^4.3.7", "fs-extra": "^11.2.0", "inquirer": "^11.1.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ora": "^8.1.0", "yerror": "^8.0.0" }, @@ -21423,18 +19567,6 @@ "node": ">=18" } }, - "packages/whook-create/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-create/node_modules/mute-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", @@ -21468,7 +19600,7 @@ "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -21478,7 +19610,6 @@ }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -21492,7 +19623,6 @@ "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "metapak": "^6.0.1", "metapak-nfroidure": "18.2.0", "prettier": "^3.3.3", @@ -21506,18 +19636,6 @@ "node": ">=20.11.1" } }, - "packages/whook-example/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-gcp-functions": { "name": "@whook/gcp-functions", "version": "17.0.2", @@ -21532,7 +19650,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cpr": "3.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", "qs": "^6.13.0", @@ -21562,18 +19680,6 @@ "node": ">=20.11.1" } }, - "packages/whook-gcp-functions/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-graphiql": { "name": "@whook/graphiql", "version": "17.0.2", @@ -21581,7 +19687,7 @@ "dependencies": { "@whook/whook": "^17.0.2", "apollo-server-module-graphiql": "^1.4.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "yerror": "^8.0.0" }, @@ -21610,18 +19716,6 @@ "node": ">=20.11.1" } }, - "packages/whook-graphiql/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-graphql": { "name": "@whook/graphql", "version": "17.0.2", @@ -21631,7 +19725,7 @@ "@whook/http-transaction": "^17.0.2", "@whook/whook": "^17.0.2", "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "type-fest": "^4.26.1", "yhttperror": "^8.0.0" @@ -21663,18 +19757,6 @@ "node": ">=20.11.1" } }, - "packages/whook-graphql/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-http-router": { "name": "@whook/http-router", "version": "17.0.2", @@ -21692,7 +19774,7 @@ "camelcase": "^8.0.0", "content-type": "^1.0.5", "first-chunk-stream": "^6.0.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "miniquery": "^1.1.2", "ms": "^2.1.3", "negotiator": "^0.6.3", @@ -21729,25 +19811,13 @@ "node": ">=20.11.1" } }, - "packages/whook-http-router/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-http-server": { "name": "@whook/http-server", "version": "17.0.2", "license": "MIT", "dependencies": { "@whook/http-router": "^17.0.2", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ms": "^2.1.3", "yerror": "^8.0.0" }, @@ -21775,25 +19845,13 @@ "node": ">=20.11.1" } }, - "packages/whook-http-server/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-http-transaction": { "name": "@whook/http-transaction", "version": "17.0.2", "license": "MIT", "dependencies": { "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ms": "^2.1.3", "openapi-types": "^12.1.3", "statuses": "^2.0.1", @@ -21827,18 +19885,6 @@ "node": ">=20.11.1" } }, - "packages/whook-http-transaction/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-method-override": { "name": "@whook/method-override", "version": "17.0.2", @@ -21847,7 +19893,7 @@ "@whook/http-transaction": "^17.0.2", "@whook/whook": "^17.0.2", "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3" }, "devDependencies": { @@ -21873,18 +19919,6 @@ "node": ">=20.11.1" } }, - "packages/whook-method-override/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-oauth2": { "name": "@whook/oauth2", "version": "17.0.2", @@ -21895,7 +19929,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cookie": "^1.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "type-fest": "^4.26.1", "yerror": "^8.0.0", @@ -21925,18 +19959,6 @@ "node": ">=20.11.1" } }, - "packages/whook-oauth2/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-swagger-ui": { "name": "@whook/swagger-ui", "version": "17.0.2", @@ -21948,7 +19970,7 @@ "@whook/whook": "^17.0.2", "axios": "^1.7.7", "ecstatic": "^4.1.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "swagger-ui-dist": "^5.17.14", "type-fest": "^4.26.1" @@ -21976,18 +19998,6 @@ "node": ">=20.11.1" } }, - "packages/whook-swagger-ui/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook-versions": { "name": "@whook/versions", "version": "17.0.2", @@ -21995,7 +20005,7 @@ "dependencies": { "@whook/whook": "^17.0.2", "application-services": "^6.1.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "semver": "^7.6.3", "yhttperror": "^8.0.0" @@ -22023,18 +20033,6 @@ "node": ">=20.11.1" } }, - "packages/whook-versions/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook/node_modules/fs-extra": { "version": "11.2.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", @@ -22066,18 +20064,6 @@ "node": ">=18" } }, - "packages/whook/node_modules/knifecycle": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/knifecycle/-/knifecycle-17.2.1.tgz", - "integrity": "sha512-Uk4BQ5X+Rvg04HrMfcwZJ1IkUN+VgyzCKUwFg7AA22UvEaeSk98fY2qYfFN0XFqK39PaJhWIbP5xnJ+9hZoCmw==", - "dependencies": { - "debug": "^4.3.5", - "yerror": "^8.0.0" - }, - "engines": { - "node": ">=20.11.1" - } - }, "packages/whook/node_modules/mute-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", diff --git a/packages/whook-authorization/package.json b/packages/whook-authorization/package.json index 5898e75a..72d74c09 100644 --- a/packages/whook-authorization/package.json +++ b/packages/whook-authorization/package.json @@ -56,7 +56,7 @@ "@whook/whook": "^17.0.2", "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "yerror": "^8.0.0", "yhttperror": "^8.0.0" }, diff --git a/packages/whook-aws-lambda/package.json b/packages/whook-aws-lambda/package.json index 31daed2d..2bfc7d68 100644 --- a/packages/whook-aws-lambda/package.json +++ b/packages/whook-aws-lambda/package.json @@ -56,7 +56,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cpr": "3.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", "qs": "^6.13.0", diff --git a/packages/whook-aws-lambda/src/commands/testCronLambda.ts b/packages/whook-aws-lambda/src/commands/testCronLambda.ts index 78bd5618..1de8682b 100644 --- a/packages/whook-aws-lambda/src/commands/testCronLambda.ts +++ b/packages/whook-aws-lambda/src/commands/testCronLambda.ts @@ -81,10 +81,13 @@ async function initTestCronLambdaCommand({ type, extension, ); - const result = await handler({ - time: date === 'now' ? new Date(time()).toISOString() : date, - body: JSON.parse(body), - }, {}); + const result = await handler( + { + time: date === 'now' ? new Date(time()).toISOString() : date, + body: JSON.parse(body), + }, + {}, + ); log('info', 'SUCCESS:', result as string); diff --git a/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts b/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts index fdc7f7f7..0f0dfad6 100644 --- a/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts +++ b/packages/whook-aws-lambda/src/wrappers/awsHTTPLambda.ts @@ -49,10 +49,7 @@ import { type DereferencedParameterObject, pickAllHeaderValues, } from '@whook/http-transaction'; -import type { - APIGatewayProxyEvent, - APIGatewayProxyResult, -} from 'aws-lambda'; +import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda'; import type { WhookErrorHandler } from '@whook/http-router'; import type { AppEnvVars } from 'application-services'; diff --git a/packages/whook-aws-lambda/src/wrappers/awsKafkaConsumerLambda.ts b/packages/whook-aws-lambda/src/wrappers/awsKafkaConsumerLambda.ts index 55b6f2e3..1267b2fe 100644 --- a/packages/whook-aws-lambda/src/wrappers/awsKafkaConsumerLambda.ts +++ b/packages/whook-aws-lambda/src/wrappers/awsKafkaConsumerLambda.ts @@ -61,9 +61,9 @@ async function initWrapHandlerForKafkaLambda({ null, { ENV, OPERATION_API, apm, time, log }, handler as WhookHandler< - LambdaKafkaConsumerInput, - LambdaKafkaConsumerOutput - >, + LambdaKafkaConsumerInput, + LambdaKafkaConsumerOutput + >, ); return wrappedHandler as unknown as S; diff --git a/packages/whook-cors/package.json b/packages/whook-cors/package.json index 029438ef..95e85fd9 100644 --- a/packages/whook-cors/package.json +++ b/packages/whook-cors/package.json @@ -55,7 +55,7 @@ "@apidevtools/swagger-parser": "^10.1.0", "@whook/http-router": "^17.0.2", "@whook/whook": "^17.0.2", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "yhttperror": "^8.0.0" }, diff --git a/packages/whook-create/package.json b/packages/whook-create/package.json index 418e4b66..80b86e68 100644 --- a/packages/whook-create/package.json +++ b/packages/whook-create/package.json @@ -74,7 +74,7 @@ "debug": "^4.3.7", "fs-extra": "^11.2.0", "inquirer": "^11.1.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ora": "^8.1.0", "yerror": "^8.0.0" }, diff --git a/packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap b/packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap index 16c2709c..b08bd9e1 100644 --- a/packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap +++ b/packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap @@ -102,19 +102,17 @@ DEV_MODE=1 "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -143,7 +141,7 @@ DEV_MODE=1 "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -153,7 +151,6 @@ DEV_MODE=1 }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -167,7 +164,6 @@ DEV_MODE=1 "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -416,19 +412,17 @@ DEV_MODE=1 "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -457,7 +451,7 @@ DEV_MODE=1 "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -467,7 +461,6 @@ DEV_MODE=1 }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -481,7 +474,6 @@ DEV_MODE=1 "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -768,19 +760,17 @@ DEV_MODE=1 "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -809,7 +799,7 @@ DEV_MODE=1 "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -819,7 +809,6 @@ DEV_MODE=1 }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -833,7 +822,6 @@ DEV_MODE=1 "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -1103,19 +1091,17 @@ DEV_MODE=1 "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -1144,7 +1130,7 @@ DEV_MODE=1 "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -1154,7 +1140,6 @@ DEV_MODE=1 }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -1168,7 +1153,6 @@ DEV_MODE=1 "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", diff --git a/packages/whook-create/src/services/createWhook.test.ts b/packages/whook-create/src/services/createWhook.test.ts index a5153ad1..cfaba9d3 100644 --- a/packages/whook-create/src/services/createWhook.test.ts +++ b/packages/whook-create/src/services/createWhook.test.ts @@ -170,7 +170,7 @@ describe('initCreateWhook', () => { "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -181,7 +181,6 @@ describe('initCreateWhook', () => { "description": "A new Whook project", "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -195,7 +194,6 @@ describe('initCreateWhook', () => { "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -263,19 +261,17 @@ describe('initCreateWhook', () => { "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -372,7 +368,7 @@ describe('initCreateWhook', () => { "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -383,7 +379,6 @@ describe('initCreateWhook', () => { "description": "A new Whook project", "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -397,7 +392,6 @@ describe('initCreateWhook', () => { "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -465,19 +459,17 @@ describe('initCreateWhook', () => { "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -559,7 +551,7 @@ describe('initCreateWhook', () => { "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -570,7 +562,6 @@ describe('initCreateWhook', () => { "description": "A new Whook project", "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -584,7 +575,6 @@ describe('initCreateWhook', () => { "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "schema2dts": "^7.0.2", @@ -652,19 +642,17 @@ describe('initCreateWhook', () => { "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md", "build": "rimraf 'dist' && tsc --outDir dist", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=\${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=\${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=\${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", diff --git a/packages/whook-example/ARCHITECTURE.md b/packages/whook-example/ARCHITECTURE.md index 1146bb82..ba38f3b6 100644 --- a/packages/whook-example/ARCHITECTURE.md +++ b/packages/whook-example/ARCHITECTURE.md @@ -9,18 +9,18 @@ 1. [A Whook baked API](#1-a-whook-baked-api) 1. [The main file](#11-the-main-file) - 1. [runServer](#111-runserver) - 2. [prepareServer](#112-prepareserver) + 1. [runProcess](#111-runprocess) + 2. [prepareProcess](#112-prepareprocess) 1. [server wrappers](#1121-server-wrappers) 3. [prepareEnvironment](#113-prepareenvironment) 1. [Autoloader](#1131-autoloader) 2. [API definitions](#1132-api-definitions) 3. [MAIN_FILE_URL](#1133-main_file_url) + 4. [supported `APP_ENV` values](#1134-supported-`app_env`-values) 4. [APP_ENV](#1134-app_env) 4. [$overrides](#1134-$overrides) 6. [TRANSACTIONS](#1136-transactions) 7. [WHOOK_PLUGINS](#1137-whook_plugins) - 4. [prepareCommand](#114-preparecommand) 2. [The build file](#12-the-build-file) 1. [The `runBuild` function](#121-the-`runbuild`-function) 2. [The `prepareBuildEnvironment` function](#122-the-`preparebuildenvironment`-function) @@ -64,7 +64,6 @@ 5. [Commands](#5-commands) 1. [Definition](#51-definition) 2. [Implementation](#52-implementation) -6. [REPL](#6-repl) 7. [Watch server](#7-watch-server) @@ -77,7 +76,7 @@ You can see a view of the full architecture document by running `npm run architecture` and opening the generated `ARCHITECTURE.md` file. -[See in context](./src/index.ts#L18-L25) +[See in context](./src/index.ts#L21-L28) @@ -86,29 +85,28 @@ You can see a view of the full architecture document Per convention a Whook server main file must exports the following 3 functions to be composable. -[See in context](./src/index.ts#L31-L35) +[See in context](./src/index.ts#L39-L43) -#### 1.1.1. runServer +#### 1.1.1. runProcess -The `runServer` function is intended to run the server +The `runProcess` function is intended to run the server and may be proxied as is, except in some e2e test cases where it can be useful to put mocks in (see [the E2E tests](./index.test.ts) coming with this project for a real world example). -[See in context](./src/index.ts#L37-L44) +[See in context](./src/index.ts#L45-L52) -#### 1.1.2. prepareServer +#### 1.1.2. prepareProcess -The `prepareServer` function is intended to prepare the server - environment. It relies on the main environment but will be - used only by the server, not the commands or build scripts. +The `prepareProcess` function is intended to prepare the process + environment. -[See in context](./src/index.ts#L63-L68) +[See in context](./src/index.ts#L73-L77) @@ -118,15 +116,15 @@ Add here any logic bound to the server only For example, here we add a Swagger UI page for development purpose. -[See in context](./src/index.ts#L73-L78) +[See in context](./src/index.ts#L82-L87) #### 1.1.3. prepareEnvironment -The `prepareEnvironment` one is intended to prepare the server environment +The `prepareEnvironment` one is intended to prepare the process environment -[See in context](./src/index.ts#L85-L88) +[See in context](./src/index.ts#L94-L97) @@ -142,7 +140,7 @@ OR, like in this example, use the Whook `$autoload` service autoloader by creating a service with the same signature (see https://github.com/nfroidure/whook/blob/master/packages/whook/src/services/_autoload.ts). -[See in context](./src/index.ts#L108-L119) +[See in context](./src/index.ts#L117-L128) @@ -154,7 +152,7 @@ This service loads the API definitions directly by Though, it is not recommended to not use the Whook's black magic ;). -[See in context](./src/index.ts#L122-L129) +[See in context](./src/index.ts#L131-L138) @@ -163,7 +161,16 @@ This service loads the API definitions directly by The project main file allows autoloading features to work either with sources (in `src`) and files built (in `dist/`). -[See in context](./src/index.ts#L132-L136) +[See in context](./src/index.ts#L141-L145) + + + +##### 1.1.3.4. supported `APP_ENV` values + +You can add more application environment here for several + deployment targets. + +[See in context](./src/index.ts#L30-L34) @@ -172,7 +179,7 @@ The project main file allows autoloading features to work Reading the `APP_ENV` from the process environment and defining it as a constant. -[See in context](./src/index.ts#L139-L143) +[See in context](./src/index.ts#L148-L152) @@ -182,7 +189,7 @@ Setting the `knifecycle` `$overrides` service depending on the current `APP_ENV`. It allows to map services to different implementations. -[See in context](./src/index.ts#L148-L153) +[See in context](./src/index.ts#L157-L162) @@ -215,7 +222,7 @@ sleep 1 && kill -s SIGTERM "$SRV_PID" & wait "$SRV_PID"; ``` -[See in context](./src/index.ts#L161-L189) +[See in context](./src/index.ts#L170-L198) @@ -226,17 +233,7 @@ Plugins allows you to add simple features to the Whook's core, You can also avoid Whook defaults by leaving it empty. -[See in context](./src/index.ts#L210-L216) - - - -#### 1.1.4. prepareCommand - -The `prepareCommand` function is intended to prepare the commands - environment. It relies on the main environment but will be - used only by the commands, not the server or build scripts. - -[See in context](./src/index.ts#L231-L236) +[See in context](./src/index.ts#L219-L225) @@ -612,7 +609,7 @@ Whook's service can come from: - the plugins services (found in the `@whook/{plugin}/src/services` folder) - the project services (in the `src/services` folder) -[See in context](./src/index.ts#L92-L105) +[See in context](./src/index.ts#L101-L114) @@ -708,7 +705,7 @@ Beware that the order here matters, you will want CORS to be applied to the authorization wrapper responses. -[See in context](./src/index.ts#L192-L202) +[See in context](./src/index.ts#L201-L211) @@ -754,15 +751,6 @@ To implement a command, just write a function that takes -## 6. REPL - -Here is a simple REPL leveraging the depency injection - features in order to let you test things up easily. - -[See in context](./src/repl.ts#L4-L8) - - - ## 7. Watch server The watch command allows you to reload the server diff --git a/packages/whook-example/DEPENDENCIES.mmd b/packages/whook-example/DEPENDENCIES.mmd index 9ab0166e..c8fb7121 100644 --- a/packages/whook-example/DEPENDENCIES.mmd +++ b/packages/whook-example/DEPENDENCIES.mmd @@ -72,6 +72,15 @@ graph TD obfuscator-->SENSIBLE_HEADERS{SENSIBLE_HEADERS} obfuscator-->log apm-->log + promptArgs-->COMMAND_DEFINITION{COMMAND_DEFINITION} + promptArgs-->args + promptArgs-->inquirer + promptArgs-->log + command-->commandHandler + command-->$ready + command-->$instance + command-->$fatalError + command-->log resolve-->MAIN_FILE_URL{MAIN_FILE_URL} resolve-->log importer-->log @@ -88,58 +97,10 @@ graph TD API_DEFINITIONS{API_DEFINITIONS}-->importer API_DEFINITIONS{API_DEFINITIONS}-->log API_DEFINITIONS{API_DEFINITIONS}-->readDir - PORT{PORT}-->ENV{ENV} - PORT{PORT}-->log - PORT{PORT}-->importer - HANDLERS{HANDLERS}-->WRAPPERS{WRAPPERS} - HANDLERS{HANDLERS}-->log - HANDLERS{HANDLERS}-->getDelay((getDelay)) - HANDLERS{HANDLERS}-->optionsWithCORS((optionsWithCORS)) - HANDLERS{HANDLERS}-->getDiagnostic((getDiagnostic)) - HANDLERS{HANDLERS}-->getOpenAPI((getOpenAPI)) - HANDLERS{HANDLERS}-->getParameters((getParameters)) - HANDLERS{HANDLERS}-->getTime((getTime)) - HANDLERS{HANDLERS}-->putEcho((putEcho)) - HANDLERS{HANDLERS}-->getPing((getPing)) - API{API}-->ENV{ENV} - API{API}-->CONFIG{CONFIG} - API{API}-->BASE_URL{BASE_URL} - API{API}-->BASE_PATH{BASE_PATH} - API{API}-->API_VERSION{API_VERSION} - API{API}-->API_DEFINITIONS{API_DEFINITIONS} - API{API}-->log - BASE_URL{BASE_URL}-->ENV{ENV} - BASE_URL{BASE_URL}-->CONFIG{CONFIG} - BASE_URL{BASE_URL}-->PROTOCOL{PROTOCOL} - BASE_URL{BASE_URL}-->HOST{HOST} - BASE_URL{BASE_URL}-->PORT{PORT} - BASE_URL{BASE_URL}-->log - FILTER_API_DEFINITION{FILTER_API_DEFINITION}-->ENV{ENV} - FILTER_API_DEFINITION{FILTER_API_DEFINITION}-->log - WRAPPERS{WRAPPERS}-->HANDLERS_WRAPPERS{HANDLERS_WRAPPERS} - WRAPPERS{WRAPPERS}-->log - WRAPPERS{WRAPPERS}-->wrapHandlerWithCORS((wrapHandlerWithCORS)) - WRAPPERS{WRAPPERS}-->wrapHandlerWithAuthorization((wrapHandlerWithAuthorization)) - getDelay((getDelay))-->delay - getDiagnostic((getDiagnostic))-->TRANSACTIONS{TRANSACTIONS} - getOpenAPI((getOpenAPI))-->API{API} - getTime((getTime))-->time - putEcho((putEcho))-->log - getPing((getPing))-->ENV{ENV} - wrapHandlerWithCORS((wrapHandlerWithCORS))-->CORS{CORS} - wrapHandlerWithCORS((wrapHandlerWithCORS))-->log - wrapHandlerWithAuthorization((wrapHandlerWithAuthorization))-->MECHANISMS{MECHANISMS} - wrapHandlerWithAuthorization((wrapHandlerWithAuthorization))-->DEFAULT_MECHANISM{DEFAULT_MECHANISM} - wrapHandlerWithAuthorization((wrapHandlerWithAuthorization))-->authentication - wrapHandlerWithAuthorization((wrapHandlerWithAuthorization))-->log - MECHANISMS{MECHANISMS}-->ENV{ENV} - MECHANISMS{MECHANISMS}-->log - authentication-->jwtToken - jwtToken-->JWT_SECRET_ENV_NAME{JWT_SECRET_ENV_NAME} - jwtToken-->ENV{ENV} - jwtToken-->JWT{JWT} - jwtToken-->log - jwtToken-->time + mermaid-->$ready + mermaid-->$instance + mermaid-->log + mermaid-->stdout classDef handlers fill:#aad400,stroke:#000,stroke-width:1px,color:#000; classDef wrappers fill:#aad400,stroke:#000,stroke-width:1px,color:#000; classDef config fill:#000,stroke:#aad400,stroke-width:1px,color:#aad400; @@ -201,31 +162,18 @@ graph TD class MAX_CLEAR_RATIO config; class SENSIBLE_PROPS config; class SENSIBLE_HEADERS config; + class COMMAND_DEFINITION config; + class promptArgs others; + class args others; + class inquirer others; + class command others; + class commandHandler others; + class $ready others; class APP_CONFIG config; class API_DEFINITIONS config; class IGNORED_FILES_SUFFIXES config; class IGNORED_FILES_PREFIXES config; class REDUCED_FILES_SUFFIXES config; class FILTER_API_DEFINITION config; - class WRAPPERS config; - class getDelay handlers; - class optionsWithCORS handlers; - class getDiagnostic handlers; - class getOpenAPI handlers; - class getParameters handlers; - class getTime handlers; - class putEcho handlers; - class getPing handlers; - class CONFIG config; - class BASE_URL config; - class API_VERSION config; - class PROTOCOL config; - class HANDLERS_WRAPPERS config; - class wrapHandlerWithCORS wrappers; - class wrapHandlerWithAuthorization wrappers; - class MECHANISMS config; - class DEFAULT_MECHANISM config; - class authentication others; - class jwtToken others; - class JWT_SECRET_ENV_NAME config; - class JWT config; \ No newline at end of file + class mermaid others; + class stdout others; \ No newline at end of file diff --git a/packages/whook-example/DEPENDENCIES.mmd.svg b/packages/whook-example/DEPENDENCIES.mmd.svg deleted file mode 100644 index bccaf7d4..00000000 --- a/packages/whook-example/DEPENDENCIES.mmd.svg +++ /dev/null @@ -1 +0,0 @@ -

PROJECT_DIR

log

WHOOK_RESOLVED_PLUGINS

MAIN_FILE_URL

WHOOK_PLUGINS

resolve

readDir

LOG_CONFIG

LOG_ROUTING

logger

time

random

delay

process

ENV

APP_ENV

PROCESS_NAME

SIGNALS

exit

$instance

$fatalError

httpRouter

DEBUG_NODE_ENVS

BUFFER_LIMIT

HANDLERS

API

PARSERS

STRINGIFYERS

DECODERS

ENCODERS

QUERY_PARSER

httpTransaction

errorHandler

DEV_ACCESS_TOKEN

BASE_PATH

HOST

PORT

SWAGGER_UI_CONFIG

importer

TIMEOUT

TRANSACTIONS

obfuscator

apm

uniqueId

httpServer

HTTP_SERVER_OPTIONS

ERRORS_DESCRIPTORS

DEFAULT_ERROR_CODE

CORS

BASE_ENV

PROCESS_ENV

readFile

SHIELD_CHAR

MAX_CLEAR_CHARS

MAX_CLEAR_RATIO

SENSIBLE_PROPS

SENSIBLE_HEADERS

APP_CONFIG

API_DEFINITIONS

IGNORED_FILES_SUFFIXES

IGNORED_FILES_PREFIXES

REDUCED_FILES_SUFFIXES

FILTER_API_DEFINITION

WRAPPERS

getDelay

optionsWithCORS

getDiagnostic

getOpenAPI

getParameters

getTime

putEcho

getPing

CONFIG

BASE_URL

API_VERSION

PROTOCOL

HANDLERS_WRAPPERS

wrapHandlerWithCORS

wrapHandlerWithAuthorization

MECHANISMS

DEFAULT_MECHANISM

authentication

jwtToken

JWT_SECRET_ENV_NAME

JWT

\ No newline at end of file diff --git a/packages/whook-example/bin/build.js b/packages/whook-example/bin/build.js index ce295bce..3a3f05a4 100644 --- a/packages/whook-example/bin/build.js +++ b/packages/whook-example/bin/build.js @@ -1,5 +1,3 @@ -#! /usr/bin/env node - import { runBuild } from '../src/build.ts'; await runBuild(); diff --git a/packages/whook-example/bin/dev.js b/packages/whook-example/bin/dev.js deleted file mode 100644 index 3625afe2..00000000 --- a/packages/whook-example/bin/dev.js +++ /dev/null @@ -1,3 +0,0 @@ -import { runServer } from '../src/index.ts'; - -await runServer(); diff --git a/packages/whook-example/bin/repl.js b/packages/whook-example/bin/repl.js deleted file mode 100644 index cdf660ce..00000000 --- a/packages/whook-example/bin/repl.js +++ /dev/null @@ -1,3 +0,0 @@ -import { runREPL } from '../src/repl.ts'; - -await runREPL(); diff --git a/packages/whook-example/bin/start.js b/packages/whook-example/bin/start.js deleted file mode 100644 index e79bf0e2..00000000 --- a/packages/whook-example/bin/start.js +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env node - -import { runServer } from '../dist/index.js'; - -await runServer(); diff --git a/packages/whook-example/bin/watch.js b/packages/whook-example/bin/watch.js index e08092cf..352d9107 100644 --- a/packages/whook-example/bin/watch.js +++ b/packages/whook-example/bin/watch.js @@ -1,3 +1,3 @@ -import { watchDevServer } from '../src/watch.ts'; +import { watchDevProcess } from '../src/watch.ts'; -await watchDevServer(); +await watchDevProcess(); diff --git a/packages/whook-example/bin/whook.js b/packages/whook-example/bin/whook.js index e0a55a6e..8910ac0a 100755 --- a/packages/whook-example/bin/whook.js +++ b/packages/whook-example/bin/whook.js @@ -1,11 +1,8 @@ -#! /usr/bin/env node - import { join } from 'node:path'; import { URL } from 'node:url'; -import { runCLI } from '@whook/whook'; -const { prepareCommand } = await import( +const { prepareEnvironment, prepareProcess, runProcess } = await import( new URL(join('..', 'src', 'index.ts'), import.meta.url) ); -await runCLI(prepareCommand); +await runProcess(prepareEnvironment, prepareProcess); diff --git a/packages/whook-example/package.json b/packages/whook-example/package.json index 13f067df..b0ab0d99 100644 --- a/packages/whook-example/package.json +++ b/packages/whook-example/package.json @@ -47,20 +47,18 @@ "build": "rimraf 'dist' && tsc --outDir dist", "cli": "env NODE_ENV=${NODE_ENV:-cli}", "cover": "npm run jest -- --coverage", - "debug": "NODE_OPTIONS=${NODE_OPTIONS:-'--inspect'} NODE_ENV=${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=${DEBUG:-whook} tsx bin/dev", - "dev": "NODE_ENV=${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/dev.js", + "debug": "NODE_OPTIONS=${NODE_OPTIONS:-'--inspect'} NODE_ENV=${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=${DEBUG:-whook} tsx bin/whook.js", + "dev": "NODE_ENV=${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/whook.js", "format": "npm run prettier", - "graph": "npm run graph:build && npm run graph:generate && git add DEPENDENCIES.mmd*", - "graph:build": "MERMAID_RUN=1 npm run --silent dev > DEPENDENCIES.mmd", - "graph:generate": "mmdc -i DEPENDENCIES.mmd -o DEPENDENCIES.mmd.svg", + "graph": "MERMAID_RUN=1 npm run --silent whook -- __inject mermaid > DEPENDENCIES.mmd", "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest", "lint": "eslint 'src/**/*.ts'", "metapak": "metapak", "postbuild": "NODE_ENV=${NODE_ENV:-development} tsx bin/build.js", "prettier": "prettier --write 'src/**/*.ts'", "rebuild": "swc ./src -s -d dist -C jsc.target=es2022", - "repl": "NODE_ENV=${NODE_ENV:-development} tsx bin/repl.js", - "start": "NODE_ENV=${NODE_ENV:-development} node bin/start.js", + "repl": "NODE_ENV=${NODE_ENV:-development} tsx bin/whook.js -- __inject repl", + "start": "NODE_ENV=${NODE_ENV:-development} node bin/whook.js", "test": "NODE_ENV=test npm run build && npm run jest", "type-check": "tsc --pretty --noEmit", "watch": "NODE_ENV=${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx bin/watch.js", @@ -95,7 +93,7 @@ "common-services": "^16.0.4", "http-auth-utils": "^6.0.1", "jwt-service": "^10.1.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "pkg-dir": "^8.0.0", "strict-qs": "^8.0.3", @@ -105,7 +103,6 @@ }, "devDependencies": { "@eslint/js": "^9.7.0", - "@mermaid-js/mermaid-cli": "^11.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.6.13", "@swc/helpers": "^0.5.12", @@ -119,7 +116,6 @@ "eslint-plugin-prettier": "^5.1.3", "jest": "^29.7.0", "jsarch": "^6.0.3", - "mermaid": "^11.4.1", "metapak": "^6.0.1", "metapak-nfroidure": "18.2.0", "prettier": "^3.3.3", diff --git a/packages/whook-example/src/cli.test.ts b/packages/whook-example/src/cli.test.ts index 54ceb68f..ccdda930 100644 --- a/packages/whook-example/src/cli.test.ts +++ b/packages/whook-example/src/cli.test.ts @@ -14,6 +14,7 @@ describe('commands should work', () => { }).toMatchInlineSnapshot(` { "stderr": "⚡ - Loading configurations from /whook/packages/whook-example/dist/config/local/config.js". +On air 🚀🌕 ", "stdout": " @@ -54,6 +55,7 @@ describe('commands should work', () => { "stderr": "⚡ - Loading configurations from /whook/packages/whook-example/dist/config/local/config.js". 🔴 - Running with "local" application environment. 🔂 - Running with "test" node environment. +On air 🚀🌕 ", "stdout": "test ", @@ -72,6 +74,7 @@ describe('commands should work', () => { }).toMatchInlineSnapshot(` { "stderr": "⚡ - Loading configurations from /whook/packages/whook-example/dist/config/local/config.js". +On air 🚀🌕 ", "stdout": ""localhost" ", diff --git a/packages/whook-example/src/index.test.ts b/packages/whook-example/src/index.test.ts index 4cb8173d..44866c58 100644 --- a/packages/whook-example/src/index.test.ts +++ b/packages/whook-example/src/index.test.ts @@ -9,8 +9,8 @@ import { } from '@jest/globals'; import { constant } from 'knifecycle'; import { - runServer, - prepareServer, + runProcess, + prepareProcess, prepareEnvironment as basePrepareEnvironment, } from './index.js'; import axios from 'axios'; @@ -24,7 +24,7 @@ import type { Logger } from 'common-services'; const _packageJSON = JSON.parse(readFileSync('package.json').toString()); -describe('runServer', () => { +describe('runProcess', () => { // TODO: Use import.meta.resolve when Jest will support it // See https://github.com/jestjs/jest/issues/14923 const require = createRequire( @@ -75,10 +75,11 @@ describe('runServer', () => { let jwtToken: JWTService; beforeAll(async () => { - const { $instance: _instance, jwtToken: _jwtToken } = await runServer( + const { $instance: _instance, jwtToken: _jwtToken } = await runProcess( prepareEnvironment, - prepareServer, + prepareProcess, ['$instance', 'httpServer', 'process', 'jwtToken'], + [], ); $instance = _instance; diff --git a/packages/whook-example/src/index.ts b/packages/whook-example/src/index.ts index 74e77736..cffe2a67 100644 --- a/packages/whook-example/src/index.ts +++ b/packages/whook-example/src/index.ts @@ -1,4 +1,4 @@ -import { env } from 'node:process'; +import { env, argv as _argv } from 'node:process'; import { Knifecycle, constant, @@ -7,11 +7,9 @@ import { } from 'knifecycle'; import { WHOOK_DEFAULT_PLUGINS, - DEFAULT_INJECTED_NAMES as BASE_DEFAULT_INJECTED_NAMES, - runServer as runBaseServer, - prepareServer as prepareBaseServer, + runProcess as runBaseProcess, + prepareProcess as prepareBaseProcess, prepareEnvironment as prepareBaseEnvironment, - prepareCommand as prepareBaseCommand, initAutoload, initAPIDefinitions, } from '@whook/whook'; @@ -38,62 +36,49 @@ const APP_ENVS = ['local', 'test', 'production'] as const; export type AppEnv = (typeof APP_ENVS)[number]; -/* Architecture Note #1.2.3: Injected names - -Whook uses Knifecycle at its core, so, you have to provide the - list of root services it has to run. Per default, those are - the `process` and the `httpServer`. - -Exporting this constant is required for the watch command - to work as expected. -*/ -export const DEFAULT_INJECTED_NAMES = BASE_DEFAULT_INJECTED_NAMES; - /* Architecture Note #1.1: The main file Per convention a Whook server main file must exports the following 3 functions to be composable. */ -/* Architecture Note #1.1.1: runServer +/* Architecture Note #1.1.1: runProcess -The `runServer` function is intended to run the server +The `runProcess` function is intended to run the server and may be proxied as is, except in some e2e test cases where it can be useful to put mocks in (see [the E2E tests](./index.test.ts) coming with this project for a real world example). */ -export async function runServer< +export async function runProcess< D extends Dependencies, T extends Knifecycle = Knifecycle, >( innerPrepareEnvironment: ($?: T) => Promise = prepareEnvironment, - innerPrepareServer: ( + innerPrepareProcess: ( injectedNames: DependencyDeclaration[], $: T, - ) => Promise = prepareServer, - injectedNames: DependencyDeclaration[] = DEFAULT_INJECTED_NAMES, + ) => Promise = prepareProcess, + injectedNames: DependencyDeclaration[] = [], + argv: typeof _argv = _argv, ): Promise { - return runBaseServer( + return runBaseProcess( innerPrepareEnvironment, - innerPrepareServer, + innerPrepareProcess, injectedNames, + argv, ); } -/* Architecture Note #1.1.2: prepareServer +/* Architecture Note #1.1.2: prepareProcess -The `prepareServer` function is intended to prepare the server - environment. It relies on the main environment but will be - used only by the server, not the commands or build scripts. +The `prepareProcess` function is intended to prepare the process + environment. */ -export async function prepareServer< +export async function prepareProcess< D extends Dependencies, T extends Knifecycle = Knifecycle, ->( - injectedNames: DependencyDeclaration[] = DEFAULT_INJECTED_NAMES, - $: T, -): Promise { +>(injectedNames: DependencyDeclaration[], $: T): Promise { /* Architecture Note #1.1.2.1: server wrappers Add here any logic bound to the server only @@ -103,12 +88,12 @@ export async function prepareServer< // eslint-disable-next-line @typescript-eslint/no-explicit-any $.register(wrapHTTPRouterWithSwaggerUI(initHTTPRouter) as any); - return await prepareBaseServer(injectedNames, $); + return await prepareBaseProcess(injectedNames, $); } /* Architecture Note #1.1.3: prepareEnvironment -The `prepareEnvironment` one is intended to prepare the server environment +The `prepareEnvironment` one is intended to prepare the process environment */ export async function prepareEnvironment( $: T = new Knifecycle() as T, @@ -251,18 +236,3 @@ export async function prepareEnvironment( return $; } - -/* Architecture Note #1.1.3: prepareCommand - -The `prepareCommand` function is intended to prepare the commands - environment. It relies on the main environment but will be - used only by the commands, not the server or build scripts. -*/ - -export async function prepareCommand( - innerPrepareEnvironment: ($?: T) => Promise = prepareEnvironment, - $: T = new Knifecycle() as T, -): Promise { - // you can add here any logic bound to the commands only - return prepareBaseCommand(innerPrepareEnvironment, $); -} diff --git a/packages/whook-example/src/repl.ts b/packages/whook-example/src/repl.ts deleted file mode 100644 index 9e6636b4..00000000 --- a/packages/whook-example/src/repl.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { prepareEnvironment } from './index.js'; -import { runREPL as runBaseREPL } from '@whook/whook'; - -/* Architecture Note #6: REPL - -Here is a simple REPL leveraging the depency injection - features in order to let you test things up easily. -*/ -export async function runREPL(): Promise { - await runBaseREPL(prepareEnvironment); -} diff --git a/packages/whook-example/src/watch.ts b/packages/whook-example/src/watch.ts index 9f6563f9..c7ca2f78 100644 --- a/packages/whook-example/src/watch.ts +++ b/packages/whook-example/src/watch.ts @@ -1,6 +1,6 @@ import { exec } from 'child_process'; import { promisify } from 'util'; -import { watchDevServer as baseWatchDevServer } from '@whook/whook/dist/watch.js'; +import { watchDevProcess as baseWatchDevProcess } from '@whook/whook/dist/watch.js'; import { printStackTrace } from 'yerror'; const doExec = promisify(exec); @@ -15,8 +15,8 @@ You can add hooks to add need behaviors to the each restart. */ -export async function watchDevServer() { - await baseWatchDevServer({ +export async function watchDevProcess() { + await baseWatchDevProcess({ injectedNames: ['PROJECT_DIR', 'log'], afterRestartEnd: async ({ PROJECT_DIR, log }, { apiChanged }) => { if (apiChanged) { diff --git a/packages/whook-gcp-functions/package.json b/packages/whook-gcp-functions/package.json index d0ade179..fa48702d 100644 --- a/packages/whook-gcp-functions/package.json +++ b/packages/whook-gcp-functions/package.json @@ -58,7 +58,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cpr": "3.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", "qs": "^6.13.0", diff --git a/packages/whook-graphiql/README.md b/packages/whook-graphiql/README.md index 895e242f..ac078192 100644 --- a/packages/whook-graphiql/README.md +++ b/packages/whook-graphiql/README.md @@ -61,7 +61,7 @@ declare module 'application-services' { ``` Then, just wrap the HTTP router with this module and register it again with the -`Knifecycle` instance inside the `runServer` function (usually in +`Knifecycle` instance inside the `runProcess` function (usually in `src/index.ts`): ```diff @@ -70,9 +70,9 @@ Then, just wrap the HTTP router with this module and register it again with the // (...) -// It is important to do this in the runServer function since it really +// It is important to do this in the runProcess function since it really // make sense only when actually running the server -export async function runServer(injectedNames = [], $ = new Knifecycle()) { +export async function runProcess(injectedNames = [], $ = new Knifecycle()) { // (...) @@ -82,7 +82,7 @@ export async function runServer(injectedNames = [], $ = new Knifecycle()) { + wrapHTTPRouterWithGraphIQL(initHTTPRouter), + ); - return await runBaseServer(injectedNames, $); + return await runBaseProcess(injectedNames, $); } ``` diff --git a/packages/whook-graphiql/package.json b/packages/whook-graphiql/package.json index 13370a8c..40d89e6e 100644 --- a/packages/whook-graphiql/package.json +++ b/packages/whook-graphiql/package.json @@ -69,7 +69,7 @@ "dependencies": { "@whook/whook": "^17.0.2", "apollo-server-module-graphiql": "^1.4.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "yerror": "^8.0.0" }, diff --git a/packages/whook-graphiql/src/index.test.ts b/packages/whook-graphiql/src/index.test.ts index 3e725ef4..e5776979 100644 --- a/packages/whook-graphiql/src/index.test.ts +++ b/packages/whook-graphiql/src/index.test.ts @@ -2,7 +2,7 @@ import { describe, it, beforeEach, jest, expect } from '@jest/globals'; import { constant, initializer } from 'knifecycle'; import axios from 'axios'; import { - prepareServer, + prepareProcess, prepareEnvironment, initGetPingDefinition, } from '@whook/whook'; @@ -100,7 +100,7 @@ describe('wrapHTTPRouterWithGraphIQL', () => { time.mockReturnValue(new Date('2010-03-06T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -204,6 +204,9 @@ describe('wrapHTTPRouterWithGraphIQL', () => { [ "DEV_ACCESS_MECHANISM", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], @@ -284,7 +287,7 @@ describe('wrapHTTPRouterWithGraphIQL', () => { time.mockReturnValue(new Date('2010-03-06T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -385,6 +388,9 @@ describe('wrapHTTPRouterWithGraphIQL', () => { [ "DEV_ACCESS_MECHANISM", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], @@ -584,7 +590,7 @@ describe('wrapHTTPRouterWithGraphIQL', () => { time.mockReturnValue(new Date('2012-01-15T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -650,6 +656,9 @@ describe('wrapHTTPRouterWithGraphIQL', () => { [ "DEV_ACCESS_MECHANISM", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], diff --git a/packages/whook-graphql/package.json b/packages/whook-graphql/package.json index a0fdf983..90bda5d6 100644 --- a/packages/whook-graphql/package.json +++ b/packages/whook-graphql/package.json @@ -71,7 +71,7 @@ "@whook/http-transaction": "^17.0.2", "@whook/whook": "^17.0.2", "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "type-fest": "^4.26.1", "yhttperror": "^8.0.0" diff --git a/packages/whook-graphql/src/index.test.ts b/packages/whook-graphql/src/index.test.ts index 3a1bb862..92e9fda7 100644 --- a/packages/whook-graphql/src/index.test.ts +++ b/packages/whook-graphql/src/index.test.ts @@ -9,8 +9,8 @@ import { expect, } from '@jest/globals'; import { - runServer, - prepareServer, + runProcess, + prepareProcess, prepareEnvironment as basePrepareEnvironment, initWrappers, initHandlers, @@ -229,9 +229,9 @@ describe('GraphQL server', () => { process.env.ISOLATED_ENV = '1'; beforeAll(async () => { - const { $instance: _instance } = await runServer<{ + const { $instance: _instance } = await runProcess<{ $instance: Knifecycle; - }>(prepareEnvironment, prepareServer, [ + }>(prepareEnvironment, prepareProcess, [ '$instance', 'httpServer', 'process', diff --git a/packages/whook-http-router/package.json b/packages/whook-http-router/package.json index 778374fc..f7c13c22 100644 --- a/packages/whook-http-router/package.json +++ b/packages/whook-http-router/package.json @@ -65,7 +65,7 @@ "camelcase": "^8.0.0", "content-type": "^1.0.5", "first-chunk-stream": "^6.0.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "miniquery": "^1.1.2", "ms": "^2.1.3", "negotiator": "^0.6.3", diff --git a/packages/whook-http-server/package.json b/packages/whook-http-server/package.json index 7fe53c0b..ace04ca9 100644 --- a/packages/whook-http-server/package.json +++ b/packages/whook-http-server/package.json @@ -54,7 +54,7 @@ "homepage": "https://github.com/nfroidure/whook", "dependencies": { "@whook/http-router": "^17.0.2", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ms": "^2.1.3", "yerror": "^8.0.0" }, diff --git a/packages/whook-http-transaction/package.json b/packages/whook-http-transaction/package.json index 14833c19..9a1e4ed4 100644 --- a/packages/whook-http-transaction/package.json +++ b/packages/whook-http-transaction/package.json @@ -55,7 +55,7 @@ "homepage": "https://github.com/nfroidure/whook", "dependencies": { "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "ms": "^2.1.3", "openapi-types": "^12.1.3", "statuses": "^2.0.1", diff --git a/packages/whook-method-override/package.json b/packages/whook-method-override/package.json index c51ed4f1..cb3f00a5 100644 --- a/packages/whook-method-override/package.json +++ b/packages/whook-method-override/package.json @@ -55,7 +55,7 @@ "@whook/http-transaction": "^17.0.2", "@whook/whook": "^17.0.2", "common-services": "^16.0.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3" }, "devDependencies": { diff --git a/packages/whook-method-override/src/index.test.ts b/packages/whook-method-override/src/index.test.ts index 37a9778c..b6fbc415 100644 --- a/packages/whook-method-override/src/index.test.ts +++ b/packages/whook-method-override/src/index.test.ts @@ -10,8 +10,8 @@ import { import wrapHTTPTransactionWithMethodOverride from './index.js'; import initHTTPTransaction from '@whook/http-transaction'; import { - runServer, - prepareServer, + runProcess, + prepareProcess, prepareEnvironment as basePrepareEnvironment, initGetPingDefinition, } from '@whook/whook'; @@ -91,9 +91,9 @@ describe('wrapHTTPTransactionWithMethodOverride', () => { process.env.ISOLATED_ENV = '1'; beforeAll(async () => { - const { $instance: _instance } = await runServer<{ + const { $instance: _instance } = await runProcess<{ $instance: Knifecycle; - }>(prepareEnvironment, prepareServer, [ + }>(prepareEnvironment, prepareProcess, [ '$instance', 'httpServer', 'process', diff --git a/packages/whook-oauth2/package.json b/packages/whook-oauth2/package.json index d535e395..d6e57c47 100644 --- a/packages/whook-oauth2/package.json +++ b/packages/whook-oauth2/package.json @@ -48,7 +48,7 @@ "camelcase": "^8.0.0", "common-services": "^16.0.4", "cookie": "^1.0.1", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "type-fest": "^4.26.1", "yerror": "^8.0.0", diff --git a/packages/whook-oauth2/src/index.test.ts b/packages/whook-oauth2/src/index.test.ts index 5e1529e7..a0c681fe 100644 --- a/packages/whook-oauth2/src/index.test.ts +++ b/packages/whook-oauth2/src/index.test.ts @@ -9,8 +9,8 @@ import { expect, } from '@jest/globals'; import { - runServer, - prepareServer, + runProcess, + prepareProcess, prepareEnvironment as basePrepareEnvironment, DEFAULT_ERRORS_DESCRIPTORS, initWrappers, @@ -265,9 +265,9 @@ describe('OAuth2 server', () => { process.env.ISOLATED_ENV = '1'; beforeAll(async () => { - const { $instance: _instance } = await runServer<{ + const { $instance: _instance } = await runProcess<{ $instance: Knifecycle; - }>(prepareEnvironment, prepareServer, [ + }>(prepareEnvironment, prepareProcess, [ '$instance', 'httpServer', 'process', diff --git a/packages/whook-swagger-ui/README.md b/packages/whook-swagger-ui/README.md index 0e88c090..a0db084d 100644 --- a/packages/whook-swagger-ui/README.md +++ b/packages/whook-swagger-ui/README.md @@ -29,7 +29,7 @@ npm i @whook/swagger-ui ``` To use it, just wrap the HTTP router with this module and override its -registration with the `Knifecycle` instance inside the `runServer` function +registration with the `Knifecycle` instance inside the `runProcess` function (usually in `src/index.ts`): ```diff @@ -38,9 +38,9 @@ registration with the `Knifecycle` instance inside the `runServer` function // (...) -// It is important to do this in the runServer function since it really +// It is important to do this in the runProcess function since it really // make sense only when actually running the server -export async function runServer(injectedNames = [], $ = new Knifecycle()) { +export async function runProcess(injectedNames = [], $ = new Knifecycle()) { // (...) @@ -50,7 +50,7 @@ export async function runServer(injectedNames = [], $ = new Knifecycle()) { + wrapHTTPRouterWithSwaggerUI(initHTTPRouter), + ); - return await runBaseServer(injectedNames, $); + return await runBaseProcess(injectedNames, $); } ``` diff --git a/packages/whook-swagger-ui/package.json b/packages/whook-swagger-ui/package.json index d1b659fb..1385a125 100644 --- a/packages/whook-swagger-ui/package.json +++ b/packages/whook-swagger-ui/package.json @@ -73,7 +73,7 @@ "@whook/whook": "^17.0.2", "axios": "^1.7.7", "ecstatic": "^4.1.4", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "swagger-ui-dist": "^5.17.14", "type-fest": "^4.26.1" diff --git a/packages/whook-swagger-ui/src/index.test.ts b/packages/whook-swagger-ui/src/index.test.ts index e587e002..fdfbf3dc 100644 --- a/packages/whook-swagger-ui/src/index.test.ts +++ b/packages/whook-swagger-ui/src/index.test.ts @@ -2,7 +2,7 @@ import { describe, it, beforeEach, jest, expect } from '@jest/globals'; import { constant, initializer } from 'knifecycle'; import axios from 'axios'; import { - prepareServer, + prepareProcess, prepareEnvironment, initGetPingDefinition, } from '@whook/whook'; @@ -94,7 +94,7 @@ describe('wrapHTTPRouterWithSwaggerUI', () => { time.mockReturnValue(new Date('2010-03-06T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -178,6 +178,9 @@ describe('wrapHTTPRouterWithSwaggerUI', () => { [ "SWAGGER_UI_CONFIG", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], @@ -279,7 +282,7 @@ describe('wrapHTTPRouterWithSwaggerUI', () => { time.mockReturnValue(new Date('2010-03-06T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -363,6 +366,9 @@ describe('wrapHTTPRouterWithSwaggerUI', () => { [ "SWAGGER_UI_CONFIG", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], @@ -462,7 +468,7 @@ describe('wrapHTTPRouterWithSwaggerUI', () => { time.mockReturnValue(new Date('2010-03-06T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -570,6 +576,9 @@ window.onload = function() { [ "DEFAULT_ERROR_CODE", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], @@ -657,7 +666,7 @@ window.onload = function() { time.mockReturnValue(new Date('2012-01-15T00:00:00Z').getTime()); - const { $instance } = await prepareServer( + const { $instance } = await prepareProcess( ['$instance', 'httpServer', 'process'], $, ); @@ -723,6 +732,9 @@ window.onload = function() { [ "SWAGGER_UI_CONFIG", ], + [ + "PROCESS_NAME", + ], [ "SIGNALS", ], diff --git a/packages/whook-swagger-ui/src/index.ts b/packages/whook-swagger-ui/src/index.ts index 70cedb1a..b2cf5d0f 100644 --- a/packages/whook-swagger-ui/src/index.ts +++ b/packages/whook-swagger-ui/src/index.ts @@ -2,16 +2,16 @@ import { wrapInitializer, alsoInject } from 'knifecycle'; import initGetOpenAPI, { definition as getOpenAPIDefinition, } from './handlers/getOpenAPI.js'; -import type { ProviderInitializer, Dependencies } from 'knifecycle'; -import type { - WhookHTTPRouterProvider, - WhookHTTPRouterService, +import { type ProviderInitializer, type Dependencies } from 'knifecycle'; +import { + type WhookHTTPRouterProvider, + type WhookHTTPRouterService, } from '@whook/http-router'; -import type { ImporterService, LogService } from 'common-services'; +import { type ImporterService, type LogService } from 'common-services'; import type ECStatic from 'ecstatic'; -import type { IncomingMessage, ServerResponse } from 'node:http'; -import type { SwaggerUIOptions } from 'swagger-ui'; -import type { Jsonify } from 'type-fest'; +import { type IncomingMessage, type ServerResponse } from 'node:http'; +import { type SwaggerUIOptions } from 'swagger-ui'; +import { type Jsonify } from 'type-fest'; export { initGetOpenAPI, getOpenAPIDefinition }; diff --git a/packages/whook-versions/package.json b/packages/whook-versions/package.json index a75245c4..aa28ebce 100644 --- a/packages/whook-versions/package.json +++ b/packages/whook-versions/package.json @@ -55,7 +55,7 @@ "dependencies": { "@whook/whook": "^17.0.2", "application-services": "^6.1.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "openapi-types": "^12.1.3", "semver": "^7.6.3", "yhttperror": "^8.0.0" diff --git a/packages/whook/ARCHITECTURE.md b/packages/whook/ARCHITECTURE.md index eeaa4683..f7b49760 100644 --- a/packages/whook/ARCHITECTURE.md +++ b/packages/whook/ARCHITECTURE.md @@ -8,11 +8,9 @@ ## Summary 1. [Main file](#1-main-file) - 1. [Server run](#11-server-run) - 2. [Server preparation](#12-server-preparation) - 1. [Root injections](#121-root-injections) + 1. [Process run](#11-process-run) + 2. [Process preparation](#12-process-preparation) 3. [Server environment](#13-server-environment) - 4. [Commands preparation](#14-commands-preparation) 2. [Services initializers](#2-services-initializers) 1. [Base URL](#21-base-url) 2. [IP detection](#22-ip-detection) @@ -39,7 +37,6 @@ 1. [Plugins resolution](#2961-plugins-resolution) 2. [Plugins/project paths](#2962-plugins/project-paths) 3. [the handlers](#3-the-handlers) -4. [Commands](#4-commands) 1. [Testing](#41-testing) @@ -48,63 +45,44 @@ The Whook's main file exports : - its specific types, - its specific `knifecycle` compatible services, -- a few bootstrapping functions. +- a few bootstrapping functions designed to be customizable. -[See in context](./src/index.ts#L205-L210) +[See in context](./src/index.ts#L200-L205) -### 1.1. Server run +### 1.1. Process run -Whook exposes a `runServer` function to programmatically spawn - its server. It is intended to be reusable and injectable so +Whook exposes a `runProcess` function to programmatically spawn + its process. It is intended to be reusable and injectable so that projects can override the whole `whook` default behavior. -[See in context](./src/index.ts#L212-L216) +[See in context](./src/index.ts#L207-L211) -### 1.2. Server preparation +### 1.2. Process preparation -Whook exposes a `prepareServer` function to create its server +Whook exposes a `prepareProcess` function to create its configuration. It takes eventually additional injections that would be required at a higher level and a [Knifecycle](https://github.com/nfroidure/knifecycle) containing the bootstrapped environment and allowing - to complete and run the server. + to complete and run the process. -[See in context](./src/index.ts#L295-L302) - - - -#### 1.2.1. Root injections - -* We need to inject `httpServer` and `process` to bring life to our - * server. We also inject `log` for logging purpose and custom other - * injected name that were required upfront. - -[See in context](./src/index.ts#L316-L320) +[See in context](./src/index.ts#L260-L267) ### 1.3. Server environment The Whook `prepareEnvironment` function aims to provide the complete - server environment without effectively planning its run. It allows - to use that environment for CLI, REPL or build purposes. It also + process environment without effectively planning its run. It allows + to use that environment for testing or build purposes. It also provides a chance to override some services/constants before actually preparing the server in actual projects main file. -[See in context](./src/index.ts#L330-L336) - - - -### 1.4. Commands preparation - -Whook expose `prepareCommand` function to create commands configuration -before effectively running them - -[See in context](./src/index.ts#L432-L435) +[See in context](./src/index.ts#L290-L296) @@ -115,7 +93,7 @@ Whook's embed a few default initializers proxied from folder. It can be wrapped or overridden, at will, later in a project using overrides. -[See in context](./src/index.ts#L347-L352) +[See in context](./src/index.ts#L307-L312) @@ -145,7 +123,7 @@ The Whook server heavily rely on the process working directory to dynamically load contents. We are making it available to the DI system as a constant. -[See in context](./src/index.ts#L371-L375) +[See in context](./src/index.ts#L334-L338) @@ -163,7 +141,7 @@ this service detects a free port automagically. Whook uses the `common-services` `resolve` service to allow to easily mock/decorate all ESM resolutions. -[See in context](./src/index.ts#L379-L382) +[See in context](./src/index.ts#L342-L345) @@ -172,7 +150,7 @@ Whook uses the `common-services` `resolve` service to allow Whook uses the `common-services` `importer` service to allow to easily mock/decorate all ESM dynamic imports. -[See in context](./src/index.ts#L385-L388) +[See in context](./src/index.ts#L348-L351) @@ -181,7 +159,7 @@ Whook uses the `common-services` `importer` service to allow Whook uses a built in `exit` service to allow to easily mock/decorate the app exit. -[See in context](./src/index.ts#L391-L394) +[See in context](./src/index.ts#L354-L357) @@ -194,7 +172,7 @@ The `WHOOK_PLUGINS` constant allows you to give the name of you to just install Whook's plugins to get them automatically loaded. -[See in context](./src/index.ts#L413-L420) +[See in context](./src/index.ts#L376-L383) @@ -204,7 +182,7 @@ Whook uses a built-in `logger` service to allow to easily route the application logs for the `common-services` provided `log` service. -[See in context](./src/index.ts#L397-L401) +[See in context](./src/index.ts#L360-L364) @@ -229,7 +207,7 @@ Loading the configuration files is done according to the `APP_ENV` environment variable. It basically requires a configuration hash where the keys are JSON formattable constants. -[See in context](./src/index.ts#L406-L410) +[See in context](./src/index.ts#L369-L373) @@ -240,7 +218,7 @@ Whook provides a simple way to load the constants, services strategies. It is done by implementing the `knifecycle` auto loading interface. -[See in context](./src/services/_autoload.ts#L61-L66) +[See in context](./src/services/_autoload.ts#L63-L68) @@ -249,7 +227,7 @@ Whook provides a simple way to load the constants, services First of all the autoloader looks for constants in the previously loaded `APP_CONFIG` configurations hash. -[See in context](./src/services/_autoload.ts#L142-L145) +[See in context](./src/services/_autoload.ts#L193-L196) @@ -259,7 +237,7 @@ We cannot inject the `API` in the auto loader since it is dynamically loaded so doing this during the auto loader initialization. -[See in context](./src/services/_autoload.ts#L112-L116) +[See in context](./src/services/_autoload.ts#L115-L119) @@ -298,7 +276,7 @@ The Whook auto-loader allows you to provide the file path of a service per its name. It exports a `WhookInitializerMap` type to help you ensure yours are valid. -[See in context](./src/services/_autoload.ts#L39-L44) +[See in context](./src/services/_autoload.ts#L40-L45) @@ -307,7 +285,7 @@ The Whook auto-loader allows you to provide the file path In order to be able to load a service from a given path map one can directly specify a path to use for its resolution. -[See in context](./src/services/_autoload.ts#L204-L207) +[See in context](./src/services/_autoload.ts#L273-L276) @@ -316,7 +294,7 @@ In order to be able to load a service from a given path map Here, we build the handlers map needed by the router by injecting every handler required by the API. -[See in context](./src/services/_autoload.ts#L164-L167) +[See in context](./src/services/_autoload.ts#L215-L218) @@ -325,7 +303,7 @@ Here, we build the handlers map needed by the router by injecting every We inject the `HANDLERS_WRAPPERS` in the `WRAPPERS` service so that they can be dynamically applied. -[See in context](./src/services/_autoload.ts#L185-L188) +[See in context](./src/services/_autoload.ts#L236-L239) @@ -334,7 +312,7 @@ We inject the `HANDLERS_WRAPPERS` in the `WRAPPERS` Finally, we either load the handler/service/wrapper module if none of the previous strategies applied. -[See in context](./src/services/_autoload.ts#L198-L201) +[See in context](./src/services/_autoload.ts#L267-L270) @@ -354,7 +332,7 @@ Whook auto loader can look for initializers in a list of Trying to load services from plugins/project paths. -[See in context](./src/services/_autoload.ts#L218-L220) +[See in context](./src/services/_autoload.ts#L287-L289) @@ -367,34 +345,6 @@ Handlers are services that provide a definition and implements -## 4. Commands - -Whook's commands are CLI tools that you may need to create and - use with your Whook's projects. - -By doing so, it provides you a convenient way to reuse your -Whook's project configuration, services and handlers easily - in you day to day command line programs. - -To test this project, go to a project (in this repo - `@whook/example`) and run: - -```sh -cd packages/whook -npm run build -cd ../whook-example - -# Debugging compiled commands -node ../whook/bin/whook.js ls - -# Debugging source commands -npm run cli -- tsx ../whook/bin/whook.js ls -``` - -[See in context](./src/cli.ts#L11-L35) - - - ### 4.1. Testing In such a hard life, Whook's make it simple to diff --git a/packages/whook/bin/whook.js b/packages/whook/bin/whook.js index 7224f9fa..7819ef73 100755 --- a/packages/whook/bin/whook.js +++ b/packages/whook/bin/whook.js @@ -2,10 +2,9 @@ import path from 'node:path'; import { cwd } from 'node:process'; -import runCLI from '../dist/cli.js'; -const { prepareCommand } = await import( +const { runProcess, prepareProcess, prepareEnvironment } = await import( path.join(cwd(), 'dist', 'index.js') ); -await runCLI(prepareCommand); +await runProcess(prepareEnvironment, prepareProcess); diff --git a/packages/whook/package.json b/packages/whook/package.json index ccf6e8c2..e284409e 100644 --- a/packages/whook/package.json +++ b/packages/whook/package.json @@ -119,7 +119,7 @@ "ignore": "^5.3.1", "inquirer": "^11.1.0", "internal-ip": "^8.0.0", - "knifecycle": "^17.2.1", + "knifecycle": "^17.3.0", "miniquery": "^1.1.2", "mkdirp": "^3.0.1", "openapi-types": "^12.1.3", diff --git a/packages/whook/src/__snapshots__/index.test.ts.snap b/packages/whook/src/__snapshots__/index.test.ts.snap index ed5c2549..c785656b 100644 --- a/packages/whook/src/__snapshots__/index.test.ts.snap +++ b/packages/whook/src/__snapshots__/index.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`runServer should work 1`] = ` +exports[`runProcess should work 1`] = ` { "debugCalls": [ [ diff --git a/packages/whook/src/__snapshots__/repl.test.ts.snap b/packages/whook/src/__snapshots__/repl.test.ts.snap deleted file mode 100644 index db501028..00000000 --- a/packages/whook/src/__snapshots__/repl.test.ts.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`runREPL should work 1`] = ` -{ - "debugCalls": [ - [ - "👣 - Logging service initialized.", - ], - [ - "📇 - Process service initialized.", - ], - [ - "🖵 - Initializing the REPL service!", - ], - ], - "logErrorCalls": [], - "logInfoCalls": [], -} -`; diff --git a/packages/whook/src/build.ts b/packages/whook/src/build.ts index 85cbbb53..c3cfd677 100644 --- a/packages/whook/src/build.ts +++ b/packages/whook/src/build.ts @@ -14,6 +14,7 @@ import type { WhookCompilerService, } from './services/compiler.js'; import type { LogService } from 'common-services'; +import { parseArgs } from './libs/args.js'; export const DEFAULT_BUILD_DIR = 'server'; export const DEFAULT_BUILD_INITIALIZER_PATH_MAP = { @@ -55,6 +56,7 @@ export async function prepareBuildEnvironment( $.register( constant('INITIALIZER_PATH_MAP', DEFAULT_BUILD_INITIALIZER_PATH_MAP), ); + $.register(constant('args', parseArgs([]))); $.register(constant('BUILD_DIR', DEFAULT_BUILD_DIR)); $.register(constant('COMPILER_OPTIONS', DEFAULT_COMPILER_OPTIONS)); diff --git a/packages/whook/src/cli.test.ts b/packages/whook/src/cli.test.ts deleted file mode 100644 index 7a001a76..00000000 --- a/packages/whook/src/cli.test.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { error } from 'node:console'; -import { exit, cwd } from 'node:process'; -import { - describe, - it, - beforeEach, - afterEach, - jest, - expect, -} from '@jest/globals'; -import { Knifecycle, constant, service } from 'knifecycle'; -import run from './cli.js'; -import { initImporter } from 'common-services'; -import { createRequire } from 'module'; -import path from 'path'; -import type { ImporterService, LogService } from 'common-services'; - -// TODO: Use import.meta when Jest will support it -const require = createRequire(path.join(cwd(), 'src', 'index.ts')); - -// SKIPPED: `jest` with `swc` do not support `jest.mock` yet -describe.skip('whook-cli', () => { - const log = jest.fn(); - const processCWD = jest.fn(); - const processExit = jest.fn(); - const consoleError = jest.fn(); - let mockCWD; - let mockExit; - let mockConsoleError; - - jest.mock('node:process', () => ({ - __esModule: true, - cwd: processCWD, - exit: processExit, - })); - jest.mock('node:console', () => ({ - __esModule: true, - error: consoleError, - })); - - beforeEach(() => { - processCWD.mockReset(); - processExit.mockReset(); - log.mockReset(); - consoleError.mockRestore(); - }); - - afterEach(() => { - mockCWD.mockRestore(); - mockExit.mockRestore(); - mockConsoleError.mockRestore(); - }); - - process.argv = ['bin/whook', 'handler', '--name', 'getPing']; - - it('should run commands', async () => { - const PROJECT_DIR = '/home/whoiam/projects/my-cool-project'; - const MAIN_FILE_URL = '/home/whoiam/projects/my-cool-project/src/index.ts'; - const baseImporter = await initImporter({ log }); - const importer = jest.fn>((path: string) => { - return baseImporter(path); - }); - const resolve = require.resolve; - - processCWD.mockReturnValueOnce('/home/whoiam/projects/my-cool-project'); - - const $ = new Knifecycle(); - - $.register(constant('log', log)); - $.register(constant('importer', importer)); - $.register(constant('resolve', resolve)); - $.register(constant('APP_ENV', 'local')); - $.register( - constant('ENV', { - NODE_ENV: 'test', - JWT_SECRET: 'lol', - }), - ); - $.register(constant('PROJECT_DIR', PROJECT_DIR)); - $.register(constant('MAIN_FILE_URL', MAIN_FILE_URL)); - $.register(constant('WHOOK_PLUGINS', [])); - $.register(constant('WHOOK_RESOLVED_PLUGINS', {})); - $.register( - constant('COMMAND_DEFINITION', { - arguments: { properties: {} }, - }), - ); - $.register( - service( - async ({ log }: { log: LogService }) => - async () => - log('warning', 'Command ran!'), - 'commandHandler', - ['log'], - ), - ); - - await run(() => Promise.resolve($)); - - expect({ - exitCalls: processExit.mock.calls, - cwdCalls: processCWD.mock.calls, - errorCalls: consoleError.mock.calls.map(([arg1]) => [arg1]), - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` - { - "cwdCalls": [ - [], - ], - "errorCalls": [], - "exitCalls": [], - "logCalls": [ - [ - "debug", - "🛂 - Initializing the importer!", - ], - [ - "debug", - "Environment initialized 🚀🌕", - ], - [ - "warning", - "Command ran!", - ], - ], - } - `); - }, 10000); - - it('should exit when erroring', async () => { - const PROJECT_DIR = '/home/whoiam/projects/my-cool-project'; - const MAIN_FILE_URL = '/home/whoiam/projects/my-cool-project/src'; - const baseImporter = await initImporter({ log }); - const importer = jest.fn>((path: string) => { - return baseImporter(path); - }); - const resolve = require.resolve; - - processCWD.mockReturnValueOnce('/home/whoiam/projects/my-cool-project'); - - const $ = new Knifecycle(); - - $.register(constant('log', log)); - $.register(constant('importer', importer)); - $.register(constant('resolve', resolve)); - $.register(constant('PROJECT_DIR', PROJECT_DIR)); - $.register(constant('MAIN_FILE_URL', MAIN_FILE_URL)); - $.register(constant('WHOOK_PLUGINS', [])); - $.register(constant('WHOOK_RESOLVED_PLUGINS', {})); - $.register( - constant('COMMAND_DEFINITION', { - arguments: { properties: {} }, - }), - ); - $.register( - service( - async () => async () => { - throw new Error('E_ERROR'); - }, - 'commandHandler', - ['log'], - ), - ); - await run(() => Promise.resolve($)); - - expect({ - exitCalls: processExit.mock.calls, - cwdCalls: processCWD.mock.calls, - errorCalls: consoleError.mock.calls.map(([arg1]) => [arg1]), - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` - { - "cwdCalls": [ - [], - ], - "errorCalls": [], - "exitCalls": [ - [ - 1, - ], - ], - "logCalls": [ - [ - "debug", - "🛂 - Initializing the importer!", - ], - [ - "debug", - "Environment initialized 🚀🌕", - ], - [ - "error", - "💀 - Command failed! Add "DEBUG=whook" for more context.", - ], - ], - } - `); - }, 10000); -}); diff --git a/packages/whook/src/cli.ts b/packages/whook/src/cli.ts deleted file mode 100644 index c01bc718..00000000 --- a/packages/whook/src/cli.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { exit, stderr } from 'node:process'; -import { printStackTrace } from 'yerror'; -import { type Knifecycle } from 'knifecycle'; -import { type LogService } from 'common-services'; - -/* Architecture Note #4: Commands - -Whook's commands are CLI tools that you may need to create and - use with your Whook's projects. - -By doing so, it provides you a convenient way to reuse your -Whook's project configuration, services and handlers easily - in you day to day command line programs. - -To test this project, go to a project (in this repo - `@whook/example`) and run: - -```sh -cd packages/whook -npm run build -cd ../whook-example - -# Debugging compiled commands -node ../whook/bin/whook.js ls - -# Debugging source commands -npm run cli -- tsx ../whook/bin/whook.js ls -``` - -*/ - -export default async function runCLI( - prepareCommandEnvironment: ($?: T) => Promise, -): Promise { - try { - let failed = false; - const $ = await prepareCommandEnvironment(); - const { command, log } = await $.run<{ - log: LogService; - command: () => Promise; - }>(['command', 'log']); - - log('debug', 'Environment initialized 🚀🌕'); - - try { - await command(); - } catch (err) { - failed = true; - log('error', '💀 - Command failed! Add "DEBUG=whook" for more context.'); - log('error-stack', printStackTrace(err as Error)); - } - - await $.destroy(); - - if (failed) { - exit(1); - } - } catch (err) { - stderr.write( - `💀 - Cannot launch the process: ${printStackTrace(err as Error)}`, - ); - exit(1); - } -} diff --git a/packages/whook/src/index.test.ts b/packages/whook/src/index.test.ts index c9f4fb0c..0a6dbcb1 100644 --- a/packages/whook/src/index.test.ts +++ b/packages/whook/src/index.test.ts @@ -1,14 +1,14 @@ -import { describe, it, jest, expect } from '@jest/globals'; +import { describe, test, jest, expect } from '@jest/globals'; import { constant } from 'knifecycle'; +import { type Logger } from 'common-services'; import { - runServer, - prepareServer, + runProcess, + prepareProcess, prepareEnvironment as basePrepareEnvironment, } from './index.js'; -import type { Logger } from 'common-services'; -describe('runServer', () => { - it('should work', async () => { +describe('runProcess', () => { + test('should work', async () => { const PORT = 8888; const HOST = 'localhost'; const BASE_PATH = '/v1'; @@ -54,6 +54,10 @@ describe('runServer', () => { $.register(constant('PORT', PORT)); $.register(constant('HOST', HOST)); $.register(constant('WRAPPERS', [])); + $.register(constant('WHOOK_PLUGINS', [])); + $.register(constant('APP_CONFIG', {})); + $.register(constant('WHOOK_RESOLVED_PLUGINS', [])); + $.register(constant('HTTP_SERVER_OPTIONS', {})); $.register(constant('DEBUG_NODE_ENVS', [])); $.register( constant('HANDLERS', { @@ -61,16 +65,18 @@ describe('runServer', () => { }), ); $.register(constant('logger', logger as Logger)); + $.register(constant('MAIN_FILE_URL', import.meta.url)); return $; } process.env.ISOLATED_ENV = '1'; - const { $instance } = await runServer(prepareEnvironment, prepareServer, [ - '$instance', - 'httpServer', - 'process', - ]); + const { $instance } = await runProcess( + prepareEnvironment, + prepareProcess, + ['$instance', 'httpServer', 'process'], + [], + ); await $instance.destroy(); diff --git a/packages/whook/src/index.ts b/packages/whook/src/index.ts index 9bf322b8..ef9918a0 100644 --- a/packages/whook/src/index.ts +++ b/packages/whook/src/index.ts @@ -1,9 +1,8 @@ -import { Knifecycle, constant } from 'knifecycle'; -import { cwd, exit, stdout, stderr, argv } from 'node:process'; +import { Knifecycle, constant, type Dependencies } from 'knifecycle'; +import { cwd, exit, stderr, stdin, stdout, argv as _argv } from 'node:process'; import { printStackTrace } from 'yerror'; import initPromptArgs from './services/promptArgs.js'; import initCommand from './services/command.js'; -import initAutoloader from './services/_cliAutoload.js'; import { DEFAULT_LOG_ROUTING, DEFAULT_LOG_CONFIG, @@ -57,17 +56,12 @@ import initAutoload from './services/_autoload.js'; import initGetPing, { definition as initGetPingDefinition, } from './handlers/getPing.js'; -import { runREPL } from './repl.js'; import { DEFAULT_BUILD_INITIALIZER_PATH_MAP, prepareBuildEnvironment, runBuild, } from './build.js'; -import { HANDLER_REG_EXP } from './services/HANDLERS.js'; -import { WRAPPER_REG_EXP } from './services/WRAPPERS.js'; -import runCLI from './cli.js'; import { parseArgs, readArgs } from './libs/args.js'; -import type { Dependencies } from 'knifecycle'; export type { WhookBaseEnv, WhookBaseConfigs } from './types.js'; export { DEFAULT_BUILD_INITIALIZER_PATH_MAP } from './build.js'; @@ -169,6 +163,7 @@ export { type WhookWrappersDependencies, } from './services/WRAPPERS.js'; import initHandlers from './services/HANDLERS.js'; +import { identity } from './libs/utils.js'; export { HANDLER_REG_EXP, applyWrappers, @@ -197,150 +192,110 @@ export { initCompiler, initWrappers, initHandlers, - runREPL, prepareBuildEnvironment, runBuild, readArgs, - runCLI, }; /* Architecture Note #1: Main file The Whook's main file exports : - its specific types, - its specific `knifecycle` compatible services, -- a few bootstrapping functions. +- a few bootstrapping functions designed to be customizable. */ -export const DEFAULT_INJECTED_NAMES = ['httpServer', 'process']; - -/* Architecture Note #1.1: Server run -Whook exposes a `runServer` function to programmatically spawn - its server. It is intended to be reusable and injectable so +/* Architecture Note #1.1: Process run +Whook exposes a `runProcess` function to programmatically spawn + its process. It is intended to be reusable and injectable so that projects can override the whole `whook` default behavior. */ -export async function runServer< +export async function runProcess< D extends Dependencies, T extends Knifecycle = Knifecycle, >( - innerPrepareEnvironment: ($?: T) => Promise, - innerPrepareServer: (injectedNames: string[], $: T) => Promise, + innerPrepareEnvironment: ($?: T) => Promise = prepareEnvironment, + innerPrepareProcess: ( + injectedNames: string[], + $: T, + ) => Promise = prepareProcess, injectedNames: string[] = [], + argv: typeof _argv = _argv, ): Promise { + const args = parseArgs(argv); + + const rootServicesNames = + args.rest[0] === '__inject' + ? (args.rest[1] || '') + .split(',') + .map((s) => s.trim()) + .filter(identity) + : args.rest[0] + ? ['command'] + : ['httpServer', 'process']; + try { const $ = await innerPrepareEnvironment(); - const { ENV, log, ...services } = await innerPrepareServer( - [...new Set([...injectedNames, 'ENV', 'log'])], - $, - ); - if (ENV.DRY_RUN) { - log('warning', '🌵 - Dry run, shutting down now!'); - await $.destroy(); - return {} as D; - } + $.register(constant('PROCESS_NAME', 'whook')); + $.register(constant('args', args)); + $.register(constant('stdin', stdin)); + $.register(constant('stdout', stdout)); + $.register(constant('stderr', stderr)); - if (ENV.MERMAID_RUN) { - const CONFIG_REG_EXP = /^([A-Z0-9_]+)$/; - const MERMAID_GRAPH_CONFIG = { - classes: { - handlers: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', - wrappers: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', - config: 'fill:#000,stroke:#aad400,stroke-width:1px,color:#aad400;', - others: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', - }, - styles: [ - { - pattern: WRAPPER_REG_EXP, - className: 'wrappers', - }, - { - pattern: HANDLER_REG_EXP, - className: 'handlers', - }, - { - pattern: CONFIG_REG_EXP, - className: 'config', - }, - { - pattern: /^(.+)$/, - className: 'others', - }, - ], - shapes: [ - { - pattern: HANDLER_REG_EXP, - template: '$0(($0))', - }, - { - pattern: WRAPPER_REG_EXP, - template: '$0(($0))', - }, - { - pattern: CONFIG_REG_EXP, - template: '$0{$0}', - }, - ], - }; - log('warning', '🌵 - Mermaid graph generated, shutting down now!'); - stdout.write($.toMermaidGraph(MERMAID_GRAPH_CONFIG)); - await $.destroy(); - return {} as D; - } + const services = await innerPrepareProcess( + [...new Set([...rootServicesNames, ...injectedNames])], + $, + ); - return { ENV, log, $instance: $, ...services } as unknown as D; + return { $instance: $, ...services } as unknown as D; } catch (err) { stderr.write( - `'💀 - Cannot launch the process: ${printStackTrace(err as Error)}`, + `'💀 - Cannot launch the process: ${printStackTrace(err as Error)}. +Run with "DEBUG=whook" for more debugging context.`, ); exit(1); - return {} as D; } } -/* Architecture Note #1.2: Server preparation -Whook exposes a `prepareServer` function to create its server +/* Architecture Note #1.2: Process preparation +Whook exposes a `prepareProcess` function to create its configuration. It takes eventually additional injections that would be required at a higher level and a [Knifecycle](https://github.com/nfroidure/knifecycle) containing the bootstrapped environment and allowing - to complete and run the server. + to complete and run the process. */ /** - * Runs the Whook server - * @param {Array} injectedNames + * Runs the Whook's process + * @param {Array} servicesNames * Root dependencies names to instanciate and return * @param {Knifecycle} $ - * The Knifecycle instance to use for the server run + * The Knifecycle instance to use for the run * @returns Object * A promise of the injected services */ -export async function prepareServer< +export async function prepareProcess< D extends Dependencies, T extends Knifecycle, ->(injectedNames: string[], $: T): Promise { - /* Architecture Note #1.2.1: Root injections - * We need to inject `httpServer` and `process` to bring life to our - * server. We also inject `log` for logging purpose and custom other - * injected name that were required upfront. - */ +>(servicesNames: string[], $: T): Promise { const { log, ...services } = await $.run<{ log: LogService; - }>([...new Set([...injectedNames, 'log'])]); + }>([...new Set([...servicesNames, 'log'])]); log('warning', 'On air 🚀🌕'); - return { log, ...services } as unknown as D; + return { $instance: $, log, ...services } as unknown as D; } -/* Architecture Note #1.3: Server environment +/* Architecture Note #1.3: Process environments The Whook `prepareEnvironment` function aims to provide the complete - server environment without effectively planning its run. It allows - to use that environment for CLI, REPL or build purposes. It also + process environment without effectively planning its run. It allows + to use that environment for testing or build purposes. It also provides a chance to override some services/constants before actually preparing the server in actual projects main file. */ /** - * Prepare the Whook server environment + * Prepare the Whook process environment * @param {Knifecycle} $ * The Knifecycle instance to set the various services * @returns Promise @@ -373,8 +328,8 @@ export async function prepareEnvironment( initAPMService, ].forEach($.register.bind($)); - $.register(constant('PROCESS_NAME', 'whook')); - $.register(constant('args', parseArgs(argv))); + $.register(initPromptArgs); + $.register(initCommand); /* Architecture Note #2.3: the `PWD` constant The Whook server heavily rely on the process working directory @@ -436,25 +391,3 @@ export async function prepareEnvironment( return $; } - -/* Architecture Note #1.4: Commands preparation -Whook expose `prepareCommand` function to create commands configuration -before effectively running them - */ -/** - * Prepare the Whook commands environment - * @param {Knifecycle} $ - * The Knifecycle instance to set the various services - * @returns Promise - * A promise of the Knifecycle instance - */ -export async function prepareCommand( - innerPrepareEnvironment: ($?: T) => Promise = prepareEnvironment, - $: T = new Knifecycle() as T, -): Promise { - $ = await innerPrepareEnvironment($); - $.register(initPromptArgs); - $.register(initCommand); - $.register(initAutoloader); - return $; -} diff --git a/packages/whook/src/repl.test.ts b/packages/whook/src/repl.test.ts deleted file mode 100644 index a88fec95..00000000 --- a/packages/whook/src/repl.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { describe, it, jest, expect } from '@jest/globals'; -import { constant } from 'knifecycle'; -import { prepareEnvironment as basePrepareEnvironment } from './index.js'; -import { runREPL } from './repl.js'; -import initREPL from './services/repl.js'; -import { PassThrough } from 'stream'; -import type { Logger } from 'common-services'; - -describe('runREPL', () => { - it('should work', async () => { - const logger = { - output: jest.fn(), - error: jest.fn(), - debug: jest.fn(), - }; - const stdin = new PassThrough(); - const stdout = new PassThrough(); - - async function prepareEnvironment() { - const $ = await basePrepareEnvironment(); - - $.register( - constant('ENV', { - NODE_ENV: 'test', - }), - ); - $.register(constant('DEBUG_NODE_ENVS', [])); - $.register(constant('APP_ENV', 'local')); - $.register(constant('logger', logger as Logger)); - $.register(constant('stdin', stdin)); - $.register(constant('stdout', stdout)); - $.register(initREPL); - - return $; - } - process.env.ISOLATED_ENV = '1'; - - const { $instance } = await runREPL(prepareEnvironment); - - await $instance.destroy(); - - expect({ - debugCalls: logger.debug.mock.calls.sort(sortLogs), - logInfoCalls: logger.output.mock.calls, - logErrorCalls: logger.error.mock.calls, - }).toMatchSnapshot(); - }); -}); - -function sortLogs(strs1, strs2) { - return strs1[0] > strs2[0] ? 1 : strs1[0] === strs2[0] ? 0 : -1; -} diff --git a/packages/whook/src/repl.ts b/packages/whook/src/repl.ts deleted file mode 100644 index 8a9c2701..00000000 --- a/packages/whook/src/repl.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { printStackTrace } from 'yerror'; -import { exit, stderr } from 'node:process'; -import type { Knifecycle, Dependencies } from 'knifecycle'; - -export async function runREPL< - D extends Dependencies, - T extends Knifecycle = Knifecycle, ->( - prepareEnvironment: ($?: T) => Promise, - injectedNames: string[] = [], -): Promise { - try { - const $ = await prepareEnvironment(); - const services = await $.run([ - ...new Set(['repl', 'log', 'process', ...injectedNames]), - ]); - - return { $instance: $, ...services } as unknown as D; - } catch (err) { - stderr.write( - `💀 - Cannot launch the process: ${printStackTrace(err as Error)}`, - ); - exit(1); - } -} diff --git a/packages/whook/src/services/WRAPPERS.test.ts b/packages/whook/src/services/WRAPPERS.test.ts index dd03e096..75093770 100644 --- a/packages/whook/src/services/WRAPPERS.test.ts +++ b/packages/whook/src/services/WRAPPERS.test.ts @@ -19,9 +19,9 @@ describe('initWrappers', () => { } as any); expect({ - WRAPPERS, - logCalls: log.mock.calls -}).toMatchInlineSnapshot(` + WRAPPERS, + logCalls: log.mock.calls, + }).toMatchInlineSnapshot(` { "WRAPPERS": [], "logCalls": [ @@ -42,9 +42,9 @@ describe('initWrappers', () => { } as any); expect({ - WRAPPERS, - logCalls: log.mock.calls -}).toMatchInlineSnapshot(` + WRAPPERS, + logCalls: log.mock.calls, + }).toMatchInlineSnapshot(` { "WRAPPERS": [ [Function], diff --git a/packages/whook/src/services/_autoload.test.ts b/packages/whook/src/services/_autoload.test.ts index a989ee96..4f3e4aa5 100644 --- a/packages/whook/src/services/_autoload.test.ts +++ b/packages/whook/src/services/_autoload.test.ts @@ -20,6 +20,7 @@ import { } from './WHOOK_RESOLVED_PLUGINS.js'; describe('$autoload', () => { + const args = { namedArguments: {}, rest: [], command: 'whook' }; const WHOOK_PLUGINS = [WHOOK_PROJECT_PLUGIN_NAME]; const WHOOK_RESOLVED_PLUGINS: WhookResolvedPluginsService = { [WHOOK_PROJECT_PLUGIN_NAME]: { @@ -53,6 +54,7 @@ describe('$autoload', () => { } as any, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -111,6 +113,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -201,6 +204,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -291,6 +295,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -299,18 +304,18 @@ describe('$autoload', () => { const result = await $autoload('WRAPPERS'); expect({ - result, - WRAPPERS: await ( - result.initializer as ServiceInitializer)( - { - getPing: () => undefined, - log - }), - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - injectorCalls: $injector.mock.calls, - importerCalls: importer.mock.calls, - resolveCalls: resolve.mock.calls -}).toMatchInlineSnapshot(` + result, + WRAPPERS: await ( + result.initializer as ServiceInitializer + )({ + getPing: () => undefined, + log, + }), + logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), + injectorCalls: $injector.mock.calls, + importerCalls: importer.mock.calls, + resolveCalls: resolve.mock.calls, + }).toMatchInlineSnapshot(` { "WRAPPERS": [], "importerCalls": [], @@ -356,6 +361,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -425,6 +431,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -497,6 +504,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -586,6 +594,7 @@ describe('$autoload', () => { types: ['handlers', 'commands', 'services', 'wrappers'], }, }, + args, log, importer, resolve, @@ -664,6 +673,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, @@ -733,6 +743,7 @@ describe('$autoload', () => { APP_CONFIG: {}, WHOOK_PLUGINS, WHOOK_RESOLVED_PLUGINS, + args, log, importer, resolve, diff --git a/packages/whook/src/services/_autoload.ts b/packages/whook/src/services/_autoload.ts index 126b24d5..dabfefa7 100644 --- a/packages/whook/src/services/_autoload.ts +++ b/packages/whook/src/services/_autoload.ts @@ -33,6 +33,7 @@ import { type WhookPluginName, type WhookResolvedPluginsService, } from './WHOOK_RESOLVED_PLUGINS.js'; +import { WhookCommandArgs } from '../libs/args.js'; const DEFAULT_INITIALIZER_PATH_MAP = {}; @@ -49,6 +50,7 @@ export type WhookAutoloadDependencies = WhookWrappersConfig & { INITIALIZER_PATH_MAP?: WhookInitializerMap; WHOOK_PLUGINS?: WhookPluginName[]; WHOOK_RESOLVED_PLUGINS: WhookResolvedPluginsService; + args: WhookCommandArgs; $injector: Injector; importer: ImporterService<{ default: Initializer; @@ -99,6 +101,7 @@ async function initAutoload({ WHOOK_PLUGINS = WHOOK_DEFAULT_PLUGINS, WHOOK_RESOLVED_PLUGINS, HANDLERS_WRAPPERS = [], + args, importer, $injector, resolve, @@ -123,6 +126,54 @@ async function initAutoload({ return API; }; })(); + let commandModule; + const getCommandModule = (() => { + return async () => { + if (!commandModule) { + const commandName = args.rest[0]; + + // This is not supposed to happen + if (!commandName) { + log('warning', `❌ - No command given in argument.`); + throw new YError('E_NO_COMMAND_NAME'); + } + + for (const pluginName of WHOOK_PLUGINS) { + const resolvedPlugin = WHOOK_RESOLVED_PLUGINS[pluginName]; + const finalPath = new URL( + pathJoin( + '.', + 'commands', + commandName + extname(resolvedPlugin.mainURL), + ), + resolvedPlugin.mainURL, + ).toString(); + + try { + commandModule = await importer(finalPath); + break; + } catch (err) { + log( + 'debug', + `❌ - Command "${commandName}" not found in "${finalPath}".`, + ); + log('debug-stack', printStackTrace(err as Error)); + } + } + + if (!commandModule) { + throw new YError('E_BAD_COMMAND_NAME', commandName); + } + if (!commandModule.default) { + throw new YError('E_NO_COMMAND_HANDLER', commandName); + } + if (!commandModule.definition) { + throw new YError('E_NO_COMMAND_DEFINITION', commandName); + } + } + return commandModule; + }; + })(); return $autoload; @@ -195,6 +246,24 @@ async function initAutoload({ }; } + if (injectedName === 'COMMAND_DEFINITION') { + return { + name: injectedName, + initializer: constant( + injectedName, + (await getCommandModule()).definition, + ), + path: `definition://${args.rest[0]}`, + }; + } + if (injectedName === 'commandHandler') { + return { + name: injectedName, + initializer: name('commandHandler', (await getCommandModule()).default), + path: `command://${args.rest[0]}`, + }; + } + /* Architecture Note #2.9.6: Service/handler/wrapper loading Finally, we either load the handler/service/wrapper module if none of the previous strategies applied. @@ -271,9 +340,7 @@ async function initAutoload({ log( 'debug', - `💿 - Loading "${injectedName}" initializer${ - injectedName !== injectedName ? ` via "${injectedName}" resolution` : '' - } from "${modulePath}".`, + `💿 - Loading "${injectedName}" initializer from "${modulePath}".`, ); return { diff --git a/packages/whook/src/services/_cliAutoload.test.ts b/packages/whook/src/services/_cliAutoload.test.ts index cba67405..e3a45d0c 100644 --- a/packages/whook/src/services/_cliAutoload.test.ts +++ b/packages/whook/src/services/_cliAutoload.test.ts @@ -1,20 +1,18 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { describe, it, beforeEach, jest, expect } from '@jest/globals'; +import { describe, test, beforeEach, jest, expect } from '@jest/globals'; import { YError } from 'yerror'; -import initAutoload from './_cliAutoload.js'; -import { constant } from 'knifecycle'; +import initAutoload from './_autoload.js'; import type { ResolveService, ImporterService, LogService, } from 'common-services'; import type { Injector } from 'knifecycle'; -import type { AutoloaderWrapperDependencies } from './_cliAutoload.js'; +import type { WhookAutoloadDependencies } from './_autoload.js'; import { WHOOK_PROJECT_PLUGIN_NAME, type WhookResolvedPluginsService, } from './WHOOK_RESOLVED_PLUGINS.js'; -import { type WhookAutoloadDependencies } from './_autoload.js'; describe('$autoload', () => { const WHOOK_PLUGINS = [WHOOK_PROJECT_PLUGIN_NAME]; @@ -39,7 +37,7 @@ describe('$autoload', () => { access.mockReset(); }); - it('should warn with no command name', async () => { + test('should fail with no command name', async () => { importer.mockImplementationOnce(() => { throw new YError('E_NOT_SUPPOSED_TO_BE_HERE'); }); @@ -57,20 +55,23 @@ describe('$autoload', () => { resolve, access, log, - } as AutoloaderWrapperDependencies as any); - const { path, initializer } = await $autoload('commandHandler'); - const command = await (initializer as any)(); - const result = await command(); + } as WhookAutoloadDependencies); - expect({ - path, - result, - importerCalls: importer.mock.calls, - injectorCalls: $injector.mock.calls, - resolveCalls: resolve.mock.calls, - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` + try { + await $autoload('commandHandler'); + throw new YError('E_UNEXPECTED_SUCCESS'); + } catch (err) { + expect({ + errorCode: (err as YError).code, + errorParams: (err as YError).params, + importerCalls: importer.mock.calls, + injectorCalls: $injector.mock.calls, + resolveCalls: resolve.mock.calls, + logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), + }).toMatchInlineSnapshot(` { + "errorCode": "E_NO_COMMAND_NAME", + "errorParams": [], "importerCalls": [], "injectorCalls": [], "logCalls": [ @@ -78,23 +79,18 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], [ "warning", "❌ - No command given in argument.", ], ], - "path": "command://undefined", "resolveCalls": [], - "result": undefined, } `); + } }); - it('should warn with not found commands', async () => { + test('should warn with not found commands', async () => { importer.mockImplementationOnce(() => { throw new YError('E_NO_MODULE'); }); @@ -108,20 +104,24 @@ describe('$autoload', () => { resolve, access, log, - } as AutoloaderWrapperDependencies as any); - const { path, initializer } = await $autoload('commandHandler'); - const command = await (initializer as any)(); - const result = await command(); - - expect({ - path, - result, - importerCalls: importer.mock.calls, - injectorCalls: $injector.mock.calls, - resolveCalls: resolve.mock.calls, - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` + } as WhookAutoloadDependencies); + try { + await $autoload('commandHandler'); + throw new YError('E_UNEXPECTED_SUCCESS'); + } catch (err) { + expect({ + errorCode: (err as YError).code, + errorParams: (err as YError).params, + importerCalls: importer.mock.calls, + injectorCalls: $injector.mock.calls, + resolveCalls: resolve.mock.calls, + logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), + }).toMatchInlineSnapshot(` { + "errorCode": "E_BAD_COMMAND_NAME", + "errorParams": [ + "myCommand", + ], "importerCalls": [ [ "file:///home/whoiam/project/src/commands/myCommand.ts", @@ -133,27 +133,18 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], [ "debug", "❌ - Command "myCommand" not found in "file:///home/whoiam/project/src/commands/myCommand.ts".", ], - [ - "warning", - "Command "myCommand" not found.", - ], ], - "path": "command://myCommand", "resolveCalls": [], - "result": undefined, } `); + } }); - it('should work with project commands', async () => { + test('should work with project commands', async () => { importer.mockImplementationOnce(async () => ({ default: async () => async () => log('warning', 'Command called!'), definition: {}, @@ -168,7 +159,7 @@ describe('$autoload', () => { resolve, access, log, - } as AutoloaderWrapperDependencies as any); + } as WhookAutoloadDependencies); const { path, initializer } = await $autoload('commandHandler'); const command = await (initializer as any)(); const result = await command(); @@ -193,10 +184,6 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], [ "warning", "Command called!", @@ -209,7 +196,7 @@ describe('$autoload', () => { `); }); - it('should work with whook-cli commands', async () => { + test('should work with whook-cli commands', async () => { importer.mockImplementationOnce(() => { throw new Error('ENOENT'); }); @@ -235,7 +222,7 @@ describe('$autoload', () => { resolve, access, log, - } as AutoloaderWrapperDependencies as any); + } as WhookAutoloadDependencies); const { path, initializer } = await $autoload('commandHandler'); const command = await (initializer as any)(); const result = await command(); @@ -263,10 +250,6 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], [ "debug", "❌ - Command "myCommand" not found in "file:///home/whoiam/project/src/commands/myCommand.ts".", @@ -283,7 +266,7 @@ describe('$autoload', () => { `); }); - it('should work with bad commands', async () => { + test('should fail with bad commands', async () => { importer.mockImplementationOnce(() => { throw new Error('ENOENT'); }); @@ -300,147 +283,64 @@ describe('$autoload', () => { resolve, access, log, - } as AutoloaderWrapperDependencies as any); - const { path, initializer } = await $autoload('commandHandler'); - const command = await (initializer as any)(); - const result = await command(); + } as WhookAutoloadDependencies); - expect({ - path, - result, - importerCalls: importer.mock.calls, - injectorCalls: $injector.mock.calls, - resolveCalls: resolve.mock.calls, - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` + try { + await $autoload('commandHandler'); + throw new YError('E_UNEXPECTED_SUCCESS'); + } catch (err) { + expect({ + errorCode: (err as YError).code, + errorParams: (err as YError).params, + importerCalls: importer.mock.calls, + injectorCalls: $injector.mock.calls, + resolveCalls: resolve.mock.calls, + logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), + }).toMatchInlineSnapshot(` { - "importerCalls": [ - [ - "file:///home/whoiam/project/src/commands/myCommand.ts", - ], - ], - "injectorCalls": [], - "logCalls": [ - [ - "debug", - "🤖 - Initializing the \`$autoload\` service.", - ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], - [ - "debug", - "❌ - Command "myCommand" not found in "file:///home/whoiam/project/src/commands/myCommand.ts".", - ], - [ - "warning", - "Command "myCommand" not found.", - ], + "errorCode": "E_BAD_COMMAND_NAME", + "errorParams": [ + "myCommand", ], - "path": "command://myCommand", - "resolveCalls": [], - "result": undefined, -} -`); - }); - - it('should delegate to whook $autoloader', async () => { - importer.mockImplementationOnce(() => { - throw new Error('ENOENT'); - }); - importer.mockImplementationOnce(async () => ({ - default: constant('anotherService', 'a_initializer'), - definition: {}, - })); - - const $autoload = await initAutoload({ - WHOOK_PLUGINS, - WHOOK_RESOLVED_PLUGINS, - args: { namedArguments: {}, rest: ['myCommand'], command: 'whook' }, - importer, - $injector, - resolve, - access, - log, - } as AutoloaderWrapperDependencies as any); - const { path, initializer } = await $autoload('anotherService'); - - expect({ - path, - initializer, - importerCalls: importer.mock.calls, - injectorCalls: $injector.mock.calls, - resolveCalls: resolve.mock.calls, - logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), - }).toMatchInlineSnapshot(` -{ "importerCalls": [ [ "file:///home/whoiam/project/src/commands/myCommand.ts", ], - [ - "file:///home/whoiam/project/src/services/anotherService.ts", - ], ], - "initializer": { - "$name": "anotherService", - "$singleton": true, - "$type": "constant", - "$value": "a_initializer", - }, "injectorCalls": [], "logCalls": [ [ "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], [ "debug", "❌ - Command "myCommand" not found in "file:///home/whoiam/project/src/commands/myCommand.ts".", ], - [ - "debug", - "🍀 - Trying to find "anotherService" module path in "__project__".", - ], - [ - "debug", - "✅ - Module path of "anotherService" found at "file:///home/whoiam/project/src/services/anotherService.ts".", - ], - [ - "debug", - "💿 - Service "anotherService" found in "file:///home/whoiam/project/src/services/anotherService.ts".", - ], - [ - "debug", - "💿 - Loading "anotherService" initializer from "file:///home/whoiam/project/src/services/anotherService.ts".", - ], ], - "path": "file:///home/whoiam/project/src/services/anotherService.ts", "resolveCalls": [], } `); + } }); describe('should fail', () => { - it('with no command handler', async () => { + test('with no command handler', async () => { importer.mockResolvedValueOnce({}); + const $autoload = await initAutoload({ + WHOOK_PLUGINS, + WHOOK_RESOLVED_PLUGINS, + args: { namedArguments: {}, rest: ['myCommand'], command: 'whook' }, + importer, + $injector, + resolve, + access, + log, + } as WhookAutoloadDependencies); + try { - await initAutoload({ - WHOOK_PLUGINS, - WHOOK_RESOLVED_PLUGINS, - args: { namedArguments: {}, rest: ['myCommand'], command: 'whook' }, - importer, - $injector, - resolve, - access, - log, - } as AutoloaderWrapperDependencies as any); + await $autoload('commandHandler'); throw new YError('E_UNEXPECTED_SUCCESS'); } catch (err) { expect({ @@ -467,10 +367,6 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], ], "resolveCalls": [], } @@ -478,22 +374,24 @@ describe('$autoload', () => { } }); - it('with no command definition', async () => { + test('with no command definition', async () => { importer.mockResolvedValueOnce({ default: async () => undefined, }); + const $autoload = await initAutoload({ + WHOOK_PLUGINS, + WHOOK_RESOLVED_PLUGINS, + args: { namedArguments: {}, rest: ['myCommand'], command: 'whook' }, + importer, + $injector, + resolve, + access, + log, + } as WhookAutoloadDependencies); + try { - await initAutoload({ - WHOOK_PLUGINS, - WHOOK_RESOLVED_PLUGINS, - args: { namedArguments: {}, rest: ['myCommand'], command: 'whook' }, - importer, - $injector, - resolve, - access, - log, - } as AutoloaderWrapperDependencies as any); + await $autoload('commandHandler'); throw new YError('E_UNEXPECTED_SUCCESS'); } catch (err) { expect({ @@ -520,10 +418,6 @@ describe('$autoload', () => { "debug", "🤖 - Initializing the \`$autoload\` service.", ], - [ - "debug", - "🤖 - Wrapping the whook autoloader.", - ], ], "resolveCalls": [], } diff --git a/packages/whook/src/services/_cliAutoload.ts b/packages/whook/src/services/_cliAutoload.ts deleted file mode 100644 index f2770529..00000000 --- a/packages/whook/src/services/_cliAutoload.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { extname, join as pathJoin } from 'node:path'; -import initAutoload from './_autoload.js'; -import { - wrapInitializer, - alsoInject, - service, - constant, - name, -} from 'knifecycle'; -import { noop } from '../libs/utils.js'; -import { printStackTrace, YError } from 'yerror'; -import type { - Autoloader, - Service, - Dependencies, - Initializer, - ServiceInitializerWrapper, -} from 'knifecycle'; -import type { ImporterService, LogService } from 'common-services'; -import type { WhookCommandArgs } from '../libs/args.js'; -import { - WHOOK_DEFAULT_PLUGINS, - type WhookPluginName, - type WhookResolvedPluginsService, -} from './WHOOK_RESOLVED_PLUGINS.js'; - -export type AutoloaderWrapperDependencies = { - WHOOK_PLUGINS?: WhookPluginName[]; - WHOOK_RESOLVED_PLUGINS: WhookResolvedPluginsService; - args: WhookCommandArgs; - log: LogService; - importer: ImporterService; -}; - -const initializerWrapper: ServiceInitializerWrapper< - Autoloader>, - AutoloaderWrapperDependencies -> = async ( - { - WHOOK_PLUGINS = WHOOK_DEFAULT_PLUGINS, - WHOOK_RESOLVED_PLUGINS, - args, - log = noop, - importer, - }: AutoloaderWrapperDependencies, - $autoload: Autoloader>, -): Promise => { - log('debug', '🤖 - Wrapping the whook autoloader.'); - - const commandName = args.rest[0]; - let commandModule; - - if (!commandName) { - commandModule = { - default: service( - async () => async () => { - log('warning', `❌ - No command given in argument.`); - }, - 'commandHandler', - ), - definition: {}, - }; - } else { - for (const pluginName of WHOOK_PLUGINS) { - const resolvedPlugin = WHOOK_RESOLVED_PLUGINS[pluginName]; - const finalPath = new URL( - pathJoin( - '.', - 'commands', - commandName + extname(resolvedPlugin.mainURL), - ), - resolvedPlugin.mainURL, - ).toString(); - - try { - commandModule = await importer(finalPath); - break; - } catch (err) { - log( - 'debug', - `❌ - Command "${commandName}" not found in "${finalPath}".`, - ); - log('debug-stack', printStackTrace(err as Error)); - } - } - } - - if (!commandModule) { - commandModule = { - default: service( - async () => async () => { - log('warning', `Command "${commandName}" not found.`); - }, - 'commandHandler', - ), - definition: {}, - }; - } - - if (!commandModule.default) { - throw new YError('E_NO_COMMAND_HANDLER', commandName); - } - if (!commandModule.definition) { - throw new YError('E_NO_COMMAND_DEFINITION', commandName); - } - - return async (serviceName) => { - if (serviceName === 'COMMAND_DEFINITION') { - return { - initializer: constant(serviceName, commandModule.definition), - path: `definition://${commandName}`, - }; - } - if (serviceName === 'commandHandler') { - return { - initializer: name('commandHandler', commandModule.default), - path: `command://${commandName}`, - }; - } - - return $autoload(serviceName); - }; -}; - -export default alsoInject( - ['WHOOK_PLUGINS', 'WHOOK_RESOLVED_PLUGINS', 'args', 'log', 'importer'], - // eslint-disable-next-line @typescript-eslint/no-explicit-any - wrapInitializer(initializerWrapper as any, initAutoload), -); diff --git a/packages/whook/src/services/command.test.ts b/packages/whook/src/services/command.test.ts index 4812ecb9..e161d437 100644 --- a/packages/whook/src/services/command.test.ts +++ b/packages/whook/src/services/command.test.ts @@ -1,22 +1,38 @@ -import { describe, it, beforeEach, jest, expect } from '@jest/globals'; +import { describe, test, beforeEach, jest, expect } from '@jest/globals'; import initCommand from './command.js'; -import type { LogService } from 'common-services'; +import { type LogService } from 'common-services'; +import { type FatalErrorService, type Knifecycle } from 'knifecycle'; +import { YError } from 'yerror'; describe('command', () => { const log = jest.fn(); - const commandHandler = () => log('info', 'commandHandler ran'); beforeEach(() => { log.mockReset(); }); - it('should work', async () => { - const command = await initCommand({ + test('should work with no error', async () => { + const commandHandler = async () => log('info', 'commandHandler ran'); + let resolveWaitProcess; + const waitProcess = new Promise((resolve) => { + resolveWaitProcess = resolve; + }); + + const $ready = Promise.resolve(); + const $instance = { + destroy: resolveWaitProcess, + } as unknown as Knifecycle; + const $fatalError = {} as unknown as FatalErrorService; + + await initCommand({ commandHandler, + $instance, + $ready, + $fatalError, log, }); - command(); + await waitProcess; expect({ logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), @@ -31,4 +47,44 @@ describe('command', () => { } `); }); + + test('should fail with errors', async () => { + const commandHandler = async () => { + throw new YError('E_ERRORING'); + }; + let resolveWaitProcess; + const waitProcess = new Promise((resolve) => { + resolveWaitProcess = resolve; + }); + + const $ready = Promise.resolve(); + const $instance = {} as unknown as Knifecycle; + const $fatalError = { + throwFatalError: jest.fn().mockImplementationOnce(resolveWaitProcess), + }; + + await initCommand({ + commandHandler, + $instance, + $ready, + $fatalError: $fatalError as unknown as FatalErrorService, + log, + }); + + await waitProcess; + + expect({ + logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')), + fatalErrorCalls: $fatalError.throwFatalError.mock.calls, + }).toMatchInlineSnapshot(` +{ + "fatalErrorCalls": [ + [ + [YError: E_ERRORING (): E_ERRORING], + ], + ], + "logCalls": [], +} +`); + }); }); diff --git a/packages/whook/src/services/command.ts b/packages/whook/src/services/command.ts index 04c6ece7..c629751a 100644 --- a/packages/whook/src/services/command.ts +++ b/packages/whook/src/services/command.ts @@ -1,12 +1,31 @@ -import { autoService } from 'knifecycle'; +import { type LogService } from 'common-services'; +import { + autoService, + type FatalErrorService, + type Knifecycle, +} from 'knifecycle'; import { printStackTrace, YError } from 'yerror'; export default autoService(initCommand); -async function initCommand({ commandHandler, log }) { - return async function commandRunner() { +async function initCommand({ + commandHandler, + $ready, + $instance, + $fatalError, + log, +}: { + commandHandler: () => Promise; + $ready: Promise; + $instance: Knifecycle; + $fatalError: FatalErrorService; + log: LogService; +}): Promise { + async function commandRunner() { + await $ready; try { await commandHandler(); + await $instance.destroy(); } catch (err) { if ((err as YError).code === 'E_BAD_ARGS') { log('error-stack', printStackTrace(err as Error)); @@ -18,13 +37,15 @@ async function initCommand({ commandHandler, log }) { (err as YError).params[0][0].params.missingProperty }" is required.`, ); - throw err; + $fatalError.throwFatalError(err as Error); + return; } } if ((err as YError).params[0][0].keyword === 'additionalProperties') { if ((err as YError).params[0][0].params.additionalProperty === '_') { log('error', 'No anonymous arguments allowed.'); - throw err; + $fatalError.throwFatalError(err as Error); + return; } if ((err as YError).params[0][0].params.additionalProperty) { log( @@ -33,7 +54,8 @@ async function initCommand({ commandHandler, log }) { (err as YError).params[0][0].params.additionalProperty }" not allowed.`, ); - throw err; + $fatalError.throwFatalError(err as Error); + return; } } log( @@ -42,9 +64,12 @@ async function initCommand({ commandHandler, log }) { (err as YError).params[0][0].message, (err as YError).params[0][0].params, ); - throw err; + $fatalError.throwFatalError(err as Error); + return; } - throw err; + $fatalError.throwFatalError(err as Error); + return; } - }; + } + commandRunner(); } diff --git a/packages/whook/src/services/compiler.test.ts b/packages/whook/src/services/compiler.test.ts index 4fa2181e..f6d087f3 100644 --- a/packages/whook/src/services/compiler.test.ts +++ b/packages/whook/src/services/compiler.test.ts @@ -42,7 +42,7 @@ describe('Compiler', () => { logCalls: log.mock.calls, }).toMatchInlineSnapshot(` { - "contentsLength": 49522, + "contentsLength": 50123, "extension": ".mjs", "logCalls": [], "mappingsLength": 0, diff --git a/packages/whook/src/services/dryRun.ts b/packages/whook/src/services/dryRun.ts new file mode 100644 index 00000000..5b36715c --- /dev/null +++ b/packages/whook/src/services/dryRun.ts @@ -0,0 +1,21 @@ +import { type Knifecycle, autoService } from 'knifecycle'; +import { type LogService } from 'common-services'; + +async function initDryRun({ + $ready, + $instance, + log, +}: { + $ready: Promise; + $instance: Knifecycle; + log: LogService; +}) { + async function doDryRun() { + await $ready; + log('warning', '🌵 - Dry run, shutting down now!'); + await $instance.destroy(); + } + doDryRun(); +} + +export default autoService(initDryRun); diff --git a/packages/whook/src/services/mermaid.ts b/packages/whook/src/services/mermaid.ts new file mode 100644 index 00000000..25d7b608 --- /dev/null +++ b/packages/whook/src/services/mermaid.ts @@ -0,0 +1,69 @@ +import { stdout as _stdout } from 'node:process'; +import { type Knifecycle, autoService } from 'knifecycle'; +import { WRAPPER_REG_EXP } from './WRAPPERS.js'; +import { HANDLER_REG_EXP } from './HANDLERS.js'; +import { type LogService } from 'common-services'; + +async function initMermaid({ + $ready, + $instance, + log, + stdout, +}: { + $ready: Promise; + $instance: Knifecycle; + log: LogService; + stdout: typeof _stdout; +}) { + async function printGraph() { + await $ready; + + const CONFIG_REG_EXP = /^([A-Z0-9_]+)$/; + const MERMAID_GRAPH_CONFIG = { + classes: { + handlers: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', + wrappers: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', + config: 'fill:#000,stroke:#aad400,stroke-width:1px,color:#aad400;', + others: 'fill:#aad400,stroke:#000,stroke-width:1px,color:#000;', + }, + styles: [ + { + pattern: WRAPPER_REG_EXP, + className: 'wrappers', + }, + { + pattern: HANDLER_REG_EXP, + className: 'handlers', + }, + { + pattern: CONFIG_REG_EXP, + className: 'config', + }, + { + pattern: /^(.+)$/, + className: 'others', + }, + ], + shapes: [ + { + pattern: HANDLER_REG_EXP, + template: '$0(($0))', + }, + { + pattern: WRAPPER_REG_EXP, + template: '$0(($0))', + }, + { + pattern: CONFIG_REG_EXP, + template: '$0{$0}', + }, + ], + }; + log('warning', '🌵 - Mermaid graph generated, shutting down now!'); + stdout.write($instance.toMermaidGraph(MERMAID_GRAPH_CONFIG)); + await $instance.destroy(); + } + printGraph(); +} + +export default autoService(initMermaid); diff --git a/packages/whook/src/services/repl.test.ts b/packages/whook/src/services/repl.test.ts index f6b4aa19..8b60a65b 100644 --- a/packages/whook/src/services/repl.test.ts +++ b/packages/whook/src/services/repl.test.ts @@ -3,8 +3,8 @@ import { describe, it, beforeEach, jest, expect } from '@jest/globals'; import initREPL from './repl.js'; import { PassThrough } from 'stream'; import streamtest from 'streamtest'; -import type { LogService } from 'common-services'; -import type { Injector, Disposer } from 'knifecycle'; +import { type LogService } from 'common-services'; +import { type Injector, type Disposer } from 'knifecycle'; describe('initREPL', () => { const $injector = jest.fn>(); diff --git a/packages/whook/src/services/repl.ts b/packages/whook/src/services/repl.ts index e0643a12..7d9a28be 100644 --- a/packages/whook/src/services/repl.ts +++ b/packages/whook/src/services/repl.ts @@ -1,8 +1,8 @@ import { autoProvider, name } from 'knifecycle'; import { identity, noop } from '../libs/utils.js'; import repl from 'node:repl'; -import type { LogService } from 'common-services'; -import type { Provider, Disposer, Injector } from 'knifecycle'; +import { type LogService } from 'common-services'; +import { type Provider, type Disposer, type Injector } from 'knifecycle'; export default name('repl', autoProvider(initREPL)); diff --git a/packages/whook/src/watch.ts b/packages/whook/src/watch.ts index 920f9c2d..4e8b29cc 100644 --- a/packages/whook/src/watch.ts +++ b/packages/whook/src/watch.ts @@ -21,7 +21,7 @@ let delay: DelayService; let delayPromise: Promise | undefined; let hash: string; -export type WatchServerDependencies = OpenAPITypesConfig & { +export type WatchProcessDependencies = OpenAPITypesConfig & { ENV: AppEnvVars; MAIN_FILE_URL: string; $instance: Knifecycle; @@ -30,17 +30,17 @@ export type WatchServerDependencies = OpenAPITypesConfig & { log: LogService; }; -export type WatchServerArgs = { +export type WatchProcessArgs = { injectedNames: string[]; ignored?: string[]; afterRestartEnd?: ( - services: T & WatchServerDependencies, + services: T & WatchProcessDependencies, context: { apiChanged: boolean; openAPIData: string }, ) => Promise; }; -export async function watchDevServer( - { injectedNames = [], ignored = [], afterRestartEnd }: WatchServerArgs = { +export async function watchDevProcess( + { injectedNames = [], ignored = [], afterRestartEnd }: WatchProcessArgs = { injectedNames: [], ignored: [], }, @@ -70,7 +70,7 @@ export async function watchDevServer( return ignoreBuilder.createFilter(); })(); - await restartDevServer({ injectedNames, afterRestartEnd, restartsCounter }); + await restartDevProcess({ injectedNames, afterRestartEnd, restartsCounter }); await new Promise((resolve, reject) => { chokidar @@ -102,7 +102,7 @@ export async function watchDevServer( if (delay) { if (!delayPromise) { delayPromise = delay.create(2000); - restartDevServer({ + restartDevProcess({ injectedNames, afterRestartEnd, restartsCounter: restartsCounter++, @@ -113,11 +113,11 @@ export async function watchDevServer( }); } -export async function restartDevServer({ +export async function restartDevProcess({ injectedNames = [], afterRestartEnd, restartsCounter, -}: WatchServerArgs & { +}: WatchProcessArgs & { restartsCounter: number; }): Promise { if ($instance) { @@ -129,12 +129,7 @@ export async function restartDevServer({ await $instance.destroy(); } - const { - DEFAULT_INJECTED_NAMES, - runServer, - prepareEnvironment, - prepareServer, - } = await import( + const { runProcess, prepareEnvironment, prepareProcess } = await import( pathToFileURL(join(process.cwd(), 'src', 'index.ts')).toString() + (restartsCounter ? '?restartsCounter=' + restartsCounter : '') ); @@ -157,23 +152,18 @@ export async function restartDevServer({ getOpenAPI, log: _log, ...additionalServices - } = (await runServer( - prepareWatchEnvironment, - prepareServer, - - [ - ...new Set([ - ...(injectedNames.length ? injectedNames : DEFAULT_INJECTED_NAMES), - 'ENV', - 'OPEN_API_TYPES_CONFIG', - 'MAIN_FILE_URL', - '$instance', - 'delay', - 'getOpenAPI', - 'log', - ]), - ], - )) as WatchServerDependencies & T; + } = (await runProcess(prepareWatchEnvironment, prepareProcess, [ + ...new Set([ + ...injectedNames, + 'ENV', + 'OPEN_API_TYPES_CONFIG', + 'MAIN_FILE_URL', + '$instance', + 'delay', + 'getOpenAPI', + 'log', + ]), + ])) as WatchProcessDependencies & T; $instance = _instance; delay = _delay; @@ -235,7 +225,7 @@ export async function restartDevServer({ getOpenAPI, log, ...additionalServices, - } as WatchServerDependencies & T, + } as WatchProcessDependencies & T, { apiChanged, openAPIData }, ); }