diff --git a/package.json b/package.json index ac69c46..168563d 100644 --- a/package.json +++ b/package.json @@ -26,21 +26,20 @@ "files": [ "types" ], - "license": "ISC", + "license": "UNLICENSED", "dependencies": { "@abearxiong/auth": "1.0.2", - "@abearxiong/router": "0.0.1-alpha.43", "@abearxiong/use-config": "^0.0.2", "@babel/core": "^7.26.0", "@babel/preset-env": "^7.26.0", "@babel/preset-typescript": "^7.26.0", "@kevisual/ai-graph": "workspace:^", "@kevisual/ai-lang": "workspace:^", - "@kevisual/router": "0.0.4-alpha-8", + "@kevisual/router": "0.0.5-alpha-1", "@supabase/supabase-js": "^2.46.1", "@types/semver": "^7.5.8", "archiver": "^7.0.1", - "bullmq": "^5.25.6", + "bullmq": "^5.26.2", "dayjs": "^1.11.13", "dts-bundle-generator": "^9.5.1", "formidable": "^3.5.2", @@ -84,14 +83,12 @@ "cross-env": "^7.0.3", "glob": "^11.0.0", "nodemon": "^3.1.7", - "patch-package": "^8.0.0", "pm2": "^5.4.3", "rimraf": "^6.0.1", - "rollup": "^4.26.0", + "rollup": "^4.27.2", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-dts": "^6.1.1", "tape": "^5.9.0", - "ts-loader": "^9.5.1", "tsx": "^4.19.2", "typescript": "^5.6.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b512f32..2147b1b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,9 +17,6 @@ importers: '@abearxiong/auth': specifier: 1.0.2 version: 1.0.2(@abearxiong/router@0.0.1-alpha.43) - '@abearxiong/router': - specifier: 0.0.1-alpha.43 - version: 0.0.1-alpha.43 '@abearxiong/use-config': specifier: ^0.0.2 version: 0.0.2 @@ -39,8 +36,8 @@ importers: specifier: workspace:^ version: link:packages/ai-lang '@kevisual/router': - specifier: 0.0.4-alpha-8 - version: 0.0.4-alpha-8 + specifier: 0.0.5-alpha-1 + version: 0.0.5-alpha-1 '@supabase/supabase-js': specifier: ^2.46.1 version: 2.46.1 @@ -51,8 +48,8 @@ importers: specifier: ^7.0.1 version: 7.0.1 bullmq: - specifier: ^5.25.6 - version: 5.25.6 + specifier: ^5.26.2 + version: 5.26.2 dayjs: specifier: ^1.11.13 version: 1.11.13 @@ -100,7 +97,7 @@ importers: version: 8.13.1 rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.23.1)(rollup@4.26.0) + version: 6.1.1(esbuild@0.23.1)(rollup@4.27.2) semver: specifier: ^7.6.3 version: 7.6.3 @@ -128,19 +125,19 @@ importers: version: 0.0.1(esbuild@0.23.1)(typescript@5.6.3) '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.26.0) + version: 5.1.1(rollup@4.27.2) '@rollup/plugin-commonjs': specifier: ^28.0.1 - version: 28.0.1(rollup@4.26.0) + version: 28.0.1(rollup@4.27.2) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.26.0) + version: 6.1.0(rollup@4.27.2) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.26.0) + version: 15.3.0(rollup@4.27.2) '@rollup/plugin-typescript': specifier: ^12.1.1 - version: 12.1.1(rollup@4.26.0)(tslib@2.7.0)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.2)(tslib@2.7.0)(typescript@5.6.3) '@types/archiver': specifier: ^6.0.3 version: 6.0.3 @@ -177,9 +174,6 @@ importers: nodemon: specifier: ^3.1.7 version: 3.1.7 - patch-package: - specifier: ^8.0.0 - version: 8.0.0 pm2: specifier: ^5.4.3 version: 5.4.3 @@ -187,20 +181,17 @@ importers: specifier: latest version: 6.0.1 rollup: - specifier: ^4.26.0 - version: 4.26.0 + specifier: ^4.27.2 + version: 4.27.2 rollup-plugin-copy: specifier: ^3.5.0 version: 3.5.0 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.26.0)(typescript@5.6.3) + version: 6.1.1(rollup@4.27.2)(typescript@5.6.3) tape: specifier: ^5.9.0 version: 5.9.0 - ts-loader: - specifier: ^9.5.1 - version: 9.5.1(typescript@5.6.3)(webpack@5.96.1(esbuild@0.23.1)) tsx: specifier: ^4.19.2 version: 4.19.2 @@ -218,7 +209,7 @@ importers: version: 0.0.2 ollama: specifier: ^0.5.9 - version: 0.5.9 + version: 0.5.10 packages/ai-lang: dependencies: @@ -248,26 +239,26 @@ importers: version: 6.9.0(socks@2.8.3) nanoid: specifier: ^5.0.7 - version: 5.0.7 + version: 5.0.8 ws: specifier: ^8.18.0 version: 8.18.0 devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.0 - version: 28.0.0(rollup@4.22.4) + version: 28.0.1(rollup@4.27.2) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.22.4) + version: 15.3.0(rollup@4.27.2) '@rollup/plugin-typescript': specifier: ^12.1.0 - version: 12.1.0(rollup@4.22.4)(tslib@2.7.0)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.2)(tslib@2.7.0)(typescript@5.6.3) '@types/node': specifier: ^22.7.2 - version: 22.7.2 + version: 22.9.0 rollup: specifier: ^4.22.4 - version: 4.22.4 + version: 4.27.2 ts-lib: specifier: ^0.0.5 version: 0.0.5 @@ -288,26 +279,26 @@ importers: version: 5.4.1 nanoid: specifier: ^5.0.7 - version: 5.0.7 + version: 5.0.8 devDependencies: '@rollup/plugin-commonjs': specifier: ^28.0.0 - version: 28.0.0(rollup@4.24.0) + version: 28.0.1(rollup@4.27.2) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.24.0) + version: 6.1.0(rollup@4.27.2) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.24.0) + version: 15.3.0(rollup@4.27.2) '@rollup/plugin-typescript': specifier: ^12.1.0 - version: 12.1.0(rollup@4.24.0)(tslib@2.7.0)(typescript@5.6.3) + version: 12.1.1(rollup@4.27.2)(tslib@2.7.0)(typescript@5.6.3) '@types/http-proxy': specifier: ^1.17.15 version: 1.17.15 '@types/node': specifier: ^22.7.5 - version: 22.7.5 + version: 22.9.0 cross-env: specifier: ^7.0.3 version: 7.0.3 @@ -316,7 +307,7 @@ importers: version: 3.1.7 rollup: specifier: ^4.24.0 - version: 4.24.0 + version: 4.27.2 ts-lib: specifier: ^0.0.5 version: 0.0.5 @@ -354,10 +345,6 @@ packages: resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.9': - resolution: {integrity: sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==} - engines: {node: '>=6.9.0'} - '@babel/compat-data@7.26.2': resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} @@ -407,12 +394,6 @@ packages: resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.25.9': - resolution: {integrity: sha512-TvLZY/F3+GvdRYFZFyxMvnsKi+4oJdgZzU3BoGN9Uc2d9C6zfNwJcKKhjqLAhK8i46mv93jsO74fDh3ih6rpHA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.26.0': resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} @@ -873,10 +854,6 @@ packages: resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.9': - resolution: {integrity: sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==} - engines: {node: '>=6.9.0'} - '@babel/types@7.26.0': resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} @@ -1076,8 +1053,8 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@kevisual/router@0.0.4-alpha-8': - resolution: {integrity: sha512-wocTAMljrns6qHen+LDzxG/JBDEM9byszwUJWyjPFKyttsKakksqciq5BkZFuokmSGZJj+/YvI2b3cC5J60aHw==} + '@kevisual/router@0.0.5-alpha-1': + resolution: {integrity: sha512-2dRt8gT6rg++jNHgxwdG/S5BimwuK/Tdj6t7Ndfm6nRESaZm1ZAdyjlakOPWiGTP+8by/MYE5IeBgK1Y1vsRhA==} '@langchain/core@0.3.3': resolution: {integrity: sha512-WAtkmhbdl2T41qzimTzhb3pXCHQxO4onqxzPxgdf3KftQdTwLq0YYBDhozRMZLNAd/+cfH0ymZGaZSsnc9Ogsg==} @@ -1198,15 +1175,6 @@ packages: rollup: optional: true - '@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-commonjs@28.0.1': resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} engines: {node: '>=16.0.0 || 14 >= 14.17'} @@ -1234,19 +1202,6 @@ packages: 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/plugin-typescript@12.1.1': resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} engines: {node: '>=14.0.0'} @@ -1269,280 +1224,102 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.22.4': - resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} + '@rollup/rollup-android-arm-eabi@4.27.2': + resolution: {integrity: sha512-Tj+j7Pyzd15wAdSJswvs5CJzJNV+qqSUcr/aCD+jpQSBtXvGnV0pnrjoc8zFTe9fcKCatkpFpOO7yAzpO998HA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm-eabi@4.24.0': - resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm-eabi@4.26.0': - resolution: {integrity: sha512-gJNwtPDGEaOEgejbaseY6xMFu+CPltsc8/T+diUTTbOQLqD+bnrJq9ulH6WD69TqwqWmrfRAtUv30cCFZlbGTQ==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.22.4': - resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} + '@rollup/rollup-android-arm64@4.27.2': + resolution: {integrity: sha512-xsPeJgh2ThBpUqlLgRfiVYBEf/P1nWlWvReG+aBWfNv3XEBpa6ZCmxSVnxJgLgkNz4IbxpLy64h2gCmAAQLneQ==} cpu: [arm64] os: [android] - '@rollup/rollup-android-arm64@4.24.0': - resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-android-arm64@4.26.0': - resolution: {integrity: sha512-YJa5Gy8mEZgz5JquFruhJODMq3lTHWLm1fOy+HIANquLzfIOzE9RA5ie3JjCdVb9r46qfAQY/l947V0zfGJ0OQ==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-darwin-arm64@4.22.4': - resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} + '@rollup/rollup-darwin-arm64@4.27.2': + resolution: {integrity: sha512-KnXU4m9MywuZFedL35Z3PuwiTSn/yqRIhrEA9j+7OSkji39NzVkgxuxTYg5F8ryGysq4iFADaU5osSizMXhU2A==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.24.0': - resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-arm64@4.26.0': - resolution: {integrity: sha512-ErTASs8YKbqTBoPLp/kA1B1Um5YSom8QAc4rKhg7b9tyyVqDBlQxy7Bf2wW7yIlPGPg2UODDQcbkTlruPzDosw==} - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.22.4': - resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} + '@rollup/rollup-darwin-x64@4.27.2': + resolution: {integrity: sha512-Hj77A3yTvUeCIx/Vi+4d4IbYhyTwtHj07lVzUgpUq9YpJSEiGJj4vXMKwzJ3w5zp5v3PFvpJNgc/J31smZey6g==} cpu: [x64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.0': - resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} - cpu: [x64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.26.0': - resolution: {integrity: sha512-wbgkYDHcdWW+NqP2mnf2NOuEbOLzDblalrOWcPyY6+BRbVhliavon15UploG7PpBRQ2bZJnbmh8o3yLoBvDIHA==} - cpu: [x64] - os: [darwin] - - '@rollup/rollup-freebsd-arm64@4.26.0': - resolution: {integrity: sha512-Y9vpjfp9CDkAG4q/uwuhZk96LP11fBz/bYdyg9oaHYhtGZp7NrbkQrj/66DYMMP2Yo/QPAsVHkV891KyO52fhg==} + '@rollup/rollup-freebsd-arm64@4.27.2': + resolution: {integrity: sha512-RjgKf5C3xbn8gxvCm5VgKZ4nn0pRAIe90J0/fdHUsgztd3+Zesb2lm2+r6uX4prV2eUByuxJNdt647/1KPRq5g==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.26.0': - resolution: {integrity: sha512-A/jvfCZ55EYPsqeaAt/yDAG4q5tt1ZboWMHEvKAH9Zl92DWvMIbnZe/f/eOXze65aJaaKbL+YeM0Hz4kLQvdwg==} + '@rollup/rollup-freebsd-x64@4.27.2': + resolution: {integrity: sha512-duq21FoXwQtuws+V9H6UZ+eCBc7fxSpMK1GQINKn3fAyd9DFYKPJNcUhdIKOrMFjLEJgQskoMoiuizMt+dl20g==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': - resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.27.2': + resolution: {integrity: sha512-6npqOKEPRZkLrMcvyC/32OzJ2srdPzCylJjiTJT2c0bwwSGm7nz2F9mNQ1WrAqCBZROcQn91Fno+khFhVijmFA==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': - resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} - cpu: [arm] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-arm-gnueabihf@4.26.0': - resolution: {integrity: sha512-paHF1bMXKDuizaMODm2bBTjRiHxESWiIyIdMugKeLnjuS1TCS54MF5+Y5Dx8Ui/1RBPVRE09i5OUlaLnv8OGnA==} - cpu: [arm] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-arm-musleabihf@4.22.4': - resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} + '@rollup/rollup-linux-arm-musleabihf@4.27.2': + resolution: {integrity: sha512-V9Xg6eXtgBtHq2jnuQwM/jr2mwe2EycnopO8cbOvpzFuySCGtKlPCI3Hj9xup/pJK5Q0388qfZZy2DqV2J8ftw==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm-musleabihf@4.24.0': - resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} - cpu: [arm] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-arm-musleabihf@4.26.0': - resolution: {integrity: sha512-cwxiHZU1GAs+TMxvgPfUDtVZjdBdTsQwVnNlzRXC5QzIJ6nhfB4I1ahKoe9yPmoaA/Vhf7m9dB1chGPpDRdGXg==} - cpu: [arm] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-arm64-gnu@4.22.4': - resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} + '@rollup/rollup-linux-arm64-gnu@4.27.2': + resolution: {integrity: sha512-uCFX9gtZJoQl2xDTpRdseYuNqyKkuMDtH6zSrBTA28yTfKyjN9hQ2B04N5ynR8ILCoSDOrG/Eg+J2TtJ1e/CSA==} cpu: [arm64] os: [linux] libc: [glibc] - '@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-gnu@4.26.0': - resolution: {integrity: sha512-4daeEUQutGRCW/9zEo8JtdAgtJ1q2g5oHaoQaZbMSKaIWKDQwQ3Yx0/3jJNmpzrsScIPtx/V+1AfibLisb3AMQ==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-arm64-musl@4.22.4': - resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} + '@rollup/rollup-linux-arm64-musl@4.27.2': + resolution: {integrity: sha512-/PU9P+7Rkz8JFYDHIi+xzHabOu9qEWR07L5nWLIUsvserrxegZExKCi2jhMZRd0ATdboKylu/K5yAXbp7fYFvA==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-musl@4.24.0': - resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-arm64-musl@4.26.0': - resolution: {integrity: sha512-eGkX7zzkNxvvS05ROzJ/cO/AKqNvR/7t1jA3VZDi2vRniLKwAWxUr85fH3NsvtxU5vnUUKFHKh8flIBdlo2b3Q==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': - resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.27.2': + resolution: {integrity: sha512-eCHmol/dT5odMYi/N0R0HC8V8QE40rEpkyje/ZAXJYNNoSfrObOvG/Mn+s1F/FJyB7co7UQZZf6FuWnN6a7f4g==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': - resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-powerpc64le-gnu@4.26.0': - resolution: {integrity: sha512-Odp/lgHbW/mAqw/pU21goo5ruWsytP7/HCC/liOt0zcGG0llYWKrd10k9Fj0pdj3prQ63N5yQLCLiE7HTX+MYw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-riscv64-gnu@4.22.4': - resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} + '@rollup/rollup-linux-riscv64-gnu@4.27.2': + resolution: {integrity: sha512-DEP3Njr9/ADDln3kNi76PXonLMSSMiCir0VHXxmGSHxCxDfQ70oWjHcJGfiBugzaqmYdTC7Y+8Int6qbnxPBIQ==} cpu: [riscv64] 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-riscv64-gnu@4.26.0': - resolution: {integrity: sha512-MBR2ZhCTzUgVD0OJdTzNeF4+zsVogIR1U/FsyuFerwcqjZGvg2nYe24SAHp8O5sN8ZkRVbHwlYeHqcSQ8tcYew==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-s390x-gnu@4.22.4': - resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} + '@rollup/rollup-linux-s390x-gnu@4.27.2': + resolution: {integrity: sha512-NHGo5i6IE/PtEPh5m0yw5OmPMpesFnzMIS/lzvN5vknnC1sXM5Z/id5VgcNPgpD+wHmIcuYYgW+Q53v+9s96lQ==} cpu: [s390x] 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-s390x-gnu@4.26.0': - resolution: {integrity: sha512-YYcg8MkbN17fMbRMZuxwmxWqsmQufh3ZJFxFGoHjrE7bv0X+T6l3glcdzd7IKLiwhT+PZOJCblpnNlz1/C3kGQ==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-x64-gnu@4.22.4': - resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} + '@rollup/rollup-linux-x64-gnu@4.27.2': + resolution: {integrity: sha512-PaW2DY5Tan+IFvNJGHDmUrORadbe/Ceh8tQxi8cmdQVCCYsLoQo2cuaSj+AU+YRX8M4ivS2vJ9UGaxfuNN7gmg==} cpu: [x64] 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-gnu@4.26.0': - resolution: {integrity: sha512-ZuwpfjCwjPkAOxpjAEjabg6LRSfL7cAJb6gSQGZYjGhadlzKKywDkCUnJ+KEfrNY1jH5EEoSIKLCb572jSiglA==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-x64-musl@4.22.4': - resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} + '@rollup/rollup-linux-x64-musl@4.27.2': + resolution: {integrity: sha512-dOlWEMg2gI91Qx5I/HYqOD6iqlJspxLcS4Zlg3vjk1srE67z5T2Uz91yg/qA8sY0XcwQrFzWWiZhMNERylLrpQ==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-linux-x64-musl@4.24.0': - resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-x64-musl@4.26.0': - resolution: {integrity: sha512-+HJD2lFS86qkeF8kNu0kALtifMpPCZU80HvwztIKnYwym3KnA1os6nsX4BGSTLtS2QVAGG1P3guRgsYyMA0Yhg==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rollup/rollup-win32-arm64-msvc@4.22.4': - resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} + '@rollup/rollup-win32-arm64-msvc@4.27.2': + resolution: {integrity: sha512-euMIv/4x5Y2/ImlbGl88mwKNXDsvzbWUlT7DFky76z2keajCtcbAsN9LUdmk31hAoVmJJYSThgdA0EsPeTr1+w==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.24.0': - resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-arm64-msvc@4.26.0': - resolution: {integrity: sha512-WUQzVFWPSw2uJzX4j6YEbMAiLbs0BUysgysh8s817doAYhR5ybqTI1wtKARQKo6cGop3pHnrUJPFCsXdoFaimQ==} - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.22.4': - resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} + '@rollup/rollup-win32-ia32-msvc@4.27.2': + resolution: {integrity: sha512-RsnE6LQkUHlkC10RKngtHNLxb7scFykEbEwOFDjr3CeCMG+Rr+cKqlkKc2/wJ1u4u990urRHCbjz31x84PBrSQ==} cpu: [ia32] 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-ia32-msvc@4.26.0': - resolution: {integrity: sha512-D4CxkazFKBfN1akAIY6ieyOqzoOoBV1OICxgUblWxff/pSjCA2khXlASUx7mK6W1oP4McqhgcCsu6QaLj3WMWg==} - cpu: [ia32] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.22.4': - resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} - cpu: [x64] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.24.0': - resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} - cpu: [x64] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.26.0': - resolution: {integrity: sha512-2x8MO1rm4PGEP0xWbubJW5RtbNLk3puzAMaLQd3B3JHVw4KcHlmXcO+Wewx9zCoo7EUFiMlu/aZbCJ7VjMzAag==} + '@rollup/rollup-win32-x64-msvc@4.27.2': + resolution: {integrity: sha512-foJM5vv+z2KQmn7emYdDLyTbkoO5bkHZE1oth2tWbQNGW7mX32d46Hz6T0MqXdWS2vBZhaEtHqdy9WYwGfiliA==} cpu: [x64] os: [win32] @@ -1599,9 +1376,6 @@ packages: '@types/eslint@9.6.1': resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -1638,15 +1412,12 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} + '@types/node-forge@1.3.11': + resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} + '@types/node@18.19.53': resolution: {integrity: sha512-GLxgUgHhDKO1Edw9Q0lvMbiO/IQXJwJlMaqxSGBXMpPy8uhkCs2iiPFaB2Q/gmobnFkckD3rqTBMVjXdwq+nKg==} - '@types/node@22.7.2': - resolution: {integrity: sha512-866lXSrpGpgyHBZUa2m9YNWqHDjjM0aBTJlNtYaGEw4rqY/dcD7deRVTbBBAJelfA7oaGDbNftXF/TL/A6RgoA==} - - '@types/node@22.7.5': - resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} - '@types/node@22.9.0': resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} @@ -1737,9 +1508,6 @@ packages: '@xtuc/long@4.2.2': resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - '@yarnpkg/lockfile@1.1.0': - resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - '@zxing/text-encoding@0.9.0': resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} @@ -1868,10 +1636,6 @@ packages: asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - at-least-node@1.0.0: - resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} - engines: {node: '>= 4.0.0'} - available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -1970,8 +1734,8 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bullmq@5.25.6: - resolution: {integrity: sha512-jxpa/DB02V20CqBAgyqpQazT630CJm0r4fky8EchH3mcJAomRtKXLS6tRA0J8tb29BDGlr/LXhlUuZwdBJBSdA==} + bullmq@5.26.2: + resolution: {integrity: sha512-UdHBrJoRkpXoF8b/FVEkuRBnaUZoA7+qHQNyTx1n2oNVZ4iWxqGqss+M9xAwXOpBmSNvOSlaBdHpf+5QJTU8GQ==} cacache@15.3.0: resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} @@ -2014,10 +1778,6 @@ packages: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} - ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -2450,9 +2210,6 @@ packages: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} - find-yarn-workspace-root@2.0.0: - resolution: {integrity: sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==} - follow-redirects@1.15.9: resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} @@ -2498,10 +2255,6 @@ packages: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} - fs-extra@9.1.0: - resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} - engines: {node: '>=10'} - fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -2750,11 +2503,6 @@ packages: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} - is-docker@2.2.1: - resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} - engines: {node: '>=8'} - hasBin: true - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -2839,10 +2587,6 @@ packages: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} engines: {node: '>= 0.4'} - is-wsl@2.2.0: - resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} - engines: {node: '>=8'} - isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -2887,10 +2631,6 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - json-stable-stringify@1.1.1: - resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==} - engines: {node: '>= 0.4'} - json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -2905,9 +2645,6 @@ packages: jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - jsonify@0.0.1: - resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} - jsonwebtoken@9.0.2: resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} engines: {node: '>=12', npm: '>=6'} @@ -2918,9 +2655,6 @@ packages: jws@3.2.2: resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} - klaw-sync@6.0.0: - resolution: {integrity: sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==} - langsmith@0.1.61: resolution: {integrity: sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==} peerDependencies: @@ -3151,11 +2885,6 @@ packages: mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - nanoid@5.0.7: - resolution: {integrity: sha512-oLxFY2gd2IqnjcYyOXD8XGCftpGtZP2AbHbOkthDkvRywH5ayNtPVy9YlOPcHckXzbLTCHpkb7FB+yuxKV13pQ==} - engines: {node: ^18 || >=20} - hasBin: true - nanoid@5.0.8: resolution: {integrity: sha512-TcJPw+9RV9dibz1hHUzlLVy8N4X9TnwirAjrU08Juo6BNKggzVfP2ZJ/3ZUSq15Xl5i85i+Z89XBO90pB2PghQ==} engines: {node: ^18 || >=20} @@ -3228,6 +2957,10 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-forge@1.3.1: + resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} + engines: {node: '>= 6.13.0'} + node-gyp-build-optional-packages@5.2.2: resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==} hasBin: true @@ -3286,16 +3019,9 @@ packages: ollama@0.5.10: resolution: {integrity: sha512-M5O4u6S6yZeeKFrKA7ZfGGLjK54otOVGPrOUc3N64zSTpz9J+x/nh93dmD6Py7YLgXzq9I6Nq+PDDoaqJuV3LQ==} - ollama@0.5.9: - resolution: {integrity: sha512-F/KZuDRC+ZsVCuMvcOYuQ6zj42/idzCkkuknGyyGVmNStMZ/sU3jQpvhnl4SyC0+zBzLiKNZJnJeuPFuieWZvQ==} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - open@7.4.2: - resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==} - engines: {node: '>=8'} - openai@4.65.0: resolution: {integrity: sha512-LfA4KUBpH/8rA3vjCQ74LZtdK/8wx9W6Qxq8MHqEdImPsN1XPQ2ompIuJWkKS6kXt5Cs5i8Eb65IIo4M7U+yeQ==} hasBin: true @@ -3305,10 +3031,6 @@ packages: zod: optional: true - os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} @@ -3351,11 +3073,6 @@ packages: pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} - patch-package@8.0.0: - resolution: {integrity: sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==} - engines: {node: '>=14', npm: '>5'} - hasBin: true - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -3367,6 +3084,10 @@ packages: resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} engines: {node: 20 || >=22} + path-to-regexp@8.2.0: + resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} + engines: {node: '>=16'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3639,18 +3360,8 @@ packages: esbuild: '>=0.18.0' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.22.4: - resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - 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 - - rollup@4.26.0: - resolution: {integrity: sha512-ilcl12hnWonG8f+NxU6BlgysVA0gvY2l8N0R84S1HcINbW20bvwuCngJkkInV6LXhwRpucsW5k1ovDwEdBVrNg==} + rollup@4.27.2: + resolution: {integrity: sha512-KreA+PzWmk2yaFmZVwe6GB2uBD86nXl86OsDkt1bJS9p3vqWuEQ6HnJJ+j/mZi/q0920P99/MVRlB4L3crpF5w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3691,6 +3402,10 @@ packages: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} + selfsigned@2.4.1: + resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} + engines: {node: '>=10'} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -3791,10 +3506,6 @@ packages: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} - slash@2.0.0: - resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==} - engines: {node: '>=6'} - slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -3992,10 +3703,6 @@ packages: through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -4300,11 +4007,6 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} - engines: {node: '>= 14'} - hasBin: true - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4370,8 +4072,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/compat-data@7.25.9': {} - '@babel/compat-data@7.26.2': {} '@babel/core@7.26.0': @@ -4404,18 +4104,18 @@ snapshots: '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.25.9 + '@babel/compat-data': 7.26.2 '@babel/helper-validator-option': 7.25.9 browserslist: 4.24.0 lru-cache: 5.1.1 @@ -4455,7 +4155,7 @@ snapshots: '@babel/helper-member-expression-to-functions@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -4466,16 +4166,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.9(@babel/core@7.26.0)': - dependencies: - '@babel/core': 7.26.0 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-simple-access': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color - '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -4487,7 +4177,7 @@ snapshots: '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 '@babel/helper-plugin-utils@7.25.9': {} @@ -4512,14 +4202,14 @@ snapshots: '@babel/helper-simple-access@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -4533,7 +4223,7 @@ snapshots: dependencies: '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -4758,7 +4448,7 @@ snapshots: '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.26.0) + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color @@ -4766,7 +4456,7 @@ snapshots: '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.26.0) + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-simple-access': 7.25.9 transitivePeerDependencies: @@ -4775,7 +4465,7 @@ snapshots: '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.26.0) + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 '@babel/traverse': 7.25.9 @@ -4785,7 +4475,7 @@ snapshots: '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.26.0) + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color @@ -5024,7 +4714,7 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 esutils: 2.0.3 '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)': @@ -5060,11 +4750,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.25.9': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/types@7.26.0': dependencies: '@babel/helper-string-parser': 7.25.9 @@ -5195,8 +4880,10 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@kevisual/router@0.0.4-alpha-8': + '@kevisual/router@0.0.5-alpha-1': dependencies: + path-to-regexp: 8.2.0 + selfsigned: 2.4.1 ws: 8.18.0 transitivePeerDependencies: - bufferutil @@ -5248,7 +4935,7 @@ snapshots: '@langchain/ollama@0.1.0(@langchain/core@0.3.3(openai@4.65.0(encoding@0.1.13)(zod@3.23.8)))': dependencies: '@langchain/core': 0.3.3(openai@4.65.0(encoding@0.1.13)(zod@3.23.8)) - ollama: 0.5.9 + ollama: 0.5.10 uuid: 10.0.0 '@langchain/openai@0.3.2(@langchain/core@0.3.3(openai@4.65.0(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13)': @@ -5367,13 +5054,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-alias@5.1.1(rollup@4.26.0)': + '@rollup/plugin-alias@5.1.1(rollup@4.27.2)': optionalDependencies: - rollup: 4.26.0 + rollup: 4.27.2 - '@rollup/plugin-commonjs@28.0.0(rollup@4.22.4)': + '@rollup/plugin-commonjs@28.0.1(rollup@4.27.2)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.22.4) + '@rollup/pluginutils': 5.1.2(rollup@4.27.2) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.3.0(picomatch@4.0.2) @@ -5381,273 +5068,93 @@ snapshots: magic-string: 0.30.11 picomatch: 4.0.2 optionalDependencies: - rollup: 4.22.4 + rollup: 4.27.2 - '@rollup/plugin-commonjs@28.0.0(rollup@4.24.0)': + '@rollup/plugin-json@6.1.0(rollup@4.27.2)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.24.0) - commondir: 1.0.1 - estree-walker: 2.0.2 - fdir: 6.3.0(picomatch@4.0.2) - is-reference: 1.2.1 - magic-string: 0.30.11 - picomatch: 4.0.2 + '@rollup/pluginutils': 5.1.2(rollup@4.27.2) optionalDependencies: - rollup: 4.24.0 + rollup: 4.27.2 - '@rollup/plugin-commonjs@28.0.1(rollup@4.26.0)': + '@rollup/plugin-node-resolve@15.3.0(rollup@4.27.2)': dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.26.0) - commondir: 1.0.1 - estree-walker: 2.0.2 - fdir: 6.3.0(picomatch@4.0.2) - is-reference: 1.2.1 - magic-string: 0.30.11 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.26.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-json@6.1.0(rollup@4.26.0)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.26.0) - optionalDependencies: - rollup: 4.26.0 - - '@rollup/plugin-node-resolve@15.3.0(rollup@4.22.4)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.22.4) + '@rollup/pluginutils': 5.1.2(rollup@4.27.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.22.4 + rollup: 4.27.2 - '@rollup/plugin-node-resolve@15.3.0(rollup@4.24.0)': + '@rollup/plugin-typescript@12.1.1(rollup@4.27.2)(tslib@2.7.0)(typescript@5.6.3)': 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-node-resolve@15.3.0(rollup@4.26.0)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.26.0) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-module: 1.0.0 - resolve: 1.22.8 - optionalDependencies: - rollup: 4.26.0 - - '@rollup/plugin-typescript@12.1.0(rollup@4.22.4)(tslib@2.7.0)(typescript@5.6.3)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.22.4) + '@rollup/pluginutils': 5.1.2(rollup@4.27.2) resolve: 1.22.8 typescript: 5.6.3 optionalDependencies: - rollup: 4.22.4 + rollup: 4.27.2 tslib: 2.7.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/plugin-typescript@12.1.1(rollup@4.26.0)(tslib@2.7.0)(typescript@5.6.3)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.26.0) - resolve: 1.22.8 - typescript: 5.6.3 - optionalDependencies: - rollup: 4.26.0 - tslib: 2.7.0 - - '@rollup/pluginutils@5.1.2(rollup@4.22.4)': + '@rollup/pluginutils@5.1.2(rollup@4.27.2)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.22.4 + rollup: 4.27.2 - '@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/pluginutils@5.1.2(rollup@4.26.0)': - dependencies: - '@types/estree': 1.0.6 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.26.0 - - '@rollup/rollup-android-arm-eabi@4.22.4': + '@rollup/rollup-android-arm-eabi@4.27.2': optional: true - '@rollup/rollup-android-arm-eabi@4.24.0': + '@rollup/rollup-android-arm64@4.27.2': optional: true - '@rollup/rollup-android-arm-eabi@4.26.0': + '@rollup/rollup-darwin-arm64@4.27.2': optional: true - '@rollup/rollup-android-arm64@4.22.4': + '@rollup/rollup-darwin-x64@4.27.2': optional: true - '@rollup/rollup-android-arm64@4.24.0': + '@rollup/rollup-freebsd-arm64@4.27.2': optional: true - '@rollup/rollup-android-arm64@4.26.0': + '@rollup/rollup-freebsd-x64@4.27.2': optional: true - '@rollup/rollup-darwin-arm64@4.22.4': + '@rollup/rollup-linux-arm-gnueabihf@4.27.2': optional: true - '@rollup/rollup-darwin-arm64@4.24.0': + '@rollup/rollup-linux-arm-musleabihf@4.27.2': optional: true - '@rollup/rollup-darwin-arm64@4.26.0': + '@rollup/rollup-linux-arm64-gnu@4.27.2': optional: true - '@rollup/rollup-darwin-x64@4.22.4': + '@rollup/rollup-linux-arm64-musl@4.27.2': optional: true - '@rollup/rollup-darwin-x64@4.24.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.27.2': optional: true - '@rollup/rollup-darwin-x64@4.26.0': + '@rollup/rollup-linux-riscv64-gnu@4.27.2': optional: true - '@rollup/rollup-freebsd-arm64@4.26.0': + '@rollup/rollup-linux-s390x-gnu@4.27.2': optional: true - '@rollup/rollup-freebsd-x64@4.26.0': + '@rollup/rollup-linux-x64-gnu@4.27.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': + '@rollup/rollup-linux-x64-musl@4.27.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + '@rollup/rollup-win32-arm64-msvc@4.27.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.26.0': + '@rollup/rollup-win32-ia32-msvc@4.27.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.4': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.24.0': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.26.0': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.22.4': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.24.0': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.26.0': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.22.4': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.24.0': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.26.0': - optional: true - - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': - optional: true - - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': - optional: true - - '@rollup/rollup-linux-powerpc64le-gnu@4.26.0': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.22.4': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.24.0': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.26.0': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.22.4': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.24.0': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.26.0': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.22.4': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.24.0': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.26.0': - optional: true - - '@rollup/rollup-linux-x64-musl@4.22.4': - optional: true - - '@rollup/rollup-linux-x64-musl@4.24.0': - optional: true - - '@rollup/rollup-linux-x64-musl@4.26.0': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.22.4': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.24.0': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.26.0': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.22.4': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.24.0': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.26.0': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.22.4': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.24.0': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.26.0': + '@rollup/rollup-win32-x64-msvc@4.27.2': optional: true '@socket.io/component-emitter@3.1.2': {} @@ -5725,8 +5232,6 @@ snapshots: '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 - '@types/estree@1.0.5': {} - '@types/estree@1.0.6': {} '@types/formidable@3.4.5': @@ -5767,18 +5272,14 @@ snapshots: '@types/node': 22.9.0 form-data: 4.0.0 + '@types/node-forge@1.3.11': + dependencies: + '@types/node': 22.9.0 + '@types/node@18.19.53': dependencies: undici-types: 5.26.5 - '@types/node@22.7.2': - dependencies: - undici-types: 6.19.8 - - '@types/node@22.7.5': - dependencies: - undici-types: 6.19.8 - '@types/node@22.9.0': dependencies: undici-types: 6.19.8 @@ -5896,8 +5397,6 @@ snapshots: '@xtuc/long@4.2.2': {} - '@yarnpkg/lockfile@1.1.0': {} - '@zxing/text-encoding@0.9.0': optional: true @@ -6045,8 +5544,6 @@ snapshots: asynckit@0.4.0: {} - at-least-node@1.0.0: {} - available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -6148,7 +5645,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bullmq@5.25.6: + bullmq@5.26.2: dependencies: cron-parser: 4.9.0 ioredis: 5.4.1 @@ -6226,8 +5723,6 @@ snapshots: chrome-trace-event@1.0.4: {} - ci-info@3.9.0: {} - clean-stack@2.2.0: optional: true @@ -6716,10 +6211,6 @@ snapshots: filter-obj@1.1.0: {} - find-yarn-workspace-root@2.0.0: - dependencies: - micromatch: 4.0.8 - follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: debug: 4.3.7(supports-color@5.5.0) @@ -6770,13 +6261,6 @@ snapshots: jsonfile: 4.0.0 universalify: 0.1.2 - fs-extra@9.1.0: - dependencies: - at-least-node: 1.0.0 - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - fs-minipass@2.1.0: dependencies: minipass: 3.3.6 @@ -7051,8 +6535,6 @@ snapshots: dependencies: has-tostringtag: 1.0.2 - is-docker@2.2.1: {} - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -7122,10 +6604,6 @@ snapshots: call-bind: 1.0.7 get-intrinsic: 1.2.4 - is-wsl@2.2.0: - dependencies: - is-docker: 2.2.1 - isarray@1.0.0: {} isarray@2.0.5: {} @@ -7167,13 +6645,6 @@ snapshots: json-schema-traverse@0.4.1: {} - json-stable-stringify@1.1.1: - dependencies: - call-bind: 1.0.7 - isarray: 2.0.5 - jsonify: 0.0.1 - object-keys: 1.1.1 - json-stringify-safe@5.0.1: optional: true @@ -7189,8 +6660,6 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 - jsonify@0.0.1: {} - jsonwebtoken@9.0.2: dependencies: jws: 3.2.2 @@ -7215,10 +6684,6 @@ snapshots: jwa: 1.4.1 safe-buffer: 5.2.1 - klaw-sync@6.0.0: - dependencies: - graceful-fs: 4.2.11 - langsmith@0.1.61(openai@4.65.0(encoding@0.1.13)(zod@3.23.8)): dependencies: '@types/uuid': 10.0.0 @@ -7452,8 +6917,6 @@ snapshots: mute-stream@0.0.8: {} - nanoid@5.0.7: {} - nanoid@5.0.8: {} napi-build-utils@1.0.2: {} @@ -7530,6 +6993,8 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 + node-forge@1.3.1: {} + node-gyp-build-optional-packages@5.2.2: dependencies: detect-libc: 2.0.3 @@ -7609,19 +7074,10 @@ snapshots: dependencies: whatwg-fetch: 3.6.20 - ollama@0.5.9: - dependencies: - whatwg-fetch: 3.6.20 - once@1.4.0: dependencies: wrappy: 1.0.2 - open@7.4.2: - dependencies: - is-docker: 2.2.1 - is-wsl: 2.2.0 - openai@4.65.0(encoding@0.1.13)(zod@3.23.8): dependencies: '@types/node': 18.19.53 @@ -7636,8 +7092,6 @@ snapshots: transitivePeerDependencies: - encoding - os-tmpdir@1.0.2: {} - p-finally@1.0.0: {} p-map@4.0.0: @@ -7688,24 +7142,6 @@ snapshots: pako@0.2.9: {} - patch-package@8.0.0: - dependencies: - '@yarnpkg/lockfile': 1.1.0 - chalk: 4.1.2 - ci-info: 3.9.0 - cross-spawn: 7.0.3 - find-yarn-workspace-root: 2.0.0 - fs-extra: 9.1.0 - json-stable-stringify: 1.1.1 - klaw-sync: 6.0.0 - minimist: 1.2.8 - open: 7.4.2 - rimraf: 6.0.1 - semver: 7.6.3 - slash: 2.0.0 - tmp: 0.0.33 - yaml: 2.5.1 - path-key@3.1.1: {} path-parse@1.0.7: {} @@ -7715,6 +7151,8 @@ snapshots: lru-cache: 11.0.1 minipass: 7.1.2 + path-to-regexp@8.2.0: {} + path-type@4.0.0: {} pg-cloudflare@1.1.1: @@ -8050,91 +7488,47 @@ snapshots: globby: 10.0.1 is-plain-object: 3.0.1 - rollup-plugin-dts@6.1.1(rollup@4.26.0)(typescript@5.6.3): + rollup-plugin-dts@6.1.1(rollup@4.27.2)(typescript@5.6.3): dependencies: magic-string: 0.30.11 - rollup: 4.26.0 + rollup: 4.27.2 typescript: 5.6.3 optionalDependencies: '@babel/code-frame': 7.26.2 - rollup-plugin-esbuild@6.1.1(esbuild@0.23.1)(rollup@4.26.0): + rollup-plugin-esbuild@6.1.1(esbuild@0.23.1)(rollup@4.27.2): dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.26.0) + '@rollup/pluginutils': 5.1.2(rollup@4.27.2) debug: 4.3.7(supports-color@5.5.0) es-module-lexer: 1.5.4 esbuild: 0.23.1 get-tsconfig: 4.8.1 - rollup: 4.26.0 + rollup: 4.27.2 transitivePeerDependencies: - supports-color - rollup@4.22.4: - dependencies: - '@types/estree': 1.0.5 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.4 - '@rollup/rollup-android-arm64': 4.22.4 - '@rollup/rollup-darwin-arm64': 4.22.4 - '@rollup/rollup-darwin-x64': 4.22.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 - '@rollup/rollup-linux-arm-musleabihf': 4.22.4 - '@rollup/rollup-linux-arm64-gnu': 4.22.4 - '@rollup/rollup-linux-arm64-musl': 4.22.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 - '@rollup/rollup-linux-riscv64-gnu': 4.22.4 - '@rollup/rollup-linux-s390x-gnu': 4.22.4 - '@rollup/rollup-linux-x64-gnu': 4.22.4 - '@rollup/rollup-linux-x64-musl': 4.22.4 - '@rollup/rollup-win32-arm64-msvc': 4.22.4 - '@rollup/rollup-win32-ia32-msvc': 4.22.4 - '@rollup/rollup-win32-x64-msvc': 4.22.4 - fsevents: 2.3.3 - - rollup@4.24.0: + rollup@4.27.2: 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 - - rollup@4.26.0: - dependencies: - '@types/estree': 1.0.6 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.26.0 - '@rollup/rollup-android-arm64': 4.26.0 - '@rollup/rollup-darwin-arm64': 4.26.0 - '@rollup/rollup-darwin-x64': 4.26.0 - '@rollup/rollup-freebsd-arm64': 4.26.0 - '@rollup/rollup-freebsd-x64': 4.26.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.26.0 - '@rollup/rollup-linux-arm-musleabihf': 4.26.0 - '@rollup/rollup-linux-arm64-gnu': 4.26.0 - '@rollup/rollup-linux-arm64-musl': 4.26.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.26.0 - '@rollup/rollup-linux-riscv64-gnu': 4.26.0 - '@rollup/rollup-linux-s390x-gnu': 4.26.0 - '@rollup/rollup-linux-x64-gnu': 4.26.0 - '@rollup/rollup-linux-x64-musl': 4.26.0 - '@rollup/rollup-win32-arm64-msvc': 4.26.0 - '@rollup/rollup-win32-ia32-msvc': 4.26.0 - '@rollup/rollup-win32-x64-msvc': 4.26.0 + '@rollup/rollup-android-arm-eabi': 4.27.2 + '@rollup/rollup-android-arm64': 4.27.2 + '@rollup/rollup-darwin-arm64': 4.27.2 + '@rollup/rollup-darwin-x64': 4.27.2 + '@rollup/rollup-freebsd-arm64': 4.27.2 + '@rollup/rollup-freebsd-x64': 4.27.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.2 + '@rollup/rollup-linux-arm-musleabihf': 4.27.2 + '@rollup/rollup-linux-arm64-gnu': 4.27.2 + '@rollup/rollup-linux-arm64-musl': 4.27.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.2 + '@rollup/rollup-linux-riscv64-gnu': 4.27.2 + '@rollup/rollup-linux-s390x-gnu': 4.27.2 + '@rollup/rollup-linux-x64-gnu': 4.27.2 + '@rollup/rollup-linux-x64-musl': 4.27.2 + '@rollup/rollup-win32-arm64-msvc': 4.27.2 + '@rollup/rollup-win32-ia32-msvc': 4.27.2 + '@rollup/rollup-win32-x64-msvc': 4.27.2 fsevents: 2.3.3 run-parallel@1.2.0: @@ -8178,6 +7572,11 @@ snapshots: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + selfsigned@2.4.1: + dependencies: + '@types/node-forge': 1.3.11 + node-forge: 1.3.1 + semver@6.3.1: {} semver@7.5.4: @@ -8268,8 +7667,6 @@ snapshots: dependencies: semver: 7.6.3 - slash@2.0.0: {} - slash@3.0.0: {} smart-buffer@4.2.0: {} @@ -8537,10 +7934,6 @@ snapshots: dependencies: readable-stream: 3.6.2 - tmp@0.0.33: - dependencies: - os-tmpdir: 1.0.2 - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -8840,8 +8233,6 @@ snapshots: yallist@4.0.0: {} - yaml@2.5.1: {} - yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/src/app.ts b/src/app.ts index 4d86de0..b84bb2b 100644 --- a/src/app.ts +++ b/src/app.ts @@ -23,15 +23,6 @@ export const app = new App<{ import: any; emit: typeof emit; sequelize: typeof s emit, sequelize, }, - // routerHandle(res) { - // console.log('routerHandle', res.query); - // const { code, data, message } = res; - // return { - // code, - // data, - // message, - // }; - // }, }); const clients = []; diff --git a/src/index.ts b/src/index.ts index 00718cc..4a60057 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,10 +2,10 @@ import { useConfig } from '@abearxiong/use-config'; import { app } from './app.ts'; import './route.ts'; const config = useConfig(); -import { app as aiApp } from '@kevisual/ai-lang/src/index.ts'; +// import { app as aiApp } from '@kevisual/ai-lang/src/index.ts'; import { uploadMiddleware } from './lib/upload.ts'; import { loadApps } from './load-apps.ts'; -export { aiApp }; +// export { aiApp }; export { app }; loadApps(app); app.listen(config.port, () => { diff --git a/src/lib/upload.ts b/src/lib/upload.ts index 1ba4c24..479eea7 100644 --- a/src/lib/upload.ts +++ b/src/lib/upload.ts @@ -4,9 +4,11 @@ import fs, { rm } from 'fs'; import path from 'path'; import { IncomingForm } from 'formidable'; import { app, minioClient } from '@/app.ts'; +import { SimpleRouter } from '@kevisual/router/simple'; import { bucketName } from '@/modules/minio.ts'; import { getContentType } from '@/utils/get-content-type.ts'; import { User } from '@/models/user.ts'; +import { getContainerById } from '@/routes/container/module/get-container-file.ts'; const filePath = useFileStore('upload', { needExists: true }); const cacheFilePath = useFileStore('cache-file', { needExists: true }); // curl -X POST http://localhost:4000/api/upload -F "file=@readme.md" @@ -17,193 +19,194 @@ const cacheFilePath = useFileStore('cache-file', { needExists: true }); // -F "username=testuser" let clients = []; -export const uploadMiddleware = async (req: http.IncomingMessage, res: http.ServerResponse) => { - if (req.method === 'GET' && req.url === '/api/app/upload') { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Upload API is ready'); - return; - } - const error = (msg: string) => { - return JSON.stringify({ code: 500, message: msg }); - }; - const checkAuth = async () => { - const authroization = req.headers?.['authorization'] as string; - if (!authroization) { - res.statusCode = 401; - res.end(error('Invalid authorization')); - return { tokenUser: null, token: null }; - } - const token = authroization.split(' ')[1]; - let tokenUser; - try { - tokenUser = await User.verifyToken(token); - } catch (e) { - res.statusCode = 401; - res.end(error('Invalid token')); - return { tokenUser: null, token: null }; - } - return { tokenUser, token }; - }; - if (req.method === 'POST' && req.url === '/api/upload') { - if (res.headersSent) return; // 如果响应已发送,不再处理 - res.writeHead(200, { 'Content-Type': 'application/json' }); - const { tokenUser } = await checkAuth(); - if (!tokenUser) return; - // 使用 formidable 解析 multipart/form-data - const form = new IncomingForm({ - multiples: true, // 支持多文件上传 - uploadDir: filePath, // 上传文件存储目录 - allowEmptyFiles: true, // 允许空文件 - }); - // 解析上传的文件 - form.parse(req, async (err, fields, files) => { - if (err) { - res.end(error(`Upload error: ${err.message}`)); - // 删除临时文件 - const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; - uploadedFiles.forEach((file) => { - fs.unlinkSync(file.filepath); - }); - return; - } - // 逐个处理每个上传的文件 - const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; - const uploadResults = []; - for (let i = 0; i < uploadedFiles.length; i++) { - const file = uploadedFiles[i]; - // @ts-ignore - const tempPath = file.filepath; // 文件上传时的临时路径 - const relativePath = file.originalFilename; // 保留表单中上传的文件名 (包含文件夹结构) - // 比如 child2/b.txt - const minioPath = `${tokenUser.username}/${relativePath}`; - // 上传到 MinIO 并保留文件夹结构 - const isHTML = relativePath.endsWith('.html'); - await minioClient.fPutObject(bucketName, minioPath, tempPath, { - 'Content-Type': getContentType(relativePath), - 'app-source': 'user-files', - 'Cache-Control': isHTML ? 'no-cache' : 'max-age=31536000, immutable', // 缓存一年 - }); - uploadResults.push({ - name: relativePath, - path: minioPath, - }); - fs.unlinkSync(tempPath); // 删除临时文件 - } - res.end(JSON.stringify({ code: 200, data: uploadResults })); - }); - } - if (req.method === 'POST' && req.url === '/api/app/upload') { - if (res.headersSent) return; // 如果响应已发送,不再处理 - res.writeHead(200, { 'Content-Type': 'application/json' }); - const { tokenUser, token } = await checkAuth(); - if (!tokenUser) return; - // - // 使用 formidable 解析 multipart/form-data - const form = new IncomingForm({ - multiples: true, // 支持多文件上传 - uploadDir: cacheFilePath, // 上传文件存储目录 - allowEmptyFiles: true, // 允许空 - minFileSize: 0, // 最小文件大小 - createDirsFromUploads: false, // 根据上传的文件夹结构创建目录 - keepExtensions: true, // 保留文件 - hashAlgorithm: 'md5', // 文件哈希算法 - }); - form.on('progress', (bytesReceived, bytesExpected) => { - const progress = (bytesReceived / bytesExpected) * 100; - console.log(`Upload progress: ${progress.toFixed(2)}%`); - const data = { - progress: progress.toFixed(2), - message: `Upload progress: ${progress.toFixed(2)}%`, - }; - // 向所有连接的客户端推送进度信息 - clients.forEach((client) => client.write(`${JSON.stringify(data)}\n`)); - }); - // 解析上传的文件 - form.parse(req, async (err, fields, files) => { - if (err) { - res.end(error(`Upload error: ${err.message}`)); - const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; - uploadedFiles.forEach((file) => { - fs.unlinkSync(file.filepath); - }); - return; - } - const clearFiles = () => { - const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; - uploadedFiles.forEach((file) => { - fs.unlinkSync(file.filepath); - }); - }; - let appKey, version; - const { appKey: _appKey, version: _version } = fields; - if (Array.isArray(_appKey)) { - appKey = _appKey?.[0]; - } else { - appKey = _appKey; - } - if (Array.isArray(_version)) { - version = _version?.[0]; - } else { - version = _version; - } - if (!appKey) { - res.end(error('appKey is required')); - clearFiles(); - return; - } - if (!version) { - res.end(error('version is required')); - clearFiles(); - return; - } - console.log('Appkey', appKey, version); - // 逐个处理每个上传的文件 - const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; - const uploadResults = []; - for (let i = 0; i < uploadedFiles.length; i++) { - const file = uploadedFiles[i]; - // @ts-ignore - const tempPath = file.filepath; // 文件上传时的临时路径 - const relativePath = file.originalFilename; // 保留表单中上传的文件名 (包含文件夹结构) - // 比如 child2/b.txt - const minioPath = `${tokenUser.username}/${appKey}/${version}/${relativePath}`; - // 上传到 MinIO 并保留文件夹结构 - const isHTML = relativePath.endsWith('.html'); - await minioClient.fPutObject(bucketName, minioPath, tempPath, { - 'Content-Type': getContentType(relativePath), - 'app-source': 'user-app', - 'Cache-Control': isHTML ? 'no-cache' : 'max-age=31536000, immutable', // 缓存一年 - }); - uploadResults.push({ - name: relativePath, - path: minioPath, - }); - fs.unlinkSync(tempPath); // 删除临时文件 - } - // 受控 - const r = await app.call({ - path: 'app', - key: 'uploadFiles', - payload: { - token: token, - data: { - appKey, - version, - files: uploadResults, - }, - }, - }); - const data: any = { - code: r.code, - data: r.body, - }; - if (r.message) { - data.message = r.message; - } - res.end(JSON.stringify(data)); - }); +const router = new SimpleRouter(); +const error = (msg: string, code = 500) => { + return JSON.stringify({ code, message: msg }); +}; +const checkAuth = async (req: http.IncomingMessage, res: http.ServerResponse) => { + const authroization = req.headers?.['authorization'] as string; + if (!authroization) { + res.statusCode = 401; + res.end(error('Invalid authorization')); + return { tokenUser: null, token: null }; } + const token = authroization.split(' ')[1]; + let tokenUser; + try { + tokenUser = await User.verifyToken(token); + } catch (e) { + res.statusCode = 401; + res.end(error('Invalid token')); + return { tokenUser: null, token: null }; + } + return { tokenUser, token }; +}; +router.get('/api/app/upload', async (req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Upload API is ready'); +}); +router.post('/api/upload', async (req, res) => { + if (res.headersSent) return; // 如果响应已发送,不再处理 + res.writeHead(200, { 'Content-Type': 'application/json' }); + const { tokenUser } = await checkAuth(req, res); + if (!tokenUser) return; + // 使用 formidable 解析 multipart/form-data + const form = new IncomingForm({ + multiples: true, // 支持多文件上传 + uploadDir: filePath, // 上传文件存储目录 + allowEmptyFiles: true, // 允许空文件 + }); + // 解析上传的文件 + form.parse(req, async (err, fields, files) => { + if (err) { + res.end(error(`Upload error: ${err.message}`)); + // 删除临时文件 + const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; + uploadedFiles.forEach((file) => { + fs.unlinkSync(file.filepath); + }); + return; + } + // 逐个处理每个上传的文件 + const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; + const uploadResults = []; + for (let i = 0; i < uploadedFiles.length; i++) { + const file = uploadedFiles[i]; + // @ts-ignore + const tempPath = file.filepath; // 文件上传时的临时路径 + const relativePath = file.originalFilename; // 保留表单中上传的文件名 (包含文件夹结构) + // 比如 child2/b.txt + const minioPath = `${tokenUser.username}/${relativePath}`; + // 上传到 MinIO 并保留文件夹结构 + const isHTML = relativePath.endsWith('.html'); + await minioClient.fPutObject(bucketName, minioPath, tempPath, { + 'Content-Type': getContentType(relativePath), + 'app-source': 'user-files', + 'Cache-Control': isHTML ? 'no-cache' : 'max-age=31536000, immutable', // 缓存一年 + }); + uploadResults.push({ + name: relativePath, + path: minioPath, + }); + fs.unlinkSync(tempPath); // 删除临时文件 + } + res.end(JSON.stringify({ code: 200, data: uploadResults })); + }); +}); +router.post('/api/app/upload', async (req, res) => { + if (res.headersSent) return; // 如果响应已发送,不再处理 + res.writeHead(200, { 'Content-Type': 'application/json' }); + const { tokenUser, token } = await checkAuth(req, res); + if (!tokenUser) return; + // + // 使用 formidable 解析 multipart/form-data + const form = new IncomingForm({ + multiples: true, // 支持多文件上传 + uploadDir: cacheFilePath, // 上传文件存储目录 + allowEmptyFiles: true, // 允许空 + minFileSize: 0, // 最小文件大小 + createDirsFromUploads: false, // 根据上传的文件夹结构创建目录 + keepExtensions: true, // 保留文件 + hashAlgorithm: 'md5', // 文件哈希算法 + }); + form.on('progress', (bytesReceived, bytesExpected) => { + const progress = (bytesReceived / bytesExpected) * 100; + console.log(`Upload progress: ${progress.toFixed(2)}%`); + const data = { + progress: progress.toFixed(2), + message: `Upload progress: ${progress.toFixed(2)}%`, + }; + // 向所有连接的客户端推送进度信息 + clients.forEach((client) => client.write(`${JSON.stringify(data)}\n`)); + }); + // 解析上传的文件 + form.parse(req, async (err, fields, files) => { + if (err) { + res.end(error(`Upload error: ${err.message}`)); + const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; + uploadedFiles.forEach((file) => { + fs.unlinkSync(file.filepath); + }); + return; + } + const clearFiles = () => { + const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; + uploadedFiles.forEach((file) => { + fs.unlinkSync(file.filepath); + }); + }; + let appKey, version; + const { appKey: _appKey, version: _version } = fields; + if (Array.isArray(_appKey)) { + appKey = _appKey?.[0]; + } else { + appKey = _appKey; + } + if (Array.isArray(_version)) { + version = _version?.[0]; + } else { + version = _version; + } + if (!appKey) { + res.end(error('appKey is required')); + clearFiles(); + return; + } + if (!version) { + res.end(error('version is required')); + clearFiles(); + return; + } + console.log('Appkey', appKey, version); + + // 逐个处理每个上传的文件 + const uploadedFiles = Array.isArray(files.file) ? files.file : [files.file]; + const uploadResults = []; + for (let i = 0; i < uploadedFiles.length; i++) { + const file = uploadedFiles[i]; + // @ts-ignore + const tempPath = file.filepath; // 文件上传时的临时路径 + const relativePath = file.originalFilename; // 保留表单中上传的文件名 (包含文件夹结构) + // 比如 child2/b.txt + const minioPath = `${tokenUser.username}/${appKey}/${version}/${relativePath}`; + // 上传到 MinIO 并保留文件夹结构 + const isHTML = relativePath.endsWith('.html'); + await minioClient.fPutObject(bucketName, minioPath, tempPath, { + 'Content-Type': getContentType(relativePath), + 'app-source': 'user-app', + 'Cache-Control': isHTML ? 'no-cache' : 'max-age=31536000, immutable', // 缓存一年 + }); + uploadResults.push({ + name: relativePath, + path: minioPath, + }); + fs.unlinkSync(tempPath); // 删除临时文件 + } + // 受控 + const r = await app.call({ + path: 'app', + key: 'uploadFiles', + payload: { + token: token, + data: { + appKey, + version, + files: uploadResults, + }, + }, + }); + const data: any = { + code: r.code, + data: r.body, + }; + if (r.message) { + data.message = r.message; + } + res.end(JSON.stringify(data)); + }); +}); +router.get('/api/events', async (req, res) => { if (req.url === '/api/events') { res.writeHead(200, { 'Content-Type': 'text/event-stream', @@ -217,4 +220,31 @@ export const uploadMiddleware = async (req: http.IncomingMessage, res: http.Serv clients = clients.filter((client) => client !== res); }); } +}); +router.get('/api/container/file/:id', async (req, res) => { + const id = req.params.id; + if (!id) { + res.end(error('id is required')); + return; + } + const container = await getContainerById(id); + if (container.id) { + const code = container.code; + res.writeHead(200, { + 'Content-Type': 'application/javascript; charset=utf-8', + 'container-id': container.id, + }); + res.end(code); + } else { + res.end(error('Container not found')); + } + + res.writeHead(200, { + 'Content-Type': 'application/json', + }); + res.end(JSON.stringify(container)); +}); + +export const uploadMiddleware = async (req: http.IncomingMessage, res: http.ServerResponse) => { + return router.parse(req, res); }; diff --git a/src/modules/redis.ts b/src/modules/redis.ts index 1c38238..55521ef 100644 --- a/src/modules/redis.ts +++ b/src/modules/redis.ts @@ -18,6 +18,7 @@ export const redis = new Redis({ maxRetriesPerRequest: null, // 允许请求重试的次数 (如果需要无限次重试) ...config.redis, }); +console.log('redis', config.redis); // 监听连接事件 redis.on('connect', () => { diff --git a/src/route.ts b/src/route.ts index 4d10593..b9da5f1 100644 --- a/src/route.ts +++ b/src/route.ts @@ -1,5 +1,5 @@ -import './demo/index.ts'; -import { app as adminApp, appendTo } from './admin/index.ts'; +// import './demo/index.ts'; +// import { app as adminApp, appendTo } from './admin/index.ts'; import './routes/index.ts'; import { app } from './app.ts'; import { useConfig } from '@abearxiong/use-config'; @@ -13,4 +13,4 @@ createAuthRoute({ // app.importApp(adminApp); -appendTo(app); +// appendTo(app); diff --git a/src/routes/agent/list.ts b/src/routes/agent/list.ts index 69b6086..cd42ff2 100644 --- a/src/routes/agent/list.ts +++ b/src/routes/agent/list.ts @@ -1,7 +1,7 @@ import { app } from '@/app.ts'; import { AiAgent, AiProperties } from '@/models/agent.ts'; import { CustomError } from '@kevisual/router'; -import { agentManger } from '@kevisual/ai-lang'; +// import { agentManger } from '@kevisual/ai-lang'; import { v4 } from 'uuid'; app .route({ @@ -66,25 +66,25 @@ app }) .addTo(app); -app - .route('agent', 'test') - .define(async (ctx) => { - const { message } = ctx.query; - const data: AiProperties = { - type: 'ollama', - id: 'test', - model: 'qwen2.5:14b', - baseUrl: 'http://mz.zxj.im:11434', - cache: 'memory', - }; - const agent = agentManger.createAgent(data as any); - const res = await agent.sendHumanMessage(message); - // agent.close(); - agentManger.removeAgent(agent.id); - ctx.body = res; - return ctx; - }) - .addTo(app); +// app +// .route('agent', 'test') +// .define(async (ctx) => { +// const { message } = ctx.query; +// const data: AiProperties = { +// type: 'ollama', +// id: 'test', +// model: 'qwen2.5:14b', +// baseUrl: 'http://mz.zxj.im:11434', +// cache: 'memory', +// }; +// const agent = agentManger.createAgent(data as any); +// const res = await agent.sendHumanMessage(message); +// // agent.close(); +// agentManger.removeAgent(agent.id); +// ctx.body = res; +// return ctx; +// }) +// .addTo(app); export const agentModelList = ['qwen2.5:14b', 'qwen2.5-coder:7b', 'llama3.1:8b', 'bakllava:latest'] as const; export const openAiModels = ['gpt-4o']; @@ -130,8 +130,8 @@ const initManager = async () => { cacheName: item.cacheName, }; }); - agentManger.createAgentList(data); + // agentManger.createAgentList(data); }; -setTimeout(() => { - initManager(); -}, 1000); +// setTimeout(() => { +// initManager(); +// }, 1000); diff --git a/src/routes/container/list.ts b/src/routes/container/list.ts index 9c71dfd..a796993 100644 --- a/src/routes/container/list.ts +++ b/src/routes/container/list.ts @@ -1,7 +1,6 @@ import { CustomError } from '@kevisual/router'; import { app } from '../../app.ts'; import { ContainerModel, ContainerData, Container } from './models/index.ts'; -import semver from 'semver'; import { uploadMinioContainer } from '../page/module/cache-file.ts'; const list = app.route({ path: 'container', @@ -49,7 +48,7 @@ add.run = async (ctx) => { const container = { ...data, }; - let containerModel: any = null; + let containerModel: ContainerModel | null = null; if (container.id) { containerModel = await ContainerModel.findByPk(container.id); if (containerModel) { @@ -134,7 +133,7 @@ app version: version, code: container.code, filePath: fileName, - saveHTML + saveHTML, }); await ctx.call({ path: 'app', diff --git a/src/routes/container/models/index.ts b/src/routes/container/models/index.ts index 97251ee..aa607eb 100644 --- a/src/routes/container/models/index.ts +++ b/src/routes/container/models/index.ts @@ -1,9 +1,9 @@ import { sequelize } from '../../../modules/sequelize.ts'; import { DataTypes, Model } from 'sequelize'; - +import crypto from 'crypto'; export interface ContainerData {} export type ContainerPublish = { - key: string; + key: string; title?: string; description?: string; fileName?: string; @@ -21,11 +21,20 @@ export class ContainerModel extends Model { declare type: string; declare tags: string[]; declare code: string; + declare hash: string; declare source: string; declare sourceType: string; declare data: ContainerData; declare publish: ContainerPublish; declare uid: string; + declare updatedAt: Date; + declare createdAt: Date; + createHash() { + const { code } = this; + const hash = crypto.createHash('md5'); + hash.update(code); + this.hash = hash.digest('hex'); + } } ContainerModel.init( { @@ -55,6 +64,10 @@ ContainerModel.init( type: DataTypes.TEXT, defaultValue: '', }, + hash: { + type: DataTypes.TEXT, + defaultValue: '', + }, source: { type: DataTypes.STRING, defaultValue: '', diff --git a/src/routes/container/module/get-container-file.ts b/src/routes/container/module/get-container-file.ts new file mode 100644 index 0000000..fe973fc --- /dev/null +++ b/src/routes/container/module/get-container-file.ts @@ -0,0 +1,11 @@ +import { ContainerModel } from '../models/index.ts'; + +export const getContainerById = async (id: string) => { + const container = await ContainerModel.findByPk(id); + const code = container?.code; + return { + code, + id: container?.id, + updatedAt: new Date(container?.updatedAt).getTime(), + }; +}; diff --git a/src/routes/index.ts b/src/routes/index.ts index 26550f5..823abe9 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -10,9 +10,9 @@ import './agent/index.ts'; import './user/index.ts'; -import './chat-prompt/index.ts'; +// import './chat-prompt/index.ts'; -import './chat-history/index.ts'; +// import './chat-history/index.ts'; import './github/index.ts'; diff --git a/src/routes/user/me.ts b/src/routes/user/me.ts index b367f90..699f022 100644 --- a/src/routes/user/me.ts +++ b/src/routes/user/me.ts @@ -16,7 +16,7 @@ app logging: false, }); if (!user) { - throw new CustomError(500, 'user not found'); + ctx.throw(500, 'user not found'); } user.setTokenUser(tokenUser); ctx.body = await user.getInfo(); @@ -30,7 +30,7 @@ app .define(async (ctx) => { const { username, email, password } = ctx.query; if (!username && !email) { - throw new CustomError(400, 'username or email is required'); + ctx.throw(400, 'username or email is required'); } let user: User | null = null; if (username) { @@ -40,10 +40,10 @@ app user = await User.findOne({ where: { email } }); } if (!user) { - throw new CustomError(500, 'Login Failed'); + ctx.throw(500, 'Login Failed'); } if (!user.checkPassword(password)) { - throw new CustomError(500, 'Password error'); + ctx.throw(500, 'Password error'); } const token = await user.createToken(); ctx.body = token; @@ -58,7 +58,7 @@ app const result = await User.verifyToken(token); ctx.body = result || {}; } catch (e) { - throw new CustomError(401, 'Token InValid '); + ctx.throw(401, 'Token InValid '); } }) .addTo(app); @@ -73,7 +73,7 @@ app const { id } = tokenUser; const user = await User.findByPk(id); if (!user) { - throw new CustomError(500, 'user not found'); + ctx.throw(500, 'user not found'); } user.setTokenUser(tokenUser); if (username) { @@ -105,13 +105,13 @@ app const tokenUser = ctx.state.tokenUser; const { username, type = 'org' } = ctx.query.data || {}; if (!username && type === 'org') { - throw new CustomError('username is required'); + ctx.throw('username is required'); } if (tokenUser.username === username) { // 自己刷新自己的token const user = await User.findByPk(tokenUser.id); if (!user) { - throw new CustomError('user not found'); + ctx.throw('user not found'); } if (user.type === 'user') { const token = await user.createToken(); @@ -131,7 +131,7 @@ app } if (!me || me.type === 'org') { console.log('switch Error ', me.username, me.type); - throw new CustomError('Permission denied'); + ctx.throw('Permission denied'); } if (type === 'user') { const token = await me.createToken(); @@ -140,13 +140,13 @@ app } const orgUser = await User.findOne({ where: { username } }); if (!orgUser) { - throw new CustomError('org user not found'); + ctx.throw('org user not found'); } const user = await Org.findOne({ where: { username } }); const users = user.users; const index = users.findIndex((u) => u.uid === me.id); if (index === -1) { - throw new CustomError('Permission denied'); + ctx.throw('Permission denied'); } const token = await orgUser.createToken(me.id); ctx.body = token;