diff --git a/.eslintrc.json b/.eslintrc.json index c5121350..ed52ae20 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ "multiline-comment-style": 0, "@typescript-eslint/no-var-requires": 0, "no-console": 0, - "no-new": 0 + "no-new": 0, + "arrow-body-style": 0 } } diff --git a/CHANGELOG.md b/CHANGELOG.md index b105e1c7..1d908491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,24 @@ # Changelog +## 0.6.0 + +### enhancement + +- add getImportDeclarationTree API. + +### Chores + +- \#210 `express` to v4.8.12 + ## 0.5.2 ### Chores - \#210 update dependency - - `commander` to v9.4.1 - - `globby` to v13.1.2 - - `vue-eslint-parser` to v9.1.0 - - `ws` to v8.11.0 + - `commander` to v9.4.1 + - `globby` to v13.1.2 + - `vue-eslint-parser` to v9.1.0 + - `ws` to v8.11.0 ## 0.5.1 diff --git a/README.md b/README.md index 0092dec8..d928db1b 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,22 @@ npm exec vca -- --dir . * `-o` or `--out` : output directory. JSON file will output here. * `-p` or `--port` : select a port number for the local server. -## License +## API -MIT License. +vue-component-analyzer is also available as an API from v0.6.0. + +This API is intended to be used for testing. + +```javascript +import {getImportDeclarationTree} from '@tkskto/vue-component-analyzer'; + +const jsonOfTree = getImportDeclarationTree('entryFile.vue'); +``` + +See [index.d.ts](./types/index.d.ts) for details of types. +(`lastModifiedTime` can be noise. If you don't need it remove explicitly.) +## License + +MIT License. diff --git a/bin/analyze.js b/bin/analyze.js index 872f2b00..382ba4f9 100755 --- a/bin/analyze.js +++ b/bin/analyze.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -import {vueComponentAnalyze} from '../dist/index.mjs'; +import {analyzeFromCLI} from '../dist/index.mjs'; /** * Catch and report unexpected error. @@ -14,12 +14,12 @@ function onCatchError(error) { process.exit(1); } -(function main() { +(async function main() { process.on('uncaughtException', onCatchError); process.on('unhandledRejection', onCatchError); try { - vueComponentAnalyze(); + await analyzeFromCLI(); } catch (err) { onCatchError(err); } diff --git a/package-lock.json b/package-lock.json index 25670915..34276d38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@tkskto/vue-component-analyzer", - "version": "0.5.1", + "version": "0.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tkskto/vue-component-analyzer", - "version": "0.5.1", + "version": "0.5.2", "license": "MIT", "dependencies": { "commander": "9.4.1", "ejs": "3.1.8", - "express": "4.18.1", + "express": "4.18.2", "globby": "13.1.2", "mkdirp": "1.0.4", "opener": "1.5.2", @@ -23,27 +23,27 @@ }, "devDependencies": { "@mitsue/eslint-config": "4.1.0", - "@rollup/plugin-commonjs": "23.0.2", - "@rollup/plugin-json": "4.1.0", + "@rollup/plugin-commonjs": "23.0.3", + "@rollup/plugin-json": "5.0.2", "@rollup/plugin-node-resolve": "15.0.1", "@rollup/plugin-terser": "0.1.0", - "@rollup/plugin-typescript": "8.3.2", + "@rollup/plugin-typescript": "10.0.1", "@types/ejs": "3.1.1", - "@types/express": "4.17.13", + "@types/express": "4.17.14", "@types/jest": "29.2.3", "@types/mkdirp": "1.0.2", - "@types/node": "16.11.38", + "@types/node": "18.11.10", "@types/opener": "1.4.0", "@types/ws": "8.5.3", - "@typescript-eslint/eslint-plugin": "5.44.0", - "@typescript-eslint/parser": "5.44.0", - "eslint": "8.28.0", + "@typescript-eslint/eslint-plugin": "5.45.0", + "@typescript-eslint/parser": "5.45.0", + "eslint": "8.29.0", "husky": "8.0.2", "jest": "29.3.1", - "lint-staged": "13.0.3", + "lint-staged": "13.0.4", "nyc": "15.1.0", - "rollup": "2.79.1", - "rollup-plugin-license": "2.8.0", + "rollup": "3.5.1", + "rollup-plugin-license": "3.0.1", "ts-jest": "29.0.3", "ts-node": "10.9.1", "typescript": "4.9.3" @@ -1247,9 +1247,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "23.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.2.tgz", - "integrity": "sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg==", + "version": "23.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.3.tgz", + "integrity": "sha512-31HxrT5emGfTyIfAs1lDQHj6EfYxTXcwtX5pIIhq+B/xZBNIqQ179d/CkYxlpYmFCxT78AeU4M8aL8Iv/IBxFA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -1271,34 +1271,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true - }, "node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1308,12 +1280,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/@rollup/plugin-commonjs/node_modules/glob": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", @@ -1346,12 +1312,23 @@ } }, "node_modules/@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-5.0.2.tgz", + "integrity": "sha512-D1CoOT2wPvadWLhVcmpkDnesTzjhNIQRWLsc3fA49IFOP2Y84cFOOJ+nKGYedvXHKUsPeq07HR4hXpBBr+CHlA==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.0.8" + "@rollup/pluginutils": "^5.0.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-node-resolve": { @@ -1379,40 +1356,6 @@ } } }, - "node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve/node_modules/@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true - }, - "node_modules/@rollup/plugin-node-resolve/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/@rollup/plugin-terser": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", @@ -1434,35 +1377,51 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz", + "integrity": "sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.14.0", + "rollup": "^2.14.0||^3.0.0", "tslib": "*", "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } } }, "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", "dev": true, "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@sinclair/typebox": { @@ -1586,15 +1545,15 @@ "dev": true }, "node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", "dev": true }, "node_modules/@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", "dev": true, "dependencies": { "@types/body-parser": "*", @@ -1679,9 +1638,9 @@ } }, "node_modules/@types/node": { - "version": "16.11.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.38.tgz", - "integrity": "sha512-hjO/0K140An3GWDw2HJfq7gko3wWeznbjXgg+rzPdVzhe198hp4x2i1dgveAOEiFKd8sOilAxzoSJiVv5P/CUg==", + "version": "18.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", + "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==", "dev": true }, "node_modules/@types/opener": { @@ -1764,14 +1723,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", - "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz", + "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/type-utils": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/type-utils": "5.45.0", + "@typescript-eslint/utils": "5.45.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -1797,14 +1756,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", - "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz", + "integrity": "sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.0", "debug": "^4.3.4" }, "engines": { @@ -1824,13 +1783,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz", + "integrity": "sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/visitor-keys": "5.45.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1841,13 +1800,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", - "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz", + "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/utils": "5.45.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1868,9 +1827,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz", + "integrity": "sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1881,13 +1840,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz", + "integrity": "sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/visitor-keys": "5.45.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1937,16 +1896,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", - "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz", + "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -1963,12 +1922,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz", + "integrity": "sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.45.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2313,9 +2272,9 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -2325,7 +2284,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -3043,9 +3002,9 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dependencies": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -3335,9 +3294,9 @@ } }, "node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, "node_modules/esutils": { @@ -3405,13 +3364,13 @@ } }, "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -3430,7 +3389,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -3705,13 +3664,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5213,9 +5172,9 @@ } }, "node_modules/lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", "dev": true, "engines": { "node": ">=10" @@ -5228,24 +5187,24 @@ "dev": true }, "node_modules/lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", + "version": "13.0.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.4.tgz", + "integrity": "sha512-HxlHCXoYRsq9QCby5wFozmZW00hMs/9e3l+/dz6Qr8Kle4UH0kJTdABAbqhzG+3pcG6QjL9kz7NgGBfph+a5dw==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", + "colorette": "^2.0.19", + "commander": "^9.4.1", "debug": "^4.3.4", "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", + "lilconfig": "2.0.6", + "listr2": "^5.0.5", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-inspect": "^1.12.2", "pidtree": "^0.6.0", "string-argv": "^0.3.1", - "yaml": "^2.1.1" + "yaml": "^2.1.3" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -5270,9 +5229,9 @@ } }, "node_modules/lint-staged/node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { "node": ">=12" @@ -5462,22 +5421,22 @@ } }, "node_modules/listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-5.0.5.tgz", + "integrity": "sha512-DpBel6fczu7oQKTXMekeprc0o3XDgGMkD7JNYyX+X0xbwK+xgrx9dcyKoXKqpLSUvAWfmoePS7kavniOcq3r4w==", "dev": true, "dependencies": { "cli-truncate": "^2.1.0", - "colorette": "^2.0.16", + "colorette": "^2.0.19", "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", - "rxjs": "^7.5.5", + "rxjs": "^7.5.6", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=12" + "node": "^14.13.1 || >=16.0.0" }, "peerDependencies": { "enquirer": ">= 2.3.0 < 3" @@ -6245,9 +6204,9 @@ } }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -6438,24 +6397,25 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.5.1.tgz", + "integrity": "sha512-hdQWTvPeiAbM6SUkxV70HdGUVxsgsc+CLy5fuh4KdgUBJ0SowXiix8gANgXoG3wEuLwfoJhCT2V+WwxfWq9Ikw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/rollup-plugin-license": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.8.0.tgz", - "integrity": "sha512-P+CM6tlgahnpnOFKeirABCcs3Eez4AQsm2fC7rvVR3aMIWd/KgSNAImmcfGS+Pmd0dGFmjE1tYgflnTINxNpIQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.0.1.tgz", + "integrity": "sha512-/lec6Y94Y3wMfTDeYTO/jSXII0GQ/XkDZCiqkMKxyU5D5nGPaxr/2JNYvAgYsoCYuOLGOanKDPjCCQiTT96p7A==", "dev": true, "dependencies": { "commenting": "~1.1.0", @@ -6469,10 +6429,10 @@ "spdx-satisfies": "~5.0.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.0.0 || ^2.0.0" + "rollup": "^1.0.0 || ^2.0.0 || ^3.0.0" } }, "node_modules/run-parallel": { @@ -6498,18 +6458,18 @@ } }, "node_modules/rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "dependencies": { "tslib": "^2.1.0" } }, "node_modules/rxjs/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "dev": true }, "node_modules/safe-buffer": { @@ -7460,9 +7420,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true, "engines": { "node": ">= 14" @@ -8459,9 +8419,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "23.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.2.tgz", - "integrity": "sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg==", + "version": "23.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.3.tgz", + "integrity": "sha512-31HxrT5emGfTyIfAs1lDQHj6EfYxTXcwtX5pIIhq+B/xZBNIqQ179d/CkYxlpYmFCxT78AeU4M8aL8Iv/IBxFA==", "dev": true, "requires": { "@rollup/pluginutils": "^5.0.1", @@ -8472,23 +8432,6 @@ "magic-string": "^0.26.4" }, "dependencies": { - "@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true - }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -8498,12 +8441,6 @@ "balanced-match": "^1.0.0" } }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "glob": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", @@ -8529,12 +8466,12 @@ } }, "@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-5.0.2.tgz", + "integrity": "sha512-D1CoOT2wPvadWLhVcmpkDnesTzjhNIQRWLsc3fA49IFOP2Y84cFOOJ+nKGYedvXHKUsPeq07HR4hXpBBr+CHlA==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.0.8" + "@rollup/pluginutils": "^5.0.1" } }, "@rollup/plugin-node-resolve": { @@ -8549,31 +8486,6 @@ "is-builtin-module": "^3.2.0", "is-module": "^1.0.0", "resolve": "^1.22.1" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@types/estree": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - } } }, "@rollup/plugin-terser": { @@ -8586,24 +8498,24 @@ } }, "@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz", + "integrity": "sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" } }, "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", "dev": true, "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" } }, "@sinclair/typebox": { @@ -8727,15 +8639,15 @@ "dev": true }, "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", "dev": true }, "@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", "dev": true, "requires": { "@types/body-parser": "*", @@ -8820,9 +8732,9 @@ } }, "@types/node": { - "version": "16.11.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.38.tgz", - "integrity": "sha512-hjO/0K140An3GWDw2HJfq7gko3wWeznbjXgg+rzPdVzhe198hp4x2i1dgveAOEiFKd8sOilAxzoSJiVv5P/CUg==", + "version": "18.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", + "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==", "dev": true }, "@types/opener": { @@ -8905,14 +8817,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", - "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.0.tgz", + "integrity": "sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/type-utils": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/type-utils": "5.45.0", + "@typescript-eslint/utils": "5.45.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -8922,53 +8834,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", - "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.45.0.tgz", + "integrity": "sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz", + "integrity": "sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/visitor-keys": "5.45.0" } }, "@typescript-eslint/type-utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", - "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.45.0.tgz", + "integrity": "sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/typescript-estree": "5.45.0", + "@typescript-eslint/utils": "5.45.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.45.0.tgz", + "integrity": "sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz", + "integrity": "sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/visitor-keys": "5.45.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -8999,28 +8911,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", - "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.45.0.tgz", + "integrity": "sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.45.0", + "@typescript-eslint/types": "5.45.0", + "@typescript-eslint/typescript-estree": "5.45.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.45.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz", + "integrity": "sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.45.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -9283,9 +9195,9 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -9295,7 +9207,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -9841,9 +9753,9 @@ "dev": true }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "requires": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -10044,9 +9956,9 @@ "dev": true }, "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, "esutils": { @@ -10096,13 +10008,13 @@ } }, "express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -10121,7 +10033,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -10341,13 +10253,13 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" } }, "get-package-type": { @@ -11464,9 +11376,9 @@ } }, "lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", "dev": true }, "lines-and-columns": { @@ -11476,24 +11388,24 @@ "dev": true }, "lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", + "version": "13.0.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.4.tgz", + "integrity": "sha512-HxlHCXoYRsq9QCby5wFozmZW00hMs/9e3l+/dz6Qr8Kle4UH0kJTdABAbqhzG+3pcG6QjL9kz7NgGBfph+a5dw==", "dev": true, "requires": { "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", + "colorette": "^2.0.19", + "commander": "^9.4.1", "debug": "^4.3.4", "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", + "lilconfig": "2.0.6", + "listr2": "^5.0.5", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-inspect": "^1.12.2", "pidtree": "^0.6.0", "string-argv": "^0.3.1", - "yaml": "^2.1.1" + "yaml": "^2.1.3" }, "dependencies": { "ansi-regex": { @@ -11503,9 +11415,9 @@ "dev": true }, "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true }, "cli-truncate": { @@ -11622,17 +11534,17 @@ } }, "listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-5.0.5.tgz", + "integrity": "sha512-DpBel6fczu7oQKTXMekeprc0o3XDgGMkD7JNYyX+X0xbwK+xgrx9dcyKoXKqpLSUvAWfmoePS7kavniOcq3r4w==", "dev": true, "requires": { "cli-truncate": "^2.1.0", - "colorette": "^2.0.16", + "colorette": "^2.0.19", "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", - "rxjs": "^7.5.5", + "rxjs": "^7.5.6", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, @@ -12207,9 +12119,9 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "requires": { "side-channel": "^1.0.4" } @@ -12336,18 +12248,18 @@ } }, "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.5.1.tgz", + "integrity": "sha512-hdQWTvPeiAbM6SUkxV70HdGUVxsgsc+CLy5fuh4KdgUBJ0SowXiix8gANgXoG3wEuLwfoJhCT2V+WwxfWq9Ikw==", "dev": true, "requires": { "fsevents": "~2.3.2" } }, "rollup-plugin-license": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.8.0.tgz", - "integrity": "sha512-P+CM6tlgahnpnOFKeirABCcs3Eez4AQsm2fC7rvVR3aMIWd/KgSNAImmcfGS+Pmd0dGFmjE1tYgflnTINxNpIQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-3.0.1.tgz", + "integrity": "sha512-/lec6Y94Y3wMfTDeYTO/jSXII0GQ/XkDZCiqkMKxyU5D5nGPaxr/2JNYvAgYsoCYuOLGOanKDPjCCQiTT96p7A==", "dev": true, "requires": { "commenting": "~1.1.0", @@ -12370,18 +12282,18 @@ } }, "rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "requires": { "tslib": "^2.1.0" }, "dependencies": { "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "dev": true } } @@ -13115,9 +13027,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 9d60d4f7..0276f2d0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,10 @@ { "name": "@tkskto/vue-component-analyzer", - "version": "0.5.2", + "version": "0.6.0", "description": "Analyze dependency tree for Vue.js SFC (Single File Component)", "type": "module", + "main": "./dist/index.mjs", + "types": "./types/index.d.ts", "bin": { "vca": "bin/analyze.js" }, @@ -46,7 +48,7 @@ "dependencies": { "commander": "9.4.1", "ejs": "3.1.8", - "express": "4.18.1", + "express": "4.18.2", "globby": "13.1.2", "mkdirp": "1.0.4", "opener": "1.5.2", @@ -55,27 +57,27 @@ }, "devDependencies": { "@mitsue/eslint-config": "4.1.0", - "@rollup/plugin-commonjs": "23.0.2", - "@rollup/plugin-json": "4.1.0", + "@rollup/plugin-commonjs": "23.0.3", + "@rollup/plugin-json": "5.0.2", "@rollup/plugin-node-resolve": "15.0.1", - "@rollup/plugin-typescript": "8.3.2", + "@rollup/plugin-typescript": "10.0.1", "@rollup/plugin-terser": "0.1.0", "@types/ejs": "3.1.1", - "@types/express": "4.17.13", + "@types/express": "4.17.14", "@types/jest": "29.2.3", "@types/mkdirp": "1.0.2", - "@types/node": "16.11.38", + "@types/node": "18.11.10", "@types/opener": "1.4.0", "@types/ws": "8.5.3", - "@typescript-eslint/eslint-plugin": "5.44.0", - "@typescript-eslint/parser": "5.44.0", - "eslint": "8.28.0", + "@typescript-eslint/eslint-plugin": "5.45.0", + "@typescript-eslint/parser": "5.45.0", + "eslint": "8.29.0", "husky": "8.0.2", "jest": "29.3.1", - "lint-staged": "13.0.3", + "lint-staged": "13.0.4", "nyc": "15.1.0", - "rollup": "2.79.1", - "rollup-plugin-license": "2.8.0", + "rollup": "3.5.1", + "rollup-plugin-license": "3.0.1", "ts-jest": "29.0.3", "ts-node": "10.9.1", "typescript": "4.9.3" diff --git a/rollup.config.js b/rollup.config.mjs similarity index 90% rename from rollup.config.js rename to rollup.config.mjs index 923c7175..f86fa6b2 100644 --- a/rollup.config.js +++ b/rollup.config.mjs @@ -3,7 +3,12 @@ import commonjs from '@rollup/plugin-commonjs'; import {nodeResolve} from '@rollup/plugin-node-resolve'; import json from '@rollup/plugin-json'; import terser from '@rollup/plugin-terser'; -import pkg from './package.json'; +import { readFile } from 'fs/promises'; +const pkg = JSON.parse( + await readFile( + new URL('./package.json', import.meta.url) + ) +); let dependencies = ''; diff --git a/src/client/Seed.ts b/src/client/Seed.ts index 150b20b4..3c490616 100644 --- a/src/client/Seed.ts +++ b/src/client/Seed.ts @@ -1,7 +1,7 @@ /** * Data Type of one of Vue File. */ -import FileReport = vueComponentAnalyzer.FileReport; +import {FileReport} from '../../types'; import {Model} from './model'; export class Seed { diff --git a/src/client/model.ts b/src/client/model.ts index 6f5ddad0..690d22aa 100644 --- a/src/client/model.ts +++ b/src/client/model.ts @@ -1,5 +1,5 @@ +import {AnalyzeReport} from '../../types'; import {CustomEventDispatcher} from './eventDispatcher'; -import AnalyzeReport = vueComponentAnalyzer.AnalyzeReport; export type INFORMATION_TYPE = 'settings' | 'props' | 'fileSize' | 'lastUpdated' | 'referenceCount'; export type VIEW_TYPE = 'GRAPH' | 'TEXT'; @@ -38,11 +38,11 @@ export class Model extends CustomEventDispatcher { this._todayTime = this._today.getTime(); } - get data(): vueComponentAnalyzer.AnalyzeReport { + get data(): AnalyzeReport { return this._data; } - set data(value: vueComponentAnalyzer.AnalyzeReport) { + set data(value: AnalyzeReport) { this._data = value; this.dispatchEvent(Model.EVENT.DATA_UPDATE); } diff --git a/src/client/renderer.ts b/src/client/renderer.ts index c2954e3d..a6433caa 100644 --- a/src/client/renderer.ts +++ b/src/client/renderer.ts @@ -1,8 +1,8 @@ // for execute from browser. +import {FileReport} from '../../types'; import {Seed} from './Seed'; import {Model} from './model'; -import FileReport = vueComponentAnalyzer.FileReport; export class Renderer { private readonly _app: HTMLElement | null; diff --git a/src/server/Analyzer.ts b/src/server/Analyzer.ts index 7ef45df0..3c6cda2a 100644 --- a/src/server/Analyzer.ts +++ b/src/server/Analyzer.ts @@ -1,88 +1,74 @@ -import FileReport = vueComponentAnalyzer.FileReport; +import {FileReport} from '../../types'; import {resolveFile} from './utils'; import {readFileSync, statSync} from 'fs'; import {resolve, extname} from 'path'; -import {FileCounter} from './FileCounter'; +import {fileCounter} from './FileCounter'; import {VueComponent} from './VueComponent'; import {model} from './Model'; const cwd = process.cwd(); -class Analyzer { - private readonly _counter: FileCounter; +/** + * get import tree. + * @param {string} fileName entry file name + * @param {string[]} parents entries of file name + * @param {boolean} isTest whether it through the test. if this doesn't exist lastModifiedTime will always fail on the GitHub Actions. + */ +export const getImportDeclarationTree = (fileName: string, parents: string[] = [], isTest = false): FileReport => { + const filename = resolve(cwd, fileName); + // get filename without current working directory. + const shortFilename = filename.replace(cwd, ''); + // get file statistic + const stat = statSync(filename); + // make a filename list for detecting circular dependency. + const ancestorList: string[] = parents.concat(); - constructor() { - this._counter = new FileCounter(); - } - - /** - * get import tree. - * @param {string} fileName entry file name - * @param {string[]} parents entries of file name - * @param {boolean} isTest whether it through the test. if this doesn't exist lastModifiedTime will always fail on the GitHub Actions. - */ - public getImportDeclarationTree = (fileName: string, parents: string[], isTest = false): FileReport => { - const filename = resolve(cwd, fileName); - // get filename without current working directory. - const shortFilename = filename.replace(cwd, ''); - // get file statistic - const stat = statSync(filename); - // make a filename list for detecting circular dependency. - const ancestorList: string[] = parents.concat(); - - ancestorList.push(fileName); + ancestorList.push(fileName); - if (!model.isSilentMode) { - console.log(`read ${filename}`); - } + if (!model.isSilentMode) { + console.log(`read ${filename}`); + } - // increment count of this file. - this._counter.add(shortFilename); + // increment count of this file. + fileCounter.add(shortFilename); - // if this file is not Vue Component file, return only filename and stat. - if (extname(filename) === '' || extname(filename) !== '.vue') { - return { - name: shortFilename, - props: '', - size: stat.size, - lastModifiedTime: isTest ? 0 : Number(stat.mtimeMs.toFixed(0)), - children: [], - }; - } + // if this file is not Vue Component file, return only filename and stat. + if (extname(filename) === '' || extname(filename) !== '.vue') { + return { + name: shortFilename, + props: '', + size: stat.size, + lastModifiedTime: isTest ? 0 : Number(stat.mtimeMs.toFixed(0)), + children: [], + }; + } - const contents = readFileSync(filename, 'utf-8'); - const component = new VueComponent(shortFilename, contents, stat); + const contents = readFileSync(filename, 'utf-8'); + const component = new VueComponent(shortFilename, contents, stat); - try { - // if we get, read imported file recursive. - for (let i = 0, len = component.importDeclaration.length; i < len; i++) { - // TODO: support other types? (value might be RegExp, or number, boolean.) - const source = String(component.importDeclaration[i].source.value); + try { + // if we get, read imported file recursive. + for (let i = 0, len = component.importDeclaration.length; i < len; i++) { + // TODO: support other types? (value might be RegExp, or number, boolean.) + const source = String(component.importDeclaration[i].source.value); - if (source) { - const nextFilename = resolveFile(source, filename); + if (source) { + const nextFilename = resolveFile(source, filename); - if (nextFilename) { - if (parents.includes(nextFilename)) { - console.warn(`Circular dependency detected between ${nextFilename} and ${filename}`); - } else { - component.addChildReport(this.getImportDeclarationTree(nextFilename, ancestorList, isTest)); - } + if (nextFilename) { + if (parents.includes(nextFilename)) { + console.warn(`Circular dependency detected between ${nextFilename} and ${filename}`); + } else { + component.addChildReport(getImportDeclarationTree(nextFilename, ancestorList, isTest)); } } } - } catch (err) { - console.error(`Something went wrong with reading ${filename}`); - if (err instanceof Error) { - console.error(err.message); - } } - - return component.getFileReport(isTest); - }; - - get counter(): FileCounter { - return this._counter; + } catch (err) { + console.error(`Something went wrong with reading ${filename}`); + if (err instanceof Error) { + console.error(err.message); + } } -} -export const analyzer = new Analyzer(); + return component.getFileReport(isTest); +}; diff --git a/src/server/FileCounter.ts b/src/server/FileCounter.ts index f2dee8e4..9f43508c 100644 --- a/src/server/FileCounter.ts +++ b/src/server/FileCounter.ts @@ -13,7 +13,13 @@ export class FileCounter { } } - public get count(): {[key: string]: number} { + public clear(): void { + this._count = {}; + } + + public get result(): {[key: string]: number} { return this._count; } } + +export const fileCounter = new FileCounter(); diff --git a/src/server/VueComponent.ts b/src/server/VueComponent.ts index f0092c9c..23937505 100644 --- a/src/server/VueComponent.ts +++ b/src/server/VueComponent.ts @@ -1,8 +1,8 @@ +import {FileReport} from '../../types'; import {parse} from 'vue-eslint-parser'; import {ESLintImportDeclaration, ESLintProgram} from 'vue-eslint-parser/ast/nodes'; import {Token} from 'vue-eslint-parser/ast/tokens'; import {getImportDeclaration, getDeclarationSyntax} from './utils'; -import FileReport = vueComponentAnalyzer.FileReport; import {Stats} from 'fs'; const parserOption = { diff --git a/src/server/index.ts b/src/server/index.ts index 58cd35b2..21d3377b 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,10 +1,11 @@ // for execute from npm scripts or commandline. - +import {AnalyzeReport} from '../../types'; import {FORMAT} from './Constant'; import {model} from './Model'; import {getOptions} from './Commander'; -import {analyzer} from './Analyzer'; +import {getImportDeclarationTree} from './Analyzer'; import {startServer} from './server'; +import {fileCounter} from './FileCounter'; import {writeFileSync} from 'fs'; import {globby} from 'globby'; import path from 'path'; @@ -23,61 +24,71 @@ function writeFileExtra(filename: string, data: string) { }); } -export const vueComponentAnalyze = async () => { - try { - // get commander options. - const argv = getOptions(process.argv); - - model.resourceRoot = argv.dir; - model.format = argv.format; - model.outDirectory = argv.out; - model.port = argv.port; - model.isSilentMode = argv.silent || false; +const analyze = (entries: string[]): Promise => { + return new Promise((resolve, reject) => { + try { + if (entries.length === 0) { + console.log('There is no entry file.'); + } - if (argv.format !== FORMAT.BROWSER && argv.format !== FORMAT.JSON && argv.format !== FORMAT.BOTH) { - console.error(`not support ${argv.format} format.`); - } + const entriesData = []; - console.log('start analyzing.'); + for (let i = 0, len = entries.length; i < len; i++) { + const entryFile = entries[i]; + const children = getImportDeclarationTree(entryFile, []); - // get vue entries from dir - const entries = await globby([argv.dir, '!**/node_modules/**'], { - expandDirectories: { - extensions: ['vue'], - }, - }); + entriesData.push(children); + } - if (entries.length === 0) { - console.log('There is no entry file.'); + resolve({ + entries: entriesData, + count: fileCounter.result, + }); + } catch (err) { + reject(err); } + }); +}; - const entriesData = []; +export const analyzeFromCLI = async (): Promise => { + // get commander options. + const argv = getOptions(process.argv); - for (let i = 0, len = entries.length; i < len; i++) { - const entryFile = entries[i]; - const children = analyzer.getImportDeclarationTree(entryFile, []); + model.resourceRoot = argv.dir; + model.format = argv.format; + model.outDirectory = argv.out; + model.port = argv.port; + model.isSilentMode = argv.silent || false; - entriesData.push(children); - } + if (argv.format !== FORMAT.BROWSER && argv.format !== FORMAT.JSON && argv.format !== FORMAT.BOTH) { + console.error(`not support ${argv.format} format.`); + } - const result = { - entries: entriesData, - count: analyzer.counter.count, - }; - - if (argv.format === FORMAT.BOTH) { - startServer(argv.port, result); - writeFileExtra(path.resolve(process.cwd(), `${argv.out}/result.json`), JSON.stringify(result, null, 4)); - } else if (argv.format === FORMAT.BROWSER) { - startServer(argv.port, result); - } else if (argv.format === FORMAT.JSON) { - writeFileExtra(path.resolve(process.cwd(), `${argv.out}/result.json`), JSON.stringify(result, null, 4)); - } + console.log('start analyzing.'); - console.log('finished analyzing.'); - } catch (err) { - if (err instanceof Error) { - console.error(err.message); - } + // get vue entries from dir + const entries = await globby([argv.dir, '!**/node_modules/**'], { + expandDirectories: { + extensions: ['vue'], + }, + }); + + const result = await analyze(entries); + + if (argv.format === FORMAT.BOTH) { + startServer(argv.port, result); + writeFileExtra(path.resolve(process.cwd(), `${argv.out}/result.json`), JSON.stringify(result, null, 4)); + } else if (argv.format === FORMAT.BROWSER) { + startServer(argv.port, result); + } else if (argv.format === FORMAT.JSON) { + writeFileExtra(path.resolve(process.cwd(), `${argv.out}/result.json`), JSON.stringify(result, null, 4)); } + + console.log('finished analyzing.'); +}; + +export { + analyze, + getImportDeclarationTree, + fileCounter, }; diff --git a/src/server/server.ts b/src/server/server.ts index 1fe46323..e8e32e53 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -1,6 +1,6 @@ // for execute from npm scripts or commandline. -import AnalyzeReport = vueComponentAnalyzer.AnalyzeReport; +import {AnalyzeReport} from '../../types'; import express from 'express'; import {WebSocketServer} from 'ws'; import path from 'path'; diff --git a/test/specs/counter.test.ts b/test/specs/counter.test.ts index 6e970782..16037e3e 100644 --- a/test/specs/counter.test.ts +++ b/test/specs/counter.test.ts @@ -1,12 +1,13 @@ import {join} from 'path'; -import {analyzer} from '../../src/server/Analyzer'; +import {getImportDeclarationTree} from '../../src/server/Analyzer'; +import {fileCounter} from '../../src/server/FileCounter'; const fixturesDir = join(__dirname, '../fixture/'); describe('counter\'s count test', () => { test('counterTest.vue', async () => { const filename = 'counterTest/counterTest'; - await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); - const json = JSON.stringify(analyzer.counter.count); + await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const json = JSON.stringify(fileCounter.result); expect(json).toMatchSnapshot(); }); diff --git a/test/specs/importDeclaration.test.ts b/test/specs/importDeclaration.test.ts index 13a7d9b8..4d9db343 100644 --- a/test/specs/importDeclaration.test.ts +++ b/test/specs/importDeclaration.test.ts @@ -1,11 +1,11 @@ import {join} from 'path'; -import {analyzer} from '../../src/server/Analyzer'; +import {getImportDeclarationTree} from '../../src/server/Analyzer'; const fixturesDir = join(__dirname, '../fixture/'); describe('import declaration test', () => { it('importOne.vue', async () => { const filename = 'declarationTest/importOne'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -14,7 +14,7 @@ describe('import declaration test', () => { it('importTwo.vue', async () => { const filename = 'declarationTest/importTwo'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -23,7 +23,7 @@ describe('import declaration test', () => { it('importThirdParty.vue', async () => { const filename = 'declarationTest/importTwo'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -32,7 +32,7 @@ describe('import declaration test', () => { it('importNestedOne.vue', async () => { const filename = 'declarationTest/importNestedOne'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -41,7 +41,7 @@ describe('import declaration test', () => { it('importNestedTwo.vue', async () => { const filename = 'declarationTest/importNestedTwo'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -50,7 +50,7 @@ describe('import declaration test', () => { it('importNestedTwo.vue', async () => { const filename = 'declarationTest/importNestedTwo'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -59,7 +59,7 @@ describe('import declaration test', () => { it('onlyTemplate.vue', async () => { const filename = 'declarationTest/onlyTemplate'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -68,7 +68,7 @@ describe('import declaration test', () => { it('SJIS.vue', async () => { const filename = 'declarationTest/SJIS'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('import declaration test', () => { it('noExtension.vue', async () => { const filename = 'declarationTest/noExtension'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); diff --git a/test/specs/props.test.ts b/test/specs/props.test.ts index 108a9185..02933ea2 100644 --- a/test/specs/props.test.ts +++ b/test/specs/props.test.ts @@ -1,11 +1,11 @@ import {join} from 'path'; -import {analyzer} from '../../src/server/Analyzer'; +import {getImportDeclarationTree} from '../../src/server/Analyzer'; const fixturesDir = join(__dirname, '../fixture/'); describe('props test', () => { it('oneProps.vue', async () => { const filename = 'propsTest/oneProps'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -14,7 +14,7 @@ describe('props test', () => { it('twoProps.vue', async () => { const filename = 'propsTest/twoProps'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); diff --git a/test/specs/syntax.test.ts b/test/specs/syntax.test.ts index 22fa01b0..afb3b45e 100644 --- a/test/specs/syntax.test.ts +++ b/test/specs/syntax.test.ts @@ -1,11 +1,11 @@ import {join} from 'path'; -import {analyzer} from '../../src/server/Analyzer'; +import {getImportDeclarationTree} from '../../src/server/Analyzer'; const fixturesDir = join(__dirname, '../fixture/'); describe('syntax test', () => { it('optionalChaining.vue', async () => { const filename = 'syntaxTest/optionalChaining'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -13,7 +13,7 @@ describe('syntax test', () => { it('logicalAssignment.vue', async () => { const filename = 'syntaxTest/logicalAssignment'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -21,7 +21,7 @@ describe('syntax test', () => { it('numericSeparators.vue', async () => { const filename = 'syntaxTest/numericSeparators'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); @@ -29,7 +29,7 @@ describe('syntax test', () => { it('classDefined.vue', async () => { const filename = 'syntaxTest/classDefined'; - const declaration = await analyzer.getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); + const declaration = await getImportDeclarationTree(join(fixturesDir, `${filename}.vue`), [], true); const json = JSON.stringify(declaration).slice(0); expect(json).toMatchSnapshot(); diff --git a/types/index.d.ts b/types/index.d.ts index 166ce489..d444d047 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,14 +1,32 @@ -declare namespace vueComponentAnalyzer { - interface FileReport { - name: string, - props: string, - size: number, - lastModifiedTime: number, - children: FileReport[] - } - export function getImportDeclarationTree(rootDir: string, file: string): FileReport; - interface AnalyzeReport { - entries: FileReport[], - count: {[key: string]: number} - } +/** + * name: filename + * props: props defined in the component + * size: filesize + * lastModifiedTime: date modified the file + * children: information array this file is importing + */ +export interface FileReport { + name: string, + props: string, + size: number, + lastModifiedTime: number, + children: FileReport[] } + +export type FileCount = {[key: string]: number} + +export interface AnalyzeReport { + entries: FileReport[], + count: FileCount +} + +/** + * get import tree as a JSON. + * @param {string} fileName entry file name + * @param {string[]} parents entries of already analyzed file name + */ +export function getImportDeclarationTree(fileName: string, parents?: string[] = []): FileReport; + +export function analyze(): Promise; + +function analyzeFromCLI(): Promise;