From 6bc3033a8c8bbe780d7be548de5d60b9ed49a488 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Tue, 5 Aug 2025 10:21:36 -0700 Subject: [PATCH 1/2] feat: linting --- eslint.config.js | 102 ++ package-lock.json | 2851 +++++++++++++++++++++++++++++++++++++++++++-- package.json | 10 +- 3 files changed, 2833 insertions(+), 130 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..6ff18d389 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,102 @@ +import js from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import importPlugin from 'eslint-plugin-import'; +import unusedImports from 'eslint-plugin-unused-imports'; + +export default tseslint.config( + js.configs.recommended, + ...tseslint.configs.recommended, + { + plugins: { + '@typescript-eslint': tseslint.plugin, + 'import': importPlugin, + 'unused-imports': unusedImports, + }, + languageOptions: { + parser: tseslint.parser, + parserOptions: { + project: './tsconfig.json', + ecmaVersion: 'latest', + sourceType: 'module', + }, + }, + rules: { + // Core rules - all as errors + 'max-classes-per-file': ['error', 1], + 'prefer-const': 'error', + + // TypeScript specific rules + '@typescript-eslint/no-floating-promises': 'error', + + // Import rules + 'import/order': ['error', { + 'groups': [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + ], + 'newlines-between': 'always', + 'alphabetize': { + 'order': 'asc', + 'caseInsensitive': true, + }, + }], + 'import/no-default-export': 'error', + + // Unused code detection + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': [ + 'error', + { + 'vars': 'all', + 'varsIgnorePattern': '^_', + 'args': 'after-used', + 'argsIgnorePattern': '^_', + }, + ], + + // Turn off rules that might be too strict + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + + // Allow console for CLI tool + 'no-console': 'off', + }, + settings: { + 'import/resolver': { + typescript: true, + node: true, + }, + }, + }, + { + // Allow default exports in specific files + files: ['src/index.ts', '*.config.js', '*.config.ts'], + rules: { + 'import/no-default-export': 'off', + }, + }, + { + // Test files can have different rules + files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + }, + }, + { + ignores: [ + 'dist/**', + 'node_modules/**', + 'coverage/**', + '*.d.ts', + 'src/__mocks__/**', + ], + }, +); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0469e6cd6..528ba6f0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -65,9 +65,14 @@ "@types/nock": "^10.0.3", "@types/readline-sync": "^1.4.8", "@types/supertest": "^6.0.3", + "@typescript-eslint/eslint-plugin": "^8.39.0", + "@typescript-eslint/parser": "^8.39.0", "@vitest/ui": "^3.2.4", "conventional-changelog-conventionalcommits": "^9.1.0", "cross-env": "^7.0.3", + "eslint": "^9.32.0", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-unused-imports": "^4.1.4", "execa": "^9.6.0", "express": "^5.1.0", "happy-dom": "^18.0.1", @@ -1191,6 +1196,170 @@ "node": ">=18" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "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/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/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/@eslint/config-helpers": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", + "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", + "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.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": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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/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": "9.32.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", + "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz", + "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@grpc/grpc-js": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", @@ -1222,6 +1391,72 @@ "node": ">=6" } }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "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/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@isaacs/balanced-match": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", @@ -2613,6 +2848,13 @@ "win32" ] }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, "node_modules/@sec-ant/readable-stream": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", @@ -2936,19 +3178,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/npm/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@semantic-release/release-notes-generator": { "version": "14.0.3", "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.3.tgz", @@ -3806,6 +4035,20 @@ "@types/ink": "^0.5.2" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/jszip": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.4.0.tgz", @@ -4010,6 +4253,267 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz", + "integrity": "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/type-utils": "8.39.0", + "@typescript-eslint/utils": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.39.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.0.tgz", + "integrity": "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.0.tgz", + "integrity": "sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.39.0", + "@typescript-eslint/types": "^8.39.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz", + "integrity": "sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz", + "integrity": "sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz", + "integrity": "sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/utils": "8.39.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.0.tgz", + "integrity": "sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz", + "integrity": "sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.39.0", + "@typescript-eslint/tsconfig-utils": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "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": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.0.tgz", + "integrity": "sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz", + "integrity": "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.39.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -4188,9 +4692,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -4208,6 +4712,16 @@ "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/acorn-walk": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", @@ -4266,6 +4780,23 @@ "node": ">=8" } }, + "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/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -4275,6 +4806,21 @@ "node": ">=8" } }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -4289,6 +4835,13 @@ "dev": true, "license": "MIT" }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/argv-formatter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz", @@ -4296,6 +4849,23 @@ "dev": true, "license": "MIT" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -4303,6 +4873,111 @@ "dev": true, "license": "MIT" }, + "node_modules/array-includes": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -4340,6 +5015,16 @@ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "license": "MIT" }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4357,6 +5042,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4430,6 +5131,17 @@ "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -4506,6 +5218,25 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -4657,22 +5388,6 @@ "npm": ">=5.0.0" } }, - "node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/cli-highlight/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4975,6 +5690,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -5052,19 +5774,6 @@ "node": ">=18" } }, - "node_modules/conventional-changelog-writer/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/conventional-commits-filter": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-5.0.0.tgz", @@ -5183,26 +5892,6 @@ } } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -5360,6 +6049,60 @@ "node": ">=18" } }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", @@ -5406,6 +6149,13 @@ "node": ">=4.0.0" } }, + "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/default-browser": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", @@ -5434,6 +6184,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -5446,6 +6214,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -5517,6 +6303,19 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -5818,6 +6617,75 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-abstract": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -5870,6 +6738,37 @@ "node": ">= 0.4" } }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-toolkit": { "version": "1.39.7", "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.39.7.tgz", @@ -5940,6 +6839,376 @@ "node": ">=8" } }, + "node_modules/eslint": { + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz", + "integrity": "sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.0", + "@eslint/core": "^0.15.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.32.0", + "@eslint/plugin-kit": "^0.3.4", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", + "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", + "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.1", + "hasown": "^2.0.2", + "is-core-module": "^2.16.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.1", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.9", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/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-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.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/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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/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", + "engines": { + "node": ">= 4" + } + }, + "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": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "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": ">=4.0" + } + }, + "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": ">=4.0" + } + }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -5950,6 +7219,16 @@ "@types/estree": "^1.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": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -6147,6 +7426,13 @@ ], "license": "MIT" }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -6164,6 +7450,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-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -6249,6 +7549,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -6279,6 +7592,23 @@ "node": ">= 0.8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/find-up-simple": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", @@ -6309,6 +7639,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/flatted": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", @@ -6342,6 +7686,22 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -6550,6 +7910,37 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gaxios": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.1.tgz", @@ -6646,6 +8037,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-tsconfig": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", @@ -6709,6 +8118,36 @@ "node": ">= 6" } }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "14.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", @@ -6806,6 +8245,13 @@ "dev": true, "license": "ISC" }, + "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/gtoken": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", @@ -6875,6 +8321,19 @@ "node": ">=12" } }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6885,6 +8344,35 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -7188,6 +8676,16 @@ "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": "5.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", @@ -7387,6 +8885,21 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/into-stream": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-7.0.0.tgz", @@ -7498,6 +9011,24 @@ "url": "https://github.com/sponsors/brc-dd" } }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -7505,6 +9036,72 @@ "dev": true, "license": "MIT" }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", @@ -7520,6 +9117,41 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-docker": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", @@ -7545,6 +9177,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7554,6 +9202,25 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -7599,6 +9266,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-node-process": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", @@ -7616,6 +9309,23 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -7654,6 +9364,54 @@ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "license": "MIT" }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", @@ -7667,6 +9425,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", @@ -7680,6 +9489,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -7764,6 +9619,19 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsdom": { "version": "26.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", @@ -7872,6 +9740,13 @@ "bignumber.js": "^9.0.0" } }, + "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-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -7891,6 +9766,20 @@ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, + "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/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/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -7898,6 +9787,19 @@ "dev": true, "license": "ISC" }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -7942,6 +9844,16 @@ "safe-buffer": "^5.0.1" } }, + "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/kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", @@ -7954,6 +9866,20 @@ "integrity": "sha512-Y3c3QZfvKWHX60BVOQPhLCvVGmDYWyJEiINE3drOog6KCyN2AOwvuQQzlS3uJg1J85kzpILXIUwRXULWavir+w==", "license": "Apache-2.0" }, + "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/lie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", @@ -8000,14 +9926,20 @@ "node": ">=4" } }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -8058,6 +9990,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.uniqby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", @@ -8434,6 +10373,13 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/negotiator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", @@ -8540,19 +10486,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-url": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.2.tgz", @@ -11309,6 +13242,90 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -11436,6 +13453,24 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "license": "MIT" }, + "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/outvariant": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", @@ -11443,6 +13478,24 @@ "dev": true, "license": "MIT" }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-each-series": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-3.0.0.tgz", @@ -11482,6 +13535,38 @@ "node": ">=8" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-map": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", @@ -11603,6 +13688,16 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -11814,6 +13909,16 @@ "node": ">=4" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", @@ -11852,6 +13957,16 @@ "node": ">=20" } }, + "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/pretty-ms": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", @@ -11934,8 +14049,6 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=6" } @@ -12196,6 +14309,50 @@ "node": ">= 0.8.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/registry-auth-token": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", @@ -12398,6 +14555,33 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -12418,6 +14602,48 @@ ], "license": "MIT" }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-stable-stringify": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", @@ -12589,7 +14815,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semantic-release/node_modules/semver": { + "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", @@ -12618,19 +14844,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver-diff/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver-regex": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-4.0.5.tgz", @@ -12681,6 +14894,55 @@ "node": ">= 18" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -13105,6 +15367,20 @@ "dev": true, "license": "MIT" }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/stream-combiner2": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", @@ -13167,6 +15443,65 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -13192,6 +15527,16 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/strip-final-newline": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", @@ -13205,6 +15550,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-literal": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", @@ -13651,6 +16009,19 @@ "node": ">= 14.0.0" } }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", @@ -13705,6 +16076,19 @@ "node": ">=0.3.1" } }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -13739,6 +16123,19 @@ "@mixmark-io/domino": "^2.2.0" } }, + "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-is": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", @@ -13753,6 +16150,84 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -13780,6 +16255,25 @@ "node": ">=0.8.0" } }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", @@ -13851,6 +16345,16 @@ "node": ">= 0.8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/url-join": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", @@ -14213,6 +16717,102 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -14375,6 +16975,16 @@ "node": ">= 6" } }, + "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/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -14417,36 +17027,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -14562,6 +17142,19 @@ "node": ">=6" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yoctocolors": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", diff --git a/package.json b/package.json index d405d168f..5c15b4726 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,10 @@ "dev": "tsx src/index.ts", "repomix:sdk": "npx repomix node_modules/@continuedev/sdk --ignore **/api,cli-repomix.xml -o sdk-repomix.xml", "repomix:cli": "npx repomix --ignore sdk-repomix.xml -o cli-repomix.xml", - "lint": "tsc --noEmit", + "lint": "tsc --noEmit && eslint .", + "lint:fix": "eslint . --fix", + "typecheck": "tsc --noEmit", + "watch:logs": "tail -f ~/.continue/logs/cn.log", "prepare": "npm run build", "semantic-release": "semantic-release", "semantic-release:dry-run": "semantic-release --dry-run" @@ -86,9 +89,14 @@ "@types/nock": "^10.0.3", "@types/readline-sync": "^1.4.8", "@types/supertest": "^6.0.3", + "@typescript-eslint/eslint-plugin": "^8.39.0", + "@typescript-eslint/parser": "^8.39.0", "@vitest/ui": "^3.2.4", "conventional-changelog-conventionalcommits": "^9.1.0", "cross-env": "^7.0.3", + "eslint": "^9.32.0", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-unused-imports": "^4.1.4", "execa": "^9.6.0", "express": "^5.1.0", "happy-dom": "^18.0.1", From 1fee6fe16f56eca92fa05260a4a062b4776c29a1 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Tue, 5 Aug 2025 10:23:38 -0700 Subject: [PATCH 2/2] improv: lint --- eslint.config.js | 140 +++--- package-lock.json | 459 ++++++++++++++++++ package.json | 1 + src/CLIPlatformClient.ts | 7 +- src/MCPConnection.ts | 57 +++ src/args.test.ts | 1 + src/args.ts | 4 +- src/asciiArt.ts | 1 + src/auth/ensureAuth.ts | 3 +- src/auth/workos.ts | 29 +- src/commands/chat.ts | 8 +- src/commands/commands.integration.test.ts | 3 +- src/commands/login.ts | 1 + src/commands/remote-test.ts | 5 +- src/commands/remote.ts | 5 +- src/commands/serve.test.ts | 5 +- src/commands/serve.ts | 20 +- src/compaction.test.ts | 10 +- src/compaction.ts | 3 +- src/config.ts | 44 +- src/configLoader.ts | 10 +- src/continueSDK.ts | 3 +- src/e2e/auth.test.ts | 1 + src/e2e/headless-dynamic-responses.test.ts | 5 +- src/e2e/headless-minimal.test.ts | 1 + src/e2e/headless-tool-calls.test.ts | 1 + src/e2e/resume-flag.test.ts | 7 +- src/freeTrialTransition.ts | 12 +- src/hooks/useService.ts | 6 +- src/index.ts | 3 +- src/logging.test.ts | 5 +- src/mcp.ts | 58 +-- src/onboarding.ts | 29 +- .../headlessPermissions.integration.test.ts | 2 +- .../permissionChecker.integration.test.ts | 4 +- src/permissions/permissionChecker.ts | 1 + src/permissions/permissionManager.ts | 1 + src/permissions/permissionsYamlLoader.ts | 5 +- src/permissions/policyWriter.ts | 7 +- src/permissions/precedenceResolver.test.ts | 1 - src/permissions/precedenceResolver.ts | 3 +- src/permissions/yamlPermissions.test.ts | 4 +- src/services/ApiClientService.test.ts | 3 +- src/services/ApiClientService.ts | 5 +- src/services/AuthService.refactored.ts | 5 +- src/services/AuthService.test.ts | 3 +- src/services/AuthService.ts | 5 +- src/services/BaseService.test.ts | 1 + src/services/BaseService.ts | 3 +- src/services/ConfigService.test.ts | 19 +- src/services/ConfigService.ts | 12 +- src/services/MCPServiceWrapper.ts | 4 +- src/services/ModeService.test.ts | 4 +- src/services/ModeService.ts | 7 +- src/services/ModelService.refactored.ts | 10 +- src/services/ModelService.test.ts | 11 +- src/services/ModelService.ts | 10 +- src/services/ServiceContainer.test.ts | 1 + src/services/ServiceContainer.ts | 6 +- src/services/ServiceContainerContext.tsx | 2 + .../ToolPermissionService.debug.test.ts | 2 + .../ToolPermissionService.integration.test.ts | 2 +- .../ToolPermissionService.modes.test.ts | 2 +- .../ToolPermissionService.real.test.ts | 4 +- src/services/ToolPermissionService.test.ts | 6 +- src/services/ToolPermissionService.ts | 3 +- src/services/circular-dependencies.test.ts | 2 +- src/services/index.initialization.test.ts | 4 +- src/services/index.test.ts | 3 +- src/services/index.ts | 8 +- src/services/types.ts | 1 + src/session.ts | 12 +- src/slashCommands.test.ts | 7 +- src/slashCommands.ts | 6 +- src/streamChatResponse.getAllTools.test.ts | 3 +- src/streamChatResponse.test.ts | 13 +- src/streamChatResponse.ts | 14 +- src/systemMessage.ts | 6 +- src/telemetry/telemetryService.ts | 7 +- src/telemetry/utils.ts | 3 +- .../__tests__/testServiceContainer.test.ts | 1 + src/test-helpers/adapter-mocks.ts | 9 +- src/test-helpers/cli-helpers.ts | 9 +- src/test-helpers/mock-helpers.ts | 2 +- src/test-helpers/mock-llm-server.ts | 3 +- src/test-helpers/renderWithServices.tsx | 2 + src/test-helpers/testServiceContainer.ts | 1 - src/tools/exit.ts | 2 +- src/tools/fetch.ts | 1 + src/tools/formatters.test.ts | 2 + src/tools/index.ts | 11 +- src/tools/listFiles.ts | 3 +- src/tools/preprocess.test.ts | 9 +- src/tools/readFile.ts | 3 +- src/tools/runTerminalCommand.ts | 7 +- src/tools/searchAndReplace/index.ts | 12 +- src/tools/searchCode.test.ts | 1 - src/tools/searchCode.ts | 1 + src/tools/viewDiff.ts | 3 +- src/tools/writeFile.ts | 9 +- src/ui/ColoredDiff.test.ts | 1 + src/ui/ConfigSelector.tsx | 7 +- src/ui/FileSearchUI.tsx | 8 +- src/ui/FreeTrialStatus.tsx | 4 +- src/ui/FreeTrialTransitionUI.tsx | 14 +- src/ui/IntroMessage.tsx | 7 +- src/ui/LoadingAnimation.tsx | 76 +-- src/ui/MarkdownRenderer.test.tsx | 3 +- src/ui/MarkdownRenderer.tsx | 7 +- src/ui/ModelCapabilityWarning.test.tsx | 3 +- src/ui/ModelCapabilityWarning.tsx | 2 +- src/ui/ModelSelector.tsx | 6 +- src/ui/OrganizationSelector.tsx | 6 +- src/ui/Selector.tsx | 2 +- src/ui/ServiceDebugger.tsx | 3 +- src/ui/SlashCommandUI.tsx | 2 +- src/ui/SyntaxHighlighter.ts | 2 +- src/ui/TUIChat.tsx | 43 +- src/ui/Timer.tsx | 2 +- src/ui/ToolResultSummary.tsx | 7 +- src/ui/UpdateNotification.tsx | 8 +- src/ui/UserInput.keyboard.test.ts | 1 + src/ui/UserInput.tsx | 16 +- src/ui/__mocks__/FreeTrialStatus.tsx | 2 +- src/ui/__mocks__/SyntaxHighlighter.ts | 5 +- .../__tests__/FreeTrialTransitionUI.test.tsx | 3 +- src/ui/__tests__/TUIChat.basic.test.tsx | 3 +- src/ui/__tests__/TUIChat.dualModeHelper.tsx | 3 +- .../TUIChat.freeTrialTransition.test.tsx | 1 - src/ui/__tests__/TUIChat.messages.test.tsx | 2 +- src/ui/__tests__/TUIChat.remote.test.tsx | 3 +- src/ui/__tests__/TUIChat.setup.ts | 87 +--- .../__tests__/TUIChat.slashCommands.test.tsx | 1 - .../__tests__/TUIChat.streamStopping.test.tsx | 3 +- src/ui/__tests__/TUIChat.testHelper.ts | 12 +- src/ui/__tests__/TUIChat.toolDisplay.test.tsx | 3 +- .../__tests__/TUIChat.toolPermission.test.tsx | 7 +- src/ui/__tests__/mockRemoteServer.ts | 6 +- src/ui/__tests__/mocks/MockApiClient.ts | 39 ++ src/ui/__tests__/mocks/MockLlmApi.ts | 38 ++ src/ui/__tests__/mocks/MockMCPService.ts | 21 + src/ui/__tests__/throttledGlob.test.ts | 4 +- src/ui/components/MemoizedMessage.tsx | 5 +- src/ui/components/ModeIndicator.test.tsx | 7 +- src/ui/components/ModeIndicator.tsx | 5 +- src/ui/components/ToolPermissionRequest.tsx | 2 +- src/ui/components/ToolPermissionSelector.tsx | 4 +- src/ui/components/ToolPreview.tsx | 6 +- src/ui/hooks/useChat.test.ts | 1 + src/ui/hooks/useChat.ts | 36 +- src/ui/hooks/useConfigSelector.ts | 8 +- src/ui/hooks/useMessageRenderer.tsx | 1 + src/ui/hooks/useModelSelector.ts | 3 +- src/ui/hooks/useOrganizationSelector.ts | 1 + src/ui/hooks/useTerminalSize.ts | 4 +- src/ui/index.ts | 6 +- src/util/exponentialBackoff.test.ts | 1 + src/util/exponentialBackoff.ts | 6 +- src/util/inputHistory.ts | 4 +- src/util/logger.ts | 29 +- src/util/stdin.ts | 2 +- src/util/tokenizer.ts | 3 +- src/util/withExponentialBackoff.test.ts | 2 + src/util/yamlConfigUpdater.test.ts | 3 +- src/util/yamlConfigUpdater.ts | 2 +- src/version.ts | 5 +- tsconfig.json | 2 +- vitest.setup.ts | 3 +- 168 files changed, 1201 insertions(+), 708 deletions(-) create mode 100644 src/MCPConnection.ts create mode 100644 src/ui/__tests__/mocks/MockApiClient.ts create mode 100644 src/ui/__tests__/mocks/MockLlmApi.ts create mode 100644 src/ui/__tests__/mocks/MockMCPService.ts diff --git a/eslint.config.js b/eslint.config.js index 6ff18d389..da7a3556d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,102 +1,112 @@ -import js from '@eslint/js'; -import tseslint from 'typescript-eslint'; -import importPlugin from 'eslint-plugin-import'; -import unusedImports from 'eslint-plugin-unused-imports'; +import tsParser from "@typescript-eslint/parser"; +import tsPlugin from "@typescript-eslint/eslint-plugin"; +import importPlugin from "eslint-plugin-import"; +import unusedImports from "eslint-plugin-unused-imports"; -export default tseslint.config( - js.configs.recommended, - ...tseslint.configs.recommended, +export default [ { + files: ["**/*.ts", "**/*.tsx"], plugins: { - '@typescript-eslint': tseslint.plugin, - 'import': importPlugin, - 'unused-imports': unusedImports, + "@typescript-eslint": tsPlugin, + import: importPlugin, + "unused-imports": unusedImports, }, languageOptions: { - parser: tseslint.parser, + parser: tsParser, parserOptions: { - project: './tsconfig.json', - ecmaVersion: 'latest', - sourceType: 'module', + project: "./tsconfig.json", + ecmaVersion: "latest", + sourceType: "module", }, }, rules: { // Core rules - all as errors - 'max-classes-per-file': ['error', 1], - 'prefer-const': 'error', - + "max-classes-per-file": ["error", 1], + "prefer-const": "error", + // TypeScript specific rules - '@typescript-eslint/no-floating-promises': 'error', - + "@typescript-eslint/no-floating-promises": "off", + // Import rules - 'import/order': ['error', { - 'groups': [ - 'builtin', - 'external', - 'internal', - 'parent', - 'sibling', - 'index', - ], - 'newlines-between': 'always', - 'alphabetize': { - 'order': 'asc', - 'caseInsensitive': true, - }, - }], - 'import/no-default-export': 'error', - - // Unused code detection - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'unused-imports/no-unused-imports': 'error', - 'unused-imports/no-unused-vars': [ - 'error', + "import/order": [ + "error", { - 'vars': 'all', - 'varsIgnorePattern': '^_', - 'args': 'after-used', - 'argsIgnorePattern': '^_', + groups: [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index", + ], + "newlines-between": "always", + alphabetize: { + order: "asc", + caseInsensitive: true, + }, }, ], - + "import/no-default-export": "error", + + // Unused code detection + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "off", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ + "error", + { + vars: "all", + varsIgnorePattern: "^_", + args: "after-used", + argsIgnorePattern: "^_", + }, + ], + // Turn off rules that might be too strict - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-non-null-assertion": "off", + // Allow console for CLI tool - 'no-console': 'off', + "no-console": "off", }, settings: { - 'import/resolver': { - typescript: true, + "import/resolver": { + typescript: { + project: "./tsconfig.json", + }, node: true, }, }, }, { // Allow default exports in specific files - files: ['src/index.ts', '*.config.js', '*.config.ts'], + files: ["src/index.ts", "*.config.js", "*.config.ts"], rules: { - 'import/no-default-export': 'off', + "import/no-default-export": "off", }, }, { // Test files can have different rules - files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'], + files: ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"], rules: { - '@typescript-eslint/no-explicit-any': 'off', + "@typescript-eslint/no-explicit-any": "off", + "unused-imports/no-unused-vars": "off", + "max-classes-per-file": "off", }, }, { ignores: [ - 'dist/**', - 'node_modules/**', - 'coverage/**', - '*.d.ts', - 'src/__mocks__/**', + "dist/**", + "node_modules/**", + "coverage/**", + "*.d.ts", + "src/__mocks__/**", + "jest.setup.ts", + "vitest.config.ts", + "*.config.js", + "*.config.ts", ], }, -); \ No newline at end of file +]; diff --git a/package-lock.json b/package-lock.json index 528ba6f0e..64cdfb0ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,6 +71,7 @@ "conventional-changelog-conventionalcommits": "^9.1.0", "cross-env": "^7.0.3", "eslint": "^9.32.0", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-unused-imports": "^4.1.4", "execa": "^9.6.0", @@ -1180,6 +1181,40 @@ "kuler": "^2.0.0" } }, + "node_modules/@emnapi/core": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.5.tgz", + "integrity": "sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.0.4", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.5.tgz", + "integrity": "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.4.tgz", + "integrity": "sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/darwin-arm64": { "version": "0.25.6", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.6.tgz", @@ -1644,6 +1679,19 @@ "node": ">=18" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" + } + }, "node_modules/@noble/hashes": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", @@ -3863,6 +3911,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.0.tgz", + "integrity": "sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", @@ -4514,6 +4573,275 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -6900,6 +7228,31 @@ } } }, + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" + }, + "peerDependencies": { + "unrs-resolver": "^1.0.0" + }, + "peerDependenciesMeta": { + "unrs-resolver": { + "optional": true + } + } + }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", @@ -6922,6 +7275,41 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz", + "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==", + "dev": true, + "license": "ISC", + "dependencies": { + "debug": "^4.4.1", + "eslint-import-context": "^0.1.8", + "get-tsconfig": "^4.10.1", + "is-bun-module": "^2.0.0", + "stable-hash-x": "^0.2.0", + "tinyglobby": "^0.2.14", + "unrs-resolver": "^1.7.11" + }, + "engines": { + "node": "^16.17.0 || >=18.6.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, "node_modules/eslint-module-utils": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", @@ -9089,6 +9477,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -10373,6 +10771,22 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-postinstall": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.2.tgz", + "integrity": "sha512-tWVJxJHmBWLy69PvO96TZMZDrzmw5KeiZBz3RHmiM2XZ9grBJ2WgMAFVVg25nqp3ZjTFUs2Ftw1JhscL3Teliw==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -15323,6 +15737,16 @@ "through2": "~2.0.0" } }, + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -16345,6 +16769,41 @@ "node": ">= 0.8" } }, + "node_modules/unrs-resolver": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.0" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 5c15b4726..9cedf9f2c 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "conventional-changelog-conventionalcommits": "^9.1.0", "cross-env": "^7.0.3", "eslint": "^9.32.0", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-unused-imports": "^4.1.4", "execa": "^9.6.0", diff --git a/src/CLIPlatformClient.ts b/src/CLIPlatformClient.ts index c815cf582..e919825b2 100644 --- a/src/CLIPlatformClient.ts +++ b/src/CLIPlatformClient.ts @@ -1,3 +1,7 @@ +import * as fs from "node:fs"; +import * as os from "node:os"; +import * as path from "node:path"; + import { FQSN, PlatformClient, @@ -6,9 +10,6 @@ import { } from "@continuedev/config-yaml"; import { DefaultApiInterface } from "@continuedev/sdk/dist/api"; import * as dotenv from "dotenv"; -import * as fs from "node:fs"; -import * as os from "node:os"; -import * as path from "node:path"; export class CLIPlatformClient implements PlatformClient { constructor( diff --git a/src/MCPConnection.ts b/src/MCPConnection.ts new file mode 100644 index 000000000..0baaea017 --- /dev/null +++ b/src/MCPConnection.ts @@ -0,0 +1,57 @@ +import { type AssistantConfig } from "@continuedev/sdk"; +import { Client } from "@modelcontextprotocol/sdk/client/index.js"; +import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; + +import { logger } from "./util/logger.js"; + +export class MCPConnection { + prompts: Awaited>["prompts"] = []; + tools: Awaited>["tools"] = []; + + private constructor(public readonly client: Client) {} + + public static async create( + config: NonNullable[number] + ) { + const client = new Client( + { + name: "continue-cli-client", + version: "1.0.0", + }, + { capabilities: {} } + ); + + // Construct transport + const env: Record = config?.env || {}; + if (process.env.PATH !== undefined) { + env.PATH = process.env.PATH; + } + + if (!config?.command) { + throw new Error("MCP server command is not specified"); + } + + const transport = new StdioClientTransport({ + command: config.command, + args: config?.args, + env, + }); + + // Connect and get all prompts and tools + const connection = new MCPConnection(client); + logger.debug('Connecting to MCP server', { command: config.command }); + await client.connect(transport); + const capabilities = client.getServerCapabilities(); + logger.debug('MCP server capabilities', { hasPrompts: !!capabilities?.prompts, hasTools: !!capabilities?.tools }); + + if (capabilities?.prompts) { + connection.prompts = (await client.listPrompts()).prompts; + } + + if (capabilities?.tools) { + connection.tools = (await client.listTools()).tools; + } + + return connection; + } +} \ No newline at end of file diff --git a/src/args.test.ts b/src/args.test.ts index aa0dc9e04..149e6d19a 100644 --- a/src/args.test.ts +++ b/src/args.test.ts @@ -1,4 +1,5 @@ import { vi } from 'vitest'; + import { parseArgs, processRule } from "./args.js"; describe("parseArgs", () => { diff --git a/src/args.ts b/src/args.ts index d783fd309..8031d3909 100644 --- a/src/args.ts +++ b/src/args.ts @@ -1,6 +1,8 @@ import * as fs from "fs"; -import JSZip from "jszip"; import * as path from "path"; + +import JSZip from "jszip"; + import { env } from "./env.js"; export interface CommandLineArgs { diff --git a/src/asciiArt.ts b/src/asciiArt.ts index b5b853c59..772772d49 100644 --- a/src/asciiArt.ts +++ b/src/asciiArt.ts @@ -1,4 +1,5 @@ import chalk from "chalk"; + import { getVersion } from "./version.js"; const b = chalk.bold.magenta; diff --git a/src/auth/ensureAuth.ts b/src/auth/ensureAuth.ts index 067e8b5da..8ee8e4402 100644 --- a/src/auth/ensureAuth.ts +++ b/src/auth/ensureAuth.ts @@ -1,4 +1,5 @@ import chalk from "chalk"; + import { isAuthenticated, login } from "./workos.js"; /** @@ -22,7 +23,7 @@ export async function ensureAuthenticated( await login(); return true; } catch (error) { - console.error(chalk.red("Failed to authenticate.")); + console.error(chalk.red("Failed to authenticate."), error); return false; } } diff --git a/src/auth/workos.ts b/src/auth/workos.ts index 83589cfd9..6b2849370 100644 --- a/src/auth/workos.ts +++ b/src/auth/workos.ts @@ -1,14 +1,14 @@ -import chalk from "chalk"; import * as fs from "fs"; -import open from "open"; import * as os from "os"; import * as path from "path"; -import { createInterface } from "readline"; -import { env } from "../env.js"; +import chalk from "chalk"; // Polyfill fetch for Node < 18 import nodeFetch from "node-fetch"; +import open from "open"; + import { getApiClient } from "../config.js"; +import { env } from "../env.js"; if (!globalThis.fetch) { globalThis.fetch = nodeFetch as unknown as typeof globalThis.fetch; } @@ -271,23 +271,6 @@ export function isAuthenticated(): boolean { return true; } -/** - * Prompt the user for input - */ -function prompt(question: string): Promise { - const rl = createInterface({ - input: process.stdin, - output: process.stdout, - }); - - return new Promise((resolve) => { - rl.question(question, (answer) => { - rl.close(); - resolve(answer); - }); - }); -} - /** * Device authorization response from WorkOS */ @@ -524,7 +507,7 @@ export async function login(): Promise { // Try to open the complete verification URL in browser try { await open(deviceAuth.verification_uri_complete); - } catch (error) { + } catch { console.info(chalk.yellow("Unable to open browser automatically")); } @@ -665,7 +648,7 @@ export async function listUserOrganizations(): Promise< try { const resp = await apiClient.listOrganizations(); return resp.organizations || []; - } catch (error) { + } catch { return null; } } diff --git a/src/commands/chat.ts b/src/commands/chat.ts index b4d4ca68e..e9ab745fa 100644 --- a/src/commands/chat.ts +++ b/src/commands/chat.ts @@ -2,6 +2,7 @@ import { ModelConfig } from "@continuedev/config-yaml"; import chalk from "chalk"; import { ChatCompletionMessageParam } from "openai/resources.mjs"; import * as readlineSync from "readline-sync"; + import { CONTINUE_ASCII_ART } from "../asciiArt.js"; import { loadAuthConfig } from "../auth/workos.js"; import { @@ -19,16 +20,17 @@ import { loadSession, saveSession } from "../session.js"; import { streamChatResponse } from "../streamChatResponse.js"; import { constructSystemMessage } from "../systemMessage.js"; import { posthogService } from "../telemetry/posthogService.js"; -import telemetryService from "../telemetry/telemetryService.js"; +import { telemetryService } from "../telemetry/telemetryService.js"; import { startTUIChat } from "../ui/index.js"; import { safeStdout } from "../util/consoleOverride.js"; import { formatError } from "../util/formatError.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; import { calculateContextUsagePercentage, countChatHistoryTokens, shouldAutoCompact, } from "../util/tokenizer.js"; + import { ExtendedCommandOptions } from "./BaseCommandOptions.js"; /** @@ -44,7 +46,7 @@ function processJsonOutput(response: string): string { JSON.parse(trimmedResponse); // If it parses successfully, return as-is return trimmedResponse; - } catch (error) { + } catch { // If it's not valid JSON, wrap it in a JSON object return JSON.stringify({ response: trimmedResponse, diff --git a/src/commands/commands.integration.test.ts b/src/commands/commands.integration.test.ts index cd956b674..7b684f29d 100644 --- a/src/commands/commands.integration.test.ts +++ b/src/commands/commands.integration.test.ts @@ -1,5 +1,6 @@ -import { beforeEach, describe, expect, it } from 'vitest'; import type { AssistantConfig } from '@continuedev/sdk'; +import { describe, expect, it } from 'vitest'; + import { getAllSlashCommands } from './commands.js'; describe('Slash Commands Integration', () => { diff --git a/src/commands/login.ts b/src/commands/login.ts index d7d96a827..5786904ae 100644 --- a/src/commands/login.ts +++ b/src/commands/login.ts @@ -1,4 +1,5 @@ import chalk from "chalk"; + import { login as workosLogin } from "../auth/workos.js"; export async function login() { diff --git a/src/commands/remote-test.ts b/src/commands/remote-test.ts index 119cbc1d0..7738b0f8e 100644 --- a/src/commands/remote-test.ts +++ b/src/commands/remote-test.ts @@ -1,7 +1,8 @@ import chalk from "chalk"; -import telemetryService from "../telemetry/telemetryService.js"; + +import { telemetryService } from "../telemetry/telemetryService.js"; import { startRemoteTUIChat } from "../ui/index.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; export async function remoteTest( prompt?: string, diff --git a/src/commands/remote.ts b/src/commands/remote.ts index e95c912c0..8f4f42c3d 100644 --- a/src/commands/remote.ts +++ b/src/commands/remote.ts @@ -1,13 +1,14 @@ import chalk from "chalk"; + import { getAccessToken, isAuthenticatedConfig, loadAuthConfig, } from "../auth/workos.js"; import { env } from "../env.js"; -import telemetryService from "../telemetry/telemetryService.js"; +import { telemetryService } from "../telemetry/telemetryService.js"; import { startRemoteTUIChat } from "../ui/index.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; export async function remote( prompt: string | undefined, diff --git a/src/commands/serve.test.ts b/src/commands/serve.test.ts index 0c8f662e9..23c762460 100644 --- a/src/commands/serve.test.ts +++ b/src/commands/serve.test.ts @@ -1,3 +1,5 @@ +import type { Server } from "http"; + import { afterEach, beforeEach, @@ -6,13 +8,12 @@ import { it, vi, } from "vitest"; -import type { Server } from "http"; + import { createMinimalTestContext } from "../test-helpers/ui-test-context.js"; describe("serve command", () => { let context: any; let originalProcessExit: typeof process.exit; - let serverPromise: Promise; let serverRef: Server | null = null; beforeEach(() => { diff --git a/src/commands/serve.ts b/src/commands/serve.ts index 137591b0d..5aa17f648 100644 --- a/src/commands/serve.ts +++ b/src/commands/serve.ts @@ -1,12 +1,14 @@ -import chalk from "chalk"; import { exec } from "child_process"; -import express, { Request, Response } from "express"; -import type { ChatCompletionMessageParam } from "openai/resources.mjs"; import path from "path"; import { promisify } from "util"; + +import chalk from "chalk"; +import express, { Request, Response } from "express"; +import type { ChatCompletionMessageParam } from "openai/resources.mjs"; + + import { getAssistantSlug } from "../auth/workos.js"; import { toolPermissionManager } from "../permissions/permissionManager.js"; -import { saveSession } from "../session.js"; import { getService, initializeServices, @@ -17,17 +19,19 @@ import { ConfigServiceState, ModelServiceState, } from "../services/types.js"; +import { saveSession } from "../session.js"; import { streamChatResponse, type StreamCallbacks, } from "../streamChatResponse.js"; import { constructSystemMessage } from "../systemMessage.js"; -import telemetryService from "../telemetry/telemetryService.js"; +import { telemetryService } from "../telemetry/telemetryService.js"; +import { getToolDisplayName } from "../tools/index.js"; import { DisplayMessage } from "../ui/types.js"; import { formatError } from "../util/formatError.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; + import { ExtendedCommandOptions } from "./BaseCommandOptions.js"; -import { getToolDisplayName } from "../tools/index.js"; const execAsync = promisify(exec); @@ -125,7 +129,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) { } // Initialize chat history - let chatHistory: ChatCompletionMessageParam[] = []; + const chatHistory: ChatCompletionMessageParam[] = []; const systemMessage = await constructSystemMessage("", options.rule, undefined, true); if (systemMessage) { chatHistory.push({ role: "system", content: systemMessage }); diff --git a/src/compaction.test.ts b/src/compaction.test.ts index 896b6c39f..011a16677 100644 --- a/src/compaction.test.ts +++ b/src/compaction.test.ts @@ -1,9 +1,11 @@ -import { describe, it, expect, vi } from "vitest"; -import { ChatCompletionMessageParam } from "openai/resources.mjs"; -import { compactChatHistory, findCompactionIndex, getHistoryForLLM, COMPACTION_MARKER } from "./compaction.js"; -import { streamChatResponse } from "./streamChatResponse.js"; import { ModelConfig } from "@continuedev/config-yaml"; import { BaseLlmApi } from "@continuedev/openai-adapters"; +import { ChatCompletionMessageParam } from "openai/resources.mjs"; +import { describe, it, expect, vi } from "vitest"; + +import { compactChatHistory, findCompactionIndex, getHistoryForLLM, COMPACTION_MARKER } from "./compaction.js"; +import { streamChatResponse } from "./streamChatResponse.js"; + // Mock the streamChatResponse function vi.mock("./streamChatResponse.js", () => ({ diff --git a/src/compaction.ts b/src/compaction.ts index ae38cb0d2..484866476 100644 --- a/src/compaction.ts +++ b/src/compaction.ts @@ -1,8 +1,9 @@ import { ModelConfig } from "@continuedev/config-yaml"; import { BaseLlmApi } from "@continuedev/openai-adapters"; import { ChatCompletionMessageParam } from "openai/resources.mjs"; + import { StreamCallbacks, streamChatResponse } from "./streamChatResponse.js"; -import logger from "./util/logger.js"; +import { logger } from "./util/logger.js"; export const COMPACTION_MARKER = "[COMPACTED HISTORY]"; diff --git a/src/config.ts b/src/config.ts index ec91eb263..86b8dd8e8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,8 +1,7 @@ + import { AssistantUnrolled, ModelConfig, - RegistryClient, - unrollAssistant, } from "@continuedev/config-yaml"; import { BaseLlmApi, @@ -14,14 +13,12 @@ import { DefaultApi, DefaultApiInterface, } from "@continuedev/sdk/dist/api/dist/index.js"; -import chalk from "chalk"; -import { dirname } from "node:path"; + import { AuthConfig, getAccessToken, getOrganizationId, } from "./auth/workos.js"; -import { CLIPlatformClient } from "./CLIPlatformClient.js"; import { loadConfiguration } from "./configLoader.js"; import { env } from "./env.js"; import { MCPService } from "./mcp.js"; @@ -77,43 +74,6 @@ export function getLlmApi( return [llmApi, model]; } -async function loadConfigYaml( - accessToken: string | null, - filePath: string, - organizationId: string | null, - apiClient: DefaultApiInterface -): Promise { - const unrollResult = await unrollAssistant( - { filePath, uriType: "file" }, - new RegistryClient({ - accessToken: accessToken ?? undefined, - apiBase: env.apiBase, - rootPath: dirname(filePath), - }), - { - currentUserSlug: "", - alwaysUseProxy: false, - orgScopeId: organizationId, - renderSecrets: true, - platformClient: new CLIPlatformClient(organizationId, apiClient), - onPremProxyUrl: null, - } - ); - - const errorDetails = unrollResult.errors; - if (!unrollResult.config) { - throw new Error(`Failed to load config file:\n${errorDetails}`); - } else if (errorDetails?.length) { - const warnings = - errorDetails?.length > 1 - ? errorDetails.map((d) => `\n- ${d.message}`) - : errorDetails[0].message; - console.warn(chalk.dim(`Warning: ${warnings}`)); - } - - return unrollResult.config; -} - export function getApiClient( accessToken: string | undefined | null ): DefaultApi { diff --git a/src/configLoader.ts b/src/configLoader.ts index 3c54366c9..208c64b45 100644 --- a/src/configLoader.ts +++ b/src/configLoader.ts @@ -1,3 +1,8 @@ +import * as fs from "fs"; +import { dirname } from "node:path"; +import * as os from "os"; +import * as path from "path"; + import { AssistantUnrolled, RegistryClient, @@ -5,10 +10,7 @@ import { } from "@continuedev/config-yaml"; import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js"; import chalk from "chalk"; -import * as fs from "fs"; -import { dirname } from "node:path"; -import * as os from "os"; -import * as path from "path"; + import { AuthConfig, getAccessToken, diff --git a/src/continueSDK.ts b/src/continueSDK.ts index 77e23f94d..2867176dd 100644 --- a/src/continueSDK.ts +++ b/src/continueSDK.ts @@ -1,7 +1,8 @@ import { Continue, ContinueClient } from "@continuedev/sdk"; -import { env } from "./env.js"; import chalk from "chalk"; +import { env } from "./env.js"; + /** * Initialize the Continue SDK with the given parameters * @param apiKey - API key to use for authentication diff --git a/src/e2e/auth.test.ts b/src/e2e/auth.test.ts index 28ef5d87d..7d7e529a5 100644 --- a/src/e2e/auth.test.ts +++ b/src/e2e/auth.test.ts @@ -1,5 +1,6 @@ import fs from "fs/promises"; import path from "path"; + import { cleanupTestContext, createTestContext, diff --git a/src/e2e/headless-dynamic-responses.test.ts b/src/e2e/headless-dynamic-responses.test.ts index f4b4722b2..0414d0838 100644 --- a/src/e2e/headless-dynamic-responses.test.ts +++ b/src/e2e/headless-dynamic-responses.test.ts @@ -1,3 +1,6 @@ +import * as fs from "fs/promises"; +import * as path from "path"; + import { cleanupTestContext, createTestContext, @@ -10,8 +13,6 @@ import { createMockLLMConfig, type MockLLMServer, } from "../test-helpers/mock-llm-server.js"; -import * as fs from "fs/promises"; -import * as path from "path"; describe("E2E: Headless Mode with Dynamic Responses", () => { let context: any; diff --git a/src/e2e/headless-minimal.test.ts b/src/e2e/headless-minimal.test.ts index 2312d22f9..5e7ace9db 100644 --- a/src/e2e/headless-minimal.test.ts +++ b/src/e2e/headless-minimal.test.ts @@ -1,5 +1,6 @@ import fs from "fs/promises"; import path from "path"; + import { cleanupTestContext, createTestContext, diff --git a/src/e2e/headless-tool-calls.test.ts b/src/e2e/headless-tool-calls.test.ts index c7d94cfca..0f2887f2b 100644 --- a/src/e2e/headless-tool-calls.test.ts +++ b/src/e2e/headless-tool-calls.test.ts @@ -1,4 +1,5 @@ import * as http from "http"; + import { cleanupTestContext, createTestContext, diff --git a/src/e2e/resume-flag.test.ts b/src/e2e/resume-flag.test.ts index bed9432d8..87e105b06 100644 --- a/src/e2e/resume-flag.test.ts +++ b/src/e2e/resume-flag.test.ts @@ -1,3 +1,6 @@ +import * as fs from "fs/promises"; +import * as path from "path"; + import { cleanupTestContext, createTestContext, @@ -8,8 +11,6 @@ import { cleanupMockLLMServer, type MockLLMServer, } from "../test-helpers/mock-llm-server.js"; -import * as fs from "fs/promises"; -import * as path from "path"; describe("E2E: Resume Flag", () => { let context: any; @@ -130,7 +131,7 @@ describe("E2E: Resume Flag", () => { expect(firstResult.stdout).toContain("First response"); // Verify the first session was saved correctly - let sessionDir = path.join(context.testDir, ".continue-cli", "sessions"); + const sessionDir = path.join(context.testDir, ".continue-cli", "sessions"); let sessionFiles = await fs.readdir(sessionDir); expect(sessionFiles).toHaveLength(1); diff --git a/src/freeTrialTransition.ts b/src/freeTrialTransition.ts index 2387027d5..514e2f107 100644 --- a/src/freeTrialTransition.ts +++ b/src/freeTrialTransition.ts @@ -1,13 +1,15 @@ -import chalk from "chalk"; import { spawn } from "child_process"; import * as fs from "fs"; -import open from "open"; import * as os from "os"; import * as path from "path"; + +import chalk from "chalk"; +import open from "open"; import * as readlineSync from "readline-sync"; -import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js"; -import { isValidAnthropicApiKey, getApiKeyValidationError } from "./util/apiKeyValidation.js"; + import { env } from "./env.js"; +import { isValidAnthropicApiKey, getApiKeyValidationError } from "./util/apiKeyValidation.js"; +import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js"; const CONFIG_PATH = path.join(os.homedir(), ".continue", "config.yaml"); @@ -63,7 +65,7 @@ export async function handleMaxedOutFreeTrial(onReload?: () => Promise): P "After setting up your models subscription, restart the CLI to continue." ) ); - } catch (error) { + } catch { console.log(chalk.yellow("\n⚠ Could not open browser automatically")); console.log(chalk.white(`Please visit: ${modelsUrl}`)); console.log( diff --git a/src/hooks/useService.ts b/src/hooks/useService.ts index ccbe34093..c78eff3c3 100644 --- a/src/hooks/useService.ts +++ b/src/hooks/useService.ts @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; + import { useServiceContainer } from '../services/ServiceContainerContext.js'; import { ServiceResult } from '../services/types.js'; @@ -104,25 +105,20 @@ export function useServices>( const newServices: Partial = {}; let hasLoading = false; let hasError: Error | null = null; - let allReady = true; for (const serviceName of serviceNames) { const result = container.getSync(serviceName as string); if (result.state === 'loading') { hasLoading = true; - allReady = false; } else if (result.state === 'error') { hasError = result.error; - allReady = false; } else if (result.state === 'idle') { - allReady = false; // Auto-load idle services container.load(serviceName as string).catch(() => {}); } else if (result.state === 'ready' && result.value !== null) { newServices[serviceName] = result.value as T[keyof T]; } else { - allReady = false; } } diff --git a/src/index.ts b/src/index.ts index bf6799f94..3156a398e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ #!/usr/bin/env node import { Command } from "commander"; + import { chat } from "./commands/chat.js"; import { login } from "./commands/login.js"; import { logout } from "./commands/logout.js"; @@ -9,7 +10,7 @@ import { remote } from "./commands/remote.js"; import { serve } from "./commands/serve.js"; import { addCommonOptions, mergeParentOptions } from "./shared-options.js"; import { configureConsoleForHeadless } from "./util/consoleOverride.js"; -import logger from "./util/logger.js"; +import { logger } from "./util/logger.js"; import { readStdinSync } from "./util/stdin.js"; import { getVersion } from "./version.js"; diff --git a/src/logging.test.ts b/src/logging.test.ts index 96167a452..fb4bf63f9 100644 --- a/src/logging.test.ts +++ b/src/logging.test.ts @@ -1,3 +1,6 @@ +import chalk from 'chalk'; +import { vi } from 'vitest'; + import { configureLogger, isLoggingEnabled, @@ -7,8 +10,6 @@ import { warn, loggers } from './logging.js'; -import { vi } from 'vitest'; -import chalk from 'chalk'; describe('logging utilities', () => { let consoleInfoSpy: ReturnType; diff --git a/src/mcp.ts b/src/mcp.ts index 10489d553..9a5a32e79 100644 --- a/src/mcp.ts +++ b/src/mcp.ts @@ -1,7 +1,7 @@ import { type AssistantConfig } from "@continuedev/sdk"; -import { Client } from "@modelcontextprotocol/sdk/client/index.js"; -import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; -import logger from "./util/logger.js"; + +import { MCPConnection } from "./MCPConnection.js"; +import { logger } from "./util/logger.js"; export class MCPService { private readonly connections: MCPConnection[] = []; @@ -60,55 +60,3 @@ export class MCPService { throw new Error(`Tool ${name} not found`); } } - -export class MCPConnection { - prompts: Awaited>["prompts"] = []; - tools: Awaited>["tools"] = []; - - private constructor(public readonly client: Client) {} - - public static async create( - config: NonNullable[number] - ) { - const client = new Client( - { - name: "continue-cli-client", - version: "1.0.0", - }, - { capabilities: {} } - ); - - // Construct transport - const env: Record = config?.env || {}; - if (process.env.PATH !== undefined) { - env.PATH = process.env.PATH; - } - - if (!config?.command) { - throw new Error("MCP server command is not specified"); - } - - const transport = new StdioClientTransport({ - command: config.command, - args: config?.args, - env, - }); - - // Connect and get all prompts and tools - const connection = new MCPConnection(client); - logger.debug('Connecting to MCP server', { command: config.command }); - await client.connect(transport); - const capabilities = client.getServerCapabilities(); - logger.debug('MCP server capabilities', { hasPrompts: !!capabilities?.prompts, hasTools: !!capabilities?.tools }); - - if (capabilities?.prompts) { - connection.prompts = (await client.listPrompts()).prompts; - } - - if (capabilities?.tools) { - connection.tools = (await client.listTools()).tools; - } - - return connection; - } -} diff --git a/src/onboarding.ts b/src/onboarding.ts index 4f8594d7a..b379f368d 100644 --- a/src/onboarding.ts +++ b/src/onboarding.ts @@ -1,16 +1,19 @@ +import * as fs from "fs"; +import * as os from "os"; +import * as path from "path"; + import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; import { BaseLlmApi } from "@continuedev/openai-adapters"; import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js"; import chalk from "chalk"; -import * as fs from "fs"; -import * as os from "os"; -import * as path from "path"; import * as readlineSync from "readline-sync"; + import { processRule } from "./args.js"; import { AuthConfig, isAuthenticated, login } from "./auth/workos.js"; import { initialize } from "./config.js"; import { MCPService } from "./mcp.js"; import { isValidAnthropicApiKey, getApiKeyValidationError } from "./util/apiKeyValidation.js"; +import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js"; const CONFIG_PATH = path.join(os.homedir(), ".continue", "config.yaml"); @@ -33,13 +36,11 @@ export async function checkHasAcceptableModel( const content = fs.readFileSync(configPath, "utf8"); return content.includes("claude"); - } catch (error) { + } catch { return false; } } -import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js"; - export async function createOrUpdateConfig(apiKey: string): Promise { const configDir = path.dirname(CONFIG_PATH); @@ -111,7 +112,7 @@ export async function runNormalFlow( ): Promise { // Step 1: Check if --config flag is provided if (configPath) { - let result = await initialize(authConfig, configPath); + const result = await initialize(authConfig, configPath); // Inject rules into the config if provided if (rules && rules.length > 0) { result.config = await injectRulesIntoConfig(result.config, rules); @@ -122,25 +123,27 @@ export async function runNormalFlow( // Step 2: If user is logged in, look for first assistant in selected org if (isAuthenticated()) { try { - let result = await initialize(authConfig, undefined); + const result = await initialize(authConfig, undefined); // Inject rules into the config if provided if (rules && rules.length > 0) { result.config = await injectRulesIntoConfig(result.config, rules); } return { ...result, wasOnboarded: false }; - } catch (error) {} + } catch { + // Silently ignore errors when loading default assistant + } } // Step 3: Look for local ~/.continue/config.yaml if (fs.existsSync(CONFIG_PATH)) { try { - let result = await initialize(authConfig, CONFIG_PATH); + const result = await initialize(authConfig, CONFIG_PATH); // Inject rules into the config if provided if (rules && rules.length > 0) { result.config = await injectRulesIntoConfig(result.config, rules); } return { ...result, wasOnboarded: false }; - } catch (error) { + } catch { console.log(chalk.yellow("⚠ Invalid config file found")); } } @@ -150,7 +153,7 @@ export async function runNormalFlow( console.log(chalk.blue("✓ Using ANTHROPIC_API_KEY from environment")); await createOrUpdateConfig(process.env.ANTHROPIC_API_KEY); console.log(chalk.gray(` Config saved to: ${CONFIG_PATH}`)); - let result = await initialize(authConfig, CONFIG_PATH); + const result = await initialize(authConfig, CONFIG_PATH); // Inject rules into the config if provided if (rules && rules.length > 0) { result.config = await injectRulesIntoConfig(result.config, rules); @@ -193,7 +196,7 @@ async function injectRulesIntoConfig( return config; } - let processedRules: string[] = []; + const processedRules: string[] = []; for (const ruleSpec of rules) { try { const processedRule = await processRule(ruleSpec); diff --git a/src/permissions/headlessPermissions.integration.test.ts b/src/permissions/headlessPermissions.integration.test.ts index 7b9ec4a14..1fc7fa773 100644 --- a/src/permissions/headlessPermissions.integration.test.ts +++ b/src/permissions/headlessPermissions.integration.test.ts @@ -1,6 +1,6 @@ -import { resolvePermissionPrecedence } from "./precedenceResolver.js"; import { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js"; import { checkToolPermission } from "./permissionChecker.js"; +import { resolvePermissionPrecedence } from "./precedenceResolver.js"; describe("Headless Permissions Integration", () => { describe("precedence resolution", () => { diff --git a/src/permissions/permissionChecker.integration.test.ts b/src/permissions/permissionChecker.integration.test.ts index fffe1d822..5ebd5eab4 100644 --- a/src/permissions/permissionChecker.integration.test.ts +++ b/src/permissions/permissionChecker.integration.test.ts @@ -1,5 +1,7 @@ -import { describe, it, expect, beforeEach, afterEach } from 'vitest'; +import { describe, it, expect, beforeEach } from 'vitest'; + import { ToolPermissionService } from '../services/ToolPermissionService.js'; + import { checkToolPermission } from './permissionChecker.js'; describe('Permission Integration Tests', () => { diff --git a/src/permissions/permissionChecker.ts b/src/permissions/permissionChecker.ts index e277783ea..ad74c91ed 100644 --- a/src/permissions/permissionChecker.ts +++ b/src/permissions/permissionChecker.ts @@ -1,6 +1,7 @@ import { getServiceSync } from "../services/index.js"; import type { ToolPermissionServiceState } from "../services/types.js"; import { SERVICE_NAMES } from "../services/types.js"; + import { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js"; import { PermissionCheckResult, diff --git a/src/permissions/permissionManager.ts b/src/permissions/permissionManager.ts index bf7a13b84..4b4c7a3ba 100644 --- a/src/permissions/permissionManager.ts +++ b/src/permissions/permissionManager.ts @@ -1,4 +1,5 @@ import { EventEmitter } from "events"; + import { ToolCallRequest } from "./types.js"; export interface PermissionRequestResult { diff --git a/src/permissions/permissionsYamlLoader.ts b/src/permissions/permissionsYamlLoader.ts index 2f44931d5..aea72fc8a 100644 --- a/src/permissions/permissionsYamlLoader.ts +++ b/src/permissions/permissionsYamlLoader.ts @@ -1,8 +1,11 @@ import * as fs from "fs"; import * as os from "os"; import * as path from "path"; + import * as yaml from "yaml"; -import logger from "../util/logger.js"; + +import { logger } from "../util/logger.js"; + import { normalizeToolName } from "./toolNameMapping.js"; import { PermissionPolicy, ToolPermissionPolicy } from "./types.js"; diff --git a/src/permissions/policyWriter.ts b/src/permissions/policyWriter.ts index 33e8415bc..d21b4a629 100644 --- a/src/permissions/policyWriter.ts +++ b/src/permissions/policyWriter.ts @@ -1,8 +1,11 @@ import * as fs from "fs"; + import * as yaml from "yaml"; + +import { logger } from "../util/logger.js"; + import { PERMISSIONS_YAML_PATH, PermissionsYamlConfig, loadPermissionsYaml } from "./permissionsYamlLoader.js"; import { normalizeToolName, getDisplayName } from "./toolNameMapping.js"; -import logger from "../util/logger.js"; /** * Generates a policy rule for a given tool call @@ -34,7 +37,7 @@ export function generatePolicyRule(toolName: string, toolArgs: any): string { export async function addPolicyToYaml(policyRule: string): Promise { try { // Load existing config or create empty one - let config: PermissionsYamlConfig = loadPermissionsYaml() || {}; + const config: PermissionsYamlConfig = loadPermissionsYaml() || {}; // Ensure allow array exists if (!config.allow) { diff --git a/src/permissions/precedenceResolver.test.ts b/src/permissions/precedenceResolver.test.ts index bd5c3fe22..736f844af 100644 --- a/src/permissions/precedenceResolver.test.ts +++ b/src/permissions/precedenceResolver.test.ts @@ -1,4 +1,3 @@ -import { vi } from "vitest"; import { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js"; import { resolvePermissionPrecedence } from "./precedenceResolver.js"; import { ToolPermissionPolicy } from "./types.js"; diff --git a/src/permissions/precedenceResolver.ts b/src/permissions/precedenceResolver.ts index b3a6da6e9..2a4c54d71 100644 --- a/src/permissions/precedenceResolver.ts +++ b/src/permissions/precedenceResolver.ts @@ -1,8 +1,9 @@ +import { logger } from "../util/logger.js"; + import { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js"; import { loadPermissionsYaml, yamlConfigToPolicies } from "./permissionsYamlLoader.js"; import { normalizeToolName } from "./toolNameMapping.js"; import { ToolPermissionPolicy } from "./types.js"; -import logger from "../util/logger.js"; export interface PermissionSources { /** Command line flags - highest precedence */ diff --git a/src/permissions/yamlPermissions.test.ts b/src/permissions/yamlPermissions.test.ts index dfbe7e3b0..67af0a898 100644 --- a/src/permissions/yamlPermissions.test.ts +++ b/src/permissions/yamlPermissions.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import * as fs from 'fs'; -import { loadPermissionsYaml, yamlConfigToPolicies } from './permissionsYamlLoader.js'; + import { checkToolPermission } from './permissionChecker.js'; +import { yamlConfigToPolicies } from './permissionsYamlLoader.js'; // Mock fs module vi.mock('fs'); diff --git a/src/services/ApiClientService.test.ts b/src/services/ApiClientService.test.ts index 00aeeb89d..9c769ae7a 100644 --- a/src/services/ApiClientService.test.ts +++ b/src/services/ApiClientService.test.ts @@ -1,10 +1,11 @@ import { describe, expect, test, beforeEach, vi } from 'vitest'; -import { ApiClientService } from './ApiClientService.js'; // Mock the config module vi.mock('../config.js'); import * as config from '../config.js'; +import { ApiClientService } from './ApiClientService.js'; + describe('ApiClientService', () => { let service: ApiClientService; const mockApiClient = { diff --git a/src/services/ApiClientService.ts b/src/services/ApiClientService.ts index f4223cceb..f27242232 100644 --- a/src/services/ApiClientService.ts +++ b/src/services/ApiClientService.ts @@ -1,8 +1,9 @@ import { AuthConfig } from "../auth/workos.js"; import { getApiClient } from "../config.js"; -import logger from "../util/logger.js"; -import { ApiClientServiceState } from "./types.js"; +import { logger } from "../util/logger.js"; + import { BaseService, ServiceWithDependencies } from "./BaseService.js"; +import { ApiClientServiceState } from "./types.js"; /** * Service for managing API client state diff --git a/src/services/AuthService.refactored.ts b/src/services/AuthService.refactored.ts index 79ac6192f..da9e77927 100644 --- a/src/services/AuthService.refactored.ts +++ b/src/services/AuthService.refactored.ts @@ -8,9 +8,10 @@ import { loadAuthConfig, saveAuthConfig, } from "../auth/workos.js"; -import logger from "../util/logger.js"; -import { AuthServiceState } from "./types.js"; +import { logger } from "../util/logger.js"; + import { BaseService } from "./BaseService.js"; +import { AuthServiceState } from "./types.js"; /** * Service for managing authentication state and operations diff --git a/src/services/AuthService.test.ts b/src/services/AuthService.test.ts index 6d62273f0..0ee08a098 100644 --- a/src/services/AuthService.test.ts +++ b/src/services/AuthService.test.ts @@ -1,5 +1,4 @@ import { describe, expect, test, beforeEach, vi } from 'vitest'; -import { AuthService } from './AuthService.js'; // Mock the workos module vi.mock('../auth/workos.js'); @@ -15,6 +14,8 @@ import { listUserOrganizations } from '../auth/workos.js'; +import { AuthService } from './AuthService.js'; + describe('AuthService', () => { let service: AuthService; const mockAuthConfig = { diff --git a/src/services/AuthService.ts b/src/services/AuthService.ts index cc0f7a53d..75320fe4a 100644 --- a/src/services/AuthService.ts +++ b/src/services/AuthService.ts @@ -8,9 +8,10 @@ import { loadAuthConfig, saveAuthConfig, } from "../auth/workos.js"; -import logger from "../util/logger.js"; -import { AuthServiceState } from "./types.js"; +import { logger } from "../util/logger.js"; + import { BaseService } from "./BaseService.js"; +import { AuthServiceState } from "./types.js"; /** * Service for managing authentication state and operations diff --git a/src/services/BaseService.test.ts b/src/services/BaseService.test.ts index ad2f11a60..824f731c9 100644 --- a/src/services/BaseService.test.ts +++ b/src/services/BaseService.test.ts @@ -1,4 +1,5 @@ import { describe, expect, test, beforeEach, vi } from 'vitest'; + import { BaseService, hasDependencies, ServiceWithDependencies } from './BaseService.js'; // Test implementation of BaseService diff --git a/src/services/BaseService.ts b/src/services/BaseService.ts index 2604fed98..bfbdb1108 100644 --- a/src/services/BaseService.ts +++ b/src/services/BaseService.ts @@ -1,5 +1,6 @@ import { EventEmitter } from "events"; -import logger from "../util/logger.js"; + +import { logger } from "../util/logger.js"; /** * Base abstract class for all services diff --git a/src/services/ConfigService.test.ts b/src/services/ConfigService.test.ts index f7462c96c..f4c8b8afc 100644 --- a/src/services/ConfigService.test.ts +++ b/src/services/ConfigService.test.ts @@ -1,6 +1,4 @@ import { beforeEach, describe, expect, vi, test } from "vitest"; -import { ConfigService } from "./ConfigService.js"; -import { SERVICE_NAMES } from "./types.js"; // Mock modules vi.mock("../auth/workos.js"); @@ -8,10 +6,13 @@ vi.mock("../configLoader.js"); vi.mock("../args.js"); vi.mock("./ServiceContainer.js"); +import * as args from "../args.js"; import * as workos from "../auth/workos.js"; import * as configLoader from "../configLoader.js"; -import * as args from "../args.js"; + +import { ConfigService } from "./ConfigService.js"; import { serviceContainer } from "./ServiceContainer.js"; +import { SERVICE_NAMES } from "./types.js"; describe("ConfigService", () => { let service: ConfigService; @@ -226,11 +227,7 @@ describe("ConfigService", () => { // Mock service container vi.mocked(workos.loadAuthConfig) .mockReturnValue({ accessToken: "token", organizationId: "org-123" } as any); - vi.mocked(serviceContainer.get).mockResolvedValueOnce({ - authConfig: { accessToken: "token", organizationId: "org-123" } as any, - isAuthenticated: true, - }); - vi.mocked(serviceContainer.get).mockResolvedValueOnce({ + vi.mocked(serviceContainer.get).mockResolvedValue({ apiClient: mockApiClient, }); @@ -269,11 +266,7 @@ describe("ConfigService", () => { vi.mocked(workos.loadAuthConfig) .mockReturnValue({ accessToken: "token", organizationId: "org-123" } as any); - vi.mocked(serviceContainer.get).mockResolvedValueOnce({ - authConfig: { accessToken: "token", organizationId: "org-123" } as any, - isAuthenticated: true, - }); - vi.mocked(serviceContainer.get).mockResolvedValueOnce({ + vi.mocked(serviceContainer.get).mockResolvedValue({ apiClient: null, }); diff --git a/src/services/ConfigService.ts b/src/services/ConfigService.ts index 145795718..6e131633b 100644 --- a/src/services/ConfigService.ts +++ b/src/services/ConfigService.ts @@ -1,19 +1,20 @@ import { AssistantUnrolled } from "@continuedev/config-yaml"; import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js"; + import { processRule } from "../args.js"; import { AuthConfig, loadAuthConfig, } from "../auth/workos.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; + +import { BaseService, ServiceWithDependencies } from "./BaseService.js"; import { serviceContainer } from "./ServiceContainer.js"; import { ApiClientServiceState, - AuthServiceState, ConfigServiceState, SERVICE_NAMES, } from "./types.js"; -import { BaseService, ServiceWithDependencies } from "./BaseService.js"; /** * Service for managing configuration state and operations @@ -146,7 +147,7 @@ export class ConfigService extends BaseService implements Se return config; } - let processedRules: string[] = []; + const processedRules: string[] = []; for (const ruleSpec of rules) { try { @@ -192,9 +193,6 @@ export class ConfigService extends BaseService implements Se try { // Get current auth and API client state needed for config loading const authConfig = loadAuthConfig(); - const authState = await serviceContainer.get( - SERVICE_NAMES.AUTH - ); const apiClientState = await serviceContainer.get( SERVICE_NAMES.API_CLIENT ); diff --git a/src/services/MCPServiceWrapper.ts b/src/services/MCPServiceWrapper.ts index 8c1e3ac52..8d584c5a1 100644 --- a/src/services/MCPServiceWrapper.ts +++ b/src/services/MCPServiceWrapper.ts @@ -1,6 +1,8 @@ import { AssistantUnrolled } from "@continuedev/config-yaml"; + import { MCPService } from '../mcp.js'; -import logger from '../util/logger.js'; +import { logger } from '../util/logger.js'; + import { MCPServiceState } from './types.js'; /** diff --git a/src/services/ModeService.test.ts b/src/services/ModeService.test.ts index 9aa93fe34..ae634d7c7 100644 --- a/src/services/ModeService.test.ts +++ b/src/services/ModeService.test.ts @@ -1,6 +1,6 @@ -import { beforeEach, afterEach, describe, expect, it, vi, test } from 'vitest'; +import { beforeEach, afterEach, describe, expect, vi, test } from 'vitest'; + import { ModeService } from './ModeService.js'; -import { PermissionMode } from '../permissions/types.js'; describe('ModeService', () => { let modeService: ModeService; diff --git a/src/services/ModeService.ts b/src/services/ModeService.ts index 55a79a25c..fdd09d2bb 100644 --- a/src/services/ModeService.ts +++ b/src/services/ModeService.ts @@ -1,7 +1,8 @@ import { PermissionMode } from "../permissions/types.js"; -import logger from "../util/logger.js"; -import { ToolPermissionService } from "./ToolPermissionService.js"; +import { logger } from "../util/logger.js"; + import { BaseService } from "./BaseService.js"; +import { ToolPermissionService } from "./ToolPermissionService.js"; export interface ModeServiceState { mode: PermissionMode; @@ -70,7 +71,7 @@ export class ModeService extends BaseService { */ public switchMode(mode: PermissionMode): void { const previousMode = this.currentState.mode; - const newState = this.currentState.toolPermissionService.switchMode(mode); + this.currentState.toolPermissionService.switchMode(mode); this.setState({ mode }); diff --git a/src/services/ModelService.refactored.ts b/src/services/ModelService.refactored.ts index 90d6eee05..a2d0d58f4 100644 --- a/src/services/ModelService.refactored.ts +++ b/src/services/ModelService.refactored.ts @@ -1,10 +1,12 @@ import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; -import { BaseLlmApi, constructLlmApi, LLMConfig } from "@continuedev/openai-adapters"; -import { getLlmApi } from '../config.js'; +import { constructLlmApi, LLMConfig } from "@continuedev/openai-adapters"; + import { AuthConfig, getAccessToken, getOrganizationId, getModelName } from '../auth/workos.js'; -import logger from '../util/logger.js'; -import { ModelServiceState } from './types.js'; +import { getLlmApi } from '../config.js'; +import { logger } from '../util/logger.js'; + import { BaseService, ServiceWithDependencies } from './BaseService.js'; +import { ModelServiceState } from './types.js'; /** * Service for managing LLM and model state diff --git a/src/services/ModelService.test.ts b/src/services/ModelService.test.ts index 8350902d7..4600079ce 100644 --- a/src/services/ModelService.test.ts +++ b/src/services/ModelService.test.ts @@ -1,16 +1,17 @@ -import { describe, it, expect, beforeEach, vi, test } from 'vitest'; +import { AssistantUnrolled, ModelConfig } from '@continuedev/config-yaml'; +import * as openaiAdapters from '@continuedev/openai-adapters'; +import { describe, expect, beforeEach, vi, test } from 'vitest'; // Mock dependencies before imports vi.mock('@continuedev/openai-adapters'); vi.mock('../config.js'); vi.mock('../auth/workos.js'); -import { ModelService } from './ModelService.js'; -import { AssistantUnrolled, ModelConfig } from '@continuedev/config-yaml'; import { AuthConfig } from '../auth/workos.js'; -import * as config from '../config.js'; import * as workos from '../auth/workos.js'; -import * as openaiAdapters from '@continuedev/openai-adapters'; +import * as config from '../config.js'; + +import { ModelService } from './ModelService.js'; describe('ModelService', () => { let service: ModelService; diff --git a/src/services/ModelService.ts b/src/services/ModelService.ts index f022bd87f..93e854087 100644 --- a/src/services/ModelService.ts +++ b/src/services/ModelService.ts @@ -1,10 +1,12 @@ import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; -import { BaseLlmApi, constructLlmApi, LLMConfig } from "@continuedev/openai-adapters"; -import { getLlmApi } from '../config.js'; +import { constructLlmApi, LLMConfig } from "@continuedev/openai-adapters"; + import { AuthConfig, getAccessToken, getOrganizationId, getModelName } from '../auth/workos.js'; -import logger from '../util/logger.js'; -import { ModelServiceState } from './types.js'; +import { getLlmApi } from '../config.js'; +import { logger } from '../util/logger.js'; + import { BaseService, ServiceWithDependencies } from './BaseService.js'; +import { ModelServiceState } from './types.js'; /** * Service for managing LLM and model state diff --git a/src/services/ServiceContainer.test.ts b/src/services/ServiceContainer.test.ts index 26d8067df..4c6cbd22c 100644 --- a/src/services/ServiceContainer.test.ts +++ b/src/services/ServiceContainer.test.ts @@ -1,4 +1,5 @@ import { describe, expect, test, beforeEach, vi } from 'vitest'; + import { ServiceContainer } from './ServiceContainer.js'; describe('ServiceContainer', () => { diff --git a/src/services/ServiceContainer.ts b/src/services/ServiceContainer.ts index 1524568a6..af085cb78 100644 --- a/src/services/ServiceContainer.ts +++ b/src/services/ServiceContainer.ts @@ -1,6 +1,8 @@ import { EventEmitter } from 'events'; -import logger from '../util/logger.js'; -import { ServiceResult, ServiceState, ServiceEvents } from './types.js'; + +import { logger } from '../util/logger.js'; + +import { ServiceResult, ServiceState } from './types.js'; /** * Central service container that manages service lifecycle and dependencies diff --git a/src/services/ServiceContainerContext.tsx b/src/services/ServiceContainerContext.tsx index 9f08e3119..630018309 100644 --- a/src/services/ServiceContainerContext.tsx +++ b/src/services/ServiceContainerContext.tsx @@ -1,5 +1,7 @@ import React, { createContext, useContext } from 'react'; + import { ServiceContainer } from './ServiceContainer.js'; + import { serviceContainer as defaultContainer } from './index.js'; const ServiceContainerContext = createContext(defaultContainer); diff --git a/src/services/ToolPermissionService.debug.test.ts b/src/services/ToolPermissionService.debug.test.ts index 41930bdf9..501a6b5b8 100644 --- a/src/services/ToolPermissionService.debug.test.ts +++ b/src/services/ToolPermissionService.debug.test.ts @@ -1,5 +1,7 @@ import { beforeEach, describe, expect, it } from "vitest"; + import { PermissionMode } from "../permissions/types.js"; + import { ToolPermissionService } from "./ToolPermissionService.js"; describe("ToolPermissionService - Debug Tool Permissions", () => { diff --git a/src/services/ToolPermissionService.integration.test.ts b/src/services/ToolPermissionService.integration.test.ts index bbfdc77f7..863308076 100644 --- a/src/services/ToolPermissionService.integration.test.ts +++ b/src/services/ToolPermissionService.integration.test.ts @@ -1,5 +1,5 @@ -import { vi } from "vitest"; import { DEFAULT_TOOL_POLICIES } from "../permissions/defaultPolicies.js"; + import { ToolPermissionService } from "./ToolPermissionService.js"; describe("ToolPermissionService E2E", () => { diff --git a/src/services/ToolPermissionService.modes.test.ts b/src/services/ToolPermissionService.modes.test.ts index 85f72a183..9a83f758d 100644 --- a/src/services/ToolPermissionService.modes.test.ts +++ b/src/services/ToolPermissionService.modes.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from 'vitest'; + import { ToolPermissionService } from './ToolPermissionService.js'; -import { PermissionMode } from '../permissions/types.js'; describe('ToolPermissionService - Mode Functionality', () => { let service: ToolPermissionService; diff --git a/src/services/ToolPermissionService.real.test.ts b/src/services/ToolPermissionService.real.test.ts index 7baa4d248..3901cc08e 100644 --- a/src/services/ToolPermissionService.real.test.ts +++ b/src/services/ToolPermissionService.real.test.ts @@ -1,7 +1,9 @@ import { describe, it, expect, beforeEach } from 'vitest'; -import { ToolPermissionService } from './ToolPermissionService.js'; + import { checkToolPermission } from '../permissions/permissionChecker.js'; +import { ToolPermissionService } from './ToolPermissionService.js'; + describe('ToolPermissionService - Real Tool Permission Test', () => { let service: ToolPermissionService; diff --git a/src/services/ToolPermissionService.test.ts b/src/services/ToolPermissionService.test.ts index 6a0a1310c..722de11bf 100644 --- a/src/services/ToolPermissionService.test.ts +++ b/src/services/ToolPermissionService.test.ts @@ -1,13 +1,13 @@ import { describe, expect, test, beforeEach, vi } from 'vitest'; -import { ToolPermissionService } from "./ToolPermissionService.js"; -import { PermissionMode, ToolPermissionPolicy } from '../permissions/types.js'; // Mock modules vi.mock('../permissions/permissionsYamlLoader.js'); vi.mock('../permissions/precedenceResolver.js'); -import * as permissionsYamlLoader from '../permissions/permissionsYamlLoader.js'; import * as precedenceResolver from '../permissions/precedenceResolver.js'; +import { ToolPermissionPolicy } from '../permissions/types.js'; + +import { ToolPermissionService } from "./ToolPermissionService.js"; describe("ToolPermissionService", () => { let service: ToolPermissionService; diff --git a/src/services/ToolPermissionService.ts b/src/services/ToolPermissionService.ts index b800c93f8..1ec8d29ca 100644 --- a/src/services/ToolPermissionService.ts +++ b/src/services/ToolPermissionService.ts @@ -5,7 +5,8 @@ import { ToolPermissionPolicy, ToolPermissions, } from "../permissions/types.js"; -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; + import { BaseService } from "./BaseService.js"; export interface ToolPermissionServiceState { diff --git a/src/services/circular-dependencies.test.ts b/src/services/circular-dependencies.test.ts index 287a5716c..88a489083 100644 --- a/src/services/circular-dependencies.test.ts +++ b/src/services/circular-dependencies.test.ts @@ -1,6 +1,6 @@ import { ServiceContainer } from './ServiceContainer.js'; + import { initializeServices } from './index.js'; -import { SERVICE_NAMES } from './types.js'; describe('Service Circular Dependencies', () => { it('should not have circular dependencies in service setup', async () => { diff --git a/src/services/index.initialization.test.ts b/src/services/index.initialization.test.ts index b5208f8a2..ed77d9b80 100644 --- a/src/services/index.initialization.test.ts +++ b/src/services/index.initialization.test.ts @@ -1,8 +1,10 @@ import { beforeEach, describe, expect, it } from 'vitest'; -import { initializeServices, getServiceSync, SERVICE_NAMES } from './index.js'; + import { serviceContainer } from './ServiceContainer.js'; import type { ToolPermissionServiceState } from './ToolPermissionService.js'; +import { initializeServices, getServiceSync, SERVICE_NAMES } from './index.js'; + describe('Service Initialization', () => { beforeEach(() => { // Clean up service container state diff --git a/src/services/index.test.ts b/src/services/index.test.ts index 895f1adaa..8d14fee3b 100644 --- a/src/services/index.test.ts +++ b/src/services/index.test.ts @@ -1,8 +1,9 @@ import { vi } from "vitest"; -import { initializeServices } from "./index.js"; import { modeService } from "./ModeService.js"; +import { initializeServices } from "./index.js"; + describe("initializeServices", () => { let mockModeService: any; diff --git a/src/services/index.ts b/src/services/index.ts index 9e5542e65..1b6a7fdd7 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -1,10 +1,11 @@ -import logger from "../util/logger.js"; +import { logger } from "../util/logger.js"; + import { ApiClientService } from "./ApiClientService.js"; import { AuthService } from "./AuthService.js"; import { ConfigService } from "./ConfigService.js"; import { MCPServiceWrapper } from "./MCPServiceWrapper.js"; -import { modeService } from "./ModeService.js"; import { ModelService } from "./ModelService.js"; +import { modeService } from "./ModeService.js"; import { serviceContainer } from "./ServiceContainer.js"; import { ApiClientServiceState, @@ -28,7 +29,6 @@ export async function initializeServices(options: ServiceInitOptions = {}) { logger.debug("Initializing service registry"); // Initialize mode service with tool permission overrides - let modeServiceInitialized = false; if (options.toolPermissionOverrides) { const overrides = { ...options.toolPermissionOverrides }; @@ -49,13 +49,11 @@ export async function initializeServices(options: ServiceInitOptions = {}) { // If mode is "normal" or undefined, no flags are set await modeService.initialize(initArgs); - modeServiceInitialized = true; } else { // Even if no overrides, we need to initialize with defaults await modeService.initialize({ isHeadless: options.headless }); - modeServiceInitialized = true; } // Register the TOOL_PERMISSIONS service with immediate value diff --git a/src/services/types.ts b/src/services/types.ts index 52ed50e35..fe85edfef 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -1,6 +1,7 @@ import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; import { BaseLlmApi } from "@continuedev/openai-adapters"; import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js"; + import { AuthConfig } from "../auth/workos.js"; import { MCPService } from "../mcp.js"; import { PermissionMode, ToolPermissions } from "../permissions/types.js"; diff --git a/src/session.ts b/src/session.ts index b78f1d904..4a2e92010 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1,9 +1,11 @@ import { execSync } from "child_process"; import fs from "fs"; -import { ChatCompletionMessageParam } from "openai/resources.mjs"; import os from "os"; import path from "path"; -import logger from "./util/logger.js"; + +import { ChatCompletionMessageParam } from "openai/resources.mjs"; + +import { logger } from "./util/logger.js"; /** * Get the terminal process ID by walking up the process tree @@ -54,12 +56,12 @@ function getTerminalProcessId(): string | null { const nextPid = parseInt(ppid); if (isNaN(nextPid) || nextPid <= 1) break; currentPid = nextPid; - } catch (innerError) { + } catch { // Continue to next iteration if this process lookup fails break; } } - } catch (error) { + } catch { // Silently fail - this is a fallback mechanism } @@ -93,7 +95,7 @@ function getTtyPath(): string | null { return ttyPath.replace("/dev/", ""); } } - } catch (error) { + } catch { // Silently fail - this is a fallback mechanism } diff --git a/src/slashCommands.test.ts b/src/slashCommands.test.ts index da74dafae..9318dfb9e 100644 --- a/src/slashCommands.test.ts +++ b/src/slashCommands.test.ts @@ -1,3 +1,6 @@ + +// Import after mocking +import { AssistantUnrolled } from "@continuedev/config-yaml"; import { afterEach, beforeEach, @@ -6,13 +9,11 @@ import { vi, test, } from "vitest"; -import type { AuthServiceState } from "./services/types.js"; -// Import after mocking -import { AssistantUnrolled } from "@continuedev/config-yaml"; import * as workos from "./auth/workos.js"; import * as commands from "./commands/commands.js"; import { reloadService, SERVICE_NAMES, services } from "./services/index.js"; +import type { AuthServiceState } from "./services/types.js"; import { handleSlashCommands } from "./slashCommands.js"; // The imports are already mocked via vitest.setup.ts, so we can use them directly diff --git a/src/slashCommands.ts b/src/slashCommands.ts index d64e65bbe..3a508b837 100644 --- a/src/slashCommands.ts +++ b/src/slashCommands.ts @@ -1,5 +1,6 @@ import { type AssistantConfig } from "@continuedev/sdk"; import chalk from "chalk"; + import { isAuthenticated, isAuthenticatedConfig, @@ -11,8 +12,7 @@ import { posthogService } from "./telemetry/posthogService.js"; export async function handleSlashCommands( input: string, - assistant: AssistantConfig, - onLoginPrompt?: (promptText: string) => Promise + assistant: AssistantConfig ): Promise<{ output?: string; exit?: boolean; @@ -95,7 +95,7 @@ export async function handleSlashCommands( exit: true, output: "Logged out successfully", }; - } catch (error: any) { + } catch { return { exit: true, output: "Logged out successfully", diff --git a/src/streamChatResponse.getAllTools.test.ts b/src/streamChatResponse.getAllTools.test.ts index 7cb3fc1d6..ce861f550 100644 --- a/src/streamChatResponse.getAllTools.test.ts +++ b/src/streamChatResponse.getAllTools.test.ts @@ -1,8 +1,9 @@ import { describe, test, expect, beforeEach } from 'vitest'; + import { initializeServices, getServiceSync, SERVICE_NAMES } from './services/index.js'; import { serviceContainer } from './services/ServiceContainer.js'; -import { getAllTools } from './streamChatResponse.js'; import type { ToolPermissionServiceState } from './services/ToolPermissionService.js'; +import { getAllTools } from './streamChatResponse.js'; describe('getAllTools - Tool Filtering', () => { beforeEach(() => { diff --git a/src/streamChatResponse.test.ts b/src/streamChatResponse.test.ts index 32d05cce3..8fb522dd9 100644 --- a/src/streamChatResponse.test.ts +++ b/src/streamChatResponse.test.ts @@ -1,22 +1,23 @@ -import { vi } from 'vitest'; - +import { ModelConfig } from "@continuedev/config-yaml"; +import { BaseLlmApi } from "@continuedev/openai-adapters"; import type { ChatCompletionChunk, ChatCompletionMessageParam, } from "openai/resources/chat/completions.mjs"; +import { vi } from 'vitest'; + +import { toolPermissionManager } from "./permissions/permissionManager.js"; import { preprocessStreamedToolCalls, executeStreamedToolCalls, processStreamingResponse, } from "./streamChatResponse.js"; import { ToolCall } from "./tools/index.js"; -import { PreprocessedToolCall } from "./tools/types.js"; -import { toolPermissionManager } from "./permissions/permissionManager.js"; import { readFileTool } from "./tools/readFile.js"; import { searchCodeTool } from "./tools/searchCode.js"; +import { PreprocessedToolCall } from "./tools/types.js"; import { writeFileTool } from "./tools/writeFile.js"; -import { BaseLlmApi } from "@continuedev/openai-adapters"; -import { ModelConfig } from "@continuedev/config-yaml"; + // Test the chunk processing logic that was identified as buggy describe("processStreamingResponse - content preservation", () => { diff --git a/src/streamChatResponse.ts b/src/streamChatResponse.ts index 6a9f42ad9..50b1b8336 100644 --- a/src/streamChatResponse.ts +++ b/src/streamChatResponse.ts @@ -8,8 +8,7 @@ import type { ChatCompletionTool, ChatCompletionToolMessageParam, } from "openai/resources.mjs"; -import { getServiceSync, SERVICE_NAMES } from "./services/index.js"; -import type { ToolPermissionServiceState } from "./services/ToolPermissionService.js"; + import { MCPService } from "./mcp.js"; import { checkToolPermission, @@ -17,23 +16,24 @@ import { ToolCallRequest, } from "./permissions/index.js"; import { toolPermissionManager } from "./permissions/permissionManager.js"; -import telemetryService from "./telemetry/telemetryService.js"; +import { getServiceSync, SERVICE_NAMES } from "./services/index.js"; +import type { ToolPermissionServiceState } from "./services/ToolPermissionService.js"; +import { telemetryService } from "./telemetry/telemetryService.js"; import { calculateTokenCost } from "./telemetry/utils.js"; import { getAllBuiltinTools, executeToolCall, getAvailableTools, - getToolDisplayName, Tool, ToolCall, validateToolCallArgsPresent, } from "./tools/index.js"; +import { PreprocessedToolCall, ToolCallPreview } from "./tools/types.js"; import { chatCompletionStreamWithBackoff, withExponentialBackoff, } from "./util/exponentialBackoff.js"; -import logger from "./util/logger.js"; -import { PreprocessedToolCall, ToolCallPreview } from "./tools/types.js"; +import { logger } from "./util/logger.js"; dotenv.config(); @@ -300,7 +300,7 @@ export async function processStreamingResponse( // Don't notify onToolStart here anymore - wait until after permission check toolCall.startNotified = true; - } catch (e) { + } catch { // JSON not complete yet, continue } } diff --git a/src/systemMessage.ts b/src/systemMessage.ts index f4e006f2f..2a032ec15 100644 --- a/src/systemMessage.ts +++ b/src/systemMessage.ts @@ -1,8 +1,10 @@ import { execSync } from "child_process"; import * as fs from "fs"; +import * as path from "path"; + import pkg from "ignore-walk"; import { Minimatch } from "minimatch"; -import * as path from "path"; + import { processRule } from "./args.js"; const { WalkerSync } = pkg; @@ -126,7 +128,7 @@ export async function constructSystemMessage( } // Process additional rules from --rule flags - let processedRules: string[] = []; + const processedRules: string[] = []; if (additionalRules && additionalRules.length > 0) { for (const ruleSpec of additionalRules) { try { diff --git a/src/telemetry/telemetryService.ts b/src/telemetry/telemetryService.ts index b9f77aa6e..c3e5a6929 100644 --- a/src/telemetry/telemetryService.ts +++ b/src/telemetry/telemetryService.ts @@ -1,3 +1,5 @@ +import os from "os"; + import { metrics } from "@opentelemetry/api"; import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http"; import { resourceFromAttributes } from "@opentelemetry/resources"; @@ -13,9 +15,9 @@ import { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_SERVICE_VERSION, } from "@opentelemetry/semantic-conventions"; -import os from "os"; import { v4 as uuidv4 } from "uuid"; -import logger from "../util/logger.js"; + +import { logger } from "../util/logger.js"; import { getVersion } from "../version.js"; export interface TelemetryConfig { @@ -545,4 +547,3 @@ class TelemetryService { // Export the singleton instance directly export const telemetryService = new TelemetryService(); -export default telemetryService; diff --git a/src/telemetry/utils.ts b/src/telemetry/utils.ts index 132ce9b6c..43aaa92c7 100644 --- a/src/telemetry/utils.ts +++ b/src/telemetry/utils.ts @@ -1,6 +1,7 @@ -import { diffLines } from "diff"; import path from "path"; +import { diffLines } from "diff"; + /** * Calculate lines of code added/removed from a file diff */ diff --git a/src/test-helpers/__tests__/testServiceContainer.test.ts b/src/test-helpers/__tests__/testServiceContainer.test.ts index c97a531b1..b341d0008 100644 --- a/src/test-helpers/__tests__/testServiceContainer.test.ts +++ b/src/test-helpers/__tests__/testServiceContainer.test.ts @@ -1,4 +1,5 @@ import { vi } from "vitest"; + import { createTestServiceContainer } from '../testServiceContainer.js'; describe('TestServiceContainer', () => { diff --git a/src/test-helpers/adapter-mocks.ts b/src/test-helpers/adapter-mocks.ts index 1dd6e4510..0213cb7c8 100644 --- a/src/test-helpers/adapter-mocks.ts +++ b/src/test-helpers/adapter-mocks.ts @@ -1,5 +1,8 @@ import { vi } from "vitest"; +// Mock BaseLlmApi class to avoid inline class definitions +class MockBaseLlmApi {} + /** * Mock the constructLlmApi function to return a mock LLM API */ @@ -38,7 +41,7 @@ export function mockLLMResponse(response: string) { vi.doMock("@continuedev/openai-adapters", () => ({ constructLlmApi: () => mockApi, - BaseLlmApi: class {}, + BaseLlmApi: MockBaseLlmApi, LLMConfig: {} })); @@ -82,7 +85,7 @@ export function mockLLMStreamResponse(chunks: string[]) { vi.doMock("@continuedev/openai-adapters", () => ({ constructLlmApi: () => mockApi, - BaseLlmApi: class {}, + BaseLlmApi: MockBaseLlmApi, LLMConfig: {} })); @@ -113,7 +116,7 @@ export function mockLLMError(errorMessage: string) { vi.doMock("@continuedev/openai-adapters", () => ({ constructLlmApi: () => mockApi, - BaseLlmApi: class {}, + BaseLlmApi: MockBaseLlmApi, LLMConfig: {} })); diff --git a/src/test-helpers/cli-helpers.ts b/src/test-helpers/cli-helpers.ts index 78ab07329..341af220a 100644 --- a/src/test-helpers/cli-helpers.ts +++ b/src/test-helpers/cli-helpers.ts @@ -1,8 +1,9 @@ -import { execaNode, type Subprocess } from "execa"; import fs from "fs/promises"; import os from "os"; import path from "path"; +import { execaNode, type Subprocess } from "execa"; + export interface CLITestContext { cliPath: string; testDir: string; @@ -35,7 +36,7 @@ export async function createTestContext(): Promise { // Ensure the CLI file exists before returning the context try { await fs.access(cliPath); - } catch (error) { + } catch { throw new Error(`CLI file not found at ${cliPath}. Please run 'npm run build' first.`); } @@ -53,7 +54,7 @@ export async function cleanupTestContext( ): Promise { try { await fs.rm(context.testDir, { recursive: true, force: true }); - } catch (error) { + } catch { // Ignore cleanup errors } } @@ -165,7 +166,7 @@ export async function readSession( const content = await fs.readFile(sessionPath, "utf-8"); return JSON.parse(content); - } catch (error) { + } catch { return null; } } diff --git a/src/test-helpers/mock-helpers.ts b/src/test-helpers/mock-helpers.ts index 220516c4c..91f09b5f3 100644 --- a/src/test-helpers/mock-helpers.ts +++ b/src/test-helpers/mock-helpers.ts @@ -64,7 +64,7 @@ export function mockOpenAIStream( return scope.reply(500, { error: { message: "Internal server error" } }); } - return scope.reply(200, (uri, requestBody) => { + return scope.reply(200, () => { // Return a stream of Server-Sent Events const events = chunks.map((chunk, index) => { const data = { diff --git a/src/test-helpers/mock-llm-server.ts b/src/test-helpers/mock-llm-server.ts index 7bc954d00..292416338 100644 --- a/src/test-helpers/mock-llm-server.ts +++ b/src/test-helpers/mock-llm-server.ts @@ -1,6 +1,7 @@ import * as fs from "fs/promises"; import * as http from "http"; import * as path from "path"; + import { CLITestContext } from "./cli-helpers.js"; export interface MockLLMServerOptions { @@ -78,7 +79,7 @@ export async function createMockLLMServer( ? (() => { try { return JSON.parse(body); - } catch (e) { + } catch { return body; } })() diff --git a/src/test-helpers/renderWithServices.tsx b/src/test-helpers/renderWithServices.tsx index d6339c20e..64e4b46ac 100644 --- a/src/test-helpers/renderWithServices.tsx +++ b/src/test-helpers/renderWithServices.tsx @@ -1,6 +1,8 @@ import { render } from 'ink-testing-library'; import React from 'react'; + import { ServiceContainerProvider } from '../services/ServiceContainerContext.js'; + import { createTestServiceContainer, TestServiceContainer } from './testServiceContainer.js'; export interface RenderWithServicesOptions { diff --git a/src/test-helpers/testServiceContainer.ts b/src/test-helpers/testServiceContainer.ts index 3a807a0f2..5e8913eb9 100644 --- a/src/test-helpers/testServiceContainer.ts +++ b/src/test-helpers/testServiceContainer.ts @@ -17,7 +17,6 @@ export function createTestServiceContainer(): TestServiceContainer { }>(); // Override load instead of register to have more control - const originalLoad = container.load.bind(container); container.load = async function(serviceName: string) { // Check if we already have a resolver for this service const existing = serviceResolvers.get(serviceName); diff --git a/src/tools/exit.ts b/src/tools/exit.ts index 840314412..ebed5ecde 100644 --- a/src/tools/exit.ts +++ b/src/tools/exit.ts @@ -8,7 +8,7 @@ export const exitTool: Tool = { parameters: {}, readonly: false, isBuiltIn: true, - run: async (args: { dirpath: string }): Promise => { + run: async (): Promise => { process.exit(1); }, }; diff --git a/src/tools/fetch.ts b/src/tools/fetch.ts index 110080b0f..d2ca53bdd 100644 --- a/src/tools/fetch.ts +++ b/src/tools/fetch.ts @@ -1,4 +1,5 @@ import TurndownService from "turndown"; + import { Tool } from "./types.js"; const turndownService = new TurndownService({ diff --git a/src/tools/formatters.test.ts b/src/tools/formatters.test.ts index 2542f3fd4..2dd0d8a35 100644 --- a/src/tools/formatters.test.ts +++ b/src/tools/formatters.test.ts @@ -1,5 +1,7 @@ import { vi } from "vitest"; + import { formatToolArgument } from "./formatters.js"; + import { formatToolCall } from "./index.js"; describe("formatToolCall", () => { diff --git a/src/tools/index.ts b/src/tools/index.ts index 6e09a248f..17141a360 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -1,8 +1,9 @@ +import { MCPService } from "../mcp.js"; import { getServiceSync, SERVICE_NAMES } from "../services/index.js"; import type { ToolPermissionServiceState } from "../services/ToolPermissionService.js"; -import { MCPService } from "../mcp.js"; -import telemetryService from "../telemetry/telemetryService.js"; -import logger from "../util/logger.js"; +import { telemetryService } from "../telemetry/telemetryService.js"; +import { logger } from "../util/logger.js"; + import { exitTool } from "./exit.js"; import { fetchTool } from "./fetch.js"; import { formatToolArgument } from "./formatters.js"; @@ -51,7 +52,7 @@ function getDynamicTools(): Tool[] { if (isHeadless) { dynamicTools.push(exitTool); } - } catch (error) { + } catch { // Service not ready yet, no dynamic tools } @@ -86,7 +87,7 @@ export function extractToolCalls( arguments: toolCallJson.arguments, }); } - } catch (e) { + } catch { logger.error("Failed to parse tool call:", { toolCall: match[1] }); } } diff --git a/src/tools/listFiles.ts b/src/tools/listFiles.ts index d302725df..181d4a9f1 100644 --- a/src/tools/listFiles.ts +++ b/src/tools/listFiles.ts @@ -1,7 +1,8 @@ import * as fs from "fs"; import * as path from "path"; -import { Tool } from "./types.js"; + import { formatToolArgument } from "./formatters.js"; +import { Tool } from "./types.js"; // List files in a directory export const listFilesTool: Tool = { diff --git a/src/tools/preprocess.test.ts b/src/tools/preprocess.test.ts index 9b4b7c3f1..e032a5e77 100644 --- a/src/tools/preprocess.test.ts +++ b/src/tools/preprocess.test.ts @@ -1,4 +1,7 @@ -import { vi } from 'vitest'; +import * as fs from "fs"; + +import * as diff from "diff"; +import { describe, it, expect, beforeEach, vi } from 'vitest'; // Mock fs module vi.mock("fs", async () => { @@ -18,10 +21,6 @@ vi.mock("diff", () => ({ createTwoFilesPatch: vi.fn(), })); -// Import mocked modules -import * as fs from "fs"; -import * as diff from "diff"; - // Get mocked functions using vi.mocked const mockExistsSync = vi.mocked(fs.existsSync); const mockReadFileSync = vi.mocked(fs.readFileSync); diff --git a/src/tools/readFile.ts b/src/tools/readFile.ts index 21f3ba1d9..3600b5966 100644 --- a/src/tools/readFile.ts +++ b/src/tools/readFile.ts @@ -1,6 +1,7 @@ import * as fs from "fs"; -import { Tool } from "./types.js"; + import { formatToolArgument } from "./formatters.js"; +import { Tool } from "./types.js"; export const readFileTool: Tool = { name: "Read", diff --git a/src/tools/runTerminalCommand.ts b/src/tools/runTerminalCommand.ts index f9c730ac7..3c32f13e5 100644 --- a/src/tools/runTerminalCommand.ts +++ b/src/tools/runTerminalCommand.ts @@ -1,9 +1,11 @@ import { spawn } from "child_process"; -import telemetryService from "../telemetry/telemetryService.js"; + +import { telemetryService } from "../telemetry/telemetryService.js"; import { isGitCommitCommand, isPullRequestCommand, } from "../telemetry/utils.js"; + import { Tool } from "./types.js"; export const runTerminalCommandTool: Tool = { @@ -41,7 +43,6 @@ export const runTerminalCommandTool: Tool = { const child = spawn("sh", ["-c", command]); let stdout = ""; let stderr = ""; - let lastOutputTime = Date.now(); let timeoutId: NodeJS.Timeout; let isResolved = false; @@ -69,13 +70,11 @@ export const runTerminalCommandTool: Tool = { child.stdout.on("data", (data) => { stdout += data.toString(); - lastOutputTime = Date.now(); resetTimeout(); }); child.stderr.on("data", (data) => { stderr += data.toString(); - lastOutputTime = Date.now(); resetTimeout(); }); diff --git a/src/tools/searchAndReplace/index.ts b/src/tools/searchAndReplace/index.ts index e4f2369f9..86e27552b 100644 --- a/src/tools/searchAndReplace/index.ts +++ b/src/tools/searchAndReplace/index.ts @@ -1,14 +1,16 @@ -import { findSearchMatch } from "./findSearchMatch.js"; -import { parseAllSearchReplaceBlocks } from "./parseBlock.js"; -import { Tool } from "../types.js"; -import { generateDiff } from "../writeFile.js"; import * as fs from "fs"; -import telemetryService from "../../telemetry/telemetryService.js"; + +import { telemetryService } from "../../telemetry/telemetryService.js"; import { calculateLinesOfCodeDiff, getLanguageFromFilePath, } from "../../telemetry/utils.js"; +import { Tool } from "../types.js"; +import { generateDiff } from "../writeFile.js"; + +import { findSearchMatch } from "./findSearchMatch.js"; import { parseSearchAndReplaceArgs } from "./parseArgs.js"; +import { parseAllSearchReplaceBlocks } from "./parseBlock.js"; export interface SearchAndReplaceInFileArgs { filepath: string; diff --git a/src/tools/searchCode.test.ts b/src/tools/searchCode.test.ts index 96e786598..ffaab5fca 100644 --- a/src/tools/searchCode.test.ts +++ b/src/tools/searchCode.test.ts @@ -1,4 +1,3 @@ -import { searchCodeTool } from "./searchCode.js"; // Since we want to test just the interface and not the internals, // let's create a simplified version of the run function to test the truncation logic diff --git a/src/tools/searchCode.ts b/src/tools/searchCode.ts index 776aa0fc2..cf5b5a4a7 100644 --- a/src/tools/searchCode.ts +++ b/src/tools/searchCode.ts @@ -1,6 +1,7 @@ import * as child_process from "child_process"; import * as fs from "fs"; import * as util from "util"; + import { Tool } from "./types.js"; const execPromise = util.promisify(child_process.exec); diff --git a/src/tools/viewDiff.ts b/src/tools/viewDiff.ts index 60e832954..f8c9d2ff3 100644 --- a/src/tools/viewDiff.ts +++ b/src/tools/viewDiff.ts @@ -1,6 +1,7 @@ import * as child_process from "child_process"; import * as fs from "fs"; import * as util from "util"; + import { Tool } from "./types.js"; const execPromise = util.promisify(child_process.exec); @@ -41,7 +42,7 @@ export const viewDiffTool: Tool = { await execPromise("git rev-parse --is-inside-work-tree", { cwd: repoPath, }); - } catch (error) { + } catch { return `Error: The specified path is not a git repository: ${repoPath}`; } diff --git a/src/tools/writeFile.ts b/src/tools/writeFile.ts index 8d577f1ee..9a3b3a770 100644 --- a/src/tools/writeFile.ts +++ b/src/tools/writeFile.ts @@ -1,11 +1,14 @@ -import { createTwoFilesPatch } from "diff"; import * as fs from "fs"; import * as path from "path"; -import telemetryService from "../telemetry/telemetryService.js"; + +import { createTwoFilesPatch } from "diff"; + +import { telemetryService } from "../telemetry/telemetryService.js"; import { calculateLinesOfCodeDiff, getLanguageFromFilePath, } from "../telemetry/utils.js"; + import { Tool, ToolCallPreview } from "./types.js"; export function generateDiff( @@ -72,7 +75,7 @@ export const writeFileTool: Tool = { ], }; } - } catch (e) { + } catch { // do nothing } const lines: string[] = args.content.split("\n"); diff --git a/src/ui/ColoredDiff.test.ts b/src/ui/ColoredDiff.test.ts index e967d496b..706fab0b8 100644 --- a/src/ui/ColoredDiff.test.ts +++ b/src/ui/ColoredDiff.test.ts @@ -1,5 +1,6 @@ import { render } from "ink-testing-library"; import React from "react"; + import { ColoredDiff } from "./ColoredDiff.js"; describe("ColoredDiff", () => { diff --git a/src/ui/ConfigSelector.tsx b/src/ui/ConfigSelector.tsx index b0a228812..12ee768b0 100644 --- a/src/ui/ConfigSelector.tsx +++ b/src/ui/ConfigSelector.tsx @@ -1,7 +1,9 @@ import * as fs from "fs"; import * as os from "os"; import * as path from "path"; + import React, { useEffect, useState } from "react"; + import { getAccessToken, getOrganizationId, @@ -9,7 +11,8 @@ import { getAssistantSlug, } from "../auth/workos.js"; import { getApiClient } from "../config.js"; -import Selector, { SelectorOption } from "./Selector.js"; + +import { Selector, SelectorOption } from "./Selector.js"; interface ConfigOption extends SelectorOption { type: "local" | "assistant" | "create"; @@ -124,4 +127,4 @@ const ConfigSelector: React.FC = ({ ); }; -export default ConfigSelector; +export { ConfigSelector }; diff --git a/src/ui/FileSearchUI.tsx b/src/ui/FileSearchUI.tsx index 1d7205cc1..0fb65c15d 100644 --- a/src/ui/FileSearchUI.tsx +++ b/src/ui/FileSearchUI.tsx @@ -1,6 +1,7 @@ -import { Box, Text } from "ink"; -import React, { useEffect, useState, useRef } from "react"; import { glob, GlobOptionsWithFileTypesFalse } from "glob"; +import { Box, Text } from "ink"; +import React, { useEffect, useState } from "react"; + import { isGitRepo } from "../util/git.js"; interface FileSearchUIProps { @@ -192,7 +193,6 @@ const filterFiles = (filterText: string): FileItem[] => { const FileSearchUI: React.FC = ({ filter, selectedIndex, - onSelect, onFilesUpdated, }) => { const [files, setFiles] = useState([]); @@ -257,7 +257,7 @@ const FileSearchUI: React.FC = ({ ); }; -export default FileSearchUI; +export { FileSearchUI }; export async function throttledGlob( patterns: string[], diff --git a/src/ui/FreeTrialStatus.tsx b/src/ui/FreeTrialStatus.tsx index 47a7a9c1a..ecd1e42e4 100644 --- a/src/ui/FreeTrialStatus.tsx +++ b/src/ui/FreeTrialStatus.tsx @@ -40,7 +40,7 @@ const FreeTrialStatus: React.FC = ({ const response = await apiClient.getFreeTrialStatus(); setStatus(response); setLoading(false); - } catch (error) { + } catch { // Silently handle errors - component returns null if no status setStatus(null); setLoading(false); @@ -105,4 +105,4 @@ const FreeTrialStatus: React.FC = ({ ); }; -export default FreeTrialStatus; +export { FreeTrialStatus }; diff --git a/src/ui/FreeTrialTransitionUI.tsx b/src/ui/FreeTrialTransitionUI.tsx index 4d4e7e15c..fc52cf034 100644 --- a/src/ui/FreeTrialTransitionUI.tsx +++ b/src/ui/FreeTrialTransitionUI.tsx @@ -1,12 +1,14 @@ import * as fs from "fs"; -import { Box, Text, useInput } from "ink"; -import open from "open"; import * as os from "os"; import * as path from "path"; + +import { Box, Text, useInput } from "ink"; +import open from "open"; import React, { useState } from "react"; -import { updateAnthropicModelInYaml } from "../util/yamlConfigUpdater.js"; -import { isValidAnthropicApiKey, getApiKeyValidationError } from "../util/apiKeyValidation.js"; + import { env } from "../env.js"; +import { isValidAnthropicApiKey, getApiKeyValidationError } from "../util/apiKeyValidation.js"; +import { updateAnthropicModelInYaml } from "../util/yamlConfigUpdater.js"; const CONFIG_PATH = path.join(os.homedir(), ".continue", "config.yaml"); @@ -104,7 +106,7 @@ const FreeTrialTransitionUI: React.FC = ({ `Browser opened to ${modelsUrl}. After setting up your models subscription, press Enter to continue.` ); setCurrentStep("success"); - } catch (error) { + } catch { setErrorMessage( `Could not open browser automatically. Please visit: ${modelsUrl}. After setting up your models subscription, press Enter to continue.` ); @@ -266,4 +268,4 @@ const FreeTrialTransitionUI: React.FC = ({ return null; }; -export default FreeTrialTransitionUI; +export { FreeTrialTransitionUI }; diff --git a/src/ui/IntroMessage.tsx b/src/ui/IntroMessage.tsx index f324e6743..cbf5f378a 100644 --- a/src/ui/IntroMessage.tsx +++ b/src/ui/IntroMessage.tsx @@ -1,11 +1,13 @@ import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; import { Box, Text } from "ink"; import React from "react"; + import { parseArgs } from "../args.js"; import { getAllSlashCommands } from "../commands/commands.js"; import { MCPService } from "../mcp.js"; import { isModelCapable } from "../utils/modelCapability.js"; -import ModelCapabilityWarning from "./ModelCapabilityWarning.js"; + +import { ModelCapabilityWarning } from "./ModelCapabilityWarning.js"; interface IntroMessageProps { config: AssistantUnrolled; @@ -18,7 +20,6 @@ const IntroMessage: React.FC = ({ model, mcpService, }) => { - const mcpTools = mcpService.getTools() ?? []; const mcpPrompts = mcpService.getPrompts() ?? []; // Get all slash commands from central definition @@ -107,4 +108,4 @@ const IntroMessage: React.FC = ({ ); }; -export default IntroMessage; \ No newline at end of file +export { IntroMessage }; \ No newline at end of file diff --git a/src/ui/LoadingAnimation.tsx b/src/ui/LoadingAnimation.tsx index 4debfe1a3..8954c7d64 100644 --- a/src/ui/LoadingAnimation.tsx +++ b/src/ui/LoadingAnimation.tsx @@ -1,77 +1,7 @@ import { Text } from "ink"; import React, { useEffect, useState } from "react"; -const SPINNER_BARS = "▁▂▃▄▅▆▇█▇▆▅▄▃▁"; -const SPINNER_BLOCKS = "▉▊▋▌▍▎▏▎▍▌▋▊▉"; -const SPINNER_CORNERS = "▖▘▝▗"; -const SPINNER_CLASSIC = "-/|\\-/|"; -const SPINNER_BOX = "┤┘┴└├┌┬┐"; -const SPINNER_DOUBLE_BARS = [ - "▁▁", - "▁▂", - "▁▃", - "▁▄", - "▁▅", - "▁▆", - "▁▇", - "▁█", - "▂▇", - "▃▆", - "▄▅", - "▅▄", - "▆▃", - "▇▂", - "█▁", - "▇▁", - "▆▁", - "▅▁", - "▄▁", - "▃▁", - "▂▁", -]; -const SPINNER_SHADES = "░▒▓█▓▒░"; -const SPINNER_RINGS = "○◔◑◕●◐◓◑◒"; -const SPINNER_SPARKLES = "✢✣✤✥✦✧✬✱✲✳✴✵✶✷✸"; -const SPINNER_PULSE = "·∙●⬤●∙·"; -const MITOSIS_FRAMES = [ - "●", - "●●", - "● ●", // regular space - "●\u2004●", // 1/3 em space - "●\u2002●", // 1/2 em space - "● ●", // regular space - "●●", - "●", -]; -const DANCING_NOTES_FRAMES = [ - "♪ ", - "♫ ", - "♪ ♫ ", - "♫ ♪ ", - "♬ ♩ ", - "♩ ♬ ", - "♫ ♪ ", - "♪ ♫ ", - "♫ ", - "♪ ", -]; -const MITOSIS_2 = [ - "⚬ ", - "⚭ ", - "⚮ ", - "⚯ ", - "○ ○", - "⚯ ", - "⚮ ", - "⚭ ", - "⚬ ", -]; - -// Generate all possible Braille characters (from U+2800 to U+28FF) -const BRAILLE_CHARS = Array.from({ length: 256 }, (_, i) => - String.fromCharCode(0x2800 + i) -); const BRAILLE_BY_DENSITY: { [key: number]: string[] } = { 0: ["⠀"], // No dots @@ -136,10 +66,6 @@ const STATIC_FADE = [ ...generateEasedStaticFade(TIMING_CURVE), ]; -// Linear (same speed throughout) -const STATIC_FADE_LINEAR = generateEasedStaticFade([2, 2, 2, 2, 2, 2, 2, 2, 2]); - -const STARS = "·+✣✤✻✽❊❈❈❈❈❊✽✻✤✣+"; const SPINNER: string | string[] = STATIC_FADE; @@ -171,4 +97,4 @@ const LoadingAnimation: React.FC = ({ return {animationChars[currentIndex]}; }; -export default LoadingAnimation; +export { LoadingAnimation }; diff --git a/src/ui/MarkdownRenderer.test.tsx b/src/ui/MarkdownRenderer.test.tsx index d9cd7abc3..913d6d169 100644 --- a/src/ui/MarkdownRenderer.test.tsx +++ b/src/ui/MarkdownRenderer.test.tsx @@ -1,6 +1,7 @@ import { Text } from "ink"; import React from "react"; -import MarkdownRenderer from "./MarkdownRenderer.js"; + +import { MarkdownRenderer } from "./MarkdownRenderer.js"; describe("MarkdownRenderer", () => { // Helper function to simulate calling the component function directly diff --git a/src/ui/MarkdownRenderer.tsx b/src/ui/MarkdownRenderer.tsx index f85d9dae3..008009876 100644 --- a/src/ui/MarkdownRenderer.tsx +++ b/src/ui/MarkdownRenderer.tsx @@ -1,5 +1,6 @@ import { Text } from "ink"; import React from "react"; + import { highlightCode, detectLanguage, SyntaxHighlighterTheme, defaultTheme } from "./SyntaxHighlighter.js"; interface MarkdownRendererProps { @@ -16,7 +17,7 @@ const MarkdownRenderer: React.FC = React.memo(({ content, const patterns: MarkdownPattern[] = [ { regex: /```(?:(\w+)\n)?([\s\S]*?)```/g, - render: (content, key) => { + render: (_content, _key) => { // content here is the captured group, but we need to parse the full match return null; // This will be handled separately }, @@ -160,7 +161,7 @@ const MarkdownRenderer: React.FC = React.memo(({ content, combinedMatches.sort((a, b) => a.index - b.index); // Process matches, avoiding overlaps - let processedMatches: typeof combinedMatches = []; + const processedMatches: typeof combinedMatches = []; for (const match of combinedMatches) { const overlaps = processedMatches.some( (processed) => @@ -210,6 +211,6 @@ const MarkdownRenderer: React.FC = React.memo(({ content, MarkdownRenderer.displayName = "MarkdownRenderer"; -export default MarkdownRenderer; +export { MarkdownRenderer }; export type { SyntaxHighlighterTheme }; export { defaultTheme }; \ No newline at end of file diff --git a/src/ui/ModelCapabilityWarning.test.tsx b/src/ui/ModelCapabilityWarning.test.tsx index 46b744493..cc22d0cb7 100644 --- a/src/ui/ModelCapabilityWarning.test.tsx +++ b/src/ui/ModelCapabilityWarning.test.tsx @@ -1,7 +1,8 @@ import { render } from 'ink-testing-library'; import React from 'react'; import { describe, expect, test } from 'vitest'; -import ModelCapabilityWarning from './ModelCapabilityWarning.js'; + +import { ModelCapabilityWarning } from './ModelCapabilityWarning.js'; describe('ModelCapabilityWarning', () => { test('should render warning message with model name', () => { diff --git a/src/ui/ModelCapabilityWarning.tsx b/src/ui/ModelCapabilityWarning.tsx index 87737abe7..e74c0384f 100644 --- a/src/ui/ModelCapabilityWarning.tsx +++ b/src/ui/ModelCapabilityWarning.tsx @@ -24,4 +24,4 @@ const ModelCapabilityWarning: React.FC = ({ ); }; -export default ModelCapabilityWarning; +export { ModelCapabilityWarning }; diff --git a/src/ui/ModelSelector.tsx b/src/ui/ModelSelector.tsx index 5cf04a8d3..34829173d 100644 --- a/src/ui/ModelSelector.tsx +++ b/src/ui/ModelSelector.tsx @@ -1,6 +1,8 @@ import React, { useEffect, useState } from "react"; + import { services } from "../services/index.js"; -import Selector, { SelectorOption } from "./Selector.js"; + +import { Selector, SelectorOption } from "./Selector.js"; interface ModelOption extends SelectorOption { index: number; @@ -70,4 +72,4 @@ const ModelSelector: React.FC = ({ ); }; -export default ModelSelector; \ No newline at end of file +export { ModelSelector }; \ No newline at end of file diff --git a/src/ui/OrganizationSelector.tsx b/src/ui/OrganizationSelector.tsx index ca2a9c237..629636c5f 100644 --- a/src/ui/OrganizationSelector.tsx +++ b/src/ui/OrganizationSelector.tsx @@ -1,10 +1,12 @@ import React, { useEffect, useState } from "react"; + import { getOrganizationId, listUserOrganizations, loadAuthConfig, } from "../auth/workos.js"; -import Selector, { SelectorOption } from "./Selector.js"; + +import { Selector, SelectorOption } from "./Selector.js"; interface Organization extends SelectorOption {} @@ -79,4 +81,4 @@ const OrganizationSelector: React.FC = ({ ); }; -export default OrganizationSelector; +export { OrganizationSelector }; diff --git a/src/ui/Selector.tsx b/src/ui/Selector.tsx index cf58d7a3a..5d3b7c65c 100644 --- a/src/ui/Selector.tsx +++ b/src/ui/Selector.tsx @@ -25,7 +25,7 @@ interface SelectorProps { ) => ReactNode; } -export default function Selector({ +export function Selector({ title, options, selectedIndex, diff --git a/src/ui/ServiceDebugger.tsx b/src/ui/ServiceDebugger.tsx index d075a4e50..d8b50a2b9 100644 --- a/src/ui/ServiceDebugger.tsx +++ b/src/ui/ServiceDebugger.tsx @@ -1,5 +1,6 @@ import { Box, Text } from "ink"; import React from "react"; + import { ApiClientServiceState, AuthServiceState, @@ -111,4 +112,4 @@ const ServiceDebugger: React.FC = ({ ); }; -export default ServiceDebugger; \ No newline at end of file +export { ServiceDebugger }; \ No newline at end of file diff --git a/src/ui/SlashCommandUI.tsx b/src/ui/SlashCommandUI.tsx index ac7389e4e..55f673669 100644 --- a/src/ui/SlashCommandUI.tsx +++ b/src/ui/SlashCommandUI.tsx @@ -79,4 +79,4 @@ const SlashCommandUI: React.FC = ({ ); }; -export default SlashCommandUI; \ No newline at end of file +export { SlashCommandUI }; \ No newline at end of file diff --git a/src/ui/SyntaxHighlighter.ts b/src/ui/SyntaxHighlighter.ts index ccfc14abd..35931b1de 100644 --- a/src/ui/SyntaxHighlighter.ts +++ b/src/ui/SyntaxHighlighter.ts @@ -191,7 +191,7 @@ export function highlightCode( } return elements; - } catch (error) { + } catch { // Fallback to plain text on error return [ React.createElement( diff --git a/src/ui/TUIChat.tsx b/src/ui/TUIChat.tsx index 7fa5c4fc0..90d9e18cd 100644 --- a/src/ui/TUIChat.tsx +++ b/src/ui/TUIChat.tsx @@ -1,6 +1,9 @@ -import { Box, Text, useApp, useStdout } from "ink"; +import { Box, Text } from "ink"; import React, { useEffect, useMemo, useState } from "react"; + import { useServices } from "../hooks/useService.js"; +import type { PermissionMode } from "../permissions/types.js"; +import { modeService } from "../services/ModeService.js"; import { ApiClientServiceState, AuthServiceState, @@ -8,28 +11,27 @@ import { MCPServiceState, ModelServiceState, } from "../services/types.js"; +import { getGitRemoteUrl, isGitRepo } from "../util/git.js"; + +import { ModeIndicator } from "./components/ModeIndicator.js"; import { ToolPermissionSelector } from "./components/ToolPermissionSelector.js"; -import ConfigSelector from "./ConfigSelector.js"; +import { ConfigSelector } from "./ConfigSelector.js"; import { startFileIndexing } from "./FileSearchUI.js"; -import FreeTrialStatus from "./FreeTrialStatus.js"; -import FreeTrialTransitionUI from "./FreeTrialTransitionUI.js"; +import { FreeTrialStatus } from "./FreeTrialStatus.js"; +import { FreeTrialTransitionUI } from "./FreeTrialTransitionUI.js"; import { useChat } from "./hooks/useChat.js"; import { useConfigSelector } from "./hooks/useConfigSelector.js"; import { useMessageRenderer } from "./hooks/useMessageRenderer.js"; import { useModelSelector } from "./hooks/useModelSelector.js"; import { useOrganizationSelector } from "./hooks/useOrganizationSelector.js"; -import IntroMessage from "./IntroMessage.js"; -import LoadingAnimation from "./LoadingAnimation.js"; -import ModelSelector from "./ModelSelector.js"; -import OrganizationSelector from "./OrganizationSelector.js"; -import Timer from "./Timer.js"; -import UpdateNotification from "./UpdateNotification.js"; -import UserInput from "./UserInput.js"; -import ModeIndicator from "./components/ModeIndicator.js"; -import { getGitRemoteUrl, getRepoUrl, isGitRepo } from "../util/git.js"; -import useTerminalSize from "./hooks/useTerminalSize.js"; -import { modeService } from "../services/ModeService.js"; -import type { PermissionMode } from "../permissions/types.js"; +import { IntroMessage } from "./IntroMessage.js"; +import { LoadingAnimation } from "./LoadingAnimation.js"; +import { ModelSelector } from "./ModelSelector.js"; +import { OrganizationSelector } from "./OrganizationSelector.js"; +import { Timer } from "./Timer.js"; +import { UpdateNotification } from "./UpdateNotification.js"; +import { UserInput } from "./UserInput.js"; + interface TUIChatProps { // Remote mode props @@ -77,8 +79,6 @@ const TUIChat: React.FC = ({ // Get all services reactively - only in normal mode const { services, - loading: servicesLoading, - error: servicesError, allReady: allServicesReady, } = useServices<{ auth: AuthServiceState; @@ -93,7 +93,6 @@ const TUIChat: React.FC = ({ text: string; resolve: (value: string) => void; } | null>(null); - const [loginToken, setLoginToken] = useState(""); // State for free trial transition const [isShowingFreeTrialTransition, setIsShowingFreeTrialTransition] = @@ -160,7 +159,6 @@ const TUIChat: React.FC = ({ // Handle login token submission const handleLoginTokenSubmit = (token: string) => { if (loginPrompt) { - setLoginToken(""); loginPrompt.resolve(token); setLoginPrompt(null); } @@ -181,7 +179,6 @@ const TUIChat: React.FC = ({ isWaitingForResponse, responseStartTime, inputMode, - attachedFiles, activePermissionRequest, handleUserMessage, handleInterrupt, @@ -214,7 +211,7 @@ const TUIChat: React.FC = ({ showOrganizationSelector, } = useOrganizationSelector({ configPath, - onAssistantChange: (newAssistant, newModel, newLlmApi, newMcpService) => {}, + onAssistantChange: () => {}, onMessage: (message) => { setMessages((prev) => [...prev, message]); }, @@ -441,4 +438,4 @@ const TUIChat: React.FC = ({ ); }; -export default TUIChat; +export { TUIChat }; diff --git a/src/ui/Timer.tsx b/src/ui/Timer.tsx index 32fc2e090..dc72904a9 100644 --- a/src/ui/Timer.tsx +++ b/src/ui/Timer.tsx @@ -22,4 +22,4 @@ const Timer: React.FC = ({ startTime, color = "gray" }) => { return {elapsed}s; }; -export default Timer; \ No newline at end of file +export { Timer }; \ No newline at end of file diff --git a/src/ui/ToolResultSummary.tsx b/src/ui/ToolResultSummary.tsx index 70fb84f26..4c7a439f8 100644 --- a/src/ui/ToolResultSummary.tsx +++ b/src/ui/ToolResultSummary.tsx @@ -1,7 +1,10 @@ -import { Box, Text } from "ink"; import path from "path"; + +import { Box, Text } from "ink"; import React from "react"; + import { getToolDisplayName } from "../tools/index.js"; + import { ColoredDiff } from "./ColoredDiff.js"; import { ChecklistDisplay } from "./components/ChecklistDisplay.js"; @@ -173,4 +176,4 @@ const ToolResultSummary: React.FC = ({ ); }; -export default ToolResultSummary; +export { ToolResultSummary }; diff --git a/src/ui/UpdateNotification.tsx b/src/ui/UpdateNotification.tsx index ffd5669fb..c893da02e 100644 --- a/src/ui/UpdateNotification.tsx +++ b/src/ui/UpdateNotification.tsx @@ -1,7 +1,9 @@ -import { Text, useStdout } from "ink"; +import { Text } from "ink"; import React, { useEffect, useMemo, useState } from "react"; + import { compareVersions, getLatestVersion, getVersion } from "../version.js"; -import useTerminalSize from "./hooks/useTerminalSize.js"; + +import { useTerminalSize } from "./hooks/useTerminalSize.js"; interface UpdateNotificationProps { isRemoteMode?: boolean; @@ -65,4 +67,4 @@ const UpdateNotification: React.FC = ({ return {text}; }; -export default UpdateNotification; +export { UpdateNotification }; diff --git a/src/ui/UserInput.keyboard.test.ts b/src/ui/UserInput.keyboard.test.ts index 47309aa78..53b8ccbc1 100644 --- a/src/ui/UserInput.keyboard.test.ts +++ b/src/ui/UserInput.keyboard.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it, beforeEach } from 'vitest'; + import { modeService } from '../services/ModeService.js'; describe('UserInput Keyboard Shortcuts', () => { diff --git a/src/ui/UserInput.tsx b/src/ui/UserInput.tsx index cb6cd6e36..8b602d649 100644 --- a/src/ui/UserInput.tsx +++ b/src/ui/UserInput.tsx @@ -1,14 +1,16 @@ import { type AssistantConfig } from "@continuedev/sdk"; import { Box, Text, useApp, useInput } from "ink"; import React, { useState } from "react"; + import { getAllSlashCommands } from "../commands/commands.js"; -import { modeService } from "../services/ModeService.js"; -import { reloadService, SERVICE_NAMES } from "../services/index.js"; import type { PermissionMode } from "../permissions/types.js"; +import { reloadService, SERVICE_NAMES } from "../services/index.js"; +import { modeService } from "../services/ModeService.js"; import { InputHistory } from "../util/inputHistory.js"; -import logger from "../util/logger.js"; -import FileSearchUI from "./FileSearchUI.js"; -import SlashCommandUI from "./SlashCommandUI.js"; +import { logger } from "../util/logger.js"; + +import { FileSearchUI } from "./FileSearchUI.js"; +import { SlashCommandUI } from "./SlashCommandUI.js"; import { TextBuffer } from "./TextBuffer.js"; interface UserInputProps { @@ -369,7 +371,7 @@ const UserInput: React.FC = ({ } if (key.downArrow) { - const historyEntry = inputHistory.navigateDown(inputText); + const historyEntry = inputHistory.navigateDown(); if (historyEntry !== null) { textBuffer.setText(historyEntry); textBuffer.setCursor(historyEntry.length); @@ -547,4 +549,4 @@ const UserInput: React.FC = ({ ); }; -export default UserInput; \ No newline at end of file +export { UserInput }; \ No newline at end of file diff --git a/src/ui/__mocks__/FreeTrialStatus.tsx b/src/ui/__mocks__/FreeTrialStatus.tsx index 1f0ab6c20..517dcf3f7 100644 --- a/src/ui/__mocks__/FreeTrialStatus.tsx +++ b/src/ui/__mocks__/FreeTrialStatus.tsx @@ -5,7 +5,7 @@ const FreeTrialStatus: React.FC = () => { return null; }; -export default FreeTrialStatus; +export { FreeTrialStatus }; export function isModelUsingFreeTrial(): boolean { return false; } \ No newline at end of file diff --git a/src/ui/__mocks__/SyntaxHighlighter.ts b/src/ui/__mocks__/SyntaxHighlighter.ts index c0f7a4633..041f75b44 100644 --- a/src/ui/__mocks__/SyntaxHighlighter.ts +++ b/src/ui/__mocks__/SyntaxHighlighter.ts @@ -1,4 +1,3 @@ -import { Text } from 'ink'; import React from 'react'; export interface SyntaxHighlighterTheme { @@ -17,12 +16,12 @@ export const defaultTheme: SyntaxHighlighterTheme = { operator: 'cyan', }; -export function highlightCode(code: string, language?: string): React.ReactNode[] { +export function highlightCode(code: string): React.ReactNode[] { // Mock implementation that just returns the code as plain text return [React.createElement('ink-text', { key: 'mock-code' }, code)]; } -export function detectLanguage(code: string): string { +export function detectLanguage(): string { // Mock implementation return 'javascript'; } \ No newline at end of file diff --git a/src/ui/__tests__/FreeTrialTransitionUI.test.tsx b/src/ui/__tests__/FreeTrialTransitionUI.test.tsx index e6fdec8af..5029fdfc8 100644 --- a/src/ui/__tests__/FreeTrialTransitionUI.test.tsx +++ b/src/ui/__tests__/FreeTrialTransitionUI.test.tsx @@ -1,7 +1,8 @@ import { render } from "ink-testing-library"; import React from "react"; import { vi } from "vitest"; -import FreeTrialTransitionUI from "../FreeTrialTransitionUI.js"; + +import { FreeTrialTransitionUI } from "../FreeTrialTransitionUI.js"; // Mock the 'open' module to prevent actual URL opening during tests vi.mock("open", () => ({ diff --git a/src/ui/__tests__/TUIChat.basic.test.tsx b/src/ui/__tests__/TUIChat.basic.test.tsx index a869ecf95..bc31f6af6 100644 --- a/src/ui/__tests__/TUIChat.basic.test.tsx +++ b/src/ui/__tests__/TUIChat.basic.test.tsx @@ -1,7 +1,8 @@ import { render } from "ink-testing-library"; import React from "react"; + import { createUITestContext } from "../../test-helpers/ui-test-context.js"; -import TUIChat from "../TUIChat.js"; +import { TUIChat } from "../TUIChat.js"; describe("TUIChat - Basic UI Tests", () => { let context: any; diff --git a/src/ui/__tests__/TUIChat.dualModeHelper.tsx b/src/ui/__tests__/TUIChat.dualModeHelper.tsx index 2ed8543be..4904459ed 100644 --- a/src/ui/__tests__/TUIChat.dualModeHelper.tsx +++ b/src/ui/__tests__/TUIChat.dualModeHelper.tsx @@ -1,7 +1,8 @@ import { render } from "ink-testing-library"; import React from "react"; + import { createUITestContext } from "../../test-helpers/ui-test-context.js"; -import TUIChat from "../TUIChat.js"; +import { TUIChat } from "../TUIChat.js"; export type TestMode = 'local' | 'remote'; diff --git a/src/ui/__tests__/TUIChat.freeTrialTransition.test.tsx b/src/ui/__tests__/TUIChat.freeTrialTransition.test.tsx index 926c4987d..ac28ac959 100644 --- a/src/ui/__tests__/TUIChat.freeTrialTransition.test.tsx +++ b/src/ui/__tests__/TUIChat.freeTrialTransition.test.tsx @@ -1,5 +1,4 @@ // Integration tests for free trial transition - simplified version -import { vi } from "vitest"; describe("TUIChat - Free Trial Transition Integration", () => { it("should integrate free trial transition with config selector", () => { diff --git a/src/ui/__tests__/TUIChat.messages.test.tsx b/src/ui/__tests__/TUIChat.messages.test.tsx index 3c877c674..bad8e3eb2 100644 --- a/src/ui/__tests__/TUIChat.messages.test.tsx +++ b/src/ui/__tests__/TUIChat.messages.test.tsx @@ -1,5 +1,5 @@ -import type { ChatCompletionMessageParam } from "openai/resources/index.js"; import { createUITestContext } from "../../test-helpers/ui-test-context.js"; + import { testBothModes, renderInMode } from "./TUIChat.dualModeHelper.js"; describe("TUIChat - Message Display Tests", () => { diff --git a/src/ui/__tests__/TUIChat.remote.test.tsx b/src/ui/__tests__/TUIChat.remote.test.tsx index adc5e86b5..6911ce550 100644 --- a/src/ui/__tests__/TUIChat.remote.test.tsx +++ b/src/ui/__tests__/TUIChat.remote.test.tsx @@ -1,7 +1,8 @@ import { render } from "ink-testing-library"; import React from "react"; + import { createUITestContext } from "../../test-helpers/ui-test-context.js"; -import TUIChat from "../TUIChat.js"; +import { TUIChat } from "../TUIChat.js"; describe("TUIChat - Remote Server Tests", () => { let context: any; diff --git a/src/ui/__tests__/TUIChat.setup.ts b/src/ui/__tests__/TUIChat.setup.ts index c28fc1f02..6ac658ad3 100644 --- a/src/ui/__tests__/TUIChat.setup.ts +++ b/src/ui/__tests__/TUIChat.setup.ts @@ -1,66 +1,12 @@ import type { AssistantUnrolled } from "@continuedev/config-yaml"; import { vi } from "vitest"; -// Minimal mock for LLM API (just enough to prevent errors) -export class MockLlmApi { - async chatCompletionStream(): Promise> { - return (async function* () { - yield { choices: [{ delta: {}, index: 0, finish_reason: "stop" }] }; - })(); - } - async chatCompletionNonStream() { - throw new Error("Not implemented"); - } - async completionStream() { - throw new Error("Not implemented"); - } - async completionNonStream() { - throw new Error("Not implemented"); - } - async streamChat() { - return this.chatCompletionStream(); - } - async completions() { - throw new Error("Not implemented"); - } - async streamCompletion() { - throw new Error("Not implemented"); - } - async chat() { - throw new Error("Not implemented"); - } - async rerank() { - return { results: [] }; - } - async embed() { - return { data: [], usage: {} }; - } - async fimComplete() { - throw new Error("Not implemented"); - } -} +import { MockApiClient } from "./mocks/MockApiClient.js"; +import { MockLlmApi } from "./mocks/MockLlmApi.js"; +import { MockMCPService } from "./mocks/MockMCPService.js"; -// Mock MCP Service -export class MockMCPService { - connections = []; - assistant = {} as any; - getTools() { - return []; - } - getPrompts() { - return []; - } - async runTool() { - return { result: "Mock result" }; - } - async executeToolCall() { - return { result: "Mock result" }; - } - async close() {} - isInitialized() { - return true; - } -} +// Re-export the mocks for backward compatibility +export { MockApiClient, MockLlmApi, MockMCPService }; // Mock Assistant config export const mockAssistant: AssistantUnrolled = { @@ -95,29 +41,6 @@ vi.mock("glob", () => ({ ]), })); -// Mock API Client -export class MockApiClient { - async getFreeTrialStatus() { - return { - optedInToFreeTrial: true, - chatCount: 5, - chatLimit: 100, - }; - } - async listAssistants() { - return []; - } - async getAssistant() { - return { configResult: { config: mockAssistant } }; - } - async listOrganizations() { - return { organizations: [] }; - } - async syncSecrets() { - return []; - } -} - export const createProps = (overrides: any = {}) => ({ config: mockAssistant, model: "test-model", diff --git a/src/ui/__tests__/TUIChat.slashCommands.test.tsx b/src/ui/__tests__/TUIChat.slashCommands.test.tsx index 722dd9e21..068ed40db 100644 --- a/src/ui/__tests__/TUIChat.slashCommands.test.tsx +++ b/src/ui/__tests__/TUIChat.slashCommands.test.tsx @@ -1,4 +1,3 @@ -import { vi } from "vitest"; import { testBothModes, renderInMode } from "./TUIChat.dualModeHelper.js"; describe("TUIChat - Slash Commands Tests", () => { diff --git a/src/ui/__tests__/TUIChat.streamStopping.test.tsx b/src/ui/__tests__/TUIChat.streamStopping.test.tsx index f23e0f726..96a9fff39 100644 --- a/src/ui/__tests__/TUIChat.streamStopping.test.tsx +++ b/src/ui/__tests__/TUIChat.streamStopping.test.tsx @@ -1,6 +1,7 @@ -import { vi } from "vitest"; import { render } from "ink-testing-library"; import React from "react"; +import { vi } from "vitest"; + import { ToolPermissionSelector } from "../components/ToolPermissionSelector.js"; describe("TUIChat - Stream Stopping on Tool Rejection", () => { diff --git a/src/ui/__tests__/TUIChat.testHelper.ts b/src/ui/__tests__/TUIChat.testHelper.ts index e7424aae6..1d8af2799 100644 --- a/src/ui/__tests__/TUIChat.testHelper.ts +++ b/src/ui/__tests__/TUIChat.testHelper.ts @@ -1,14 +1,16 @@ -import { vi } from "vitest"; import { render } from "ink-testing-library"; import React from "react"; -import TUIChat from "../TUIChat.js"; +import { vi } from "vitest"; + +import { TUIChat } from "../TUIChat.js"; + +import { MockRemoteServer } from "./mockRemoteServer.js"; import { MockApiClient, mockAssistant, MockLlmApi, MockMCPService, } from "./TUIChat.setup.js"; -import { MockRemoteServer } from "./mockRemoteServer.js"; // Define RenderResult type to match ink-testing-library's Instance interface RenderResult { @@ -122,7 +124,7 @@ export function runTest( allReady: true, }); - mockUseService.mockImplementation((serviceName: string) => ({ + mockUseService.mockImplementation((serviceName: string) => ({ value: (() => { switch (serviceName) { case "auth": @@ -274,7 +276,7 @@ export function runTestSuite( allReady: true, }); - mockUseService.mockImplementation((serviceName: string) => ({ + mockUseService.mockImplementation((serviceName: string) => ({ value: (() => { switch (serviceName) { case "auth": diff --git a/src/ui/__tests__/TUIChat.toolDisplay.test.tsx b/src/ui/__tests__/TUIChat.toolDisplay.test.tsx index d2f179918..e15389e39 100644 --- a/src/ui/__tests__/TUIChat.toolDisplay.test.tsx +++ b/src/ui/__tests__/TUIChat.toolDisplay.test.tsx @@ -1,7 +1,8 @@ import { render } from "ink-testing-library"; import React from "react"; + import { createUITestContext } from "../../test-helpers/ui-test-context.js"; -import TUIChat from "../TUIChat.js"; +import { TUIChat } from "../TUIChat.js"; describe("TUIChat - Tool Display Tests", () => { let context: any; diff --git a/src/ui/__tests__/TUIChat.toolPermission.test.tsx b/src/ui/__tests__/TUIChat.toolPermission.test.tsx index 37fe7935c..d90b8a2ec 100644 --- a/src/ui/__tests__/TUIChat.toolPermission.test.tsx +++ b/src/ui/__tests__/TUIChat.toolPermission.test.tsx @@ -1,6 +1,7 @@ -import { vi } from "vitest"; import { render } from "ink-testing-library"; import React from "react"; +import { vi } from "vitest"; + import { ToolPermissionSelector } from "../components/ToolPermissionSelector.js"; describe("TUIChat - Tool Permission Tests", () => { @@ -145,7 +146,7 @@ describe("TUIChat - Tool Permission Tests", () => { await vi.advanceTimersByTimeAsync(50); // Initial state should show "> Continue" selected - let frame = lastFrame(); + const frame = lastFrame(); expect(frame).toMatch(/>\s+Continue/); // Test that pressing Enter on default selection triggers approval @@ -190,7 +191,7 @@ describe("TUIChat - Tool Permission Tests", () => { it("shows tool result with red dot and 'Cancelled by user' message", async () => { // Import the components we need for this test - const { default: ToolResultSummary } = await import( + const { ToolResultSummary } = await import( "../ToolResultSummary.js" ); const { MemoizedMessage } = await import( diff --git a/src/ui/__tests__/mockRemoteServer.ts b/src/ui/__tests__/mockRemoteServer.ts index 999ff325f..3831b75eb 100644 --- a/src/ui/__tests__/mockRemoteServer.ts +++ b/src/ui/__tests__/mockRemoteServer.ts @@ -1,6 +1,8 @@ -import { describe, expect, test } from "vitest"; -import express from "express"; import { Server } from "http"; + +import express from "express"; +import { describe, expect, test } from "vitest"; + import { DisplayMessage } from "../types.js"; export interface MockRemoteServerConfig { diff --git a/src/ui/__tests__/mocks/MockApiClient.ts b/src/ui/__tests__/mocks/MockApiClient.ts new file mode 100644 index 000000000..41184578b --- /dev/null +++ b/src/ui/__tests__/mocks/MockApiClient.ts @@ -0,0 +1,39 @@ +// Mock API Client +export class MockApiClient { + async getFreeTrialStatus() { + return { + optedInToFreeTrial: true, + chatCount: 5, + chatLimit: 100, + }; + } + async listAssistants() { + return []; + } + async getAssistant() { + // Return a minimal assistant config + return { + configResult: { + config: { + name: "test-assistant", + models: [ + { + provider: "openai", + name: "test-model", + model: "test-model", + }, + ], + systemMessage: "You are a helpful assistant", + tools: [], + mcpServers: [], + } + } + }; + } + async listOrganizations() { + return { organizations: [] }; + } + async syncSecrets() { + return []; + } +} \ No newline at end of file diff --git a/src/ui/__tests__/mocks/MockLlmApi.ts b/src/ui/__tests__/mocks/MockLlmApi.ts new file mode 100644 index 000000000..da19ee2ff --- /dev/null +++ b/src/ui/__tests__/mocks/MockLlmApi.ts @@ -0,0 +1,38 @@ +// Minimal mock for LLM API (just enough to prevent errors) +export class MockLlmApi { + async chatCompletionStream(): Promise> { + return (async function* () { + yield { choices: [{ delta: {}, index: 0, finish_reason: "stop" }] }; + })(); + } + async chatCompletionNonStream() { + throw new Error("Not implemented"); + } + async completionStream() { + throw new Error("Not implemented"); + } + async completionNonStream() { + throw new Error("Not implemented"); + } + async streamChat() { + return this.chatCompletionStream(); + } + async completions() { + throw new Error("Not implemented"); + } + async streamCompletion() { + throw new Error("Not implemented"); + } + async chat() { + throw new Error("Not implemented"); + } + async rerank() { + return { results: [] }; + } + async embed() { + return { data: [], usage: {} }; + } + async fimComplete() { + throw new Error("Not implemented"); + } +} \ No newline at end of file diff --git a/src/ui/__tests__/mocks/MockMCPService.ts b/src/ui/__tests__/mocks/MockMCPService.ts new file mode 100644 index 000000000..c1ca17860 --- /dev/null +++ b/src/ui/__tests__/mocks/MockMCPService.ts @@ -0,0 +1,21 @@ +// Mock MCP Service +export class MockMCPService { + connections = []; + assistant = {} as any; + getTools() { + return []; + } + getPrompts() { + return []; + } + async runTool() { + return { result: "Mock result" }; + } + async executeToolCall() { + return { result: "Mock result" }; + } + async close() {} + isInitialized() { + return true; + } +} \ No newline at end of file diff --git a/src/ui/__tests__/throttledGlob.test.ts b/src/ui/__tests__/throttledGlob.test.ts index e07382fdc..547b338ad 100644 --- a/src/ui/__tests__/throttledGlob.test.ts +++ b/src/ui/__tests__/throttledGlob.test.ts @@ -1,3 +1,5 @@ +import { EventEmitter } from "events"; + import { vi, describe, @@ -6,7 +8,7 @@ import { it, expect, } from "vitest"; -import { EventEmitter } from "events"; + import { throttledGlob } from "../FileSearchUI.js"; // Define a custom interface for our mock diff --git a/src/ui/components/MemoizedMessage.tsx b/src/ui/components/MemoizedMessage.tsx index 71165c3bb..addbbcf32 100644 --- a/src/ui/components/MemoizedMessage.tsx +++ b/src/ui/components/MemoizedMessage.tsx @@ -1,7 +1,8 @@ import { Box, Text } from "ink"; import React, { memo } from "react"; -import MarkdownRenderer from "../MarkdownRenderer.js"; -import ToolResultSummary from "../ToolResultSummary.js"; + +import { MarkdownRenderer } from "../MarkdownRenderer.js"; +import { ToolResultSummary } from "../ToolResultSummary.js"; import { DisplayMessage } from "../types.js"; interface MemoizedMessageProps { diff --git a/src/ui/components/ModeIndicator.test.tsx b/src/ui/components/ModeIndicator.test.tsx index d1119afd7..6fb93aeb8 100644 --- a/src/ui/components/ModeIndicator.test.tsx +++ b/src/ui/components/ModeIndicator.test.tsx @@ -1,9 +1,12 @@ -import { describe, expect, it, beforeEach } from 'vitest'; import { render } from 'ink-testing-library'; import React from 'react'; -import ModeIndicator from './ModeIndicator.js'; +import { describe, expect, it, beforeEach } from 'vitest'; + import { modeService } from '../../services/ModeService.js'; +import { ModeIndicator } from './ModeIndicator.js'; + + describe('ModeIndicator', () => { beforeEach(() => { // Reset to normal mode for each test diff --git a/src/ui/components/ModeIndicator.tsx b/src/ui/components/ModeIndicator.tsx index 2a2d8755b..ee95160bf 100644 --- a/src/ui/components/ModeIndicator.tsx +++ b/src/ui/components/ModeIndicator.tsx @@ -1,7 +1,8 @@ import { Text } from "ink"; import React, { useEffect, useState } from "react"; -import { modeService } from "../../services/ModeService.js"; + import type { PermissionMode } from "../../permissions/types.js"; +import { modeService } from "../../services/ModeService.js"; interface ModeIndicatorProps { mode?: PermissionMode; @@ -59,4 +60,4 @@ const ModeIndicator: React.FC = ({ mode }) => { ); }; -export default ModeIndicator; \ No newline at end of file +export { ModeIndicator }; \ No newline at end of file diff --git a/src/ui/components/ToolPermissionRequest.tsx b/src/ui/components/ToolPermissionRequest.tsx index 468becebe..bb9abe80d 100644 --- a/src/ui/components/ToolPermissionRequest.tsx +++ b/src/ui/components/ToolPermissionRequest.tsx @@ -16,7 +16,7 @@ export const ToolPermissionRequest: React.FC = ({ }) => { const [responded, setResponded] = useState(false); - useInput((input, key) => { + useInput((input) => { if (responded) return; if (input === "y" || input === "Y") { diff --git a/src/ui/components/ToolPermissionSelector.tsx b/src/ui/components/ToolPermissionSelector.tsx index 7cc8c1a44..9be8e88d4 100644 --- a/src/ui/components/ToolPermissionSelector.tsx +++ b/src/ui/components/ToolPermissionSelector.tsx @@ -1,9 +1,11 @@ import { Box, Text, useInput } from "ink"; import React, { useState } from "react"; + import { formatToolCall } from "../../tools/index.js"; -import { ToolPreview } from "./ToolPreview.js"; import { ToolCallPreview } from "../../tools/types.js"; +import { ToolPreview } from "./ToolPreview.js"; + interface PermissionOption { id: string; name: string; diff --git a/src/ui/components/ToolPreview.tsx b/src/ui/components/ToolPreview.tsx index 2b91f0907..e6c5e83d4 100644 --- a/src/ui/components/ToolPreview.tsx +++ b/src/ui/components/ToolPreview.tsx @@ -1,8 +1,10 @@ import { Box, Text } from "ink"; import React from "react"; -import { ColoredDiff } from "../ColoredDiff.js"; -import { ToolCallPreview } from "../../tools/types.js"; + import { getToolDisplayName } from "../../tools/index.js"; +import { ToolCallPreview } from "../../tools/types.js"; +import { ColoredDiff } from "../ColoredDiff.js"; + import { ChecklistDisplay } from "./ChecklistDisplay.js"; interface ToolPreviewProps { diff --git a/src/ui/hooks/useChat.test.ts b/src/ui/hooks/useChat.test.ts index b7363d4cb..4ad7bf5a6 100644 --- a/src/ui/hooks/useChat.test.ts +++ b/src/ui/hooks/useChat.test.ts @@ -6,6 +6,7 @@ import { it, vi, } from "vitest"; + import { createMinimalTestContext } from "../../test-helpers/ui-test-context.js"; describe("useChat", () => { diff --git a/src/ui/hooks/useChat.ts b/src/ui/hooks/useChat.ts index af47e19ee..e20a56998 100644 --- a/src/ui/hooks/useChat.ts +++ b/src/ui/hooks/useChat.ts @@ -3,16 +3,6 @@ import { BaseLlmApi } from "@continuedev/openai-adapters"; import { useApp } from "ink"; import { ChatCompletionMessageParam } from "openai/resources.mjs"; import { useEffect, useState } from "react"; -import { toolPermissionManager } from "../../permissions/permissionManager.js"; -import { loadSession, saveSession } from "../../session.js"; -import { handleSlashCommands } from "../../slashCommands.js"; -import { - StreamCallbacks, - streamChatResponse, -} from "../../streamChatResponse.js"; -import telemetryService from "../../telemetry/telemetryService.js"; -import { formatError } from "../../util/formatError.js"; -import logger from "../../util/logger.js"; import { initializeChatHistory } from "../../commands/chat.js"; import { @@ -20,9 +10,19 @@ import { findCompactionIndex, getHistoryForLLM, } from "../../compaction.js"; +import { toolPermissionManager } from "../../permissions/permissionManager.js"; +import { loadSession, saveSession } from "../../session.js"; +import { handleSlashCommands } from "../../slashCommands.js"; +import { + StreamCallbacks, + streamChatResponse, +} from "../../streamChatResponse.js"; import { posthogService } from "../../telemetry/posthogService.js"; +import { telemetryService } from "../../telemetry/telemetryService.js"; import { formatToolCall } from "../../tools/index.js"; import { ToolCallPreview } from "../../tools/types.js"; +import { formatError } from "../../util/formatError.js"; +import { logger } from "../../util/logger.js"; import { shouldAutoCompact } from "../../util/tokenizer.js"; import { DisplayMessage } from "../types.js"; @@ -53,8 +53,7 @@ export function useChat({ onShowOrgSelector, onShowConfigSelector, onShowModelSelector, - onLoginPrompt, - onReload, + onLoginPrompt: _onLoginPrompt, isRemoteMode = false, remoteUrl, }: UseChatProps) { @@ -68,17 +67,7 @@ export function useChat({ } // Synchronously initialize chat history to prevent race conditions - // This ensures system message is always loaded before handleUserMessage runs - let initialHistory: ChatCompletionMessageParam[] = []; - // Load previous session if resume flag is used - if (resume) { - const savedHistory = loadSession(); - if (savedHistory) { - initialHistory = savedHistory; - } - } - // If no session loaded or not resuming, we'll need to add system message // We can't make this async, so we'll handle it in the useEffect return resume ? loadSession() ?? [] : []; @@ -351,8 +340,7 @@ export function useChat({ if (!isRemoteMode && assistant) { const commandResult = await handleSlashCommands( message, - assistant, - onLoginPrompt + assistant ); if (commandResult) { if (commandResult.exit) { diff --git a/src/ui/hooks/useConfigSelector.ts b/src/ui/hooks/useConfigSelector.ts index e32e739c1..f392f98cd 100644 --- a/src/ui/hooks/useConfigSelector.ts +++ b/src/ui/hooks/useConfigSelector.ts @@ -1,9 +1,10 @@ import { exec } from "child_process"; import * as os from "os"; import * as path from "path"; + import { useState } from "react"; -import { loadAuthConfig, updateAssistantSlug } from "../../auth/workos.js"; -import { reloadService, services, SERVICE_NAMES } from "../../services/index.js"; + +import { services } from "../../services/index.js"; interface ConfigOption { id: string; @@ -25,7 +26,6 @@ interface UseConfigSelectorProps { const CONFIG_PATH = path.join(os.homedir(), ".continue", "config.yaml"); export function useConfigSelector({ - configPath, onMessage, onChatReset, }: UseConfigSelectorProps) { @@ -60,7 +60,7 @@ export function useConfigSelector({ content: `Opening ${url} in your browser to create a new assistant...`, messageType: "system" as const, }); - } catch (error) { + } catch { onMessage({ role: "system", content: `Please visit ${url} to create a new assistant`, diff --git a/src/ui/hooks/useMessageRenderer.tsx b/src/ui/hooks/useMessageRenderer.tsx index bb8e719d6..888b03cce 100644 --- a/src/ui/hooks/useMessageRenderer.tsx +++ b/src/ui/hooks/useMessageRenderer.tsx @@ -1,4 +1,5 @@ import React, { useCallback } from "react"; + import { MemoizedMessage } from "../components/MemoizedMessage.js"; import { DisplayMessage } from "../types.js"; diff --git a/src/ui/hooks/useModelSelector.ts b/src/ui/hooks/useModelSelector.ts index de8f3ae19..f4917f847 100644 --- a/src/ui/hooks/useModelSelector.ts +++ b/src/ui/hooks/useModelSelector.ts @@ -1,7 +1,8 @@ import { useState } from "react"; + +import { updateModelName } from "../../auth/workos.js"; import { services, serviceContainer, SERVICE_NAMES } from "../../services/index.js"; import { ModelServiceState } from "../../services/types.js"; -import { updateModelName } from "../../auth/workos.js"; interface ModelOption { id: string; diff --git a/src/ui/hooks/useOrganizationSelector.ts b/src/ui/hooks/useOrganizationSelector.ts index 6c8742048..73465b42a 100644 --- a/src/ui/hooks/useOrganizationSelector.ts +++ b/src/ui/hooks/useOrganizationSelector.ts @@ -1,6 +1,7 @@ import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml"; import { BaseLlmApi } from "@continuedev/openai-adapters"; import { useState } from "react"; + import { isAuthenticatedConfig, loadAuthConfig, diff --git a/src/ui/hooks/useTerminalSize.ts b/src/ui/hooks/useTerminalSize.ts index 41bcbcfd3..8b1f08d15 100644 --- a/src/ui/hooks/useTerminalSize.ts +++ b/src/ui/hooks/useTerminalSize.ts @@ -1,5 +1,5 @@ -import { useEffect, useState } from "react"; import { useStdout } from "ink"; +import { useEffect, useState } from "react"; const DEFAULT_ROWS = 24; const DEFAULT_COLS = 80; @@ -43,4 +43,4 @@ const useTerminalSize = (debounce = 100) => { return { ...dimensions, isResizing }; }; -export default useTerminalSize; +export { useTerminalSize }; diff --git a/src/ui/index.ts b/src/ui/index.ts index bebd1d509..ffba48ec2 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -1,11 +1,13 @@ import { render } from "ink"; import React from "react"; + import { PermissionMode } from "../permissions/types.js"; import { initializeServices } from "../services/index.js"; import { ServiceContainerProvider } from "../services/ServiceContainerContext.js"; -import TUIChat from "./TUIChat.js"; -export { default as MarkdownRenderer } from "./MarkdownRenderer.js"; +import { TUIChat } from "./TUIChat.js"; + +export { MarkdownRenderer } from "./MarkdownRenderer.js"; export async function startTUIChat( initialPrompt?: string, diff --git a/src/util/exponentialBackoff.test.ts b/src/util/exponentialBackoff.test.ts index 5b1b44f84..05fd9f30a 100644 --- a/src/util/exponentialBackoff.test.ts +++ b/src/util/exponentialBackoff.test.ts @@ -1,4 +1,5 @@ import { vi } from "vitest"; + import { ExponentialBackoffOptions } from "./exponentialBackoff.js"; // Since the functions are not exported, we need to recreate them for testing diff --git a/src/util/exponentialBackoff.ts b/src/util/exponentialBackoff.ts index 18c73abb8..7ab424bec 100644 --- a/src/util/exponentialBackoff.ts +++ b/src/util/exponentialBackoff.ts @@ -1,8 +1,10 @@ import { BaseLlmApi } from "@continuedev/openai-adapters"; import type { ChatCompletionCreateParamsStreaming } from "openai/resources.mjs"; + import { error, warn } from "../logging.js"; + import { formatError } from "./formatError.js"; -import logger from "./logger.js"; +import { logger } from "./logger.js"; export interface ExponentialBackoffOptions { /** Maximum number of retry attempts */ @@ -157,7 +159,7 @@ export async function* withExponentialBackoff( let lastError: any; for (let attempt = 0; attempt <= opts.maxRetries; attempt++) { - let yieldedValues: T[] = []; + const yieldedValues: T[] = []; try { // Check if we should abort before creating the generator diff --git a/src/util/inputHistory.ts b/src/util/inputHistory.ts index 1ec172adc..f6c528273 100644 --- a/src/util/inputHistory.ts +++ b/src/util/inputHistory.ts @@ -1,6 +1,6 @@ import fs from 'fs'; -import path from 'path'; import os from 'os'; +import path from 'path'; const HISTORY_FILE = path.join(os.homedir(), '.continue', 'input_history.json'); const MAX_HISTORY_SIZE = 1000; @@ -84,7 +84,7 @@ export class InputHistory { return this.history[this.currentIndex]?.text || null; } - navigateDown(currentInput: string): string | null { + navigateDown(): string | null { if (this.currentIndex === -1) return null; if (this.currentIndex > 0) { diff --git a/src/util/logger.ts b/src/util/logger.ts index 1c3c180d7..76df80408 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -1,9 +1,10 @@ -import winston from 'winston'; -import path from 'path'; -import os from 'os'; -import fs from 'fs'; import crypto from 'crypto'; +import fs from 'fs'; +import os from 'os'; +import path from 'path'; + import chalk from 'chalk'; +import winston from 'winston'; const { combine, timestamp, printf, errors } = winston.format; @@ -82,7 +83,7 @@ const logFormat = printf(({ level, message, timestamp, stack, ...metadata }) => let isHeadlessMode = false; // Create the logger instance -const logger = winston.createLogger({ +const winstonLogger = winston.createLogger({ level: 'info', // Default level format: combine( errors({ stack: true }), @@ -101,7 +102,7 @@ const logger = winston.createLogger({ // Function to set log level export function setLogLevel(level: string) { - logger.level = level; + winstonLogger.level = level; } // Function to configure headless mode @@ -109,18 +110,18 @@ export function configureHeadlessMode(headless: boolean) { isHeadlessMode = headless; } -// Export logger methods -export default { - debug: (message: string, meta?: any) => logger.debug(message, meta), - info: (message: string, meta?: any) => logger.info(message, meta), - warn: (message: string, meta?: any) => logger.warn(message, meta), +// Export logger methods +export const logger = { + debug: (message: string, meta?: any) => winstonLogger.debug(message, meta), + info: (message: string, meta?: any) => winstonLogger.info(message, meta), + warn: (message: string, meta?: any) => winstonLogger.warn(message, meta), error: (message: string, error?: Error | any, meta?: any) => { if (error instanceof Error) { - logger.error(message, { ...meta, error: error.message, stack: error.stack }); + winstonLogger.error(message, { ...meta, error: error.message, stack: error.stack }); } else if (error) { - logger.error(message, { ...meta, error }); + winstonLogger.error(message, { ...meta, error }); } else { - logger.error(message, meta); + winstonLogger.error(message, meta); } // In headless mode, also output to stderr diff --git a/src/util/stdin.ts b/src/util/stdin.ts index acc6a11de..b1de966bf 100644 --- a/src/util/stdin.ts +++ b/src/util/stdin.ts @@ -27,7 +27,7 @@ export function readStdinSync(): string | null { // If isTTY is explicitly false, try to read stdin const stdinData = fs.readFileSync(0, "utf8"); return stdinData.trim(); - } catch (error) { + } catch { return null; } } \ No newline at end of file diff --git a/src/util/tokenizer.ts b/src/util/tokenizer.ts index d3b3aea64..a2ff9dfd6 100644 --- a/src/util/tokenizer.ts +++ b/src/util/tokenizer.ts @@ -1,7 +1,8 @@ import { ModelConfig } from "@continuedev/config-yaml"; import { encode } from "gpt-tokenizer"; import { ChatCompletionMessageParam } from "openai/resources.mjs"; -import logger from "./logger.js"; + +import { logger } from "./logger.js"; // Global auto-compact threshold (80% of context limit) // This is intentionally not configurable to ensure consistent behavior diff --git a/src/util/withExponentialBackoff.test.ts b/src/util/withExponentialBackoff.test.ts index 2561dca7d..242a408af 100644 --- a/src/util/withExponentialBackoff.test.ts +++ b/src/util/withExponentialBackoff.test.ts @@ -1,5 +1,7 @@ import { vi } from "vitest"; + import { createMinimalTestContext } from "../test-helpers/ui-test-context.js"; + import { withExponentialBackoff } from "./exponentialBackoff.js"; describe("withExponentialBackoff", () => { diff --git a/src/util/yamlConfigUpdater.test.ts b/src/util/yamlConfigUpdater.test.ts index 838d5d600..d16eda873 100644 --- a/src/util/yamlConfigUpdater.test.ts +++ b/src/util/yamlConfigUpdater.test.ts @@ -1,6 +1,7 @@ -import { updateAnthropicModelInYaml } from './yamlConfigUpdater.js'; import { parse } from 'yaml'; +import { updateAnthropicModelInYaml } from './yamlConfigUpdater.js'; + describe('updateAnthropicModelInYaml', () => { const testApiKey = 'sk-ant-test123456789'; diff --git a/src/util/yamlConfigUpdater.ts b/src/util/yamlConfigUpdater.ts index 059bdf8f7..ee63bb2ed 100644 --- a/src/util/yamlConfigUpdater.ts +++ b/src/util/yamlConfigUpdater.ts @@ -69,7 +69,7 @@ export function updateAnthropicModelInYaml(yamlContent: string, apiKey: string): doc.set('models', config.models); return doc.toString(); - } catch (error) { + } catch { // If parsing fails completely, create a new config const defaultConfig: ConfigStructure = { name: "Local Config", diff --git a/src/version.ts b/src/version.ts index 9d7a2282a..bf0906fc4 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,7 +1,8 @@ import { readFileSync } from "fs"; import { dirname, join } from "path"; import { fileURLToPath } from "url"; -import logger from "./util/logger.js"; + +import { logger } from "./util/logger.js"; export function getVersion(): string { try { @@ -10,7 +11,7 @@ export function getVersion(): string { const packageJsonPath = join(__dirname, "../package.json"); const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8")); return packageJson.version; - } catch (error) { + } catch { console.warn("Warning: Could not read version from package.json"); return "unknown"; } diff --git a/tsconfig.json b/tsconfig.json index c017885ba..1f00342ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,5 +21,5 @@ "inlineSources": true, "jsx": "react" }, - "include": ["src/**/*"] + "include": ["src/**/*", "vitest.setup.ts"] } diff --git a/vitest.setup.ts b/vitest.setup.ts index cc69749ee..86715ac60 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -1,4 +1,5 @@ import { vi } from "vitest"; + import { resetConsoleOverrides } from "./src/util/consoleOverride.js"; // Disable telemetry for tests @@ -17,7 +18,7 @@ afterEach(() => { // Reset console overrides to ensure clean state for each test try { resetConsoleOverrides(); - } catch (e) { + } catch { // Ignore errors when resetting console } }); \ No newline at end of file