diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..863e4b34 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,24 @@ +.eslintrc.js + +# Ignore build output +**/out/** +**/dist/** +**/node_modules/** +**/coverage/** +**/.nyc_output/** + +# Ignore generated files +**/generated/** +**/*.d.ts +**/*.test.ts + +# Ignore test fixtures +**/test/fixtures/** + +# Ignore third-party code +**/vendor/** + +# Ignore script directories +**/script/** +**/scripts/** + diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..5467eb21 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,42 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: [ + './tsconfig.json', + './types/tsconfig.json', + './runtimes/tsconfig.json', + './chat-client-ui-types/tsconfig.json', + ], + tsconfigRootDir: __dirname, + }, + plugins: ['@typescript-eslint'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + rules: { + eqeqeq: 'error', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'warn', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/no-misused-promises': 'warn', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-call': 'error', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/restrict-template-expressions': 'error', + '@typescript-eslint/no-duplicate-type-constituents': 'error', + '@typescript-eslint/no-floating-promises': 'error', + 'prettier/prettier': 'off', + }, +} diff --git a/chat-client-ui-types/src/uiContracts.ts b/chat-client-ui-types/src/uiContracts.ts index 000ce51b..1e151dd5 100644 --- a/chat-client-ui-types/src/uiContracts.ts +++ b/chat-client-ui-types/src/uiContracts.ts @@ -174,7 +174,7 @@ export type UiMessageResultParams = } export interface ErrorResult { message: string - type: 'InvalidRequest' | 'InternalError' | 'UnknownError' | string + type: string } /* diff --git a/package-lock.json b/package-lock.json index c8af899d..449d8f8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,14 +13,26 @@ "runtimes", "chat-client-ui-types" ], + "dependencies": { + "mac-ca": "^3.1.1", + "win-ca": "^3.5.1" + }, "devDependencies": { "@commitlint/cli": "^19.8.0", "@commitlint/config-conventional": "^19.8.0", + "@stylistic/eslint-plugin": "^1.7.0", "@types/mocha": "^10.0.9", "@types/node": "^22.13.1", "@types/proxyquire": "^1.3.31", + "@typescript-eslint/eslint-plugin": "^7.9.0", + "@typescript-eslint/parser": "^7.9.0", "assert": "^2.0.0", "conventional-changelog-conventionalcommits": "^8.0.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-security-node": "^1.1.1", + "eslint-plugin-unicorn": "^51.0.1", "husky": "^9.1.7", "prettier": "3.5.3", "pretty-quick": "^4.1.1", @@ -1122,6 +1134,127 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", + "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@grpc/grpc-js": { "version": "1.12.6", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", @@ -1194,6 +1327,68 @@ "node": ">=12" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/@js-sdsl/ordered-map": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", @@ -1806,6 +2001,19 @@ "node": ">=14" } }, + "node_modules/@pkgr/core": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.4.tgz", + "integrity": "sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "license": "BSD-3-Clause" @@ -2432,6 +2640,110 @@ "node": ">=18.0.0" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.8.1.tgz", + "integrity": "sha512-64My6I7uCcmSQ//427Pfg2vjSf9SDzfsGIWohNFgISMLYdC5BzJqDo647iDDJzSxINh3WTC0Ql46ifiKuOoTyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "1.8.1", + "@stylistic/eslint-plugin-jsx": "1.8.1", + "@stylistic/eslint-plugin-plus": "1.8.1", + "@stylistic/eslint-plugin-ts": "1.8.1", + "@types/eslint": "^8.56.10" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.8.1.tgz", + "integrity": "sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.8.1.tgz", + "integrity": "sha512-k1Eb6rcjMP+mmjvj+vd9y5KUdWn1OBkkPLHXhsrHt5lCDFZxJEs0aVQzE5lpYrtVZVkpc5esTtss/cPJux0lfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "^1.8.1", + "@types/eslint": "^8.56.10", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@stylistic/eslint-plugin-plus": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.8.1.tgz", + "integrity": "sha512-4+40H3lHYTN8OWz+US8CamVkO+2hxNLp9+CAjorI7top/lHqemhpJvKA1LD9Uh+WMY9DYWiWpL2+SZ2wAXY9fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^6.21.0" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@stylistic/eslint-plugin-ts": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.8.1.tgz", + "integrity": "sha512-/q1m+ZuO1JHfiSF16EATFzv7XSJkc5W6DocfvH5o9oB6WWYFMF77fVoBWnKT3wGptPOc2hkRupRKhmeFROdfWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "1.8.1", + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, "node_modules/@types/chai": { "version": "5.0.1", "dev": true, @@ -2453,6 +2765,24 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/eslint": { + "version": "8.56.12", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "license": "MIT" @@ -2492,11 +2822,25 @@ "@types/node": "*" } }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/proxyquire": { "version": "1.3.31", "dev": true, "license": "MIT" }, + "node_modules/@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/shimmer": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz", @@ -2525,74 +2869,465 @@ "dev": true, "license": "MIT" }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "node_modules/@types/win-ca": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/@types/win-ca/-/win-ca-3.5.4.tgz", + "integrity": "sha512-WDlA6ZvTg1g9ygKcDCQb4GjEtk0RcZyx09btQea9NZqfKPl+WtyOlEwNfYMhK2E5sRCo6hMtct1EX3l04yAC1A==", + "dev": true, "license": "MIT", - "peerDependencies": { - "acorn": "^8" + "dependencies": { + "@types/node": "*", + "@types/node-forge": "*" } }, - "node_modules/ajv": { - "version": "8.17.1", + "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", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/ansi-colors": { - "version": "4.1.3", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, "license": "MIT", - "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, "engines": { - "node": ">=6" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "color-convert": "^2.0.1" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || >=20.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", "peer": true, "dependencies": { "normalize-path": "^3.0.0", @@ -2611,6 +3346,16 @@ "dev": true, "license": "MIT" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/arrify": { "version": "1.0.1", "dev": true, @@ -2734,7 +3479,6 @@ "version": "2.0.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -2756,6 +3500,39 @@ "license": "ISC", "peer": true }, + "node_modules/browserslist": { + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer": { "version": "4.9.2", "license": "MIT", @@ -2775,6 +3552,19 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { "version": "1.0.7", "license": "MIT", @@ -2814,11 +3604,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001716", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz", + "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, "node_modules/chalk": { "version": "4.1.2", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2834,7 +3644,6 @@ "version": "7.2.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -2866,12 +3675,51 @@ "fsevents": "~2.3.2" } }, + "node_modules/ci-info": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.2.0.tgz", + "integrity": "sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cjs-module-lexer": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", "license": "MIT" }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/cliui": { "version": "7.0.4", "dev": true, @@ -3031,6 +3879,20 @@ "node": ">=10" } }, + "node_modules/core-js-compat": { + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.42.0.tgz", + "integrity": "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "dev": true, @@ -3134,6 +3996,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/define-data-property": { "version": "1.1.4", "license": "MIT", @@ -3178,88 +4047,430 @@ "license": "BSD-3-Clause", "peer": true, "engines": { - "node": ">=0.3.1" + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.145", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.145.tgz", + "integrity": "sha512-pZ5EcTWRq/055MvSBgoFEyKf2i4apwfoqJbK/ak2jnFq8oHjZ+vzc3AhRcz37Xn+ZJfL58R666FLJx0YOK9yTw==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.6.tgz", + "integrity": "sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-security-node": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-security-node/-/eslint-plugin-security-node-1.1.4.tgz", + "integrity": "sha512-8+agTMb2glNbP1zFhqo/Ixwtz16Hn0TvJW5KgpoHkAzGjDUhQf9iT+D6OgbhvZCMWRKMjc+5FbJ2Lh0UEUz7fQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-unicorn": { + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "@eslint-community/eslint-utils": "^4.4.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", + "esquery": "^1.5.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.5.4", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.56.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-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, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" } }, - "node_modules/dot-prop": { - "version": "5.3.0", + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, "license": "MIT" }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "license": "MIT", + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "is-arrayish": "^0.2.1" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/es-define-property": { - "version": "1.0.0", - "license": "MIT", + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "get-intrinsic": "^1.2.4" + "estraverse": "^5.1.0" }, "engines": { - "node": ">= 0.4" + "node": ">=0.10" } }, - "node_modules/es-errors": { - "version": "1.3.0", - "license": "MIT", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=4.0" } }, - "node_modules/escalade": { - "version": "3.2.0", - "license": "MIT", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">=6" + "node": ">=4.0" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "MIT", - "peer": true, + "license": "BSD-2-Clause", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, "node_modules/events": { @@ -3273,6 +4484,13 @@ "version": "3.1.3", "license": "MIT" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -3290,6 +4508,20 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-uri": { "version": "3.0.3", "license": "BSD-3-Clause" @@ -3326,6 +4558,19 @@ "reusify": "^1.0.4" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-keys": { "version": "1.0.2", "dev": true, @@ -3373,6 +4618,28 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, "node_modules/follow-redirects": { "version": "1.15.9", "funding": [ @@ -3523,6 +4790,53 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/gopd": { "version": "1.1.0", "license": "MIT", @@ -3536,6 +4850,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, "node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -3609,6 +4930,13 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, "node_modules/hpagent": { "version": "1.2.0", "license": "MIT", @@ -3694,6 +5022,26 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -3760,6 +5108,22 @@ "node": ">=8" } }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-callable": { "version": "1.2.7", "license": "MIT", @@ -3865,6 +5229,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "dev": true, @@ -3956,6 +5330,26 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -3989,6 +5383,13 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -4021,6 +5422,30 @@ "dev": true, "license": "MIT" }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -4218,6 +5643,16 @@ "node": ">= 0.6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "5.1.6", "dev": true, @@ -4316,6 +5751,13 @@ "version": "2.1.3", "license": "MIT" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/nise": { "version": "6.1.1", "dev": true, @@ -4337,6 +5779,13 @@ "node": ">= 6.13.0" } }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, "node_modules/noms": { "version": "0.0.0", "dev": true, @@ -4346,6 +5795,29 @@ "readable-stream": "~1.0.31" } }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "dev": true, @@ -4403,6 +5875,24 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -4441,6 +5931,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4509,6 +6009,16 @@ "node": ">=16" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "1.1.1", "dev": true, @@ -4532,11 +6042,31 @@ "node": ">=4" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" } }, "node_modules/prettier": { @@ -4555,6 +6085,19 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-quick": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.1.1.tgz", @@ -4685,6 +6228,116 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, "node_modules/readable-stream": { "version": "1.0.34", "dev": true, @@ -4720,6 +6373,38 @@ "node": ">= 0.10" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, "node_modules/require-directory": { "version": "2.1.1", "license": "MIT", @@ -4784,6 +6469,69 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5042,6 +6790,16 @@ "node": ">=8" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/source-map": { "version": "0.6.1", "dev": true, @@ -5061,6 +6819,42 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/split": { "version": "1.0.1", "license": "MIT", @@ -5118,11 +6912,23 @@ "node": ">=0.10.0" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" }, @@ -5167,6 +6973,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.4.tgz", + "integrity": "sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, "node_modules/text-extensions": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", @@ -5180,6 +7003,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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, + "license": "MIT" + }, "node_modules/through": { "version": "2.3.8", "license": "MIT" @@ -5279,6 +7109,19 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "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, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-mocha": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-11.1.0.tgz", @@ -5440,6 +7283,19 @@ "version": "2.8.1", "license": "0BSD" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "dev": true, @@ -5448,6 +7304,19 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", @@ -5494,6 +7363,57 @@ "node": ">=8" } }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/url": { "version": "0.10.3", "license": "MIT", @@ -5531,6 +7451,17 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "license": "MIT", @@ -5606,6 +7537,16 @@ "split": "^1.0.1" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.5.1", "dev": true, @@ -5759,6 +7700,7 @@ "@types/mock-fs": "^4.13.4", "@types/node": "^22.13.1", "@types/node-forge": "^1.3.11", + "@types/win-ca": "^3.5.4", "assert": "^2.0.0", "copyfiles": "^2.4.1", "husky": "^9.1.7", diff --git a/package.json b/package.json index 3543fb53..70ee27bb 100644 --- a/package.json +++ b/package.json @@ -35,16 +35,26 @@ "test": "npm run test --workspaces --if-present", "preversion": "npm run test", "version": "npm run compile && git add -A .", - "watch": "tsc --build --watch" + "watch": "tsc --build --watch", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix" }, "devDependencies": { "@commitlint/cli": "^19.8.0", "@commitlint/config-conventional": "^19.8.0", + "@stylistic/eslint-plugin": "^1.7.0", "@types/mocha": "^10.0.9", "@types/node": "^22.13.1", "@types/proxyquire": "^1.3.31", + "@typescript-eslint/eslint-plugin": "^7.9.0", + "@typescript-eslint/parser": "^7.9.0", "assert": "^2.0.0", "conventional-changelog-conventionalcommits": "^8.0.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-security-node": "^1.1.1", + "eslint-plugin-unicorn": "^51.0.1", "husky": "^9.1.7", "prettier": "3.5.3", "pretty-quick": "^4.1.1", @@ -74,5 +84,9 @@ "bracketSpacing": true, "arrowParens": "avoid", "endOfLine": "lf" + }, + "dependencies": { + "mac-ca": "^3.1.1", + "win-ca": "^3.5.1" } } diff --git a/runtimes/package.json b/runtimes/package.json index d1b50b91..ada361d0 100644 --- a/runtimes/package.json +++ b/runtimes/package.json @@ -60,6 +60,7 @@ "@types/mock-fs": "^4.13.4", "@types/node": "^22.13.1", "@types/node-forge": "^1.3.11", + "@types/win-ca": "^3.5.4", "assert": "^2.0.0", "copyfiles": "^2.4.1", "husky": "^9.1.7", diff --git a/runtimes/protocol/notification.ts b/runtimes/protocol/notification.ts index 1657546b..145458a5 100644 --- a/runtimes/protocol/notification.ts +++ b/runtimes/protocol/notification.ts @@ -13,16 +13,16 @@ export interface NotificationContent { readonly title?: string } -export namespace FollowupNotificationActionType { - export const Acknowledge = 'Acknowledge' -} +export const FollowupNotificationActionType = { + Acknowledge: 'Acknowledge', +} as const export type FollowupNotificationActionType = typeof FollowupNotificationActionType.Acknowledge -export namespace NotificationActionType { - export const Url = 'Url' - export const Marketplace = 'Marketplace' -} +const NotificationActionType = { + Url: 'Url', + Marketplace: 'Marketplace', +} as const export type NotificationActionType = | typeof NotificationActionType.Url diff --git a/runtimes/runtimes/auth/auth.test.ts b/runtimes/runtimes/auth/auth.test.ts index 0d2800f0..67bd8802 100644 --- a/runtimes/runtimes/auth/auth.test.ts +++ b/runtimes/runtimes/auth/auth.test.ts @@ -396,7 +396,7 @@ describe('Auth', () => { describe('Encrypted credentials', () => { it('Rejects when encrypted flag is set wrong', async () => { const updateIamRequest: UpdateCredentialsParams = { - data: iamCredentials as IamCredentials, + data: iamCredentials, encrypted: true, } const auth = new Auth(serverLspConnectionMock, lspRouter) @@ -472,8 +472,8 @@ describe('Auth', () => { const jwt = await new jose.EncryptJWT(payload) .setProtectedHeader({ alg: 'dir', enc: 'A256GCM' }) - .setNotBefore(new Date().getTime() / 1000 + 50) //allows up to 60s clockTolerance - .setExpirationTime(new Date().getTime() / 1000 - 70) //not allowed + .setNotBefore(Date.now() / 1000 + 50) // allows up to 60s clockTolerance + .setExpirationTime(Date.now() / 1000 - 70) // not allowed .encrypt(encryptionKey) const updateBearerRequest: UpdateCredentialsParams = { diff --git a/runtimes/runtimes/auth/auth.ts b/runtimes/runtimes/auth/auth.ts index 5008ccfa..3351c633 100644 --- a/runtimes/runtimes/auth/auth.ts +++ b/runtimes/runtimes/auth/auth.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/restrict-template-expressions */ import { jwtDecrypt } from 'jose' import { Connection } from 'vscode-languageserver' import { CredentialsEncoding } from './standalone/encryption' @@ -97,7 +98,7 @@ export class Auth { return creds && (isIamCredentials(creds) || isBearerCredentials(creds)) } - private async registerLspCredentialsUpdateHandlers() { + private registerLspCredentialsUpdateHandlers() { this.registerIamCredentialsUpdateHandlers() this.registerBearerCredentialsUpdateHandlers() } @@ -166,11 +167,11 @@ export class Auth { private setCredentials(creds: Credentials) { if (this.areValidCredentials(creds)) { if (isIamCredentials(creds)) { - this.iamCredentials = creds as IamCredentials + this.iamCredentials = creds // Prevent modifying credentials by implementors Object.freeze(this.iamCredentials) } else { - this.bearerCredentials = creds as BearerCredentials + this.bearerCredentials = creds Object.freeze(this.bearerCredentials) } } diff --git a/runtimes/runtimes/auth/standalone/encryption.ts b/runtimes/runtimes/auth/standalone/encryption.ts index ebe576dd..28292c88 100644 --- a/runtimes/runtimes/auth/standalone/encryption.ts +++ b/runtimes/runtimes/auth/standalone/encryption.ts @@ -2,7 +2,7 @@ import { Readable } from 'stream' import { CompactEncrypt } from 'jose' export function shouldWaitForEncryptionKey(): boolean { - return process.argv.some(arg => arg === '--set-credentials-encryption-key') + return process.argv.includes('--set-credentials-encryption-key') } export type CredentialsEncoding = 'JWT' @@ -38,7 +38,7 @@ export function validateEncryptionDetails(encryptionDetails: EncryptionInitializ } if (encryptionDetails.mode !== 'JWT') { - throw new Error(`Unsupported encoding mode: ${encryptionDetails.mode}`) + throw new Error(`Unsupported encoding mode: ${String(encryptionDetails.mode)}`) } } @@ -65,9 +65,9 @@ export function readEncryptionDetails(stream: Readable): Promise { - let byteRead + let byteRead: Buffer | null while ((byteRead = stream.read(1)) !== null) { - if (byteRead.toString('utf-8') == '\n') { + if (byteRead.toString('utf-8') === '\n') { clearTimer() // Stop reading this stream, we have read a line from it stream.removeListener('readable', onStreamIsReadable) @@ -90,7 +90,12 @@ export function readEncryptionDetails(stream: Readable): Promise { +export function encryptObjectWithKey( + request: NonNullable, + key: string, + alg?: string, + enc?: string +): Promise { const payload = new TextEncoder().encode(JSON.stringify(request)) const keyBuffer = Buffer.from(key, 'base64') return new CompactEncrypt(payload) @@ -126,8 +131,8 @@ export function isMessageJWEEncrypted(message: string, algorithm: string, encodi if ( protectedHeader.alg && protectedHeader.enc && - protectedHeader.alg == algorithm && - protectedHeader.enc == encoding + protectedHeader.alg === algorithm && + protectedHeader.enc === encoding ) { return true } diff --git a/runtimes/runtimes/base-runtime.ts b/runtimes/runtimes/base-runtime.ts index c3bc8f4f..bb8bddb7 100644 --- a/runtimes/runtimes/base-runtime.ts +++ b/runtimes/runtimes/base-runtime.ts @@ -44,11 +44,6 @@ import { inlineChatResultNotificationType, listConversationsRequestType, conversationClickRequestType, - GetSerializedChatParams, - GetSerializedChatResult, - RequestHandler, - TabBarActionParams, - TabBarActionResult, getSerializedChatRequestType, tabBarActionRequestType, chatOptionsUpdateType, @@ -122,10 +117,11 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag // Set up the workspace to use the LSP Text Documents component const defaultHomeDir = '/home/user' const workspace: Workspace = { - getTextDocument: async uri => documents.get(uri), - getAllTextDocuments: async () => documents.all(), - getWorkspaceFolder: _uri => - lspRouter.clientInitializeParams!.workspaceFolders && lspRouter.clientInitializeParams!.workspaceFolders[0], + getTextDocument: uri => Promise.resolve(documents.get(uri)), + getAllTextDocuments: () => Promise.resolve(documents.all()), + getWorkspaceFolder: _ => + lspRouter.clientInitializeParams?.workspaceFolders && + lspRouter.clientInitializeParams.workspaceFolders?.[0], fs: { copyFile: (_src, _dest, _options?) => Promise.resolve(), exists: _path => Promise.resolve(false), @@ -167,9 +163,10 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag chatOptionsUpdate: params => lspConnection.sendNotification(chatOptionsUpdateType.method, params), openTab: params => lspConnection.sendRequest(openTabRequestType.method, params), onButtonClick: params => lspConnection.onRequest(buttonClickRequestType.method, params), - sendChatUpdate: params => lspConnection.sendNotification(chatUpdateNotificationType.method, params), + sendChatUpdate: params => () => lspConnection.sendNotification(chatUpdateNotificationType.method, params), onFileClicked: handler => lspConnection.onNotification(fileClickNotificationType.method, handler), - sendContextCommands: params => lspConnection.sendNotification(contextCommandsNotificationType.method, params), + sendContextCommands: params => () => + lspConnection.sendNotification(contextCommandsNotificationType.method, params), onCreatePrompt: handler => lspConnection.onNotification(createPromptNotificationType.method, handler), onInlineChatResult: handler => lspConnection.onNotification(inlineChatResultNotificationType.method, handler), onListConversations: handler => lspConnection.onRequest(listConversationsRequestType.method, handler), @@ -185,7 +182,7 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag onUpdateProfile: handler => lspConnection.onRequest(updateProfileRequestType, handler), onGetSsoToken: handler => lspConnection.onRequest(getSsoTokenRequestType, handler), onInvalidateSsoToken: handler => lspConnection.onRequest(invalidateSsoTokenRequestType, handler), - sendSsoTokenChanged: params => lspConnection.sendNotification(ssoTokenChangedRequestType, params), + sendSsoTokenChanged: params => () => lspConnection.sendNotification(ssoTokenChangedRequestType, params), } // Set up auth without encryption @@ -197,7 +194,7 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag version: props.version, }, platform: 'browser', - getConfiguration(key: string) { + getConfiguration(_key: string) { return undefined }, } @@ -238,8 +235,10 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag onDidDeleteFiles: params => lspConnection.workspace.onDidDeleteFiles(params), onDidRenameFiles: params => lspConnection.workspace.onDidRenameFiles(params), onUpdateConfiguration: lspServer.setUpdateConfigurationHandler, - selectWorkspaceItem: params => lspConnection.sendRequest(selectWorkspaceItemRequestType.method, params), - openFileDiff: params => lspConnection.sendNotification(openFileDiffNotificationType.method, params), + selectWorkspaceItem: params => () => + lspConnection.sendRequest(selectWorkspaceItemRequestType.method, params), + openFileDiff: params => () => + lspConnection.sendNotification(openFileDiffNotificationType.method, params), }, window: { showMessage: params => lspConnection.sendNotification(ShowMessageNotification.method, params), @@ -298,7 +297,9 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag // Free up any resources or threads used by Servers lspConnection.onExit(() => { - disposables.forEach(d => d()) + for (const d of disposables) { + d() + } }) // Initialize the documents listener and start the LSP connection diff --git a/runtimes/runtimes/chat/baseChat.ts b/runtimes/runtimes/chat/baseChat.ts index 1d82c341..89df41c4 100644 --- a/runtimes/runtimes/chat/baseChat.ts +++ b/runtimes/runtimes/chat/baseChat.ts @@ -136,12 +136,12 @@ export class BaseChat implements Chat { return this.connection.sendRequest(openTabRequestType.method, params) } - public chatOptionsUpdate(params: ChatOptionsUpdateParams): void { - this.connection.sendNotification(chatOptionsUpdateType.method, params) + public chatOptionsUpdate(params: ChatOptionsUpdateParams): Promise { + return this.connection.sendNotification(chatOptionsUpdateType.method, params) } public sendChatUpdate(params: ChatUpdateParams) { - this.connection.sendNotification(chatUpdateNotificationType.method, params) + return this.connection.sendNotification(chatUpdateNotificationType.method, params) } public onFileClicked(handler: NotificationHandler) { @@ -149,7 +149,7 @@ export class BaseChat implements Chat { } public sendContextCommands(params: ContextCommandParams) { - this.connection.sendNotification(contextCommandsNotificationType.method, params) + return this.connection.sendNotification(contextCommandsNotificationType.method, params) } public onCreatePrompt(handler: NotificationHandler) { diff --git a/runtimes/runtimes/encoding.ts b/runtimes/runtimes/encoding.ts index 39789f28..02c20fce 100644 --- a/runtimes/runtimes/encoding.ts +++ b/runtimes/runtimes/encoding.ts @@ -3,8 +3,8 @@ export interface Encoding { encode(value: string): string } -const HEX_PAD: string = '00' -const HEX_REGEX: RegExp = /%([0-9A-F]{2})/g +const HEX_PAD = '00' +const HEX_REGEX = /%([0-9A-F]{2})/g export class WebBase64Encoding implements Encoding { constructor(private window: WindowOrWorkerGlobalScope) {} @@ -22,7 +22,7 @@ export class WebBase64Encoding implements Encoding { encode(value: string): string { // to support Unicode chars - const converted = encodeURIComponent(value).replace(HEX_REGEX, (_, arg) => { + const converted = encodeURIComponent(value).replace(HEX_REGEX, (_, arg: string) => { return String.fromCharCode(parseInt(arg, 16)) }) return this.window.btoa(converted) diff --git a/runtimes/runtimes/lsp/router/loggingServer.ts b/runtimes/runtimes/lsp/router/loggingServer.ts index ead37823..29bb0425 100644 --- a/runtimes/runtimes/lsp/router/loggingServer.ts +++ b/runtimes/runtimes/lsp/router/loggingServer.ts @@ -12,15 +12,15 @@ export class LoggingServer { private lspConnection: Connection, private encoding: Encoding ) { - this.logger = new DefaultLogger(DEFAULT_LOG_LEVEL as LogLevel, this.lspConnection) + this.logger = new DefaultLogger(DEFAULT_LOG_LEVEL, this.lspConnection) this.lspServer = new LspServer(this.lspConnection, this.encoding, this.logger) - this.lspServer.setInitializeHandler(async (params: InitializeParams): Promise => { + this.lspServer.setInitializeHandler((params: InitializeParams): Promise => { this.updateLoggingLevel(params.initializationOptions?.logLevel ?? ('log' as LogLevel)) - return { + return Promise.resolve({ capabilities: {}, - } + }) }) - this.lspServer.setDidChangeConfigurationHandler(async params => { + this.lspServer.setDidChangeConfigurationHandler(async _params => { const logLevelConfig = await lspConnection.workspace.getConfiguration({ section: 'aws.logLevel', }) diff --git a/runtimes/runtimes/lsp/router/lspRouter.test.ts b/runtimes/runtimes/lsp/router/lspRouter.test.ts index bce3b0cb..f6f768d5 100644 --- a/runtimes/runtimes/lsp/router/lspRouter.test.ts +++ b/runtimes/runtimes/lsp/router/lspRouter.test.ts @@ -267,9 +267,9 @@ describe('LspRouter', () => { () => ({ serverInfo: { name: 'C' } }), ] - handlers.forEach(h => { + for (const h of handlers) { lspRouter.servers.push(newServer({ initializeHandler: h })) - }) + } const result = await initializeHandler({} as InitializeParams, {} as CancellationToken) diff --git a/runtimes/runtimes/lsp/router/lspRouter.ts b/runtimes/runtimes/lsp/router/lspRouter.ts index 02ed8d2e..2fd38d4b 100644 --- a/runtimes/runtimes/lsp/router/lspRouter.ts +++ b/runtimes/runtimes/lsp/router/lspRouter.ts @@ -72,10 +72,10 @@ export class LspRouter { } let responsesList = await Promise.all(this.servers.map(s => s.initialize(params, token))) - responsesList = responsesList.filter(r => r != undefined) + responsesList = responsesList.filter(r => r !== undefined) const responseError = responsesList.find(el => el instanceof ResponseError) if (responseError) { - return responseError as ResponseError + return responseError } const dupServerNames = findDuplicates(responsesList.map(r => (r as PartialInitializeResult).serverInfo?.name)) if (dupServerNames) { @@ -113,10 +113,7 @@ ${JSON.stringify({ ...result.capabilities, ...result.awsServerCapabilities })}` return result } - executeCommand = async ( - params: ExecuteCommandParams, - token: CancellationToken - ): Promise => { + executeCommand = async (params: ExecuteCommandParams, token: CancellationToken): Promise => { return this.routeRequestToFirstCapableServer( (server, params, token) => server.tryExecuteCommand(params, token), params, @@ -142,11 +139,11 @@ ${JSON.stringify({ ...result.capabilities, ...result.awsServerCapabilities })}` const errors = results.filter(result => result instanceof ResponseError) if (errors.length > 0) { - errors.forEach(error => { + for (const error of errors) { this.lspConnection.console.log( `Error updating configration section ${params.section}: ${error.message}` ) - }) + } return new ResponseError(ErrorCodes.InternalError, 'Error during updating configuration', errors) } @@ -170,7 +167,14 @@ ${JSON.stringify({ ...result.capabilities, ...result.awsServerCapabilities })}` const workspaceCapabilities = this.clientInitializeParams?.capabilities.workspace if (workspaceCapabilities?.didChangeConfiguration?.dynamicRegistration) { // Ask the client to notify the server on configuration changes - this.lspConnection.client.register(DidChangeConfigurationNotification.type, undefined) + this.lspConnection.client + .register(DidChangeConfigurationNotification.type, undefined) + .then(() => {}) + .catch(e => { + this.lspConnection.console.error( + `Failed to register DidChangeConfigurationNotification: ${e.message}` + ) + }) } this.routeNotificationToAllServers((server, params) => server.sendInitializedNotification(params), params) @@ -193,7 +197,7 @@ ${JSON.stringify({ ...result.capabilities, ...result.awsServerCapabilities })}` } } - private async routeNotificationToAllServers

(action: (server: LspServer, params: P) => void, params: P) { + private routeNotificationToAllServers

(action: (server: LspServer, params: P) => void, params: P) { for (const server of this.servers) { action(server, params) } diff --git a/runtimes/runtimes/lsp/router/lspServer.ts b/runtimes/runtimes/lsp/router/lspServer.ts index 19b73071..02c8cdab 100644 --- a/runtimes/runtimes/lsp/router/lspServer.ts +++ b/runtimes/runtimes/lsp/router/lspServer.ts @@ -31,7 +31,7 @@ export class LspServer { readonly notification: Notification private didChangeConfigurationHandler?: NotificationHandler - private executeCommandHandler?: RequestHandler + private executeCommandHandler?: RequestHandler private getServerConfigurationHandler?: RequestHandler private initializeHandler?: RequestHandler private initializedHandler?: NotificationHandler @@ -89,9 +89,7 @@ export class LspServer { this.initializeHandler = handler } - public setExecuteCommandHandler = ( - handler: RequestHandler - ): void => { + public setExecuteCommandHandler = (handler: RequestHandler): void => { this.executeCommandHandler = handler } @@ -121,7 +119,7 @@ export class LspServer { } return initializeResult - } catch (e) { + } catch (e: any) { this.logger.log( `Runtime Initialization Error\nInitializationOptions: ${JSON.stringify(params.initializationOptions)}\n${e}` ) @@ -135,9 +133,9 @@ export class LspServer { public tryExecuteCommand = async ( params: ExecuteCommandParams, token: CancellationToken - ): Promise<[boolean, any | undefined | null]> => { + ): Promise<[boolean, unknown]> => { if ( - this.initializeResult?.capabilities?.executeCommandProvider?.commands.some(c => c === params.command) && + this.initializeResult?.capabilities?.executeCommandProvider?.commands.includes(params.command) && this.executeCommandHandler ) { const result = await asPromise(this.executeCommandHandler(params, token)) @@ -150,11 +148,9 @@ export class LspServer { public tryGetServerConfiguration = async ( params: GetConfigurationFromServerParams, token: CancellationToken - ): Promise<[boolean, any | undefined | null]> => { + ): Promise<[boolean, unknown]> => { if ( - this.initializeResult?.awsServerCapabilities?.configurationProvider?.sections.some( - c => c === params.section - ) && + this.initializeResult?.awsServerCapabilities?.configurationProvider?.sections.includes(params.section) && this.getServerConfigurationHandler ) { const result = await asPromise(this.getServerConfigurationHandler(params, token)) diff --git a/runtimes/runtimes/lsp/router/routerByServerName.ts b/runtimes/runtimes/lsp/router/routerByServerName.ts index b53354fe..229db5d6 100644 --- a/runtimes/runtimes/lsp/router/routerByServerName.ts +++ b/runtimes/runtimes/lsp/router/routerByServerName.ts @@ -17,7 +17,7 @@ export class RouterByServerName

, F extends Fo const attachServerName = (): P => { const idObject = { serverName: this.serverName, - id: params.id!, + id: params.id, } const id = this.encoding.encode(JSON.stringify(idObject)) return { @@ -27,7 +27,7 @@ export class RouterByServerName

, F extends Fo } const sendParams = params.id ? attachServerName() : params - sendHandler(sendParams) + void sendHandler(sendParams) } processFollowup(followupHandler: NotificationHandler, params: F) { diff --git a/runtimes/runtimes/lsp/router/util.ts b/runtimes/runtimes/lsp/router/util.ts index 57f82eb9..f298d9e5 100644 --- a/runtimes/runtimes/lsp/router/util.ts +++ b/runtimes/runtimes/lsp/router/util.ts @@ -1,4 +1,4 @@ -function func(value: any): value is Function { +function func(value: any): value is (...args: any[]) => any { return typeof value === 'function' } @@ -27,25 +27,28 @@ export function asPromise(value: any): Promise { export function mergeObjects(obj1: any, obj2: any) { let merged: any = {} - for (let key in obj1) { - if (obj1.hasOwnProperty(key)) { + for (const key in obj1) { + if (Object.prototype.hasOwnProperty.call(obj1, key)) { if (Array.isArray(obj1) && Array.isArray(obj2)) { merged = [...new Set([...obj1, ...obj2])] } else if (typeof obj1[key] === 'object' && typeof obj2[key] === 'object') { merged[key] = mergeObjects(obj1[key], obj2[key]) } else { merged[key] = obj1[key] - if (obj2.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(obj2, key)) { merged[key] = obj2[key] } } } } - for (let key in obj2) { + for (const key in obj2) { if (Array.isArray(obj1) && Array.isArray(obj2)) { continue - } else if (obj2.hasOwnProperty(key) && !obj1.hasOwnProperty(key)) { + } else if ( + Object.prototype.hasOwnProperty.call(obj2, key) && + !Object.prototype.hasOwnProperty.call(obj1, key) + ) { merged[key] = obj2[key] } } diff --git a/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.test.ts b/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.test.ts index 111076f3..7e5b444b 100644 --- a/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.test.ts +++ b/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.test.ts @@ -58,13 +58,13 @@ describe('TextDocumentConnection', () => { calledFirst = false calledSecond = false - Object.keys(notificationHandlers).forEach( - k => (notificationHandlers[k as keyof typeof notificationHandlers] = undefined) - ) + for (const k of Object.keys(notificationHandlers)) { + notificationHandlers[k as keyof typeof notificationHandlers] = undefined + } }) describe('without observable (baseline)', () => { - Object.keys(notificationHandlers).forEach(key => { + for (const key of Object.keys(notificationHandlers)) { it(key + ' only supports the last callback', () => { testConnection[key as keyof typeof notificationHandlers](() => { calledFirst = true @@ -76,11 +76,11 @@ describe('TextDocumentConnection', () => { assert.equal(calledFirst, false) assert.equal(calledSecond, true) }) - }) + } }) describe('with observable', () => { - Object.keys(notificationHandlers).forEach(key => { + for (const key of Object.keys(notificationHandlers)) { let observableConnection: ReturnType beforeEach(async () => { @@ -141,7 +141,7 @@ describe('TextDocumentConnection', () => { assert.equal(calledFirst, false) assert.equal(calledSecond, true) }) - }) + } }) describe('onWillSaveTextDocumentWaitUntil', () => { diff --git a/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.ts b/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.ts index a775614a..59516d39 100644 --- a/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.ts +++ b/runtimes/runtimes/lsp/textDocuments/textDocumentConnection.ts @@ -42,21 +42,21 @@ type TextDocumentObservable = { export const observe = ( connection: TextDocumentConnection ): { callbacks: TextDocumentConnection } & TextDocumentObservable => { - const onDidChangeTextDocument = fromEventPattern( - connection.onDidChangeTextDocument + const onDidChangeTextDocument = fromEventPattern(handler => + connection.onDidChangeTextDocument(handler) + ).pipe(share()) + const onDidOpenTextDocument = fromEventPattern(handler => + connection.onDidOpenTextDocument(handler) + ).pipe(share()) + const onDidCloseTextDocument = fromEventPattern(handler => + connection.onDidCloseTextDocument(handler) + ).pipe(share()) + const onWillSaveTextDocument = fromEventPattern(handler => + connection.onWillSaveTextDocument(handler) + ).pipe(share()) + const onDidSaveTextDocument = fromEventPattern(handler => + connection.onDidSaveTextDocument(handler) ).pipe(share()) - const onDidOpenTextDocument = fromEventPattern(connection.onDidOpenTextDocument).pipe( - share() - ) - const onDidCloseTextDocument = fromEventPattern(connection.onDidCloseTextDocument).pipe( - share() - ) - const onWillSaveTextDocument = fromEventPattern(connection.onWillSaveTextDocument).pipe( - share() - ) - const onDidSaveTextDocument = fromEventPattern(connection.onDidSaveTextDocument).pipe( - share() - ) return { callbacks: { diff --git a/runtimes/runtimes/operational-telemetry/aws-cognito-gateway-sender.ts b/runtimes/runtimes/operational-telemetry/aws-cognito-gateway-sender.ts index 6f4e7e1b..c9713513 100644 --- a/runtimes/runtimes/operational-telemetry/aws-cognito-gateway-sender.ts +++ b/runtimes/runtimes/operational-telemetry/aws-cognito-gateway-sender.ts @@ -67,6 +67,9 @@ export class AwsCognitoApiGatewaySender { } private signRequest(url: URL, body: string) { + if (!this.credentials || !this.credentials.AccessKeyId || !this.credentials.SecretKey) { + throw new Error('Cognito credentials are not available') + } const request = new HttpRequest({ method: 'POST', headers: { @@ -80,9 +83,9 @@ export class AwsCognitoApiGatewaySender { const signer = new SignatureV4({ credentials: { - accessKeyId: this.credentials!.AccessKeyId!, - secretAccessKey: this.credentials!.SecretKey!, - sessionToken: this.credentials!.SessionToken!, + accessKeyId: this.credentials.AccessKeyId, + secretAccessKey: this.credentials.SecretKey, + sessionToken: this.credentials.SessionToken, }, region: this.region, service: 'execute-api', diff --git a/runtimes/runtimes/operational-telemetry/aws-metrics-exporter.ts b/runtimes/runtimes/operational-telemetry/aws-metrics-exporter.ts index 03a969db..d507c706 100644 --- a/runtimes/runtimes/operational-telemetry/aws-metrics-exporter.ts +++ b/runtimes/runtimes/operational-telemetry/aws-metrics-exporter.ts @@ -116,7 +116,7 @@ export class AwsMetricExporter implements PushMetricExporter { const isValid = this.eventValidator.validateEvent(result) if (!isValid) { - throw Error(`Invalid operational event: ${result}`) + throw Error(`Invalid operational event: ${JSON.stringify(result)}`) } return result as any diff --git a/runtimes/runtimes/operational-telemetry/aws-spans-exporter.ts b/runtimes/runtimes/operational-telemetry/aws-spans-exporter.ts index d418f605..7cc87121 100644 --- a/runtimes/runtimes/operational-telemetry/aws-spans-exporter.ts +++ b/runtimes/runtimes/operational-telemetry/aws-spans-exporter.ts @@ -113,7 +113,7 @@ export class AwsSpanExporter implements SpanExporter { const isValid = this.eventValidator.validateEvent(result) if (!isValid) { diag.error('Invalid operational event:', result) - throw Error(`Invalid operational event: ${result}`) + throw Error(`Invalid operational event: ${JSON.stringify(result)}`) } return result as OperationalEvent } diff --git a/runtimes/runtimes/operational-telemetry/operational-event-validator.ts b/runtimes/runtimes/operational-telemetry/operational-event-validator.ts index eda67672..10d312f7 100644 --- a/runtimes/runtimes/operational-telemetry/operational-event-validator.ts +++ b/runtimes/runtimes/operational-telemetry/operational-event-validator.ts @@ -11,14 +11,18 @@ export class OperationalEventValidator { const schemaDir = path.resolve(__dirname, 'telemetry-schemas') - fs.readdirSync(schemaDir).forEach(file => { + for (const file of fs.readdirSync(schemaDir)) { if (file.endsWith('.json')) { - const schema = require(path.resolve(schemaDir, file)) + const schema = JSON.parse(fs.readFileSync(path.resolve(schemaDir, file), 'utf8')) this.ajv.addSchema(schema, file) } - }) + } - this.validate = this.ajv.getSchema('telemetry-schema.json#/definitions/OperationalEvent')! + const validateSchema = this.ajv.getSchema('telemetry-schema.json#/definitions/OperationalEvent') + if (!validateSchema) { + throw new Error('Schema not found: telemetry-schema.json#/definitions/OperationalEvent') + } + this.validate = validateSchema } validateEvent(event: Record): boolean { diff --git a/runtimes/runtimes/operational-telemetry/operational-telemetry-service.ts b/runtimes/runtimes/operational-telemetry/operational-telemetry-service.ts index 05db4d25..06f43904 100644 --- a/runtimes/runtimes/operational-telemetry/operational-telemetry-service.ts +++ b/runtimes/runtimes/operational-telemetry/operational-telemetry-service.ts @@ -7,7 +7,7 @@ import { OperationalTelemetry, ValueProviders, } from './operational-telemetry' -import { diag, Attributes, DiagLogLevel, trace, metrics } from '@opentelemetry/api' +import { diag, DiagLogLevel, trace, metrics } from '@opentelemetry/api' import { NodeSDK } from '@opentelemetry/sdk-node' import { Resource } from '@opentelemetry/resources' import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from '@opentelemetry/semantic-conventions' @@ -108,7 +108,7 @@ export class OperationalTelemetryService implements OperationalTelemetry { this.telemetryOptOut = telemetryOptOut if (this.telemetryOptOut) { - this.shutdownSdk() + void this.shutdownSdk() } else { this.startupSdk() } @@ -160,7 +160,7 @@ export class OperationalTelemetryService implements OperationalTelemetry { recordEvent(eventName: EventName, eventAttr: OperationalEventAttributes, scopeName?: string): void { const tracer = trace.getTracer(scopeName ?? this.RUNTIMES_SCOPE_NAME) - const span = tracer.startSpan(eventName) + const span = tracer.startSpan(eventName as string) span.setAttribute('event.attributes', JSON.stringify(eventAttr)) span.end() } diff --git a/runtimes/runtimes/operational-telemetry/operational-telemetry.ts b/runtimes/runtimes/operational-telemetry/operational-telemetry.ts index 89709010..ce595289 100644 --- a/runtimes/runtimes/operational-telemetry/operational-telemetry.ts +++ b/runtimes/runtimes/operational-telemetry/operational-telemetry.ts @@ -1,5 +1,6 @@ import { ErrorEventAttributes, ResourceUsageAttributes, OperationalEvent } from './types/generated/telemetry' +// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents export type OperationalEventAttributes = ResourceUsageAttributes | ErrorEventAttributes export type EventName = OperationalEvent['baseInfo']['name'] @@ -21,7 +22,7 @@ export interface OperationalTelemetry { } class NoopOperationalTelemetry implements OperationalTelemetry { - toggleOptOut(telemetryOptOut: boolean): void {} + toggleOptOut(_telemetryOptOut: boolean): void {} registerGaugeProvider( _metricName: MetricName, diff --git a/runtimes/runtimes/standalone.ts b/runtimes/runtimes/standalone.ts index fb76db2f..01ea2149 100644 --- a/runtimes/runtimes/standalone.ts +++ b/runtimes/runtimes/standalone.ts @@ -174,15 +174,17 @@ export const standalone = (props: RuntimeProps) => { // Set up the workspace sync to use the LSP Text Document Sync capability const workspace: Workspace = { - getTextDocument: async uri => documents.get(uri), - getAllTextDocuments: async () => documents.all(), + getTextDocument: uri => Promise.resolve(documents.get(uri)), + getAllTextDocuments: () => Promise.resolve(documents.all()), // Get all workspace folders and return the workspace folder that contains the uri getWorkspaceFolder: uri => { const fileUrl = new URL(uri) const normalizedFileUri = fileUrl.pathname || '' - const folders = lspRouter.clientInitializeParams!.workspaceFolders - if (!folders) return undefined + const folders = lspRouter.clientInitializeParams?.workspaceFolders + if (!folders) { + return undefined + } for (const folder of folders) { const folderUrl = new URL(folder.uri) @@ -219,7 +221,7 @@ export const standalone = (props: RuntimeProps) => { readFile: (path, options?) => readFile(path, { encoding: (options?.encoding || 'utf-8') as BufferEncoding }), rm: (dir, options?) => rm(dir, options), - isFile: path => stat(path).then(({ isFile }) => isFile()), + isFile: path => stat(path).then(stats => stats.isFile()), writeFile: (path, data, options?) => writeFile(path, data, options), appendFile: (path, data) => appendFile(path, data), mkdir: (path, options?) => mkdir(path, options), @@ -263,7 +265,7 @@ export const standalone = (props: RuntimeProps) => { } ), onInvalidateSsoToken: handler => lspConnection.onRequest(invalidateSsoTokenRequestType, handler), - sendSsoTokenChanged: params => lspConnection.sendNotification(ssoTokenChangedRequestType, params), + sendSsoTokenChanged: params => () => lspConnection.sendNotification(ssoTokenChangedRequestType, params), } const credentialsProvider: CredentialsProvider = auth.getCredentialsProvider() @@ -328,9 +330,10 @@ export const standalone = (props: RuntimeProps) => { onDidDeleteFiles: params => lspConnection.workspace.onDidDeleteFiles(params), onDidRenameFiles: params => lspConnection.workspace.onDidRenameFiles(params), onUpdateConfiguration: lspServer.setUpdateConfigurationHandler, - selectWorkspaceItem: params => + selectWorkspaceItem: params => () => lspConnection.sendRequest(selectWorkspaceItemRequestType.method, params), - openFileDiff: params => lspConnection.sendNotification(openFileDiffNotificationType.method, params), + openFileDiff: params => () => + lspConnection.sendNotification(openFileDiffNotificationType.method, params), }, window: { showMessage: params => lspConnection.sendNotification(ShowMessageNotification.method, params), @@ -343,7 +346,7 @@ export const standalone = (props: RuntimeProps) => { lspConnection.sendNotification(PublishDiagnosticsNotification.method, params), sendProgress: async

(type: ProgressType

, token: ProgressToken, value: P) => { if (encryptionKey) { - const encryptedProgress = await encryptObjectWithKey(value as Object, encryptionKey) + const encryptedProgress = await encryptObjectWithKey(value as object, encryptionKey) return lspConnection.sendProgress(type, token, encryptedProgress as P) } @@ -376,7 +379,7 @@ export const standalone = (props: RuntimeProps) => { logging.log(`Using ${isExperimentalProxy ? 'experimental' : 'standard'} proxy util`) // setup proxy - let instance = new Ctor({ + const instance = new Ctor({ ...current_config, requestHandler: requestHandler, }) @@ -402,7 +405,7 @@ export const standalone = (props: RuntimeProps) => { Ctor: SDKClientConstructorV2, current_config: P ): T => { - let instance = new Ctor({ ...current_config }) + const instance = new Ctor({ ...current_config }) try { const configOptions = isExperimentalProxy @@ -450,7 +453,9 @@ export const standalone = (props: RuntimeProps) => { // Free up any resources or threads used by Servers lspConnection.onExit(() => { - disposables.forEach(d => d()) + for (const d of disposables) { + d() + } }) // Initialize the documents listener and start the LSP connection diff --git a/runtimes/runtimes/util/loggingUtil.test.ts b/runtimes/runtimes/util/loggingUtil.test.ts index 6f9b6860..92812e72 100644 --- a/runtimes/runtimes/util/loggingUtil.test.ts +++ b/runtimes/runtimes/util/loggingUtil.test.ts @@ -26,16 +26,16 @@ describe('LoggingUtil', () => { describe('isValidLogLevel', () => { it('should return true for valid log levels', () => { const validLevels: LogLevel[] = ['error', 'warn', 'info', 'log', 'debug'] - validLevels.forEach(level => { + for (const level of validLevels) { assert.strictEqual(true, isValidLogLevel(level)) - }) + } }) it('should return false for invalid log levels', () => { const invalidLevels = ['trace', 'verbose', undefined, null] - invalidLevels.forEach(level => { + for (const level of invalidLevels) { assert.strictEqual(false, isValidLogLevel(level as LogLevel)) - }) + } }) }) @@ -48,9 +48,9 @@ describe('LoggingUtil', () => { { level1: 'warn', level2: 'error', expected: true }, { level1: 'error', level2: 'error', expected: true }, ] - testCases.forEach(({ level1, level2, expected }) => { + for (const { level1, level2, expected } of testCases) { assert.strictEqual(expected, isLogLevelEnabled(level1 as LogLevel, level2 as LogLevel)) - }) + } }) }) diff --git a/runtimes/runtimes/util/standalone/certificatesReaders.ts b/runtimes/runtimes/util/standalone/certificatesReaders.ts index 874c0b54..33de7f84 100644 --- a/runtimes/runtimes/util/standalone/certificatesReaders.ts +++ b/runtimes/runtimes/util/standalone/certificatesReaders.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ /*! * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 @@ -43,7 +44,9 @@ export function readLinuxCertificates(): string[] { const matches = content.match(PEM_CERT_REGEXP) // Skip if no certificates found in this file - if (!matches) continue + if (!matches) { + continue + } // Track if we've found any valid certificates hasSeenCertificate = hasSeenCertificate || matches.length > 0 @@ -74,7 +77,7 @@ export function readLinuxCertificates(): string[] { } export function readWindowsCertificates(): string[] { - const winCaReader = require('win-ca/api') + const winCaReader = require('win-ca') const certs: string[] = [] winCaReader({ @@ -88,7 +91,8 @@ export function readWindowsCertificates(): string[] { export function readMacosCertificates(): string[] { const macCertsReader = require('mac-ca') - const certs = macCertsReader.get({ + + const certs: string[] = macCertsReader.get({ excludeBundled: false, }) diff --git a/runtimes/runtimes/util/standalone/experimentalProxyUtil.test.ts b/runtimes/runtimes/util/standalone/experimentalProxyUtil.test.ts index 950bb7c3..6cf4cbb5 100644 --- a/runtimes/runtimes/util/standalone/experimentalProxyUtil.test.ts +++ b/runtimes/runtimes/util/standalone/experimentalProxyUtil.test.ts @@ -20,7 +20,7 @@ export const generateCert = (validityDays = 365) => { cert.publicKey = keys.publicKey cert.validity.notBefore = new Date() - cert.validity.notAfter = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * validityDays) + cert.validity.notAfter = new Date(Date.now() + 1000 * 60 * 60 * 24 * validityDays) cert.sign(keys.privateKey) return { diff --git a/runtimes/runtimes/util/telemetryLspServer.ts b/runtimes/runtimes/util/telemetryLspServer.ts index 5a6a37c4..30001525 100644 --- a/runtimes/runtimes/util/telemetryLspServer.ts +++ b/runtimes/runtimes/util/telemetryLspServer.ts @@ -26,7 +26,7 @@ function setServerCrashTelemetryListeners() { const optel = OperationalTelemetryProvider.getTelemetryForScope(TELEMETRY_SCOPES.RUNTIMES) // Handles both 'uncaughtException' and 'unhandledRejection' - process.on('uncaughtExceptionMonitor', async (err, origin) => { + process.on('uncaughtExceptionMonitor', (err, origin) => { optel.recordEvent('ErrorEvent', { errorOrigin: origin, errorType: 'unknownServerCrash', @@ -44,12 +44,12 @@ export function getTelemetryLspServer( ): LspServer { const lspServer = new LspServer(lspConnection, encoding, logging) - lspServer.setInitializeHandler(async (params: InitializeParams): Promise => { - const optOut = params.initializationOptions?.telemetryOptOut ?? true // telemetry disabled if option not provided + lspServer.setInitializeHandler((params: InitializeParams): Promise => { + const _optOut = params.initializationOptions?.telemetryOptOut ?? true // telemetry disabled if option not provided - const endpoint = runtime.getConfiguration('TELEMETRY_GATEWAY_ENDPOINT') ?? DEFAULT_TELEMETRY_GATEWAY_ENDPOINT - const region = runtime.getConfiguration('TELEMETRY_COGNITO_REGION') ?? DEFAULT_TELEMETRY_COGNITO_REGION - const poolId = runtime.getConfiguration('TELEMETRY_COGNITO_POOL_ID') ?? DEFAULT_TELEMETRY_COGNITO_POOL_ID + const _endpoint = runtime.getConfiguration('TELEMETRY_GATEWAY_ENDPOINT') ?? DEFAULT_TELEMETRY_GATEWAY_ENDPOINT + const _region = runtime.getConfiguration('TELEMETRY_COGNITO_REGION') ?? DEFAULT_TELEMETRY_COGNITO_REGION + const _poolId = runtime.getConfiguration('TELEMETRY_COGNITO_POOL_ID') ?? DEFAULT_TELEMETRY_COGNITO_POOL_ID // const optel = OperationalTelemetryService.getInstance({ // serviceName: props.name, @@ -67,12 +67,12 @@ export function getTelemetryLspServer( setServerCrashTelemetryListeners() setMemoryUsageTelemetry() - return { + return Promise.resolve({ capabilities: {}, - } + }) }) - lspServer.setDidChangeConfigurationHandler(async params => { + lspServer.setDidChangeConfigurationHandler(async _params => { const optOut = await lspConnection.workspace.getConfiguration({ section: 'aws.optOutTelemetry', }) diff --git a/runtimes/runtimes/webworker.ts b/runtimes/runtimes/webworker.ts index 0fe7d14c..8d2059f6 100644 --- a/runtimes/runtimes/webworker.ts +++ b/runtimes/runtimes/webworker.ts @@ -1,6 +1,5 @@ import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver/browser' -import { RuntimeProps } from './runtime' import { baseRuntime } from './base-runtime' declare const self: WindowOrWorkerGlobalScope diff --git a/runtimes/server-interface/logging.ts b/runtimes/server-interface/logging.ts index c43b0e49..2c41c9c8 100644 --- a/runtimes/server-interface/logging.ts +++ b/runtimes/server-interface/logging.ts @@ -1,5 +1,3 @@ -import { LogLevel } from '../runtimes/util/loggingUtil' - /** * The logging feature interface */ diff --git a/runtimes/server-interface/lsp.ts b/runtimes/server-interface/lsp.ts index 90960787..6157b1bc 100644 --- a/runtimes/server-interface/lsp.ts +++ b/runtimes/server-interface/lsp.ts @@ -130,7 +130,7 @@ export type Lsp = { publishDiagnostics: (params: PublishDiagnosticsParams) => Promise sendProgress:

(type: ProgressType

, token: ProgressToken, value: P) => Promise onHover: (handler: RequestHandler) => void - onExecuteCommand: (handler: RequestHandler) => void + onExecuteCommand: (handler: RequestHandler) => void onSemanticTokens: (handler: RequestHandler) => void onSignatureHelp: (handler: RequestHandler) => void workspace: { diff --git a/runtimes/testing/TestFeatures.ts b/runtimes/testing/TestFeatures.ts index c273174e..32ac2e18 100644 --- a/runtimes/testing/TestFeatures.ts +++ b/runtimes/testing/TestFeatures.ts @@ -92,8 +92,8 @@ export class TestFeatures { ): T => new Ctor({ ...current_config }), } ) - this.workspace.getTextDocument.callsFake(async uri => this.documents[uri]) - this.workspace.getAllTextDocuments.callsFake(async () => Object.values(this.documents)) + this.workspace.getTextDocument.callsFake(uri => Promise.resolve(this.documents[uri])) + this.workspace.getAllTextDocuments.callsFake(() => Promise.resolve(Object.values(this.documents))) this.agent = stubInterface() } @@ -135,7 +135,7 @@ export class TestFeatures { return this.lsp.extensions.onInlineCompletionWithReferences.args[0]?.[0](...args) } - async doLogInlineCompletionSessionResults( + doLogInlineCompletionSessionResults( ...args: Parameters[0]> ) { return this.lsp.extensions.onLogInlineCompletionSessionResults.args[0]?.[0](...args) @@ -148,26 +148,26 @@ export class TestFeatures { async doChangeConfiguration() { // Force the call to handle after the current task completes - await undefined + await Promise.resolve() this.lsp.didChangeConfiguration.args[0]?.[0]({ settings: undefined }) return this } async doChangeTextDocument(params: DidChangeTextDocumentParams) { // Force the call to handle after the current task completes - await undefined + await Promise.resolve() this.lsp.onDidChangeTextDocument.args[0]?.[0](params) return this } async doOpenTextDocument(params: DidOpenTextDocumentParams) { // Force the call to handle after the current task completes - await undefined + await Promise.resolve() this.lsp.onDidOpenTextDocument.args[0]?.[0](params) return this } - async doExecuteCommand(params: ExecuteCommandParams, token: CancellationToken) { + doExecuteCommand(params: ExecuteCommandParams, token: CancellationToken) { return this.lsp.onExecuteCommand.args[0]?.[0](params, token) } @@ -179,7 +179,7 @@ export class TestFeatures { let remainder = text while (remainder.length > 0) { - const document = this.documents[uri]! + const document = this.documents[uri] const contentChange = remainder.substring(0, 1) remainder = remainder.substring(1) const newDocument = TextDocument.create( @@ -197,7 +197,7 @@ export class TestFeatures { } // Force the call to handle after the current task completes - await undefined + await Promise.resolve() this.lsp.onDidChangeTextDocument.args[0]?.[0]({ textDocument: { uri, @@ -216,6 +216,8 @@ export class TestFeatures { } dispose() { - this.disposables.forEach(d => d()) + for (const d of this.disposables) { + d() + } } } diff --git a/types/chat.ts b/types/chat.ts index acde28b6..3c3123a4 100644 --- a/types/chat.ts +++ b/types/chat.ts @@ -385,7 +385,7 @@ export interface ProgrammingLanguage { languageName: string } -export type InlineChatUserDecision = 'ACCEPT' | 'REJECT' | 'DISMISS' | string +export type InlineChatUserDecision = string export interface InlineChatResultParams { requestId: string