upgrade @kksh/api

This commit is contained in:
Huakun Shen 2025-01-27 16:23:07 -05:00
parent 19a98d0aaa
commit 90ef28eb4a
No known key found for this signature in database
4 changed files with 20 additions and 27 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -35,7 +35,7 @@
"program": "deno",
"args": [
"install",
"--allow-scripts"
"--allow-scripts=npm:faiss-node@0.5.1,npm:sharp@0.33.5"
]
}
}
@ -47,7 +47,9 @@
{
"path": "$EXTENSION/deno-src/index.ts",
"read": "*",
"write": "*",
"write": [
"$EXTENSION_SUPPORT"
],
"ffi": "*",
"sys": [
"uid"
@ -84,24 +86,21 @@
},
"dependencies": {
"@iconify/svelte": "^4.2.0",
"@kksh/api": "^0.0.54",
"@kksh/api": "^0.0.55",
"@kksh/svelte5": "0.1.15",
"clsx": "^2.1.1",
"lucide-svelte": "^0.474.0",
"mode-watcher": "^0.5.1",
"sveltekit-superforms": "^2.23.1",
"tailwind-merge": "^2.6.0",
"tailwind-variants": "^0.3.1",
"valibot": "^1.0.0-beta.14"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "^2.8.1",
"@sveltejs/vite-plugin-svelte": "^4.0.1",
"svelte": "^5.2.7",
"svelte-check": "^4.0.9",
"typescript": "^5.6.3",
"vite": "^5.4.11",
"@sveltejs/adapter-static": "^3.0.6",
"@tailwindcss/typography": "^0.5.15",
"@types/eslint": "^9.6.1",
"autoprefixer": "^10.4.20",
@ -113,8 +112,12 @@
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.8",
"prettier-plugin-tailwindcss": "^0.6.9",
"svelte": "^5.2.7",
"svelte-check": "^4.0.9",
"tailwindcss": "^3.4.15",
"typescript-eslint": "^8.15.0"
"typescript": "^5.6.3",
"typescript-eslint": "^8.15.0",
"vite": "^5.4.11"
},
"type": "module",
"files": [

13
pnpm-lock.yaml generated
View File

@ -1,13 +0,0 @@
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
'@kksh/api':
specifier: ^0.0.54
version: link:../../kunkun/packages/api

View File

@ -1,4 +1,4 @@
import { log, fs, shell, path, toast } from '@kksh/api/ui/iframe';
import { fs, shell, path, toast } from '@kksh/api/ui/iframe';
import type { DenoAPI } from '../api.types';
export async function getRpcAPI(env: { OPENAI_API_KEY: string; EXTENSION_SUPPORT: string }) {
@ -14,10 +14,9 @@ export async function getRpcAPI(env: { OPENAI_API_KEY: string; EXTENSION_SUPPORT
cwd,
// allowAllEnv: true,
allowEnv: ['OPENAI_API_KEY', 'EXTENSION_SUPPORT', 'CWD'],
allowWrite: ['$EXTENSION_SUPPORT'],
allowAllRead: true,
// allowRead: ['$EXTENSION_SUPPORT', '$EXTENSION/deno-src'],
// allowWrite: ['$EXTENSION_SUPPORT'],
allowAllWrite: true,
// allowAllWrite: true,
allowAllFfi: true, // /Users/hk/Dev/kunkun-extension-repos/kunkun-ext-rag/deno-src/node_modules/.deno/faiss-node@0.5.1/node_modules/faiss-node/build/Release/faiss-node.node
// allowAllSys: true, // uid
allowSys: ['uid'],
@ -46,7 +45,11 @@ export async function installDenoDeps() {
return;
}
const command = shell.createCommand('deno', ['install', '--allow-scripts'], { cwd });
const command = shell.createCommand(
'deno',
['install', '--allow-scripts=npm:faiss-node@0.5.1,npm:sharp@0.33.5'],
{ cwd }
);
const ret = await command.execute();
if (ret.code !== 0) {
// log.error(`Failed to install deno dependencies; ${ret.stderr}`);