From 3d45a831295637554efcbdb6e20883c15608a1d0 Mon Sep 17 00:00:00 2001 From: xion Date: Thu, 20 Mar 2025 18:22:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=9A=84=E6=89=93=E5=8C=85=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + package.json | 23 ++- pnpm-lock.yaml | 395 +++++++++++++++++++++-------------------- src/command/deploy.ts | 21 ++- src/command/publish.ts | 266 +++++++++++++++++---------- src/program.ts | 9 + 6 files changed, 412 insertions(+), 304 deletions(-) diff --git a/.gitignore b/.gitignore index a8e5b71..9ee6d08 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules .DS_Store dist + +pack-dist \ No newline at end of file diff --git a/package.json b/package.json index 5be254f..cf6328d 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,19 @@ { "name": "@kevisual/envision-cli", - "version": "0.0.31", + "version": "0.0.32", "description": "envision command tools", - "main": "dist/index.js", + "main": "dist/app.mjs", "type": "module", "private": false, + "basename": "/root/backend-envision-cli", + "app": { + "key": "envision-cli", + "entry": "dist/app.mjs", + "type": "pm2-system-app", + "files": [ + "dist" + ] + }, "bin": { "envision": "bin/envision.js", "ev": "bin/envision.js", @@ -24,7 +33,7 @@ ], "author": "abearxiong", "devDependencies": { - "@kevisual/query": "0.0.9-alpha.2", + "@kevisual/query": "0.0.9", "@rollup/plugin-alias": "^5.1.1", "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", @@ -40,10 +49,10 @@ "filesize": "^10.1.6", "form-data": "^4.0.2", "ignore": "^7.0.3", - "inquirer": "^12.4.3", + "inquirer": "^12.5.0", "rimraf": "^6.0.1", - "rollup": "^4.35.0", - "rollup-plugin-dts": "^6.1.1", + "rollup": "^4.36.0", + "rollup-plugin-dts": "^6.2.0", "rollup-plugin-esbuild": "^6.2.1", "tar": "^7.4.3", "tslib": "^2.8.1", @@ -66,6 +75,6 @@ "pg-hstore": "^2.3.4", "sequelize": "^6.37.6", "sqlite3": "^5.1.7", - "vite": "^6.2.1" + "vite": "^6.2.2" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88188b0..ac324d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,30 +33,30 @@ importers: specifier: ^5.1.7 version: 5.1.7 vite: - specifier: ^6.2.1 - version: 6.2.1(@types/node@22.13.10) + specifier: ^6.2.2 + version: 6.2.2(@types/node@22.13.10) devDependencies: '@kevisual/query': - specifier: 0.0.9-alpha.2 - version: 0.0.9-alpha.2(encoding@0.1.13)(ws@8.18.0) + specifier: 0.0.9 + version: 0.0.9(encoding@0.1.13)(ws@8.18.0) '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.35.0) + version: 5.1.1(rollup@4.36.0) '@rollup/plugin-commonjs': specifier: ^28.0.3 - version: 28.0.3(rollup@4.35.0) + version: 28.0.3(rollup@4.36.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.35.0) + version: 6.1.0(rollup@4.36.0) '@rollup/plugin-node-resolve': specifier: ^16.0.1 - version: 16.0.1(rollup@4.35.0) + version: 16.0.1(rollup@4.36.0) '@rollup/plugin-replace': specifier: ^6.0.2 - version: 6.0.2(rollup@4.35.0) + version: 6.0.2(rollup@4.36.0) '@rollup/plugin-typescript': specifier: ^12.1.2 - version: 12.1.2(rollup@4.35.0)(tslib@2.8.1)(typescript@5.8.2) + version: 12.1.2(rollup@4.36.0)(tslib@2.8.1)(typescript@5.8.2) '@types/crypto-js': specifier: ^4.2.2 version: 4.2.2 @@ -85,20 +85,20 @@ importers: specifier: ^7.0.3 version: 7.0.3 inquirer: - specifier: ^12.4.3 - version: 12.4.3(@types/node@22.13.10) + specifier: ^12.5.0 + version: 12.5.0(@types/node@22.13.10) rimraf: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.35.0 - version: 4.35.0 + specifier: ^4.36.0 + version: 4.36.0 rollup-plugin-dts: - specifier: ^6.1.1 - version: 6.1.1(rollup@4.35.0)(typescript@5.8.2) + specifier: ^6.2.0 + version: 6.2.0(rollup@4.36.0)(typescript@5.8.2) rollup-plugin-esbuild: specifier: ^6.2.1 - version: 6.2.1(esbuild@0.25.0)(rollup@4.35.0) + version: 6.2.1(esbuild@0.25.0)(rollup@4.36.0) tar: specifier: ^7.4.3 version: 7.4.3 @@ -272,8 +272,8 @@ packages: '@gar/promisify@1.1.3': resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} - '@inquirer/checkbox@4.1.3': - resolution: {integrity: sha512-KU1MGwf24iABJjGESxhyj+/rlQYSRoCfcuHDEHXfZ1DENmbuSRfyrUb+LLjHoee5TNOFKwaFxDXc5/zRwJUPMQ==} + '@inquirer/checkbox@4.1.4': + resolution: {integrity: sha512-d30576EZdApjAMceijXA5jDzRQHT/MygbC+J8I7EqA6f/FRpYxlRtRJbHF8gHeWYeSdOuTEJqonn7QLB1ELezA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -281,8 +281,8 @@ packages: '@types/node': optional: true - '@inquirer/confirm@5.1.7': - resolution: {integrity: sha512-Xrfbrw9eSiHb+GsesO8TQIeHSMTP0xyvTCeeYevgZ4sKW+iz9w/47bgfG9b0niQm+xaLY2EWPBINUPldLwvYiw==} + '@inquirer/confirm@5.1.8': + resolution: {integrity: sha512-dNLWCYZvXDjO3rnQfk2iuJNL4Ivwz/T2+C3+WnNfJKsNGSuOs3wAo2F6e0p946gtSAk31nZMfW+MRmYaplPKsg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -290,8 +290,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.8': - resolution: {integrity: sha512-HpAqR8y715zPpM9e/9Q+N88bnGwqqL8ePgZ0SMv/s3673JLMv3bIkoivGmjPqXlEgisUksSXibweQccUwEx4qQ==} + '@inquirer/core@10.1.9': + resolution: {integrity: sha512-sXhVB8n20NYkUBfDYgizGHlpRVaCRjtuzNZA6xpALIUbkgfd2Hjz+DfEN6+h1BRnuxw0/P4jCIMjMsEOAMwAJw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -299,8 +299,8 @@ packages: '@types/node': optional: true - '@inquirer/editor@4.2.8': - resolution: {integrity: sha512-UkGKbMFlQw5k4ZLjDwEi5z8NIVlP/3DAlLHta0o0pSsdpPThNmPtUL8mvGCHUaQtR+QrxR9yRYNWgKMsHkfIUA==} + '@inquirer/editor@4.2.9': + resolution: {integrity: sha512-8HjOppAxO7O4wV1ETUlJFg6NDjp/W2NP5FB9ZPAcinAlNT4ZIWOLe2pUVwmmPRSV0NMdI5r/+lflN55AwZOKSw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -308,8 +308,8 @@ packages: '@types/node': optional: true - '@inquirer/expand@4.0.10': - resolution: {integrity: sha512-leyBouGJ77ggv51Jb/OJmLGGnU2HYc13MZ2iiPNLwe2VgFgZPVqsrRWSa1RAHKyazjOyvSNKLD1B2K7A/iWi1g==} + '@inquirer/expand@4.0.11': + resolution: {integrity: sha512-OZSUW4hFMW2TYvX/Sv+NnOZgO8CHT2TU1roUCUIF2T+wfw60XFRRp9MRUPCT06cRnKL+aemt2YmTWwt7rOrNEA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -321,8 +321,8 @@ packages: resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} engines: {node: '>=18'} - '@inquirer/input@4.1.7': - resolution: {integrity: sha512-rCQAipJNA14UTH84df/z4jDJ9LZ54H6zzuCAi7WZ0qVqx3CSqLjfXAMd5cpISIxbiHVJCPRB81gZksq6CZsqDg==} + '@inquirer/input@4.1.8': + resolution: {integrity: sha512-WXJI16oOZ3/LiENCAxe8joniNp8MQxF6Wi5V+EBbVA0ZIOpFcL4I9e7f7cXse0HJeIPCWO8Lcgnk98juItCi7Q==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -330,8 +330,8 @@ packages: '@types/node': optional: true - '@inquirer/number@3.0.10': - resolution: {integrity: sha512-GLsdnxzNefjCJUmWyjaAuNklHgDpCTL4RMllAVhVvAzBwRW9g38eZ5tWgzo1lirtSDTpsh593hqXVhxvdrjfwA==} + '@inquirer/number@3.0.11': + resolution: {integrity: sha512-pQK68CsKOgwvU2eA53AG/4npRTH2pvs/pZ2bFvzpBhrznh8Mcwt19c+nMO7LHRr3Vreu1KPhNBF3vQAKrjIulw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -339,8 +339,8 @@ packages: '@types/node': optional: true - '@inquirer/password@4.0.10': - resolution: {integrity: sha512-JC538ujqeYKkFqLoWZ0ILBteIUO2yajBMVEUZSxjl9x6fiEQtM+I5Rca7M2D8edMDbyHLnXifGH1hJZdh8V5rA==} + '@inquirer/password@4.0.11': + resolution: {integrity: sha512-dH6zLdv+HEv1nBs96Case6eppkRggMe8LoOTl30+Gq5Wf27AO/vHFgStTVz4aoevLdNXqwE23++IXGw4eiOXTg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -348,8 +348,8 @@ packages: '@types/node': optional: true - '@inquirer/prompts@7.3.3': - resolution: {integrity: sha512-QS1AQgJ113iE/nmym03yKZKHvGjVWwkGZT3B1yKrrMG0bJKQg1jUkntFP8aPd2FUQzu/nga7QU2eDpzIP5it0Q==} + '@inquirer/prompts@7.4.0': + resolution: {integrity: sha512-EZiJidQOT4O5PYtqnu1JbF0clv36oW2CviR66c7ma4LsupmmQlUwmdReGKRp456OWPWMz3PdrPiYg3aCk3op2w==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -357,8 +357,8 @@ packages: '@types/node': optional: true - '@inquirer/rawlist@4.0.10': - resolution: {integrity: sha512-vOQbQkmhaCsF2bUmjoyRSZJBz77UnIF/F3ZS2LMgwbgyaG2WgwKHh0WKNj0APDB72WDbZijhW5nObQbk+TnbcA==} + '@inquirer/rawlist@4.0.11': + resolution: {integrity: sha512-uAYtTx0IF/PqUAvsRrF3xvnxJV516wmR6YVONOmCWJbbt87HcDHLfL9wmBQFbNJRv5kCjdYKrZcavDkH3sVJPg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -366,8 +366,8 @@ packages: '@types/node': optional: true - '@inquirer/search@3.0.10': - resolution: {integrity: sha512-EAVKAz6P1LajZOdoL+R+XC3HJYSU261fbJzO4fCkJJ7UPFcm+nP+gzC+DDZWsb2WK9PQvKsnaKiNKsY8B6dBWQ==} + '@inquirer/search@3.0.11': + resolution: {integrity: sha512-9CWQT0ikYcg6Ls3TOa7jljsD7PgjcsYEM0bYE+Gkz+uoW9u8eaJCRHJKkucpRE5+xKtaaDbrND+nPDoxzjYyew==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -375,8 +375,8 @@ packages: '@types/node': optional: true - '@inquirer/select@4.0.10': - resolution: {integrity: sha512-Tg8S9nESnCfISu5tCZSuXpXq0wHuDVimj7xyHstABgR34zcJnLdq/VbjB2mdZvNAMAehYBnNzSjxB06UE8LLAA==} + '@inquirer/select@4.1.0': + resolution: {integrity: sha512-z0a2fmgTSRN+YBuiK1ROfJ2Nvrpij5lVN3gPDkQGhavdvIVGHGW29LwYZfM/j42Ai2hUghTI/uoBuTbrJk42bA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -407,8 +407,8 @@ packages: '@kevisual/load@0.0.6': resolution: {integrity: sha512-+3YTFehRcZ1haGel5DKYMUwmi5i6f2psyaPZlfkKU/cOXgkpwoG9/BEqPCnPjicKqqnksEpixVRkyHJ+5bjLVA==} - '@kevisual/query@0.0.9-alpha.2': - resolution: {integrity: sha512-bpMHngIB5et7s83b6gCty9PzvU2JMEe41LhdE+9IHUj8iD0Jg6gD0RlX1t3SFW1Thgc6DoCFcTEPAOCYXqoE5w==} + '@kevisual/query@0.0.9': + resolution: {integrity: sha512-b2rNhORKtyAY1Zo36Qum3JOuxKU76mYQJdWOxxX5+1jJSqv11Pa9RSu3FYWiaSP0+9djrjLg/nECr9sMkJxt8Q==} '@kevisual/router@0.0.9': resolution: {integrity: sha512-qPyC2GVJ7iOIdJCCKNDsWMAKOQeSJW9HBpL5ZWKHTbi+t4jJBGTzIlXmjKeMHRd0lr/Qq1imQvlkSh4hlrbodA==} @@ -504,98 +504,98 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.35.0': - resolution: {integrity: sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==} + '@rollup/rollup-android-arm-eabi@4.36.0': + resolution: {integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.35.0': - resolution: {integrity: sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==} + '@rollup/rollup-android-arm64@4.36.0': + resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.35.0': - resolution: {integrity: sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==} + '@rollup/rollup-darwin-arm64@4.36.0': + resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.35.0': - resolution: {integrity: sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==} + '@rollup/rollup-darwin-x64@4.36.0': + resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.35.0': - resolution: {integrity: sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==} + '@rollup/rollup-freebsd-arm64@4.36.0': + resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.35.0': - resolution: {integrity: sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==} + '@rollup/rollup-freebsd-x64@4.36.0': + resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.35.0': - resolution: {integrity: sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==} + '@rollup/rollup-linux-arm-gnueabihf@4.36.0': + resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.35.0': - resolution: {integrity: sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==} + '@rollup/rollup-linux-arm-musleabihf@4.36.0': + resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.35.0': - resolution: {integrity: sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==} + '@rollup/rollup-linux-arm64-gnu@4.36.0': + resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.35.0': - resolution: {integrity: sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==} + '@rollup/rollup-linux-arm64-musl@4.36.0': + resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.35.0': - resolution: {integrity: sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==} + '@rollup/rollup-linux-loongarch64-gnu@4.36.0': + resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.35.0': - resolution: {integrity: sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==} + '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': + resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.35.0': - resolution: {integrity: sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==} + '@rollup/rollup-linux-riscv64-gnu@4.36.0': + resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.35.0': - resolution: {integrity: sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==} + '@rollup/rollup-linux-s390x-gnu@4.36.0': + resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.35.0': - resolution: {integrity: sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==} + '@rollup/rollup-linux-x64-gnu@4.36.0': + resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.35.0': - resolution: {integrity: sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==} + '@rollup/rollup-linux-x64-musl@4.36.0': + resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.35.0': - resolution: {integrity: sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==} + '@rollup/rollup-win32-arm64-msvc@4.36.0': + resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.35.0': - resolution: {integrity: sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==} + '@rollup/rollup-win32-ia32-msvc@4.36.0': + resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.35.0': - resolution: {integrity: sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==} + '@rollup/rollup-win32-x64-msvc@4.36.0': + resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==} cpu: [x64] os: [win32] @@ -1060,8 +1060,8 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - inquirer@12.4.3: - resolution: {integrity: sha512-p9+jcDKhFHKTunvpffCk7I9eKt8+NPNWO8hMSSoLPv5vahP5Vhr78qWzDtA+6FBWQtFTuLFUWmxTyhC6G2Xz/Q==} + inquirer@12.5.0: + resolution: {integrity: sha512-aiBBq5aKF1k87MTxXDylLfwpRwToShiHrSv4EmB07EYyLgmnjEz5B3rn0aGw1X3JA/64Ngf2T54oGwc+BCsPIQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -1166,6 +1166,9 @@ packages: magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + make-fetch-happen@9.1.0: resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==} engines: {node: '>= 10'} @@ -1328,8 +1331,8 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - openai@4.87.3: - resolution: {integrity: sha512-d2D54fzMuBYTxMW8wcNmhT1rYKcTfMJ8t+4KjH2KtvYenygITiGBgHoIrzHwnDQWW+C5oCA+ikIR2jgPCFqcKQ==} + openai@4.88.0: + resolution: {integrity: sha512-Ll2ZJCdX/56WcCF/wLtAFou+zWRyLeneoXy+qya5T5/wm5LkIr6heJfSn53c5ujXWPB+24cgumiOetbFqcppFA==} hasBin: true peerDependencies: ws: ^8.18.0 @@ -1458,8 +1461,8 @@ packages: engines: {node: 20 || >=22} hasBin: true - rollup-plugin-dts@6.1.1: - resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} + rollup-plugin-dts@6.2.0: + resolution: {integrity: sha512-iciY+z46mUbN5nCxtJqVynwgrZZljM8of6k8Rg5rVAmu4VHDxexFPgoCa2wrJG5mMsHSGrJmjQPCM4vD0Oe3Lg==} engines: {node: '>=16'} peerDependencies: rollup: ^3.29.4 || ^4 @@ -1472,8 +1475,8 @@ packages: esbuild: '>=0.18.0' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.35.0: - resolution: {integrity: sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==} + rollup@4.36.0: + resolution: {integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1690,8 +1693,8 @@ packages: resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} engines: {node: '>= 0.10'} - vite@6.2.1: - resolution: {integrity: sha512-n2GnqDb6XPhlt9B8olZPrgMD/es/Nd1RdChF6CBD/fHW6pUyUTt2sQW2fPRX5GiD9XEa6+8A6A4f2vT6pSsE7Q==} + vite@6.2.2: + resolution: {integrity: sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -1879,9 +1882,9 @@ snapshots: '@gar/promisify@1.1.3': optional: true - '@inquirer/checkbox@4.1.3(@types/node@22.13.10)': + '@inquirer/checkbox@4.1.4(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/figures': 1.0.11 '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 @@ -1889,14 +1892,14 @@ snapshots: optionalDependencies: '@types/node': 22.13.10 - '@inquirer/confirm@5.1.7(@types/node@22.13.10)': + '@inquirer/confirm@5.1.8(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: '@types/node': 22.13.10 - '@inquirer/core@10.1.8(@types/node@22.13.10)': + '@inquirer/core@10.1.9(@types/node@22.13.10)': dependencies: '@inquirer/figures': 1.0.11 '@inquirer/type': 3.0.5(@types/node@22.13.10) @@ -1909,17 +1912,17 @@ snapshots: optionalDependencies: '@types/node': 22.13.10 - '@inquirer/editor@4.2.8(@types/node@22.13.10)': + '@inquirer/editor@4.2.9(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) external-editor: 3.1.0 optionalDependencies: '@types/node': 22.13.10 - '@inquirer/expand@4.0.10(@types/node@22.13.10)': + '@inquirer/expand@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: @@ -1927,63 +1930,63 @@ snapshots: '@inquirer/figures@1.0.11': {} - '@inquirer/input@4.1.7(@types/node@22.13.10)': + '@inquirer/input@4.1.8(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: '@types/node': 22.13.10 - '@inquirer/number@3.0.10(@types/node@22.13.10)': + '@inquirer/number@3.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) optionalDependencies: '@types/node': 22.13.10 - '@inquirer/password@4.0.10(@types/node@22.13.10)': + '@inquirer/password@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 optionalDependencies: '@types/node': 22.13.10 - '@inquirer/prompts@7.3.3(@types/node@22.13.10)': + '@inquirer/prompts@7.4.0(@types/node@22.13.10)': dependencies: - '@inquirer/checkbox': 4.1.3(@types/node@22.13.10) - '@inquirer/confirm': 5.1.7(@types/node@22.13.10) - '@inquirer/editor': 4.2.8(@types/node@22.13.10) - '@inquirer/expand': 4.0.10(@types/node@22.13.10) - '@inquirer/input': 4.1.7(@types/node@22.13.10) - '@inquirer/number': 3.0.10(@types/node@22.13.10) - '@inquirer/password': 4.0.10(@types/node@22.13.10) - '@inquirer/rawlist': 4.0.10(@types/node@22.13.10) - '@inquirer/search': 3.0.10(@types/node@22.13.10) - '@inquirer/select': 4.0.10(@types/node@22.13.10) + '@inquirer/checkbox': 4.1.4(@types/node@22.13.10) + '@inquirer/confirm': 5.1.8(@types/node@22.13.10) + '@inquirer/editor': 4.2.9(@types/node@22.13.10) + '@inquirer/expand': 4.0.11(@types/node@22.13.10) + '@inquirer/input': 4.1.8(@types/node@22.13.10) + '@inquirer/number': 3.0.11(@types/node@22.13.10) + '@inquirer/password': 4.0.11(@types/node@22.13.10) + '@inquirer/rawlist': 4.0.11(@types/node@22.13.10) + '@inquirer/search': 3.0.11(@types/node@22.13.10) + '@inquirer/select': 4.1.0(@types/node@22.13.10) optionalDependencies: '@types/node': 22.13.10 - '@inquirer/rawlist@4.0.10(@types/node@22.13.10)': + '@inquirer/rawlist@4.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: '@types/node': 22.13.10 - '@inquirer/search@3.0.10(@types/node@22.13.10)': + '@inquirer/search@3.0.11(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/figures': 1.0.11 '@inquirer/type': 3.0.5(@types/node@22.13.10) yoctocolors-cjs: 2.1.2 optionalDependencies: '@types/node': 22.13.10 - '@inquirer/select@4.0.10(@types/node@22.13.10)': + '@inquirer/select@4.1.0(@types/node@22.13.10)': dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) '@inquirer/figures': 1.0.11 '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 @@ -2014,9 +2017,9 @@ snapshots: dependencies: eventemitter3: 5.0.1 - '@kevisual/query@0.0.9-alpha.2(encoding@0.1.13)(ws@8.18.0)': + '@kevisual/query@0.0.9(encoding@0.1.13)(ws@8.18.0)': dependencies: - openai: 4.87.3(encoding@0.1.13)(ws@8.18.0) + openai: 4.88.0(encoding@0.1.13)(ws@8.18.0) transitivePeerDependencies: - encoding - ws @@ -2058,13 +2061,13 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/plugin-alias@5.1.1(rollup@4.35.0)': + '@rollup/plugin-alias@5.1.1(rollup@4.36.0)': optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/plugin-commonjs@28.0.3(rollup@4.35.0)': + '@rollup/plugin-commonjs@28.0.3(rollup@4.36.0)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.35.0) + '@rollup/pluginutils': 5.1.2(rollup@4.36.0) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.4.0(picomatch@4.0.2) @@ -2072,103 +2075,103 @@ snapshots: magic-string: 0.30.11 picomatch: 4.0.2 optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/plugin-json@6.1.0(rollup@4.35.0)': + '@rollup/plugin-json@6.1.0(rollup@4.36.0)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.35.0) + '@rollup/pluginutils': 5.1.2(rollup@4.36.0) optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/plugin-node-resolve@16.0.1(rollup@4.35.0)': + '@rollup/plugin-node-resolve@16.0.1(rollup@4.36.0)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.35.0) + '@rollup/pluginutils': 5.1.2(rollup@4.36.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/plugin-replace@6.0.2(rollup@4.35.0)': + '@rollup/plugin-replace@6.0.2(rollup@4.36.0)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.35.0) + '@rollup/pluginutils': 5.1.2(rollup@4.36.0) magic-string: 0.30.11 optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/plugin-typescript@12.1.2(rollup@4.35.0)(tslib@2.8.1)(typescript@5.8.2)': + '@rollup/plugin-typescript@12.1.2(rollup@4.36.0)(tslib@2.8.1)(typescript@5.8.2)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.35.0) + '@rollup/pluginutils': 5.1.2(rollup@4.36.0) resolve: 1.22.8 typescript: 5.8.2 optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 tslib: 2.8.1 - '@rollup/pluginutils@5.1.2(rollup@4.35.0)': + '@rollup/pluginutils@5.1.2(rollup@4.36.0)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.35.0 + rollup: 4.36.0 - '@rollup/rollup-android-arm-eabi@4.35.0': + '@rollup/rollup-android-arm-eabi@4.36.0': optional: true - '@rollup/rollup-android-arm64@4.35.0': + '@rollup/rollup-android-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-arm64@4.35.0': + '@rollup/rollup-darwin-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-x64@4.35.0': + '@rollup/rollup-darwin-x64@4.36.0': optional: true - '@rollup/rollup-freebsd-arm64@4.35.0': + '@rollup/rollup-freebsd-arm64@4.36.0': optional: true - '@rollup/rollup-freebsd-x64@4.35.0': + '@rollup/rollup-freebsd-x64@4.36.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.35.0': + '@rollup/rollup-linux-arm-gnueabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.35.0': + '@rollup/rollup-linux-arm-musleabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.35.0': + '@rollup/rollup-linux-arm64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.35.0': + '@rollup/rollup-linux-arm64-musl@4.36.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.35.0': + '@rollup/rollup-linux-loongarch64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.35.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.35.0': + '@rollup/rollup-linux-riscv64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.35.0': + '@rollup/rollup-linux-s390x-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.35.0': + '@rollup/rollup-linux-x64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-musl@4.35.0': + '@rollup/rollup-linux-x64-musl@4.36.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.35.0': + '@rollup/rollup-win32-arm64-msvc@4.36.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.35.0': + '@rollup/rollup-win32-ia32-msvc@4.36.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.35.0': + '@rollup/rollup-win32-x64-msvc@4.36.0': optional: true '@tootallnate/once@1.1.2': @@ -2681,10 +2684,10 @@ snapshots: ini@1.3.8: {} - inquirer@12.4.3(@types/node@22.13.10): + inquirer@12.5.0(@types/node@22.13.10): dependencies: - '@inquirer/core': 10.1.8(@types/node@22.13.10) - '@inquirer/prompts': 7.3.3(@types/node@22.13.10) + '@inquirer/core': 10.1.9(@types/node@22.13.10) + '@inquirer/prompts': 7.4.0(@types/node@22.13.10) '@inquirer/type': 3.0.5(@types/node@22.13.10) ansi-escapes: 4.3.2 mute-stream: 2.0.0 @@ -2793,6 +2796,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + make-fetch-happen@9.1.0: dependencies: agentkeepalive: 4.6.0 @@ -2968,7 +2975,7 @@ snapshots: dependencies: wrappy: 1.0.2 - openai@4.87.3(encoding@0.1.13)(ws@8.18.0): + openai@4.88.0(encoding@0.1.13)(ws@8.18.0): dependencies: '@types/node': 18.19.80 '@types/node-fetch': 2.6.12 @@ -3101,48 +3108,48 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.1 - rollup-plugin-dts@6.1.1(rollup@4.35.0)(typescript@5.8.2): + rollup-plugin-dts@6.2.0(rollup@4.36.0)(typescript@5.8.2): dependencies: - magic-string: 0.30.11 - rollup: 4.35.0 + magic-string: 0.30.17 + rollup: 4.36.0 typescript: 5.8.2 optionalDependencies: '@babel/code-frame': 7.26.2 - rollup-plugin-esbuild@6.2.1(esbuild@0.25.0)(rollup@4.35.0): + rollup-plugin-esbuild@6.2.1(esbuild@0.25.0)(rollup@4.36.0): dependencies: debug: 4.4.0 es-module-lexer: 1.6.0 esbuild: 0.25.0 get-tsconfig: 4.10.0 - rollup: 4.35.0 + rollup: 4.36.0 unplugin-utils: 0.2.4 transitivePeerDependencies: - supports-color - rollup@4.35.0: + rollup@4.36.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.35.0 - '@rollup/rollup-android-arm64': 4.35.0 - '@rollup/rollup-darwin-arm64': 4.35.0 - '@rollup/rollup-darwin-x64': 4.35.0 - '@rollup/rollup-freebsd-arm64': 4.35.0 - '@rollup/rollup-freebsd-x64': 4.35.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.35.0 - '@rollup/rollup-linux-arm-musleabihf': 4.35.0 - '@rollup/rollup-linux-arm64-gnu': 4.35.0 - '@rollup/rollup-linux-arm64-musl': 4.35.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.35.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.35.0 - '@rollup/rollup-linux-riscv64-gnu': 4.35.0 - '@rollup/rollup-linux-s390x-gnu': 4.35.0 - '@rollup/rollup-linux-x64-gnu': 4.35.0 - '@rollup/rollup-linux-x64-musl': 4.35.0 - '@rollup/rollup-win32-arm64-msvc': 4.35.0 - '@rollup/rollup-win32-ia32-msvc': 4.35.0 - '@rollup/rollup-win32-x64-msvc': 4.35.0 + '@rollup/rollup-android-arm-eabi': 4.36.0 + '@rollup/rollup-android-arm64': 4.36.0 + '@rollup/rollup-darwin-arm64': 4.36.0 + '@rollup/rollup-darwin-x64': 4.36.0 + '@rollup/rollup-freebsd-arm64': 4.36.0 + '@rollup/rollup-freebsd-x64': 4.36.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.36.0 + '@rollup/rollup-linux-arm-musleabihf': 4.36.0 + '@rollup/rollup-linux-arm64-gnu': 4.36.0 + '@rollup/rollup-linux-arm64-musl': 4.36.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.36.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.36.0 + '@rollup/rollup-linux-riscv64-gnu': 4.36.0 + '@rollup/rollup-linux-s390x-gnu': 4.36.0 + '@rollup/rollup-linux-x64-gnu': 4.36.0 + '@rollup/rollup-linux-x64-musl': 4.36.0 + '@rollup/rollup-win32-arm64-msvc': 4.36.0 + '@rollup/rollup-win32-ia32-msvc': 4.36.0 + '@rollup/rollup-win32-x64-msvc': 4.36.0 fsevents: 2.3.3 run-async@3.0.0: {} @@ -3364,11 +3371,11 @@ snapshots: validator@13.12.0: {} - vite@6.2.1(@types/node@22.13.10): + vite@6.2.2(@types/node@22.13.10): dependencies: esbuild: 0.25.0 postcss: 8.5.3 - rollup: 4.35.0 + rollup: 4.36.0 optionalDependencies: '@types/node': 22.13.10 fsevents: 2.3.3 diff --git a/src/command/deploy.ts b/src/command/deploy.ts index 441901d..41c4a9e 100644 --- a/src/command/deploy.ts +++ b/src/command/deploy.ts @@ -18,9 +18,10 @@ const command = new Command('deploy') .option('-y, --yes ', 'yes') .option('-o, --org ', 'org') .option('-u, --update', 'load current app. set current version in product') + .option('-s, --showBackend', 'show backend url') .action(async (filePath, options) => { try { - let { version, key, yes, update, org } = options; + let { version, key, yes, update, org, showBackend } = options; if (!version || !key) { const answers = await inquirer.prompt([ { @@ -80,18 +81,24 @@ const command = new Command('deploy') if (id && !update) { console.log(chalk.green('id: '), id); if (!org) { - console.log(chalk.green(`run to load: envision deploy-load ${id}`)); + console.log(chalk.green(`更新为最新版本: envision deploy-load ${id}`)); } else { - console.log(chalk.green(`run to load: envision deploy-load ${id} -o ${org}`)); + console.log(chalk.green(`更新为最新版本: envision deploy-load ${id} -o ${org}`)); } } else if (id && update) { deployLoadFn(id); } else { - console.log('rest', JSON.stringify(rest, null, 2)); + console.log('rest error', JSON.stringify(rest, null, 2)); + } + if (id && showBackend) { + console.log('\n'); + console.log(chalk.blue('服务端应用部署: '), 'envision pack-deploy', id, '-k '); + console.log('\n'); } } else { console.error('File upload failed', res?.message); } + return res; } catch (error) { console.error('error', error); } @@ -171,13 +178,13 @@ const deployLoadFn = async (id: string, org?: string) => { }, }); if (res.code === 200) { - console.log('deploy-load success. current version:', res.data?.version); + console.log(chalk.green('deploy-load success. current version:', res.data?.version)); // /:username/:appName try { const { user, key } = res.data; const baseURL = getBaseURL(); - const deployURL = new URL(`/${user}/${key}`, baseURL); - console.log('deployURL', deployURL.href); + const deployURL = new URL(`/${user}/${key}/`, baseURL); + console.log(chalk.blue('deployURL', deployURL.href)); } catch (error) {} } else { console.error('deploy-load failed', res.message); diff --git a/src/command/publish.ts b/src/command/publish.ts index ad16262..717a789 100644 --- a/src/command/publish.ts +++ b/src/command/publish.ts @@ -3,10 +3,9 @@ import path from 'path'; import * as tar from 'tar'; import glob from 'fast-glob'; import { program, Command } from '@/program.ts'; -import { getBaseURL, getConfig, query } from '@/module/index.ts'; +import { getConfig, query } from '@/module/index.ts'; import { fileIsExist } from '@/uitls/file.ts'; import ignore from 'ignore'; -import FormData from 'form-data'; import { chalk } from '@/module/chalk.ts'; import * as backServices from '@/query/services/index.ts'; import inquirer from 'inquirer'; @@ -66,8 +65,61 @@ async function getFiles(cwd: string, patterns: string[]): Promise { const filteredFiles = allFiles.filter((file) => !ig.ignores(file)); return filteredFiles; } +/** + * 复制文件到 pack-dist + * @param files 文件列表 + * @param cwd 当前工作目录 + * @param packDist 打包目录 + */ +export const copyFilesToPackDist = async (files: string[], cwd: string, packDist = 'pack-dist') => { + const packDistPath = path.join(cwd, packDist); + if (!fileIsExist(packDistPath)) { + fs.mkdirSync(packDistPath, { recursive: true }); + } else { + fs.rmSync(packDistPath, { recursive: true, force: true }); + } + files.forEach((file) => { + const stat = fs.statSync(path.join(cwd, file)); + if (stat.isDirectory()) { + fs.cpSync(path.join(cwd, file), path.join(packDistPath, file), { recursive: true }); + } else { + fs.copyFileSync(path.join(cwd, file), path.join(packDistPath, file), fs.constants.COPYFILE_EXCL); + } + }); + const packageInfo = await getPackageInfo(); + // 根据所有文件,生成一个index.html + const indexHtmlPath = path.join(packDistPath, 'index.html'); + const collectionFiles = (await Promise.all(files.map((file) => collectFileInfo(file)))).flat(); + const prettifySize = (size: number) => { + if (size < 1024) { + return `${size}B`; + } + if (size < 1024 * 1024) { + return `${(size / 1024).toFixed(2)}kB`; + } + return `${(size / 1024 / 1024).toFixed(2)}MB`; + }; + const filesString = collectionFiles.map((file) => `
  • ${file.path}${prettifySize(file.size)}
  • `).join('\n'); + const indexHtmlContent = ` + + -export const pack = async () => { + + ${packageInfo.name} + + + +

    ${packageInfo.name}

    +
      +${filesString} +
    +
    ${JSON.stringify(packageInfo, null, 2)}
    + + +`; + fs.writeFileSync(indexHtmlPath, indexHtmlContent); +}; +export const pack = async (opts: { isTar: boolean; packDist?: string }) => { const cwd = process.cwd(); const collection: Record = {}; const packageJsonPath = path.join(cwd, 'package.json'); @@ -89,6 +141,7 @@ export const pack = async () => { .replace('@', '') // 替换特殊字符 @ .replace(/[\/\\:*?"<>|]/g, '-'); // 替换特殊字符 + // 当 opts.isTar 为 true 时,输出文件为 tgz 文件 const outputFilePath = path.join(cwd, outputFileName); // 从 package.json 的 files 字段收集文件 @@ -130,16 +183,20 @@ export const pack = async () => { console.log(`filename: ${outputFileName}`); console.log(`package size: ${packageSize}`); console.log(`total files: ${allFiles.length}`); - console.log(`Created package: ${outputFileName}`); + opts?.isTar && console.log(`Created package: ${outputFileName}`); try { - await tar.c( - { - gzip: true, - file: outputFilePath, - cwd: cwd, - }, - filesToInclude, - ); + if (opts.isTar) { + await tar.c( + { + gzip: true, + file: outputFilePath, + cwd: cwd, + }, + filesToInclude, + ); + } else { + copyFilesToPackDist(filesToInclude, cwd, opts.packDist); + } } catch (error) { console.error('Error creating tarball:', error); } @@ -150,7 +207,23 @@ export const pack = async () => { } return { collection, outputFilePath }; }; -export const packByIgnore = async () => { +export const getPackageInfo = async () => { + const cwd = process.cwd(); + const packageJsonPath = path.join(cwd, 'package.json'); + try { + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')); + return packageJson; + } catch (error) { + console.error('Invalid package.json:', error); + return {}; + } +}; + +type PackByIgnoreOpts = { + isTar: boolean; + packDist?: string; +}; +export const packByIgnore = async (opts: PackByIgnoreOpts) => { let collection: Record = {}; const cwd = process.cwd(); const patterns = ['**/*']; // 匹配所有文件 @@ -194,14 +267,18 @@ export const packByIgnore = async () => { console.log(`total files: ${allFiles.length}`); const filesToInclude = files.map((file) => path.relative(cwd, file)); try { - await tar.c( - { - gzip: true, - file: outputFilePath, - cwd: cwd, - }, - filesToInclude, - ); + if (opts.isTar) { + await tar.c( + { + gzip: true, + file: outputFilePath, + cwd: cwd, + }, + filesToInclude, + ); + } else { + copyFilesToPackDist(filesToInclude, cwd, opts.packDist); + } } catch (error) { console.error('Error creating tarball:', error); } @@ -212,11 +289,16 @@ export const packByIgnore = async () => { } return { collection, outputFilePath }; }; -export const packLib = async (ignore: boolean = false) => { +/** + * 打包应用 + * @param ignore 是否忽略 .npmignore 文件 + * @returns 打包结果 + */ +export const packLib = async ({ ignore = false, tar = false, packDist = 'pack-dist' }: { ignore?: boolean; tar?: boolean; packDist?: string }) => { if (ignore) { - return await packByIgnore(); + return await packByIgnore({ isTar: tar, packDist }); } - return await pack(); + return await pack({ isTar: tar, packDist }); }; export const unpackLib = async (filePath: string, cwd: string) => { try { @@ -237,60 +319,7 @@ const publishCommand = new Command('publish') const config = await getConfig(); console.log('发布逻辑实现', { key, version, config }); }); -const uploadFiles = async (filePath: string, collection: any): Promise => { - const config = await getConfig(); - const form = new FormData(); - const filename = path.basename(filePath); - try { - console.log('upload file', filePath); - form.append('file', createReadStream(filePath)); - } catch (error) { - console.error('Error reading file:', error); - return; - } - form.append('collection', JSON.stringify(collection)); - console.log('upload file', filename); - return await new Promise((resolve) => { - const _baseURL = getBaseURL(); - const url = new URL(_baseURL); - console.log('upload url', url.hostname, url.protocol, url.port); - form.submit( - { - path: '/api/micro-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; - } - console.log('upload success'); - // 处理服务器响应 - let body = ''; - res.on('data', (chunk) => { - body += chunk; - }); - res.on('end', () => { - try { - const res = JSON.parse(body); - console.log('upload success', res); - resolve(res); - } catch (e) { - resolve({ code: 500, message: body }); - } - }); - }, - ); - }); -}; const deployLoadFn = async (id: string, fileKey: string, force = false, install = false) => { if (!id) { console.error(chalk.red('id is required')); @@ -329,31 +358,76 @@ const deployLoadFn = async (id: string, fileKey: string, force = false, install } return res; }; + const packCommand = new Command('pack') .description('打包应用, 默认使用 package.json 中的 files 字段') .option('-i, --ignore', '使用 .npmignore 文件模式去忽略文件进行打包, 不需要package.json中的files字段') .option('-p, --publish', '打包并发布') - .option('-u, --update', 'show command for deploy to server') + .option('-u, --update', '发布后显示更新命令, show command for deploy to server') + .option('-t, --tar', '打包为 tgz 文件') + .option('-d, --packDist ', '打包目录') + .option('-y, --yes', '确定,直接打包', true) .action(async (opts) => { - let value: { collection: Record; outputFilePath: string } = await packLib(opts.ignore); - if (opts.publish && value?.collection) { - const { collection, outputFilePath } = value; - try { - const res = await uploadFiles(outputFilePath, collection); - if (res.code === 200 && opts?.update) { - const id = res.data.id; - if (opts?.update) { - console.log(chalk.blue('example: '), 'envision pack-deploy', id, '-k '); - console.log('envision pack-deploy', id); - } - } else { - console.error('Error uploading file:', res.message); - } - } catch (error) { - console.error('Error uploading file:', error); - } + const packDist = opts.packDist || 'pack-dist'; + const packageInfo = await getPackageInfo(); + if (!packageInfo) { + console.error('Invalid package.json:'); + return; + } + let basename = packageInfo.basename || ''; + let appKey: string | undefined; + let version = packageInfo.version || ''; + if (!version) { + const answers = await inquirer.prompt([ + { + type: 'input', + name: 'version', + message: 'Enter your version:', + }, + ]); + version = answers.version || version; + } + + if (basename) { + if (basename.startsWith('/')) { + basename = basename.slice(1); + } + const basenameArr = basename.split('/'); + appKey = basenameArr[1] || ''; + } + if (!appKey) { + const answers = await inquirer.prompt([ + { + type: 'input', + name: 'appKey', + message: 'Enter your appKey:', + }, + ]); + appKey = answers.appKey || appKey; + } + let value: { collection: Record; outputFilePath: string } = await packLib({ + ignore: opts.ignore, + tar: opts.tar, + packDist, + }); + if (opts.publish) { + // 运行 deploy 命令 + const runDeployCommand = 'envision pack-deploy ' + value.outputFilePath + ' -k ' + appKey; + const [_app, _command] = process.argv; + console.log(chalk.blue('example: '), runDeployCommand); + let deployDist = opts.isTar ? value.outputFilePath : packDist; + const deployCommand = [_app, _command, 'deploy', deployDist, '-k', appKey, '-v', version, '-u']; + if (opts.org) { + deployCommand.push('-o', opts.org); + } + if (opts.update) { + deployCommand.push('-s'); + } + if (opts.yes) { + deployCommand.push('-y', 'yes'); + } + program.parse(deployCommand); } - // }); const packDeployCommand = new Command('pack-deploy') .argument('', 'id') diff --git a/src/program.ts b/src/program.ts index 9845393..21beb39 100644 --- a/src/program.ts +++ b/src/program.ts @@ -16,3 +16,12 @@ const ls = new Command('ls').description('List files in the current directory'). program.addCommand(ls); export { program, Command }; + +/** + * 在命令行中运行程序 + * @param args + */ +export const runProgram = (args: string[]) => { + const [_app, _command] = process.argv; + program.parse([_app, _command, ...args]); +};