diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..575edef --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish to npm +on: + push: + tags: + - 'v*.*.*' # 当推送带有版本号的 tag 时触发,例如 v1.0.0 + workflow_dispatch: # 添加手动触发器 + +jobs: + publish: + runs-on: ubuntu-latest + steps: + # Step 1: Clone current Git repository + - name: Checkout this repository + uses: actions/checkout@v3 + # Step 3: Setup Node.js and install dependencies + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.6' + registry-url: 'https://registry.npmjs.org/' + cache: 'npm' # 启用 npm 缓存,提高安装速度 + - name: Configure npm authentication + run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} + - name: Install dependencies + run: npm install + - name: Build project + run: npm run build + # Step 6: 发布到 npm + - name: Publish package + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # Step 7: 发布成功后,更新版本标签 + # - name: Create Git tag + # run: | + # TAG="v$(node -p -e "require('./package.json').version")" + # git tag $TAG + # git push origin $TAG \ No newline at end of file diff --git a/.gitignore b/.gitignore index fd4f2b0..a8e5b71 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules .DS_Store + +dist diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d9b4b32 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@abearxiong:registry=https://npm.pkg.github.com diff --git a/bin/envision.js b/bin/envision.js new file mode 100755 index 0000000..c4c1458 --- /dev/null +++ b/bin/envision.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import '../dist/app.js'; \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 0000000..83b122b --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,3 @@ +# envision-cli + +## 上传文件 \ No newline at end of file diff --git a/package.json b/package.json index 97b264f..05354ca 100644 --- a/package.json +++ b/package.json @@ -7,16 +7,41 @@ "bin": { "envision": "./bin/envision" }, + "files": [ + "dist", + "bin" + ], "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "tsx src/index.ts ", + "build": "rimraf dist && rollup -c", + "b": "./bin/envision.js" }, - "keywords": ["kevisual","cli"], + "keywords": [ + "kevisual", + "cli" + ], "author": "abearxiong", "devDependencies": { + "@rollup/plugin-commonjs": "^28.0.0", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-typescript": "^12.1.0", "@types/node": "^22.5.5", - "commander": "^12.1.0" + "commander": "^12.1.0", + "rollup": "^4.24.0", + "tslib": "^2.7.0", + "typescript": "^5.6.3", + "@kevisual/query": "0.0.7-alpha.1", + "chalk": "^5.3.0", + "form-data": "^4.0.0", + "glob": "^11.0.0", + "inquirer": "^12.0.0" }, - "dependencies": { - "chalk": "^5.3.0" + "dependencies": {}, + "resolutions": { + "picomatch": "^4" + }, + "engines": { + "node": ">=18.0.0" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35a1887..69437c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,45 +4,1061 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + picomatch: ^4 + importers: .: dependencies: + '@kevisual/query': + specifier: 0.0.7-alpha.1 + version: 0.0.7-alpha.1 chalk: specifier: ^5.3.0 version: 5.3.0 + form-data: + specifier: ^4.0.0 + version: 4.0.0 + glob: + specifier: ^11.0.0 + version: 11.0.0 + inquirer: + specifier: ^12.0.0 + version: 12.0.0(@types/node@22.5.5) devDependencies: + '@rollup/plugin-commonjs': + specifier: ^28.0.0 + version: 28.0.0(rollup@4.24.0) + '@rollup/plugin-json': + specifier: ^6.1.0 + version: 6.1.0(rollup@4.24.0) + '@rollup/plugin-node-resolve': + specifier: ^15.3.0 + version: 15.3.0(rollup@4.24.0) + '@rollup/plugin-typescript': + specifier: ^12.1.0 + version: 12.1.0(rollup@4.24.0)(tslib@2.7.0)(typescript@5.6.3) '@types/node': specifier: ^22.5.5 version: 22.5.5 commander: specifier: ^12.1.0 version: 12.1.0 + rollup: + specifier: ^4.24.0 + version: 4.24.0 + tslib: + specifier: ^2.7.0 + version: 2.7.0 + typescript: + specifier: ^5.6.3 + version: 5.6.3 packages: + '@inquirer/checkbox@4.0.0': + resolution: {integrity: sha512-TNd+u1fAG8vf8YMgXzK2BI0u0xsphFv//T5rpF1eZ+8AAXby5Ll1qptr4/XVS45dvWDIzuBmmWIpVJRvnaNqzQ==} + engines: {node: '>=18'} + + '@inquirer/confirm@5.0.0': + resolution: {integrity: sha512-6QEzj6bZg8atviRIL+pR0tODC854cYSjvZxkyCarr8DVaOJPEyuGys7GmEG3W0Rb8kKSQec7P6okt0sJvNneFw==} + engines: {node: '>=18'} + + '@inquirer/core@10.0.0': + resolution: {integrity: sha512-7dwoKCGvgZGHWTZfOj2KLmbIAIdiXP9NTrwGaTO/XDfKMEmyBahZpnombiG6JDHmiOrmK3GLEJRXrWExXCDLmQ==} + engines: {node: '>=18'} + + '@inquirer/editor@4.0.0': + resolution: {integrity: sha512-bhHAP7hIOxUjiTZrpjyAYD+2RFRa+PNutWeW7JdDPcWWG3GVRiFsu3pBGw9kN2PktoiilDWFGSR0dwXBzGQang==} + engines: {node: '>=18'} + + '@inquirer/expand@4.0.0': + resolution: {integrity: sha512-mR7JHNIvCB4o12f75KN42he7s1O9tmcSN4wJ6l04oymfXKLn+lYJFI7z9lbe4/Ald6fm8nuF38fuY5hNPl3B+A==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.7': + resolution: {integrity: sha512-m+Trk77mp54Zma6xLkLuY+mvanPxlE4A7yNKs2HBiyZ4UkVs28Mv5c/pgWrHeInx+USHeX/WEPzjrWrcJiQgjw==} + engines: {node: '>=18'} + + '@inquirer/input@4.0.0': + resolution: {integrity: sha512-LD7MNzaX+q2OpU4Fn0i/SedhnnBCAnEzRr6L0MP6ohofFFlx9kp5EXX7flbRZlUnh8icOwC3NFmXTyP76hvo0g==} + engines: {node: '>=18'} + + '@inquirer/number@3.0.0': + resolution: {integrity: sha512-DUYfROyQNWm3q+JXL3S6s1/y/cOWRstnmt5zDXhdYNJ5N8TgCnHcDXKwW/dRZL7eBZupmDVHxdKCWZDUYUqmeg==} + engines: {node: '>=18'} + + '@inquirer/password@4.0.0': + resolution: {integrity: sha512-W4QRSzJDMKIvWSvQWOIhs6qba1MJ6yIoy+sazSFhl2QIwn58B0Yw3iZ/zLk3QqVcCsTmKcyrSNVWUJ5RVDLStw==} + engines: {node: '>=18'} + + '@inquirer/prompts@7.0.0': + resolution: {integrity: sha512-y8kX/TmyBqV0H1i3cWbhiTljcuBtgVgyVXAVub3ba1j5/G+dxhYohK1JLRkaosPGKKf3LnEJsYK+GPabpfnaHw==} + engines: {node: '>=18'} + + '@inquirer/rawlist@4.0.0': + resolution: {integrity: sha512-frzJNoMsQBO1fxLXrtpxt2c8hUy/ASEmBpIOEnXY2CjylPnLsVyxrEq7hcOIqVJKHn1tIPfplfiSPowOTrrUDg==} + engines: {node: '>=18'} + + '@inquirer/search@3.0.0': + resolution: {integrity: sha512-AT9vkC2KD/PLHZZXIW5Tn/FnJzEU3xEZMLxNo9OggKoreDEKfTOKVM1LkYbDg6UQUOOjntXd0SsrvoHfCzS8cw==} + engines: {node: '>=18'} + + '@inquirer/select@4.0.0': + resolution: {integrity: sha512-XTN4AIFusWbNCBU1Xm2YDxbtH94e/FOrC27U3QargSsoDT1mRm+aLfqE+oOZnUuxwtTnInRT8UHRU3MVOu52wg==} + engines: {node: '>=18'} + + '@inquirer/type@3.0.0': + resolution: {integrity: sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@kevisual/query@0.0.7-alpha.1': + resolution: {integrity: sha512-by0z2HAy6/oxI49HYCUlaXP/sS0UWC0VvYTWhFtGm8R/CY+u03aOD82x3g8ktPCSv0s4LvfqgMa8haT7/uYMpg==} + + '@rollup/plugin-commonjs@28.0.0': + resolution: {integrity: sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-json@6.1.0': + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-node-resolve@15.3.0': + resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-typescript@12.1.0': + resolution: {integrity: sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + + '@rollup/pluginutils@5.1.2': + resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + cpu: [x64] + os: [win32] + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/node@22.5.5': resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + chalk@5.3.0: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fdir@6.4.0: + resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} + peerDependencies: + picomatch: ^4 + peerDependenciesMeta: + picomatch: + optional: true + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + inquirer@12.0.0: + resolution: {integrity: sha512-W3mwgzLtWIqHndtAb82zCHbRfdPit3jcqEyYkAjM/4p15g/1tOoduYydx6IJ3sh31FHT82YoqYZB8RoTwoMy7w==} + engines: {node: '>=18'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + snapshots: + '@inquirer/checkbox@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/figures': 1.0.7 + '@inquirer/type': 3.0.0(@types/node@22.5.5) + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/confirm@5.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + transitivePeerDependencies: + - '@types/node' + + '@inquirer/core@10.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/figures': 1.0.7 + '@inquirer/type': 3.0.0(@types/node@22.5.5) + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/editor@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + external-editor: 3.1.0 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/expand@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/figures@1.0.7': {} + + '@inquirer/input@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + transitivePeerDependencies: + - '@types/node' + + '@inquirer/number@3.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + transitivePeerDependencies: + - '@types/node' + + '@inquirer/password@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + ansi-escapes: 4.3.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/prompts@7.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/checkbox': 4.0.0(@types/node@22.5.5) + '@inquirer/confirm': 5.0.0(@types/node@22.5.5) + '@inquirer/editor': 4.0.0(@types/node@22.5.5) + '@inquirer/expand': 4.0.0(@types/node@22.5.5) + '@inquirer/input': 4.0.0(@types/node@22.5.5) + '@inquirer/number': 3.0.0(@types/node@22.5.5) + '@inquirer/password': 4.0.0(@types/node@22.5.5) + '@inquirer/rawlist': 4.0.0(@types/node@22.5.5) + '@inquirer/search': 3.0.0(@types/node@22.5.5) + '@inquirer/select': 4.0.0(@types/node@22.5.5) + transitivePeerDependencies: + - '@types/node' + + '@inquirer/rawlist@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/search@3.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/figures': 1.0.7 + '@inquirer/type': 3.0.0(@types/node@22.5.5) + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/select@4.0.0(@types/node@22.5.5)': + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/figures': 1.0.7 + '@inquirer/type': 3.0.0(@types/node@22.5.5) + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + transitivePeerDependencies: + - '@types/node' + + '@inquirer/type@3.0.0(@types/node@22.5.5)': + dependencies: + '@types/node': 22.5.5 + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@kevisual/query@0.0.7-alpha.1': {} + + '@rollup/plugin-commonjs@28.0.0(rollup@4.24.0)': + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + commondir: 1.0.1 + estree-walker: 2.0.2 + fdir: 6.4.0(picomatch@4.0.2) + is-reference: 1.2.1 + magic-string: 0.30.11 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.24.0 + + '@rollup/plugin-json@6.1.0(rollup@4.24.0)': + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + optionalDependencies: + rollup: 4.24.0 + + '@rollup/plugin-node-resolve@15.3.0(rollup@4.24.0)': + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.8 + optionalDependencies: + rollup: 4.24.0 + + '@rollup/plugin-typescript@12.1.0(rollup@4.24.0)(tslib@2.7.0)(typescript@5.6.3)': + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@4.24.0) + resolve: 1.22.8 + typescript: 5.6.3 + optionalDependencies: + rollup: 4.24.0 + tslib: 2.7.0 + + '@rollup/pluginutils@5.1.2(rollup@4.24.0)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.24.0 + + '@rollup/rollup-android-arm-eabi@4.24.0': + optional: true + + '@rollup/rollup-android-arm64@4.24.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.0': + optional: true + + '@rollup/rollup-darwin-x64@4.24.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.24.0': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-x64-musl@4.24.0': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.24.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.24.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.24.0': + optional: true + + '@types/estree@1.0.6': {} + '@types/node@22.5.5': dependencies: undici-types: 6.19.8 + '@types/resolve@1.20.2': {} + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.1: {} + + asynckit@0.4.0: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + chalk@5.3.0: {} + chardet@0.7.0: {} + + cli-width@4.1.0: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + commander@12.1.0: {} + commondir@1.0.1: {} + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + deepmerge@4.3.1: {} + + delayed-stream@1.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + estree-walker@2.0.2: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + fdir@6.4.0(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + + form-data@4.0.0: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + inquirer@12.0.0(@types/node@22.5.5): + dependencies: + '@inquirer/core': 10.0.0(@types/node@22.5.5) + '@inquirer/prompts': 7.0.0(@types/node@22.5.5) + '@inquirer/type': 3.0.0(@types/node@22.5.5) + ansi-escapes: 4.3.2 + mute-stream: 2.0.0 + run-async: 3.0.0 + rxjs: 7.8.1 + transitivePeerDependencies: + - '@types/node' + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-fullwidth-code-point@3.0.0: {} + + is-module@1.0.0: {} + + is-reference@1.2.1: + dependencies: + '@types/estree': 1.0.6 + + isexe@2.0.0: {} + + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + + lru-cache@11.0.1: {} + + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minipass@7.1.2: {} + + mute-stream@2.0.0: {} + + os-tmpdir@1.0.2: {} + + package-json-from-dist@1.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + + picomatch@4.0.2: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + rollup@4.24.0: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 + fsevents: 2.3.3 + + run-async@3.0.0: {} + + rxjs@7.8.1: + dependencies: + tslib: 2.7.0 + + safer-buffer@2.1.2: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + tslib@2.7.0: {} + + type-fest@0.21.3: {} + + typescript@5.6.3: {} + undici-types@6.19.8: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + yoctocolors-cjs@2.1.2: {} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e730e85 --- /dev/null +++ b/readme.md @@ -0,0 +1,4 @@ +# Cli For Envision + +## upload files + diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..d07e5cb --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,27 @@ +// rollup.config.js + +import typescript from '@rollup/plugin-typescript'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; +/** + * @type {import('rollup').RollupOptions} + */ +export default { + input: 'src/index.ts', // TypeScript 入口文件 + output: { + file: 'dist/app.js', // 输出文件 + format: 'es', // 输出格式设置为 ES 模块 + }, + plugins: [ + resolve(), // 使用 @rollup/plugin-node-resolve 解析 node_modules 中的模块 + commonjs(), + json(), + typescript({ + allowImportingTsExtensions: true, + noEmit: true, + // 不生成声明文件 + declaration: false, + }), // 使用 @rollup/plugin-typescript 处理 TypeScript 文件 + ], +}; diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..3910c42 --- /dev/null +++ b/src/app.ts @@ -0,0 +1,16 @@ +import { program , Command} from 'commander'; +import fs from 'fs'; + +// 将多个子命令加入主程序中 +program.name('app').description('A CLI tool with envison').version('0.0.1'); + +const ls =new Command('ls') + .description('List files in the current directory') + .action(() => { + console.log('List files'); + console.log(fs.readdirSync(process.cwd())); + }); +program.addCommand(ls); + +export const app = program; +export { program, Command }; diff --git a/src/command/deploy.ts b/src/command/deploy.ts new file mode 100644 index 0000000..ba575b4 --- /dev/null +++ b/src/command/deploy.ts @@ -0,0 +1,118 @@ +import { app, Command } from '@/app.ts'; +import { glob } from 'glob'; +import path from 'path'; +import fs from 'fs'; +import FormData from 'form-data'; +import { baseURL } from '@/module/query.ts'; +import { getConfig } from '@/module/index.ts'; +import inquirer from 'inquirer'; + +const command = new Command('deploy') + .description('deploy to server') + .argument('', 'Path to the file to be uploaded') // 定义文件路径参数 + .option('-v, --version ', 'verbose') + .option('-k, --key ', 'key') + .action(async (filePath, options) => { + try { + let { version, key } = options; + if (!version || !key) { + const answers = await inquirer.prompt([ + { + type: 'input', + name: 'version', + message: 'Enter your version:', + when: () => !version, + }, + { + type: 'input', + name: 'key', + message: 'Enter your key:', + when: () => !key, + }, + ]); + version = answers.version || version; + key = answers.key || key; + } + const pwd = process.cwd(); + const directory = path.join(pwd, filePath); + const gPath = path.join(directory, '**/*'); + const files = await glob(gPath, { cwd: pwd, ignore: ['node_modules/**/*'] }); + const _relativeFiles = files.map((file) => file.replace(directory + '/', '')); + console.log('upload Files', _relativeFiles); + console.log('upload Files Key', key, version); + // 确认是否上传 + const confirm = await inquirer.prompt([ + { + type: 'confirm', + name: 'confirm', + message: 'Do you want to upload these files?', + }, + ]); + if (!confirm.confirm) { + return; + } + + const res = await uploadFiles(_relativeFiles, directory, { key, version }); + if (res?.code === 200) { + console.log('File uploaded successfully!'); + res.data?.data?.files?.map?.((d) => { + console.log('uploaded file', d?.name, d?.path); + }); + } else { + console.error('File upload failed', res?.message); + } + } catch (error) { + console.error('error', error); + } + }); + +const uploadFiles = async (files: string[], directory: string, { key, version }: { key: string; version: string }): Promise => { + const config = await getConfig(); + const form = new FormData(); + for (const file of files) { + const filePath = path.join(directory, file); + form.append('file', fs.createReadStream(filePath), { + filename: file, + }); + } + form.append('appKey', key); + form.append('version', version); + return new Promise((resolve) => { + const url = new URL(baseURL); + console.log('upload url', url.hostname, url.protocol, url.port); + form.submit( + { + path: '/api/app/upload', + host: url.hostname, + protocol: url.protocol as any, + port: url.port, + method: 'POST', + headers: { + Authorization: 'Bearer ' + config.token, + ...form.getHeaders(), + }, + }, + (err, res) => { + if (err) { + console.error('Error uploading file:', err.message); + return; + } + // 处理服务器响应 + let body = ''; + res.on('data', (chunk) => { + body += chunk; + }); + + res.on('end', () => { + try { + const res = JSON.parse(body); + resolve(res); + } catch (e) { + resolve({ code: 500, message: body }); + } + }); + }, + ); + }); +}; +app.addCommand(command); diff --git a/src/command/login.ts b/src/command/login.ts new file mode 100644 index 0000000..9bdf810 --- /dev/null +++ b/src/command/login.ts @@ -0,0 +1,59 @@ +import { app, program, Command } from '@/app.ts'; +import { getConfig, writeConfig } from '@/module/get-config.ts'; +import { queryLogin, queryMe } from '@/route/index.ts'; +import inquirer from 'inquirer'; + +// 导入 login 命令 + +// 定义login命令,支持 `-u` 和 `-p` 参数来输入用户名和密码 +const loginCommand = new Command('login') + .description('Login to the application') + .option('-u, --username ', 'Specify username') + .option('-p, --password ', 'Specify password') + .action(async (options) => { + const config = getConfig(); + let { username, password } = options; + + // 如果没有传递参数,则通过交互式输入 + if (!username || !password) { + const answers = await inquirer.prompt([ + { + type: 'input', + name: 'username', + message: 'Enter your username:', + when: () => !username, // 当 username 为空时,提示用户输入 + }, + { + type: 'password', + name: 'password', + message: 'Enter your password:', + mask: '*', // 隐藏输入的字符 + when: () => !password, // 当 password 为空时,提示用户输入 + }, + ]); + username = answers.username || username; + password = answers.password || password; + } + if (config.token) { + const res = await queryMe(); + if (res.code === 200) { + const data = res.data; + if (data.username === username) { + console.log('Already Login For', data.username); + return; + } + } + } + + const res = await queryLogin(username, password); + if (res.code === 200) { + console.log('登录成功'); + const { token } = res.data; + writeConfig({ ...config, token }); + } else { + console.log('登录失败', res.message || ''); + } + console.log('u', username, password); + }); + +app.addCommand(loginCommand); diff --git a/src/command/logout.ts b/src/command/logout.ts new file mode 100644 index 0000000..53a9c23 --- /dev/null +++ b/src/command/logout.ts @@ -0,0 +1,11 @@ +import { app, Command } from '@/app.ts'; +import { getConfig, writeConfig } from '@/module/index.ts'; + +const command = new Command('logout') + .description('') + .action(async () => { + const config = getConfig(); + writeConfig({ ...config, token: '' }); + }); + +app.addCommand(command); diff --git a/src/command/ls-token.ts b/src/command/ls-token.ts new file mode 100644 index 0000000..0d7034a --- /dev/null +++ b/src/command/ls-token.ts @@ -0,0 +1,37 @@ +import { app, Command } from '@/app.ts'; +import { getConfig, query, writeConfig } from '@/module/index.ts'; +import inquirer from 'inquirer'; + +const token = new Command('token').description('show token').action(async () => { + const config = getConfig(); + console.log('token', config.token); +}); + +app.addCommand(token); + +const baseURL = new Command('baseURL').description('show baseURL').action(async () => { + const config = getConfig(); + console.log('baseURL', config.baseURL); +}); +app.addCommand(baseURL); + +const setBaseURL = new Command('setBaseURL').description('set baseURL').action(async () => { + const config = getConfig(); + const answers = await inquirer.prompt([ + { + type: 'input', + name: 'baseURL', + message: `Enter your baseURL:(current: ${config.baseURL})`, + }, + ]); + const baseURL = answers.baseURL; + writeConfig({ ...config, baseURL }); +}); + +app.addCommand(setBaseURL); + +// const showQueryURL = new Command('showQueryURL').description('show query URL').action(async () => { +// console.log("url", query.url); +// }); + +// app.addCommand(showQueryURL); diff --git a/src/command/me.ts b/src/command/me.ts new file mode 100644 index 0000000..6187e00 --- /dev/null +++ b/src/command/me.ts @@ -0,0 +1,19 @@ +import { app, Command } from '@/app.ts'; +import { getConfig, writeConfig } from '@/module/index.ts'; +import {queryMe} from '../route/index.ts'; + + +const command = new Command('me') + .description('') + .action(async () => { + const config = getConfig() + const res = await queryMe(); + if(res.code===200) { + console.log('me', res.data) + } else { + console.log('not login') + writeConfig({ ...config, token: '' }); + } + }); + +app.addCommand(command); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..b4706d9 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +import { app } from '@/app.ts'; +import './command/login.ts'; +import './command/logout.ts'; +import './command/ls-token.ts'; +import './command/me.ts'; +import './command/deploy.ts'; + + +app.parse(process.argv); diff --git a/src/module/get-config.ts b/src/module/get-config.ts new file mode 100644 index 0000000..91c30e9 --- /dev/null +++ b/src/module/get-config.ts @@ -0,0 +1,33 @@ +import os from 'os'; +import path from 'path'; +import fs from 'fs'; + +const envisionPath = path.join(os.homedir(), '.config', 'envision'); +const configPath = path.join(os.homedir(), '.config', 'envision', 'config.json'); + +export const checkFileExists = (filePath: string) => { + try { + fs.accessSync(filePath, fs.constants.F_OK); + return true; + } catch (error) { + return false; + } +}; +export const getConfig = () => { + if (!checkFileExists(envisionPath)) { + fs.mkdirSync(envisionPath, { recursive: true }); + } + if (checkFileExists(configPath)) { + const config = fs.readFileSync(configPath, 'utf-8'); + try { + return JSON.parse(config); + } catch (e) { + return {}; + } + } + return {}; +}; + +export const writeConfig = (config: Record) => { + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); +}; diff --git a/src/module/index.ts b/src/module/index.ts new file mode 100644 index 0000000..513532a --- /dev/null +++ b/src/module/index.ts @@ -0,0 +1,3 @@ +export * from './query.ts'; + +export * from './get-config.ts'; diff --git a/src/module/query.ts b/src/module/query.ts new file mode 100644 index 0000000..8dd6244 --- /dev/null +++ b/src/module/query.ts @@ -0,0 +1,18 @@ +import { Query } from '@kevisual/query'; +import { getConfig } from './get-config.ts'; +const config = getConfig(); +export const baseURL = config?.baseURL || 'https://envision.xiongxiao.me'; + +export const query = new Query({ + url: `${baseURL}/api/router`, +}); + +query.beforeRequest = async (config) => { + if (config.headers) { + const token = await getConfig()?.token; + if (token) { + config.headers['Authorization'] = 'Bearer ' + token; + } + } + return config; +}; diff --git a/src/route/index.ts b/src/route/index.ts new file mode 100644 index 0000000..665ba54 --- /dev/null +++ b/src/route/index.ts @@ -0,0 +1 @@ +export * from './user/login.ts'; diff --git a/src/route/user/login.ts b/src/route/user/login.ts new file mode 100644 index 0000000..985bbe6 --- /dev/null +++ b/src/route/user/login.ts @@ -0,0 +1,19 @@ +import { query } from '@/module/query.ts'; + +export const queryLogin = async (username: string, password: string) => { + return await query.post({ + path: 'user', + key: 'login', + payload: { + username, + password, + }, + }); +}; + +export const queryMe = async () => { + return await query.post({ + path: 'user', + key: 'me', + }); +}; diff --git a/src/scripts/login.ts b/src/scripts/login.ts new file mode 100644 index 0000000..fd25585 --- /dev/null +++ b/src/scripts/login.ts @@ -0,0 +1,15 @@ +import { query } from '@/module/query.ts'; + +export const login = async () => { + const res = await query.post({ + path: 'user', + key: 'login', + payload: { + username: 'demo', + password: '123456', + }, + }); + console.log(res); +}; + +login(); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..bea82a0 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "module": "nodenext", + "target": "esnext", + "noImplicitAny": false, + "outDir": "./dist", + "sourceMap": false, + "allowJs": true, + "newLine": "LF", + "baseUrl": "./", + "typeRoots": [ + "node_modules/@types", + ], + "declaration": true, + "noEmit": false, + "allowImportingTsExtensions": true, + "emitDeclarationOnly": true, + "moduleResolution": "NodeNext", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "paths": { + "@/*": [ + "src/*" + ], + } + }, + "include": [ + "typings.d.ts", + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist", + ], +} \ No newline at end of file