From 620a4ad91bdeac18345081001125b016852eaf8a Mon Sep 17 00:00:00 2001 From: saqqdy Date: Sun, 1 Jan 2023 15:50:15 +0800 Subject: [PATCH] release v1.0.0 --- .github/workflows/publish-test.yml | 2 +- .github/workflows/publish.yml | 2 +- .vscode/settings.json | 2 + build/rollup.config.ts | 40 ---- docs/.nojekyll | 1 + docs/README.md | 58 +++++ docs/modules.md | 3 + docs/out.json | 16 ++ package.json | 16 +- pnpm-lock.yaml | 347 +++++++++++++++++++++++++++-- src/installer.ts | 245 +++++++++++--------- src/utils/config.ts | 11 + typedoc.js | 2 +- 13 files changed, 568 insertions(+), 177 deletions(-) create mode 100644 docs/.nojekyll create mode 100644 docs/README.md create mode 100644 docs/modules.md create mode 100644 docs/out.json create mode 100644 src/utils/config.ts diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml index d49ee87..3450163 100644 --- a/.github/workflows/publish-test.yml +++ b/.github/workflows/publish-test.yml @@ -19,7 +19,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 with: - version: 7.14.2 + version: 7.18.2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fe69037..b8bc8c8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 with: - version: 7.14.2 + version: 7.18.2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.vscode/settings.json b/.vscode/settings.json index c58f48c..68189ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,13 @@ { "cSpell.words": [ + "callsite", "Codacy", "consola", "convertable", "demi", "esbuild", "filesize", + "gitmars", "hooks-demi", "iife", "instanceof", diff --git a/build/rollup.config.ts b/build/rollup.config.ts index d3db043..b552c15 100644 --- a/build/rollup.config.ts +++ b/build/rollup.config.ts @@ -1,11 +1,7 @@ -// import { dirname, resolve } from 'node:path' -// import { fileURLToPath } from 'node:url' import type { RollupOptions } from 'rollup' -// import glob from 'fast-glob' import nodeResolve from '@rollup/plugin-node-resolve' import babel from '@rollup/plugin-babel' import commonjs from '@rollup/plugin-commonjs' -// import terser from '@rollup/plugin-terser' import typescript from '@rollup/plugin-typescript' import json from '@rollup/plugin-json' import alias, { type ResolverObject } from '@rollup/plugin-alias' @@ -15,9 +11,6 @@ import shebang from 'rollup-plugin-replace-shebang' import pkg from '../package.json' assert { type: 'json' } import { banner, extensions, reporter } from './config' -// const __filename = fileURLToPath(import.meta.url) -// const __dirname = dirname(__filename) -// const production = !process.env.ROLLUP_WATCH const externals = [ ...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.devDependencies || {}) @@ -31,15 +24,6 @@ const nodeResolver = nodeResolve({ moduleDirectories: ['node_modules'] }) -// const moduleList = glob -// .sync('*', { -// cwd: resolve(__dirname, '..', 'src'), -// ignore: ['__tests__'], -// deep: 1, -// onlyDirectories: true -// }) -// .map(name => resolve('src', name, 'index.ts')) - const options: RollupOptions = { plugins: [ alias({ @@ -84,30 +68,6 @@ const options: RollupOptions = { } export default [ - // { - // input: moduleList, - // output: [ - // { - // entryFileNames: '[name].cjs', - // dir: 'lib', - // preserveModules: true, - // preserveModulesRoot: 'src', - // exports: 'auto', - // format: 'cjs', - // banner - // }, - // { - // entryFileNames: '[name].mjs', - // dir: 'es', - // preserveModules: true, - // preserveModulesRoot: 'src', - // exports: 'auto', - // format: 'es', - // banner - // } - // ], - // ...options - // }, { input: 'src/installer.ts', output: [ diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b672173 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,58 @@ +index.md - v1.0.0 / [Exports](modules.md) + +
+ +# reinstaller + +A simple installing tool + +[![NPM version][npm-image]][npm-url] +[![Codacy Badge][codacy-image]][codacy-url] +[![build status][travis-image]][travis-url] +[![Test coverage][codecov-image]][codecov-url] +[![npm download][download-image]][download-url] +[![gzip][gzip-image]][gzip-url] +[![License][license-image]][license-url] + +[![Sonar][sonar-image]][sonar-url] + +
+ +## **完整文档请查阅: [API 完整文档](./docs/modules.md)** + +## 安装 + +```bash +# 使用npm +$ npm install reinstaller --save + +# 使用yarn +$ yarn add reinstaller +``` + +## 使用 + +## 问题和支持 + +Please open an issue [here](https://github.com/saqqdy/reinstaller/issues). + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/reinstaller.svg?style=flat-square +[npm-url]: https://npmjs.org/package/reinstaller +[codacy-image]: https://app.codacy.com/project/badge/Grade/f70d4880e4ad4f40aa970eb9ee9d0696 +[codacy-url]: https://www.codacy.com/gh/saqqdy/reinstaller/dashboard?utm_source=github.com&utm_medium=referral&utm_content=saqqdy/reinstaller&utm_campaign=Badge_Grade +[travis-image]: https://travis-ci.com/saqqdy/reinstaller.svg?branch=master +[travis-url]: https://travis-ci.com/saqqdy/reinstaller +[codecov-image]: https://img.shields.io/codecov/c/github/saqqdy/reinstaller.svg?style=flat-square +[codecov-url]: https://codecov.io/github/saqqdy/reinstaller?branch=master +[download-image]: https://img.shields.io/npm/dm/reinstaller.svg?style=flat-square +[download-url]: https://npmjs.org/package/reinstaller +[gzip-image]: http://img.badgesize.io/https://unpkg.com/reinstaller/lib/index.js?compression=gzip&label=gzip%20size:%20JS +[gzip-url]: http://img.badgesize.io/https://unpkg.com/reinstaller/lib/index.js?compression=gzip&label=gzip%20size:%20JS +[license-image]: https://img.shields.io/badge/License-MIT-yellow.svg +[license-url]: LICENSE +[sonar-image]: https://sonarcloud.io/api/project_badges/quality_gate?project=saqqdy_reinstaller +[sonar-url]: https://sonarcloud.io/dashboard?id=saqqdy_reinstaller diff --git a/docs/modules.md b/docs/modules.md new file mode 100644 index 0000000..d8103a1 --- /dev/null +++ b/docs/modules.md @@ -0,0 +1,3 @@ +[index.md - v1.0.0](README.md) / Exports + +# index.md - v1.0.0 diff --git a/docs/out.json b/docs/out.json new file mode 100644 index 0000000..b54f603 --- /dev/null +++ b/docs/out.json @@ -0,0 +1,16 @@ +{ + "id": 0, + "name": "index.md - v1.0.0", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "index.md", + "sources": [ + { + "fileName": "installer.ts", + "line": 3, + "character": 0, + "url": "https://github.com/saqqdy/reinstaller/blob/c12cf50/src/installer.ts#L3" + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e8bba9a..139511c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "reinstaller", "description": "A installing tool", - "version": "1.0.0-alpha.2", + "version": "1.0.0", "packageManager": "pnpm@7.18.0", "bin": { "reinstaller": "./bin/index.js", @@ -36,35 +36,41 @@ "build:bundle": "rollup -c build/rollup.config.ts --configPlugin @rollup/plugin-typescript", "build:umd": "webpack --config build/webpack.config.js", "build:types": "tsc --emitDeclarationOnly --outDir temp -p src", + "build:docs": "rimraf docs && typedoc && prettier --write \"**/*.md\"", "roll-types": "api-extractor run && rimraf temp", "watch": "pnpm build:bundle -w", "pub": "tscjs scripts/publish", "unpub": "tscjs scripts/unpublish", "sync": "tscjs scripts/sync", "clean": "rimraf lib es dist", - "dist": "run-s clean build docs prettier:docs", + "dist": "run-s clean build build:docs", "test-unit": "jest --filter ./scripts/filter-unit.js", "jest": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --coverage", "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "docs": "rimraf docs && typedoc", "eslint": "eslint --fix .", - "prettier": "prettier --write \"**/*.{js,ts,jsx,tsx,yml,json,md}\"", - "prettier:docs": "prettier --write \"**/*.md\"" + "prettier": "prettier --write \"**/*.{js,ts,jsx,tsx,yml,json,md}\"" }, "dependencies": { "@gitmars/core": "^4.0.0", + "callsite-record": "^4.1.5", "commander": "^9.4.1", "consola": "^2.15.3", "core-js": "^3.27.1", + "cosmiconfig": "^8.0.0", "debug": "^4.3.4", "depcheck": "^1.4.3", "fs-extra": "^11.1.0", + "global-modules": "^2.0.0", "js-cool": "^2.8.0", "lodash-es": "^4.17.21", "lodash-unified": "^1.0.3", "ora": "^6.1.2", "os-locale": "^6.0.2", + "package-json": "^8.1.0", "picocolors": "^1.0.0", + "preferred-pm": "^3.0.3", + "semver": "^7.3.8", + "semver-diff": "^4.0.0", "shelljs": "^0.8.5" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa48eba..fd55ddf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,10 +24,12 @@ specifiers: '@types/node': ^18.11.18 '@types/shelljs': ^0.8.11 babel-loader: ^9.1.0 + callsite-record: ^4.1.5 chalk: ^5.2.0 commander: ^9.4.1 consola: ^2.15.3 core-js: ^3.27.1 + cosmiconfig: ^8.0.0 coveralls: ^3.1.1 cross-env: ^7.0.3 debug: ^4.3.4 @@ -36,6 +38,7 @@ specifiers: eslint: ^8.31.0 fast-glob: ^3.2.12 fs-extra: ^11.1.0 + global-modules: ^2.0.0 jest: ^29.3.1 js-cool: ^2.8.0 lodash-es: ^4.17.21 @@ -43,7 +46,9 @@ specifiers: npm-run-all: ^4.1.5 ora: ^6.1.2 os-locale: ^6.0.2 + package-json: ^8.1.0 picocolors: ^1.0.0 + preferred-pm: ^3.0.3 prettier: ^2.8.1 prettier-config-common: ^1.3.0 rimraf: ^3.0.2 @@ -51,6 +56,8 @@ specifiers: rollup-plugin-filesize: ^9.1.2 rollup-plugin-replace-shebang: ^1.2.0 rollup-plugin-visualizer: ^5.9.0 + semver: ^7.3.8 + semver-diff: ^4.0.0 shelljs: ^0.8.5 ts-jest: ^29.0.3 ts-morph: ^17.0.1 @@ -61,18 +68,25 @@ specifiers: dependencies: '@gitmars/core': 4.0.0_fdwmjat3dvkyl27iltpbowxd7u + callsite-record: 4.1.5 commander: 9.4.1 consola: 2.15.3 core-js: 3.27.1 + cosmiconfig: 8.0.0 debug: 4.3.4 depcheck: 1.4.3 fs-extra: 11.1.0 + global-modules: 2.0.0 js-cool: 2.8.0_core-js@3.27.1 lodash-es: 4.17.21 lodash-unified: 1.0.3_6vt5du6ay2thm2pqhl32dksnvu ora: 6.1.2 os-locale: 6.0.2 + package-json: 8.1.0 picocolors: 1.0.0 + preferred-pm: 3.0.3 + semver: 7.3.8 + semver-diff: 4.0.0 shelljs: 0.8.5 devDependencies: @@ -1394,6 +1408,12 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@devexpress/error-stack-parser/2.0.6: + resolution: {integrity: sha512-fneVypElGUH6Be39mlRZeAu00pccTlf4oVuzf9xPJD1cdEqI8NyAiQua/EW7lZdrbMUbgyXcJmfKPefhYius3A==} + dependencies: + stackframe: 1.3.4 + dev: false + /@esbuild-kit/core-utils/3.0.0: resolution: {integrity: sha512-TXmwH9EFS3DC2sI2YJWJBgHGhlteK0Xyu1VabwetMULfm3oYhbrsWV5yaSr2NTWZIgDGVLHbRf0inxbjXqAcmQ==} dependencies: @@ -1646,7 +1666,7 @@ packages: /@eslint-sets/eslint-config-basic/3.2.0_ib54xo6grzl36uajsck6bolfri: resolution: {integrity: sha512-exhQLgC7gSloIN9bUoIAYPDBULaKFffP9EJaU413FyVpAIch4j3ZLd4hUrBGntc5tlaT3cyyeJPnQaSpvdmrjA==} peerDependencies: - eslint: '>=8.0.0 || >= 8.0.0 || ^8.0.0' + eslint: '>=8.0.0 || ^8.0.0' prettier: '>=2.0.0' dependencies: '@babel/eslint-parser': 7.19.1_cbdx2nt4qlpatq6svgwvehmsk4 @@ -2205,6 +2225,21 @@ packages: read-package-json-fast: 2.0.3 dev: true + /@pnpm/network.ca-file/1.0.2: + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + dependencies: + graceful-fs: 4.2.10 + dev: false + + /@pnpm/npm-conf/1.0.5: + resolution: {integrity: sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A==} + engines: {node: '>=12'} + dependencies: + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + dev: false + /@rollup/plugin-alias/4.0.2_rollup@3.9.0: resolution: {integrity: sha512-1hv7dBOZZwo3SEupxn4UA2N0EDThqSSS+wI1St1TNTBtOZvUchyIClyHcnDcjjrReTPZ47Faedrhblv4n+T5UQ==} engines: {node: '>=14.0.0'} @@ -2368,6 +2403,11 @@ packages: resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} dev: true + /@sindresorhus/is/5.3.0: + resolution: {integrity: sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==} + engines: {node: '>=14.16'} + dev: false + /@sinonjs/commons/1.8.4: resolution: {integrity: sha512-RpmQdHVo8hCEHDVpO39zToS9jOhR6nw+/lQAzRNq9ErrGV9IeHM71XCn68svVl/euFeVW6BWX4p35gkhbOcSIQ==} deprecated: Breaks compatibility with ES5, use v1.8.5 @@ -2381,6 +2421,13 @@ packages: '@sinonjs/commons': 1.8.4 dev: true + /@szmarczak/http-timer/5.0.1: + resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} + engines: {node: '>=14.16'} + dependencies: + defer-to-connect: 2.0.1 + dev: false + /@tootallnate/once/1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} @@ -3243,12 +3290,45 @@ packages: - bluebird dev: true + /cacheable-lookup/7.0.0: + resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} + engines: {node: '>=14.16'} + dev: false + + /cacheable-request/10.2.4: + resolution: {integrity: sha512-IWIea8ei1Ht4dBqvlvh7Gs7EYlMyBhlJybLDUB9sadEqHqftmdNieMLIR5ia3vs8gbjj9t8hXLBpUVg3vcQNbg==} + engines: {node: '>=14.16'} + dependencies: + get-stream: 6.0.1 + http-cache-semantics: 4.1.0 + keyv: 4.5.2 + mimic-response: 4.0.0 + normalize-url: 8.0.0 + responselike: 3.0.0 + dev: false + /call-bind/1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 get-intrinsic: 1.1.3 + /callsite-record/4.1.5: + resolution: {integrity: sha512-OqeheDucGKifjQRx524URgV4z4NaKjocGhygTptDea+DLROre4ZEecA4KXDq+P7qlGCohYVNOh3qr+y5XH5Ftg==} + dependencies: + '@devexpress/error-stack-parser': 2.0.6 + '@types/lodash': 4.14.190 + callsite: 1.0.0 + chalk: 2.4.2 + highlight-es: 1.0.3 + lodash: 4.17.21 + pinkie-promise: 2.0.1 + dev: false + + /callsite/1.0.0: + resolution: {integrity: sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==} + dev: false + /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -3482,6 +3562,13 @@ packages: /concat-map/0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + /config-chain/1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + dev: false + /consola/2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: false @@ -3634,10 +3721,22 @@ packages: dependencies: ms: 2.1.2 + /decompress-response/6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + dev: false + /dedent/0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true + /deep-extend/0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + dev: false + /deep-is/0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -3659,6 +3758,11 @@ packages: clone: 1.0.4 dev: false + /defer-to-connect/2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + dev: false + /define-lazy-prop/2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -4928,7 +5032,6 @@ packages: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: true /find-up/5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} @@ -4936,7 +5039,13 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true + + /find-yarn-workspace-root2/1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + dev: false /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} @@ -4954,6 +5063,11 @@ packages: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true + /form-data-encoder/2.1.4: + resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} + engines: {node: '>= 14.17'} + dev: false + /form-data/2.3.3: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} @@ -5088,7 +5202,6 @@ packages: /get-stream/6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} - dev: true /get-symbol-description/1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} @@ -5156,6 +5269,22 @@ packages: once: 1.4.0 dev: true + /global-modules/2.0.0: + resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} + engines: {node: '>=6'} + dependencies: + global-prefix: 3.0.0 + dev: false + + /global-prefix/3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + dev: false + /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -5179,6 +5308,23 @@ packages: slash: 3.0.0 dev: true + /got/12.5.3: + resolution: {integrity: sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==} + engines: {node: '>=14.16'} + dependencies: + '@sindresorhus/is': 5.3.0 + '@szmarczak/http-timer': 5.0.1 + cacheable-lookup: 7.0.0 + cacheable-request: 10.2.4 + decompress-response: 6.0.0 + form-data-encoder: 2.1.4 + get-stream: 6.0.1 + http2-wrapper: 2.2.0 + lowercase-keys: 3.0.0 + p-cancelable: 3.0.0 + responselike: 3.0.0 + dev: false + /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -5259,6 +5405,14 @@ packages: dependencies: function-bind: 1.1.1 + /highlight-es/1.0.3: + resolution: {integrity: sha512-s/SIX6yp/5S1p8aC/NRDC1fwEb+myGIfp8/TzZz0rtAv8fzsdX7vGl3Q1TrXCsczFq8DI3CBFBCySPClfBSdbg==} + dependencies: + chalk: 2.4.2 + is-es2016-keyword: 1.0.0 + js-tokens: 3.0.2 + dev: false + /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -5285,7 +5439,6 @@ packages: /http-cache-semantics/4.1.0: resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==} - dev: true /http-errors/2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} @@ -5317,6 +5470,14 @@ packages: sshpk: 1.17.0 dev: true + /http2-wrapper/2.2.0: + resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==} + engines: {node: '>=10.19.0'} + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + dev: false + /https-proxy-agent/5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -5417,6 +5578,10 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + /ini/1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: false + /inquirer/8.2.5: resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==} engines: {node: '>=12.0.0'} @@ -5538,6 +5703,10 @@ packages: hasBin: true dev: true + /is-es2016-keyword/1.0.0: + resolution: {integrity: sha512-JtZWPUwjdbQ1LIo9OSZ8MdkWEve198ors27vH+RzUUvZXXZkzXCxFnlUhzWYxy5IexQSRiXVw9j2q/tHMmkVYQ==} + dev: false + /is-extendable/0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} @@ -6168,6 +6337,10 @@ packages: resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==} dev: true + /js-tokens/3.0.2: + resolution: {integrity: sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==} + dev: false + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -6204,6 +6377,10 @@ packages: hasBin: true dev: true + /json-buffer/3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: false + /json-parse-better-errors/1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} dev: true @@ -6285,6 +6462,17 @@ packages: verror: 1.10.0 dev: true + /keyv/4.5.2: + resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==} + dependencies: + json-buffer: 3.0.1 + dev: false + + /kind-of/6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: false + /kleur/3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -6336,19 +6524,27 @@ packages: strip-bom: 3.0.0 dev: true + /load-yaml-file/0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.10 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: false + /locate-path/5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} dependencies: p-locate: 4.1.0 - dev: true /locate-path/6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - dev: true /lodash-es/4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -6416,6 +6612,11 @@ packages: js-tokens: 4.0.0 dev: false + /lowercase-keys/3.0.0: + resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: false + /lru-cache/5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -6552,7 +6753,6 @@ packages: dependencies: braces: 3.0.2 picomatch: 2.3.1 - dev: true /mime-db/1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} @@ -6576,6 +6776,16 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + /mimic-response/3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + dev: false + + /mimic-response/4.0.0: + resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: false + /min-indent/1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -6810,6 +7020,11 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + /normalize-url/8.0.0: + resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} + engines: {node: '>=14.16'} + dev: false + /npm-bundled/1.1.2: resolution: {integrity: sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==} dependencies: @@ -7046,33 +7261,34 @@ packages: minimist: 1.2.7 dev: false + /p-cancelable/3.0.0: + resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} + engines: {node: '>=12.20'} + dev: false + /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} dependencies: p-try: 2.2.0 - dev: true /p-limit/3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 - dev: true /p-locate/4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} dependencies: p-limit: 2.3.0 - dev: true /p-locate/5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - dev: true /p-map/4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} @@ -7084,7 +7300,6 @@ packages: /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - dev: true /pac-proxy-agent/5.0.0: resolution: {integrity: sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ==} @@ -7112,6 +7327,16 @@ packages: netmask: 2.0.2 dev: false + /package-json/8.1.0: + resolution: {integrity: sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==} + engines: {node: '>=14.16'} + dependencies: + got: 12.5.3 + registry-auth-token: 5.0.1 + registry-url: 6.0.1 + semver: 7.3.8 + dev: false + /pacote/11.3.5: resolution: {integrity: sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg==} engines: {node: '>=10'} @@ -7182,7 +7407,6 @@ packages: /path-exists/4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute/1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -7242,7 +7466,18 @@ packages: /pify/4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - dev: true + + /pinkie-promise/2.0.1: + resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} + engines: {node: '>=0.10.0'} + dependencies: + pinkie: 2.0.4 + dev: false + + /pinkie/2.0.4: + resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} + engines: {node: '>=0.10.0'} + dev: false /pirates/4.0.5: resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} @@ -7254,7 +7489,6 @@ packages: engines: {node: '>=8'} dependencies: find-up: 4.1.0 - dev: true /please-upgrade-node/3.2.0: resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==} @@ -7276,6 +7510,16 @@ packages: source-map-js: 1.0.2 dev: false + /preferred-pm/3.0.3: + resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + dev: false + /prelude-ls/1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -7341,6 +7585,10 @@ packages: sisteransi: 1.0.5 dev: true + /proto-list/1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + dev: false + /proxy-agent/5.0.0: resolution: {integrity: sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g==} engines: {node: '>= 8'} @@ -7400,6 +7648,11 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /quick-lru/5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + dev: false + /randombytes/2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -7416,6 +7669,16 @@ packages: unpipe: 1.0.0 dev: false + /rc/1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.7 + strip-json-comments: 2.0.1 + dev: false + /react-is/18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -7551,6 +7814,20 @@ packages: unicode-match-property-value-ecmascript: 2.0.0 dev: true + /registry-auth-token/5.0.1: + resolution: {integrity: sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==} + engines: {node: '>=14'} + dependencies: + '@pnpm/npm-conf': 1.0.5 + dev: false + + /registry-url/6.0.1: + resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} + engines: {node: '>=12'} + dependencies: + rc: 1.2.8 + dev: false + /regjsgen/0.7.1: resolution: {integrity: sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==} dev: true @@ -7602,6 +7879,10 @@ packages: resolution: {integrity: sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==} dev: false + /resolve-alpn/1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + dev: false + /resolve-cwd/3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -7644,6 +7925,13 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + /responselike/3.0.0: + resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} + engines: {node: '>=14.16'} + dependencies: + lowercase-keys: 3.0.0 + dev: false + /restore-cursor/3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -7801,6 +8089,13 @@ packages: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} dev: false + /semver-diff/4.0.0: + resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} + engines: {node: '>=12'} + dependencies: + semver: 7.3.8 + dev: false + /semver/5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true @@ -8027,6 +8322,10 @@ packages: escape-string-regexp: 2.0.0 dev: true + /stackframe/1.3.4: + resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} + dev: false + /statuses/1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -8131,7 +8430,6 @@ packages: /strip-bom/3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - dev: true /strip-bom/4.0.0: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} @@ -8150,6 +8448,11 @@ packages: min-indent: 1.0.1 dev: true + /strip-json-comments/2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + dev: false + /strip-json-comments/3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -8665,12 +8968,19 @@ packages: is-symbol: 1.0.4 dev: true + /which-pm/2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + dev: false + /which/1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 - dev: true /which/2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} @@ -8798,7 +9108,6 @@ packages: /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - dev: true /z-schema/5.0.4: resolution: {integrity: sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA==} diff --git a/src/installer.ts b/src/installer.ts index 1ee7eca..16f1f40 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -1,10 +1,15 @@ #!/usr/bin/env ts-node import { createRequire } from 'node:module' +import { spawnSync } from 'node:child_process' +import { join } from 'node:path' import { program } from 'commander' import sh from 'shelljs' import chalk from 'chalk' -import depcheck from 'depcheck' +// import depcheck from 'depcheck' +import preferredPM from 'preferred-pm' +import getGitRevParse from '@gitmars/core/lib/git/getGitRevParse' +import config from './utils/config' // import { version } from '../package.json' assert { type: 'json' } import lang from '#lib/utils/lang' @@ -33,33 +38,6 @@ program.version( t('View reinstaller version number') ) -// Check for outdated, incorrect, and unused dependencies. - -// Usage -// $ npm-check - -// Path -// Where to check. Defaults to current directory. Use -g for checking global modules. - -// Options -// -u, --update Interactive update. -// -y, --update-all Uninteractive update. Apply all updates without prompting. -// -g, --global Look at global modules. -// -s, --skip-unused Skip check for unused packages. -// -p, --production Skip devDependencies. -// -d, --dev-only Look at devDependencies only (skip dependencies). -// -i, --ignore Ignore dependencies based on succeeding glob. -// -E, --save-exact Save exact version (x.y.z) instead of caret (^x.y.z) in package.json. -// --specials List of depcheck specials to include in check for unused dependencies. -// --no-color Force or disable color output. -// --no-emoji Remove emoji support. No emoji in default in CI environments. -// --debug Debug output. Throw in a gist when creating issues on github. - -// Examples -// $ npm-check # See what can be updated, what isn't being used. -// $ npm-check ../foo # Check another path. -// $ npm-check -gu # Update globally installed modules by picking which ones to upgrade. - program .name('reinstaller') .usage('[path] [options]') @@ -68,91 +46,138 @@ program '[path]', 'Where to check. Defaults to current directory. Use -g for checking global modules.' ) - .option('-u, --update', t('Interactive update.')) - .option('-y, --update-all', t('Uninteractive update. Apply all updates without prompting.')) - .option('-g, --global', t('Look at global modules.')) - .option('-s, --skip-unused', t('Skip check for unused packages.')) - .option('-p, --production', t('Skip devDependencies.')) - .option('-d, --dev-only ', t('Look at devDependencies only (skip dependencies).')) - .option('-i, --ignore', t('Ignore dependencies based on succeeding glob.')) - .option( - '-E, --save-exact', - t('Save exact version (x.y.z) instead of caret (^x.y.z) in package.json.') - ) - .option( - '--specials', - t('List of depcheck specials to include in check for unused dependencies.') - ) - .option('--no-color', t('Force or disable color output.')) - .option('--no-emoji', t('Remove emoji support. No emoji in default in CI environments.')) - .option('--debug', t('Debug output. Throw in a gist when creating issues on github.')) - .action((path, options) => { - console.log(path, options) + // .option('-u, --update', t('Interactive update.')) + // .option('-y, --update-all', t('Uninteractive update. Apply all updates without prompting.')) + // .option('-g, --global', t('Look at global modules.')) + // .option('-s, --skip-unused', t('Skip check for unused packages.')) + // .option('-p, --production', t('Skip devDependencies.')) + // .option('-d, --dev-only ', t('Look at devDependencies only (skip dependencies).')) + // .option('-i, --ignore', t('Ignore dependencies based on succeeding glob.')) + // .option( + // '-E, --save-exact', + // t('Save exact version (x.y.z) instead of caret (^x.y.z) in package.json.') + // ) + // .option( + // '--specials', + // t('List of depcheck specials to include in check for unused dependencies.') + // ) + // .option('--no-color', t('Force or disable color output.')) + // .option('--no-emoji', t('Remove emoji support. No emoji in default in CI environments.')) + // .option('--debug', t('Debug output. Throw in a gist when creating issues on github.')) + .action(async (path, options) => { + const { root } = getGitRevParse() + const customConfig = config('reinstaller') + const pkg = require(join(root, 'package.json')) + const { name: pm } = (await preferredPM(root)) || { name: 'npm' } + let argv = ['--registry', 'https://registry.npmmirror.com'] - const _options = { - ignoreBinPackage: false, // ignore the packages with bin entry - skipMissing: false, // skip calculation of missing dependencies - parsers: { - // the target parsers - '**/*.js': depcheck.parser.es6, - '**/*.jsx': depcheck.parser.jsx - }, - // detectors: [ - // // the target detectors - // depcheck.detector.requireCallExpression, - // depcheck.detector.importDeclaration - // ], - // specials: [ - // // the target special parsers - // depcheck.special.eslint, - // depcheck.special.webpack - // ], - // package: { - // // may specify dependencies instead of parsing package.json - // dependencies: { - // lodash: '^4.17.15' - // }, - // devDependencies: { - // eslint: '^6.6.0' - // }, - // peerDependencies: {}, - // optionalDependencies: {} - // }, - // files matching these patterns will be ignored - // ignorePatterns: ['sandbox', 'dist', 'bower_components'], - ignoreDirs: [ - 'sandbox', - 'dist', - 'generated', - '.generated', - 'build', - 'fixtures', - 'jspm_packages' - ], - ignoreMatches: [ - 'gulp-*', - 'grunt-*', - 'karma-*', - 'angular-*', - 'babel-*', - 'metalsmith-*', - 'eslint-plugin-*', - '@types/*', - 'grunt', - 'mocha', - 'ava' - ] - // specials: getSpecialParsers(currentState) + switch (pm) { + case 'yarn': + argv = argv.concat(['add']) + break + default: + argv = argv.concat(['i']) + break } - depcheck('/Users/saqqdy/www/saqqdy/reinstaller', _options).then(unused => { - console.log(unused.dependencies) // an array containing the unused dependencies - console.log(unused.devDependencies) // an array containing the unused devDependencies - console.log(unused.missing) // a lookup containing the dependencies missing in `package.json` and where they are used - console.log(unused.using) // a lookup indicating each dependency is used by which files - console.log(unused.invalidFiles) // files that cannot access or parse - console.log(unused.invalidDirs) // directories that cannot access - }) + const pkgList = genInstallName(pkg.dependencies) + const devPkgList = genInstallName(pkg.devDependencies) + + // run install + if (pkgList.length > 0 || devPkgList.length > 0) { + pkgList.length && + spawnSync(pm, argv.concat(pkgList), { + stdio: 'inherit' + }) + devPkgList.length && + spawnSync(pm, argv.concat(devPkgList).concat(['-D']), { + stdio: 'inherit' + }) + } else { + process.exit(1) + } + + function genInstallName(dependencies: Record) { + const pkgList: string[] = [] + for (let packageName in dependencies) { + const isWorkspacePkg = dependencies[packageName] === 'workspace:*' + const isCustomize = /^npm:/.test(dependencies[packageName]) + const isExcludePkg = customConfig.exclude.includes(packageName) + if (isCustomize) packageName += `@${dependencies[packageName]}` + else if (packageName in customConfig.packageTags) + packageName += `@${customConfig.packageTags[packageName]}` + else packageName += '@latest' + if (!isWorkspacePkg && !isExcludePkg) { + pkgList.push(packageName) + } + } + return pkgList + } + + // const _options = { + // ignoreBinPackage: false, // ignore the packages with bin entry + // skipMissing: false, // skip calculation of missing dependencies + // parsers: { + // // the target parsers + // '**/*.js': depcheck.parser.es6, + // '**/*.jsx': depcheck.parser.jsx + // }, + // // detectors: [ + // // // the target detectors + // // depcheck.detector.requireCallExpression, + // // depcheck.detector.importDeclaration + // // ], + // // specials: [ + // // // the target special parsers + // // depcheck.special.eslint, + // // depcheck.special.webpack + // // ], + // // package: { + // // // may specify dependencies instead of parsing package.json + // // dependencies: { + // // lodash: '^4.17.15' + // // }, + // // devDependencies: { + // // eslint: '^6.6.0' + // // }, + // // peerDependencies: {}, + // // optionalDependencies: {} + // // }, + // // files matching these patterns will be ignored + // // ignorePatterns: ['sandbox', 'dist', 'bower_components'], + // ignoreDirs: [ + // 'sandbox', + // 'dist', + // 'generated', + // '.generated', + // 'build', + // 'fixtures', + // 'jspm_packages' + // ], + // ignoreMatches: [ + // 'gulp-*', + // 'grunt-*', + // 'karma-*', + // 'angular-*', + // 'babel-*', + // 'metalsmith-*', + // 'eslint-plugin-*', + // '@types/*', + // 'grunt', + // 'mocha', + // 'ava' + // ] + // // specials: getSpecialParsers(currentState) + // } + + // depcheck('/Users/saqqdy/www/saqqdy/reinstaller', _options).then(unused => { + // // console.log(unused.dependencies) // an array containing the unused dependencies + // // console.log(unused.devDependencies) // an array containing the unused devDependencies + // console.log(unused.missing) // a lookup containing the dependencies missing in `package.json` and where they are used + // // console.log(unused.using) // a lookup indicating each dependency is used by which files + // // console.log(unused.invalidFiles) // files that cannot access or parse + // // console.log(unused.invalidDirs) // directories that cannot access + // }) }) // 自定义帮助 diff --git a/src/utils/config.ts b/src/utils/config.ts new file mode 100644 index 0000000..faaa74a --- /dev/null +++ b/src/utils/config.ts @@ -0,0 +1,11 @@ +import { type OptionsSync, cosmiconfigSync } from 'cosmiconfig' + +export interface Config extends OptionsSync { + depcheck: Record +} + +function config(pkgName: string, options?: Config) { + return cosmiconfigSync(pkgName, options).search()?.config +} + +export { config, config as default } diff --git a/typedoc.js b/typedoc.js index 4ccfeb1..62cc802 100644 --- a/typedoc.js +++ b/typedoc.js @@ -1,6 +1,6 @@ module.exports = { out: 'docs', - entryPoints: ['src/index.ts'], + entryPoints: ['src/installer.ts'], json: 'docs/out.json', name: 'index.md', includeVersion: true,