mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-10-21 14:11:23 +00:00
## Summary `@saintno/comfyui-sdk@0.3.1` tests `z.data instanceof ArrayBuffer || z.data instanceof Buffer` on every socket message, with no guard ([comfy-addons/comfyui-sdk#32](https://github.com/comfy-addons/comfyui-sdk/pull/32)). `Buffer` is undeclared in the WebView, so every message that isn't an `ArrayBuffer` (all JSON status, progress and `executed` events) throws a `ReferenceError` inside the handler's `try` and the SDK drops it. ComfyUI generations never see progress or completion. This installs a real `globalThis.Buffer` from the `buffer` npm package. ## Changes - Add `buffer@^6.0.3` and set `globalThis.Buffer ??= Buffer` in `providers/comfy.ts`, next to the only code that needs it. `??=` leaves Node's `Buffer` alone under vitest. - A stub class would not do: `ai-sdk-pollinations` calls `globalThis.Buffer.from(...).toString('base64')` whenever a global `Buffer` exists, and liquidjs calls `Buffer.isBuffer`. The real package handles both. - `package-lock.json` was re-derived with npm. Besides adding `buffer@6.0.3` at the top level (the existing 5.7.1 now nests under `@jimp/core`), the re-resolve moved some nested copies around and bumped `@internationalized/date` from 3.12.3 to 3.12.4. ## Testing - `aubr check`, `aube test` and `aubr lint:fix` pass; `aubr build` prints no "externalized for browser compatibility" warning. - Not covered by the suite, since vitest runs in Node where `Buffer` always exists. Still to do by hand: `tauri dev` against a running ComfyUI, one image per built-in mode, confirming progress updates and the finished image arrive. ## Follow-up The upstream fix, [comfyui-sdk#33](https://github.com/comfy-addons/comfyui-sdk/pull/33), guards the check with `typeof Buffer !== "undefined"` and reads `event.data`. It is still open and unreleased (latest is 0.3.1). Once an SDK release includes it, this polyfill can be dropped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Skpo6psWSMbdzbMiBscyGi Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
134 lines
4.4 KiB
JSON
134 lines
4.4 KiB
JSON
{
|
|
"name": "aventura",
|
|
"version": "0.7.12",
|
|
"description": "AI-powered adventure and creative writing frontend",
|
|
"type": "module",
|
|
"imports": {
|
|
"#lib/*": "./src/lib/*"
|
|
},
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"prepare": "svelte-kit sync",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"tauri": "tauri",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"release": "node scripts/release.js",
|
|
"fake-provider": "node scripts/fake-provider.mjs",
|
|
"lint": "node scripts/pm.js run lint:ts && node scripts/pm.js run lint:rust",
|
|
"lint:fix": "node scripts/pm.js run lint:ts:fix && node scripts/pm.js run lint:rust:fix",
|
|
"lint:ts": "eslint .",
|
|
"lint:ts:fix": "eslint . --fix",
|
|
"lint:rust": "cargo fmt --manifest-path src-tauri/Cargo.toml --check && cargo +1.99.0 clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings",
|
|
"lint:rust:fix": "cargo +1.99.0 clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features --fix --allow-dirty -- -D warnings && cargo fmt --manifest-path src-tauri/Cargo.toml",
|
|
"format": "prettier --write \"**/*.{ts,js,svelte,json,css,html}\""
|
|
},
|
|
"license": "AGPL-3.0",
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^4.0.78",
|
|
"@ai-sdk/deepseek": "^3.0.63",
|
|
"@ai-sdk/google": "^4.0.93",
|
|
"@ai-sdk/groq": "^4.0.59",
|
|
"@ai-sdk/mistral": "^4.0.62",
|
|
"@ai-sdk/openai": "^4.0.91",
|
|
"@ai-sdk/openai-compatible": "^3.0.67",
|
|
"@ai-sdk/xai": "^5.0.20",
|
|
"@codemirror/autocomplete": "^6.20.3",
|
|
"@codemirror/lang-liquid": "^6.3.3",
|
|
"@codemirror/language": "^6.13.1",
|
|
"@codemirror/state": "^6.7.6",
|
|
"@codemirror/view": "^6.43.14",
|
|
"@lezer/highlight": "^1.2.5",
|
|
"@lucide/svelte": "^1.55.0",
|
|
"@openrouter/ai-sdk-provider": "^3.1.0",
|
|
"@saintno/comfyui-sdk": "0.3.1",
|
|
"@tauri-apps/api": "^2.12.3",
|
|
"@tauri-apps/plugin-dialog": "^2.8.2",
|
|
"@tauri-apps/plugin-fs": "^2.7.0",
|
|
"@tauri-apps/plugin-http": "^2.8.3",
|
|
"@tauri-apps/plugin-notification": "^2.6.0",
|
|
"@tauri-apps/plugin-opener": "^2.7.1",
|
|
"@tauri-apps/plugin-process": "^2.4.0",
|
|
"@tauri-apps/plugin-sql": "^2.5.0",
|
|
"@tauri-apps/plugin-updater": "^2.13.3",
|
|
"@tauri-apps/plugin-websocket": "^2.5.0",
|
|
"@tutorlatin/svelte-tiny-virtual-list": "^3.0.20",
|
|
"ai": "^7.0.137",
|
|
"ai-sdk-pollinations": "^0.0.2",
|
|
"buffer": "^6.0.3",
|
|
"clsx": "^2.1.1",
|
|
"codemirror": "^6.0.2",
|
|
"gpt-tokenizer": "^4.0.0",
|
|
"harper.js": "^2.10.0",
|
|
"html5-qrcode": "^2.3.8",
|
|
"jsonrepair": "^3.15.0",
|
|
"liquidjs": "^10.30.0",
|
|
"marked": "^18.1.0",
|
|
"svelte-codemirror-editor": "^2.1.0",
|
|
"tailwind-merge": "^3.7.0",
|
|
"yaml": "^2.9.1",
|
|
"zod": "^4.6.6"
|
|
},
|
|
"devDependencies": {
|
|
"@ai-sdk/provider": "^4.0.26",
|
|
"@sveltejs/adapter-static": "^4.0.0",
|
|
"@sveltejs/kit": "^3.0.1",
|
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@tauri-apps/cli": "^2.12.2",
|
|
"@types/json-schema": "^7.0.15",
|
|
"@types/node": "^24",
|
|
"bits-ui": "^2.19.5",
|
|
"eslint": "^10.12.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
"eslint-plugin-boundaries": "^7.2.0",
|
|
"eslint-plugin-prettier": "^5.5.6",
|
|
"eslint-plugin-svelte": "^3.23.1",
|
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
"globals": "^17.13.0",
|
|
"jsdom": "^30.1.2",
|
|
"lefthook": "^2.2.1",
|
|
"prettier": "^3.9.10",
|
|
"prettier-plugin-svelte": "^4.1.1",
|
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
"svelte": "^5.57.2",
|
|
"svelte-check": "^4.7.6",
|
|
"tailwind-variants": "^3.3.0",
|
|
"tailwindcss": "^4.3.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.71.1",
|
|
"vaul-svelte": "^1.0.0-next.7",
|
|
"vite": "^8.3.4",
|
|
"vitest": "^5.0.3"
|
|
},
|
|
"overrides": {
|
|
"@saintno/comfyui-sdk": {
|
|
"typescript": "$typescript"
|
|
},
|
|
"runed": {
|
|
"@sveltejs/kit": "$@sveltejs/kit"
|
|
}
|
|
},
|
|
"aube": {
|
|
"allowBuilds": {
|
|
"esbuild": true,
|
|
"lefthook": true,
|
|
"unrs-resolver": true
|
|
}
|
|
},
|
|
"devEngines": {
|
|
"runtime": {
|
|
"name": "node",
|
|
"version": "^24.15.0",
|
|
"onFail": "error"
|
|
}
|
|
},
|
|
"allowScripts": {
|
|
"lefthook@2.2.1": true,
|
|
"unrs-resolver@1.12.2": true
|
|
}
|
|
}
|