diff --git a/package.json b/package.json index 47ece92..5be254f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/envision-cli", - "version": "0.0.30", + "version": "0.0.31", "description": "envision command tools", "main": "dist/index.js", "type": "module", @@ -24,30 +24,30 @@ ], "author": "abearxiong", "devDependencies": { - "@kevisual/query": "0.0.7-alpha.3", + "@kevisual/query": "0.0.9-alpha.2", "@rollup/plugin-alias": "^5.1.1", - "@rollup/plugin-commonjs": "^28.0.2", + "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^16.0.0", + "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-replace": "^6.0.2", "@rollup/plugin-typescript": "^12.1.2", "@types/crypto-js": "^4.2.2", "@types/jsonwebtoken": "^9.0.9", - "@types/node": "^22.13.5", + "@types/node": "^22.13.10", "chalk": "^5.4.1", "commander": "^13.1.0", "fast-glob": "^3.3.3", "filesize": "^10.1.6", "form-data": "^4.0.2", "ignore": "^7.0.3", - "inquirer": "^12.4.2", + "inquirer": "^12.4.3", "rimraf": "^6.0.1", - "rollup": "^4.34.8", + "rollup": "^4.35.0", "rollup-plugin-dts": "^6.1.1", - "rollup-plugin-esbuild": "^6.2.0", + "rollup-plugin-esbuild": "^6.2.1", "tar": "^7.4.3", "tslib": "^2.8.1", - "typescript": "^5.7.3" + "typescript": "^5.8.2" }, "resolutions": { "picomatch": "^4" @@ -59,13 +59,13 @@ "access": "public" }, "dependencies": { - "@kevisual/load": "^0.0.4", - "@kevisual/router": "^0.0.7", + "@kevisual/load": "^0.0.6", + "@kevisual/router": "^0.0.9", "crypto-js": "^4.2.0", "jsonwebtoken": "^9.0.2", "pg-hstore": "^2.3.4", - "sequelize": "^6.37.5", + "sequelize": "^6.37.6", "sqlite3": "^5.1.7", - "vite": "^6.2.0" + "vite": "^6.2.1" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4bedd3b..88188b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,11 @@ importers: .: dependencies: '@kevisual/load': - specifier: ^0.0.4 - version: 0.0.4 + specifier: ^0.0.6 + version: 0.0.6 '@kevisual/router': - specifier: ^0.0.7 - version: 0.0.7 + specifier: ^0.0.9 + version: 0.0.9 crypto-js: specifier: ^4.2.0 version: 4.2.0 @@ -27,30 +27,30 @@ importers: specifier: ^2.3.4 version: 2.3.4 sequelize: - specifier: ^6.37.5 + specifier: ^6.37.6 version: 6.37.6(pg-hstore@2.3.4)(sqlite3@5.1.7) sqlite3: specifier: ^5.1.7 version: 5.1.7 vite: - specifier: ^6.2.0 + specifier: ^6.2.1 version: 6.2.1(@types/node@22.13.10) devDependencies: '@kevisual/query': - specifier: 0.0.7-alpha.3 - version: 0.0.7-alpha.3 + specifier: 0.0.9-alpha.2 + version: 0.0.9-alpha.2(encoding@0.1.13)(ws@8.18.0) '@rollup/plugin-alias': specifier: ^5.1.1 version: 5.1.1(rollup@4.35.0) '@rollup/plugin-commonjs': - specifier: ^28.0.2 + specifier: ^28.0.3 version: 28.0.3(rollup@4.35.0) '@rollup/plugin-json': specifier: ^6.1.0 version: 6.1.0(rollup@4.35.0) '@rollup/plugin-node-resolve': - specifier: ^16.0.0 - version: 16.0.0(rollup@4.35.0) + specifier: ^16.0.1 + version: 16.0.1(rollup@4.35.0) '@rollup/plugin-replace': specifier: ^6.0.2 version: 6.0.2(rollup@4.35.0) @@ -64,7 +64,7 @@ importers: specifier: ^9.0.9 version: 9.0.9 '@types/node': - specifier: ^22.13.5 + specifier: ^22.13.10 version: 22.13.10 chalk: specifier: ^5.4.1 @@ -85,19 +85,19 @@ importers: specifier: ^7.0.3 version: 7.0.3 inquirer: - specifier: ^12.4.2 + specifier: ^12.4.3 version: 12.4.3(@types/node@22.13.10) rimraf: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.34.8 + specifier: ^4.35.0 version: 4.35.0 rollup-plugin-dts: specifier: ^6.1.1 version: 6.1.1(rollup@4.35.0)(typescript@5.8.2) rollup-plugin-esbuild: - specifier: ^6.2.0 + specifier: ^6.2.1 version: 6.2.1(esbuild@0.25.0)(rollup@4.35.0) tar: specifier: ^7.4.3 @@ -106,7 +106,7 @@ importers: specifier: ^2.8.1 version: 2.8.1 typescript: - specifier: ^5.7.3 + specifier: ^5.8.2 version: 5.8.2 packages: @@ -404,14 +404,14 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@kevisual/load@0.0.4': - resolution: {integrity: sha512-TJBieKsEoEPfP4+tDyhNZdMX2LMAGiDZ/IrAXPFWB4jeFP0Ywm1W5xDV52LhhHq4nwTmuhyTVmPxJYiEVYTHtA==} + '@kevisual/load@0.0.6': + resolution: {integrity: sha512-+3YTFehRcZ1haGel5DKYMUwmi5i6f2psyaPZlfkKU/cOXgkpwoG9/BEqPCnPjicKqqnksEpixVRkyHJ+5bjLVA==} - '@kevisual/query@0.0.7-alpha.3': - resolution: {integrity: sha512-zNTIbyU87dlp8ZeLvPoc1ou7cZCL60to4xptyMD3VKsldL/dDSAMf7JWwUivNiq9lRxk9KVEZA7YX558mzeQcw==} + '@kevisual/query@0.0.9-alpha.2': + resolution: {integrity: sha512-bpMHngIB5et7s83b6gCty9PzvU2JMEe41LhdE+9IHUj8iD0Jg6gD0RlX1t3SFW1Thgc6DoCFcTEPAOCYXqoE5w==} - '@kevisual/router@0.0.7': - resolution: {integrity: sha512-4n1Tp4YLoraJv7jtfy7jbuLGyAj0B2QkTlnlEDHCUTlEUOvOkjtf7DHAe2SL92fTgXhSbod0I/0vUcDF85oj/w==} + '@kevisual/router@0.0.9': + resolution: {integrity: sha512-qPyC2GVJ7iOIdJCCKNDsWMAKOQeSJW9HBpL5ZWKHTbi+t4jJBGTzIlXmjKeMHRd0lr/Qq1imQvlkSh4hlrbodA==} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -464,8 +464,8 @@ packages: rollup: optional: true - '@rollup/plugin-node-resolve@16.0.0': - resolution: {integrity: sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==} + '@rollup/plugin-node-resolve@16.0.1': + resolution: {integrity: sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0||^4.0.0 @@ -618,9 +618,15 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + '@types/node-fetch@2.6.12': + resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} + '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} + '@types/node@18.19.80': + resolution: {integrity: sha512-kEWeMwMeIvxYkeg1gTc01awpwLbfMRZXdIhwRcakd/KlK53jmRC26LqcbIt7fnAQTu5GzlnWmzA3H6+l1u6xxQ==} + '@types/node@22.13.10': resolution: {integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==} @@ -633,6 +639,10 @@ packages: abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -864,6 +874,10 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -905,10 +919,17 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} + form-data-encoder@1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + form-data@4.0.2: resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} engines: {node: '>= 6'} + formdata-node@4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -1272,6 +1293,19 @@ packages: node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -1294,6 +1328,18 @@ 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==} + hasBin: true + peerDependencies: + ws: ^8.18.0 + zod: ^3.23.8 + peerDependenciesMeta: + ws: + optional: true + zod: + optional: true + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -1596,6 +1642,9 @@ packages: toposort-class@1.0.1: resolution: {integrity: sha512-OsLcGGbYF3rMjPUf8oKktyvCiUxSbqMMS39m33MAjLTC1DVIH6x3WSt63/M77ihI09+Sdfk1AXvfhCEeUmC7mg==} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -1614,6 +1663,9 @@ packages: underscore@1.13.7: resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} @@ -1678,6 +1730,16 @@ packages: yaml: optional: true + web-streams-polyfill@4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1948,13 +2010,19 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@kevisual/load@0.0.4': + '@kevisual/load@0.0.6': dependencies: eventemitter3: 5.0.1 - '@kevisual/query@0.0.7-alpha.3': {} + '@kevisual/query@0.0.9-alpha.2(encoding@0.1.13)(ws@8.18.0)': + dependencies: + openai: 4.87.3(encoding@0.1.13)(ws@8.18.0) + transitivePeerDependencies: + - encoding + - ws + - zod - '@kevisual/router@0.0.7': + '@kevisual/router@0.0.9': dependencies: path-to-regexp: 8.2.0 selfsigned: 2.4.1 @@ -2012,7 +2080,7 @@ snapshots: optionalDependencies: rollup: 4.35.0 - '@rollup/plugin-node-resolve@16.0.0(rollup@4.35.0)': + '@rollup/plugin-node-resolve@16.0.1(rollup@4.35.0)': dependencies: '@rollup/pluginutils': 5.1.2(rollup@4.35.0) '@types/resolve': 1.20.2 @@ -2121,10 +2189,19 @@ snapshots: '@types/ms@0.7.34': {} + '@types/node-fetch@2.6.12': + dependencies: + '@types/node': 22.13.10 + form-data: 4.0.2 + '@types/node-forge@1.3.11': dependencies: '@types/node': 22.13.10 + '@types/node@18.19.80': + dependencies: + undici-types: 5.26.5 + '@types/node@22.13.10': dependencies: undici-types: 6.20.0 @@ -2136,6 +2213,10 @@ snapshots: abbrev@1.1.1: optional: true + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + agent-base@6.0.2: dependencies: debug: 4.4.0 @@ -2146,7 +2227,6 @@ snapshots: agentkeepalive@4.6.0: dependencies: humanize-ms: 1.2.1 - optional: true aggregate-error@3.1.0: dependencies: @@ -2388,6 +2468,8 @@ snapshots: estree-walker@2.0.2: {} + event-target-shim@5.0.1: {} + eventemitter3@5.0.1: {} expand-template@2.0.3: {} @@ -2427,6 +2509,8 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 + form-data-encoder@1.7.2: {} + form-data@4.0.2: dependencies: asynckit: 0.4.0 @@ -2434,6 +2518,11 @@ snapshots: es-set-tostringtag: 2.1.0 mime-types: 2.1.35 + formdata-node@4.4.1: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + fs-constants@1.0.0: {} fs-minipass@2.1.0: @@ -2557,7 +2646,6 @@ snapshots: humanize-ms@1.2.1: dependencies: ms: 2.1.3 - optional: true iconv-lite@0.4.24: dependencies: @@ -2836,6 +2924,14 @@ snapshots: node-addon-api@7.1.1: {} + node-domexception@1.0.0: {} + + node-fetch@2.7.0(encoding@0.1.13): + dependencies: + whatwg-url: 5.0.0 + optionalDependencies: + encoding: 0.1.13 + node-forge@1.3.1: {} node-gyp@8.4.1: @@ -2872,6 +2968,20 @@ snapshots: dependencies: wrappy: 1.0.2 + openai@4.87.3(encoding@0.1.13)(ws@8.18.0): + dependencies: + '@types/node': 18.19.80 + '@types/node-fetch': 2.6.12 + abort-controller: 3.0.0 + agentkeepalive: 4.6.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0(encoding@0.1.13) + optionalDependencies: + ws: 8.18.0 + transitivePeerDependencies: + - encoding + os-tmpdir@1.0.2: {} p-map@4.0.0: @@ -3215,6 +3325,8 @@ snapshots: toposort-class@1.0.1: {} + tr46@0.0.3: {} + tslib@2.8.1: {} tunnel-agent@0.6.0: @@ -3227,6 +3339,8 @@ snapshots: underscore@1.13.7: {} + undici-types@5.26.5: {} + undici-types@6.20.0: {} unique-filename@1.1.1: @@ -3259,6 +3373,15 @@ snapshots: '@types/node': 22.13.10 fsevents: 2.3.3 + web-streams-polyfill@4.0.0-beta.3: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/src/command/deploy.ts b/src/command/deploy.ts index d57db4f..441901d 100644 --- a/src/command/deploy.ts +++ b/src/command/deploy.ts @@ -79,7 +79,11 @@ const command = new Command('deploy') const { id, data, ...rest } = res.data || {}; if (id && !update) { console.log(chalk.green('id: '), id); - console.log(chalk.green(`run to load: envision deploy-load ${id}`)); + if (!org) { + console.log(chalk.green(`run to load: envision deploy-load ${id}`)); + } else { + console.log(chalk.green(`run to load: envision deploy-load ${id} -o ${org}`)); + } } else if (id && update) { deployLoadFn(id); } else { @@ -153,7 +157,7 @@ const uploadFiles = async ( }; app.addCommand(command); -const deployLoadFn = async (id: string) => { +const deployLoadFn = async (id: string, org?: string) => { if (!id) { console.error(chalk.red('id is required')); return; @@ -163,6 +167,7 @@ const deployLoadFn = async (id: string) => { key: 'publish', data: { id: id, + username: org, }, }); if (res.code === 200) { @@ -182,8 +187,9 @@ const deployLoadFn = async (id: string) => { const deployLoad = new Command('deploy-load') .description('部署加载') .argument('', 'id') - .action(async (id) => { - deployLoadFn(id); + .option('-o, --org ', 'org') + .action(async (id, opts) => { + deployLoadFn(id, opts?.org); }); app.addCommand(deployLoad);