mirror of
https://github.com/mengxi-ream/read-frog.git
synced 2026-04-30 01:56:46 +00:00
* fix(selection): route stream requests through background to bypass CORS Previously, selection translate/analyze used direct `streamText` calls from content scripts, which fail on providers without permissive CORS headers (e.g. NVIDIA, Tencent Hunyuan). The old Firefox-only workaround is replaced with a unified background stream relay that works across all browsers. - Add generic `background-stream` port handler in background script - Add `port-streaming` client utility for content scripts - Remove Firefox-specific `firefox-stream.ts` and `firefox-streaming.ts` - Simplify `ai-button.tsx` and `translate-button.tsx` to use the new `streamBackgroundText` API - Minor lint fixes and ref naming improvements Closes #829 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(selection): move provider guard into try block and use crypto polyfill - Move translateProviderConfig null check inside try block so setIsTranslating(true) runs before the throw - Use generateUUIDv4 polyfill as fallback instead of manual ID generation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
194 lines
5.7 KiB
JSON
194 lines
5.7 KiB
JSON
{
|
|
"name": "@read-frog/extension",
|
|
"type": "module",
|
|
"version": "1.25.1",
|
|
"private": true,
|
|
"packageManager": "pnpm@10.29.1",
|
|
"description": "Read Frog browser extension for language learning",
|
|
"scripts": {
|
|
"build": "wxt build",
|
|
"build:firefox": "wxt build -b firefox",
|
|
"build:analyze": "wxt build --analyze",
|
|
"dev:local": "WXT_USE_LOCAL_PACKAGES=true wxt",
|
|
"dev": "wxt",
|
|
"dev:edge": "wxt -b edge",
|
|
"dev:firefox": "wxt -b firefox",
|
|
"lint": "eslint",
|
|
"lint:fix": "eslint --fix",
|
|
"postinstall": "wxt prepare",
|
|
"test": "vitest run",
|
|
"test:cov": "vitest run --coverage",
|
|
"test:watch": "vitest",
|
|
"type-check": "tsc --noEmit",
|
|
"zip": "WXT_ZIP_MODE=true wxt zip",
|
|
"zip:edge": "WXT_ZIP_MODE=true wxt zip -b edge",
|
|
"zip:firefox": "WXT_ZIP_MODE=true wxt zip -b firefox",
|
|
"zip:all": "pnpm zip && pnpm zip:edge",
|
|
"release": "changeset tag && git push origin --tags",
|
|
"prepare": "husky"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/amazon-bedrock": "^4.0.51",
|
|
"@ai-sdk/anthropic": "^3.0.38",
|
|
"@ai-sdk/cerebras": "^2.0.31",
|
|
"@ai-sdk/cohere": "^3.0.19",
|
|
"@ai-sdk/deepinfra": "^2.0.32",
|
|
"@ai-sdk/deepseek": "^2.0.18",
|
|
"@ai-sdk/fireworks": "^2.0.32",
|
|
"@ai-sdk/google": "^3.0.22",
|
|
"@ai-sdk/groq": "^3.0.22",
|
|
"@ai-sdk/mistral": "^3.0.19",
|
|
"@ai-sdk/openai": "^3.0.26",
|
|
"@ai-sdk/openai-compatible": "^2.0.28",
|
|
"@ai-sdk/perplexity": "^3.0.18",
|
|
"@ai-sdk/react": "^3.0.79",
|
|
"@ai-sdk/replicate": "^2.0.18",
|
|
"@ai-sdk/togetherai": "^2.0.31",
|
|
"@ai-sdk/vercel": "^2.0.30",
|
|
"@ai-sdk/xai": "^3.0.48",
|
|
"@base-ui/react": "^1.1.0",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-json": "^6.0.2",
|
|
"@codemirror/lint": "^6.9.3",
|
|
"@codemirror/state": "^6.5.4",
|
|
"@codemirror/view": "^6.39.12",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@headless-tree/core": "^1.6.3",
|
|
"@headless-tree/react": "^1.6.3",
|
|
"@mozilla/readability": "^0.6.0",
|
|
"@openrouter/ai-sdk-provider": "^2.1.1",
|
|
"@orpc/client": "^1.13.4",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@read-frog/api-contract": "0.1.3",
|
|
"@read-frog/definitions": "0.1.1",
|
|
"@tabler/icons-react": "^3.36.1",
|
|
"@tanstack/react-form": "^1.28.0",
|
|
"@tanstack/react-query": "^5.90.20",
|
|
"@uiw/codemirror-extensions-color": "^4.25.4",
|
|
"@uiw/react-codemirror": "^4.25.4",
|
|
"@valibot/to-json-schema": "^1.5.0",
|
|
"@visactor/react-vchart": "^2.0.16",
|
|
"@visactor/vchart": "^2.0.16",
|
|
"@webext-core/messaging": "^2.3.0",
|
|
"@wxt-dev/i18n": "^0.2.4",
|
|
"ai": "^6.0.77",
|
|
"better-auth": "^1.4.18",
|
|
"case-anything": "^3.1.2",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"css-tree": "^3.1.0",
|
|
"debounce": "^3.0.0",
|
|
"deepmerge-ts": "^7.1.5",
|
|
"dequal": "^2.0.3",
|
|
"dexie": "^4.3.0",
|
|
"effect": "^3.19.16",
|
|
"file-saver": "^2.0.5",
|
|
"franc": "^6.2.0",
|
|
"hotkeys-js": "^4.0.0",
|
|
"jotai": "^2.17.1",
|
|
"jotai-family": "^1.0.1",
|
|
"js-sha256": "^0.11.1",
|
|
"ollama-ai-provider-v2": "^3.0.4",
|
|
"react": "^19.2.4",
|
|
"react-dom": "^19.2.4",
|
|
"react-markdown": "^10.1.0",
|
|
"react-router": "^7.13.0",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.4.0",
|
|
"tw-animate-css": "^1.4.0",
|
|
"vercel-minimax-ai-provider": "^0.0.2",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@antfu/eslint-config": "^7.3.0",
|
|
"@changesets/changelog-github": "^0.5.2",
|
|
"@changesets/cli": "^2.29.8",
|
|
"@commitlint/cli": "^20.4.1",
|
|
"@commitlint/config-conventional": "^20.4.1",
|
|
"@eslint-react/eslint-plugin": "^2.12.2",
|
|
"@faker-js/faker": "^10.3.0",
|
|
"@iconify/react": "^6.0.2",
|
|
"@tailwindcss/postcss": "^4.1.18",
|
|
"@tanstack/eslint-plugin-query": "^5.91.4",
|
|
"@tanstack/react-query-devtools": "^5.91.3",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
"@types/css-tree": "^2.3.11",
|
|
"@types/file-saver": "^2.0.7",
|
|
"@types/react": "^19.2.13",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^5.1.3",
|
|
"@vitest/coverage-istanbul": "^4.0.18",
|
|
"@wxt-dev/module-react": "^1.1.5",
|
|
"agentation": "^2.2.0",
|
|
"autoprefixer": "^10.4.24",
|
|
"eruda": "^3.4.3",
|
|
"eslint": "9.39.2",
|
|
"eslint-plugin-format": "^1.4.0",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^28.0.0",
|
|
"lint-staged": "^16.2.7",
|
|
"nx": "^22.4.5",
|
|
"postcss": "^8.5.6",
|
|
"postcss-rem-to-responsive-pixel": "^7.0.1",
|
|
"postcss-value-parser": "^4.2.0",
|
|
"tailwindcss": "^4.1.18",
|
|
"type-fest": "^5.4.3",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.0.18",
|
|
"wxt": "0.20.14"
|
|
},
|
|
"devEngines": {
|
|
"runtime": {
|
|
"name": "node",
|
|
"version": "^24.12.0",
|
|
"onFail": "download"
|
|
}
|
|
},
|
|
"nx": {
|
|
"targets": {
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "wxt build"
|
|
}
|
|
},
|
|
"build:firefox": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "wxt build -b firefox"
|
|
}
|
|
},
|
|
"test": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "vitest run"
|
|
}
|
|
},
|
|
"test:cov": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "vitest run --coverage"
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "eslint"
|
|
}
|
|
},
|
|
"type-check": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "tsc --noEmit"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|