-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
158 lines (158 loc) · 13.3 KB
/
Copy pathpackage.json
File metadata and controls
158 lines (158 loc) · 13.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
"name": "astra",
"type": "module",
"version": "0.1.0",
"packageManager": "pnpm@10.33.0",
"private": true,
"description": "AI-powered language learning software, extension-first",
"engines": {
"node": ">=22.0.0",
"pnpm": ">=10.0.0"
},
"scripts": {
"dev": "wxt",
"dev:web": "vite --config src/web/vite.config.ts",
"dev:safari": "wxt -b safari",
"build": "wxt build && pnpm verify:content-bundles -- .output/chrome-mv3/content-scripts",
"build:web": "vite build --config src/web/vite.config.ts",
"deploy:web:cloudflare": "pnpm build:web && pnpm dlx wrangler pages deploy dist/web --project-name astra-web --branch main --commit-dirty=true",
"deploy:relay-lite:cloudflare": "pnpm dlx wrangler deploy --config src/platform/relay-lite/wrangler.jsonc",
"build:compat": "ASTRA_BROWSER_CHANNEL=compat wxt build && pnpm verify:content-bundles -- .output/chrome-mv3/content-scripts",
"build:firefox": "wxt build -b firefox && pnpm verify:content-bundles -- .output/firefox-mv3/content-scripts",
"canonicalize:safari-js": "tsx script/maintenance/canonicalize-safari-js.ts",
"build:safari": "wxt build -b safari && pnpm canonicalize:safari-js && pnpm verify:content-bundles -- .output/safari-mv3/content-scripts",
"ios:sync-extension": "bash ./ios/scripts/sync-safari-build.sh",
"ios:prepare": "pnpm build:safari && pnpm ios:sync-extension",
"zip": "wxt zip",
"zip:compat": "ASTRA_BROWSER_CHANNEL=compat wxt zip",
"zip:firefox": "wxt zip -b firefox",
"zip:safari": "wxt zip -b safari",
"postinstall": "wxt prepare",
"repo:size": "sh -c 'echo \"# top-level KiB\"; LC_ALL=C du -sk .[!.]* * 2>/dev/null | sort -nr | head -40; echo; echo \"# depth-2 dirs KiB\"; LC_ALL=C find . -mindepth 1 -maxdepth 2 -type d -not -path \"./.git/*\" -exec du -sk {} + 2>/dev/null | sort -nr | head -80'",
"type-check": "tsc --noEmit && tsc -p src/web/tsconfig.json --noEmit",
"type-check:web": "tsc -p src/web/tsconfig.json --noEmit",
"preview:web": "vite preview --config src/web/vite.config.ts",
"check:zod-entrypoints": "tsx script/maintenance/verify-zod-entrypoints.ts",
"check:repo-knowledge": "tsx script/maintenance/check-repo-knowledge.ts",
"check:weekly-digest-delivery": "tsx script/maintenance/verify-weekly-digest-delivery-workflow.ts",
"check:strategic-non-goals": "tsx script/maintenance/check-strategic-non-goals.ts",
"check:product-copy": "tsx script/maintenance/check-product-copy.ts",
"check:safari-sync-needed": "tsx script/maintenance/check-safari-sync-needed.ts",
"check:macro-final-completion": "tsx script/maintenance/check-macro-final-completion.ts",
"verify:content-bundles": "tsx script/maintenance/verify-content-script-bundles.ts",
"verify:firefox-lint": "tsx script/maintenance/verify-firefox-lint.ts",
"lint": "pnpm check:zod-entrypoints && eslint . --ext .ts,.tsx",
"lint:ci": "pnpm check:zod-entrypoints && pnpm check:strategic-non-goals && pnpm check:safari-sync-needed && pnpm check:macro-final-completion && eslint src/entrypoints/background/index.ts src/entrypoints/content/index.tsx src/entrypoints/content/video-platforms/bilibili.ts src/entrypoints/content/video-platforms/youtube.ts \"src/entrypoints/*/main.tsx\" src/utils/zod-config.ts src/utils/cache/*.ts src/utils/providers/router.ts src/utils/storage/config.ts src/utils/storage/config-sync.ts src/utils/storage/page-digests.ts src/utils/storage/reading-history-core.ts src/utils/storage/reading-history.ts src/utils/storage/site-rules.ts src/utils/storage/translation-usage.ts src/utils/storage/vocabulary-core.ts src/utils/storage/vocabulary.ts src/platform/cloudflare/src/index.ts src/platform/cloudflare/src/routes.ts src/platform/cloudflare/src/bindings.ts src/platform/cloudflare/src/context.ts src/platform/cloudflare/src/env.ts src/platform/cloudflare/src/types/*.ts src/platform/cloudflare/src/lib/d1.ts src/platform/cloudflare/src/lib/http.ts src/platform/cloudflare/src/lib/proxy.ts \"src/platform/cloudflare/src/repositories/*.ts\" script/bench-live/driver.ts script/bench-live/index.ts script/bench-live/scenarios/index.ts script/bench-live/scenarios/article-extraction-docs.ts script/bench-live/scenarios/dynamic-content-append.ts script/bench-live/scenarios/onboarding-smoke.ts script/bench-live/scenarios/popup-deep-read-proof.ts script/bench-live/scenarios/site-automation-autostart.ts script/bench-live/scenarios/vocabulary-srs-smoke.ts script/maintenance/check-strategic-non-goals.ts script/maintenance/check-macro-final-completion.ts script/maintenance/check-safari-sync-needed.ts script/maintenance/verify-zod-entrypoints.ts script/maintenance/verify-content-script-bundles.ts src/web/src/app.tsx src/web/src/lib/article-import.ts src/web/src/main.tsx vitest.config.ts --ext .ts,.tsx",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"relay:dev": "tsx watch src/server/index.ts",
"relay:start": "tsx src/server/index.ts",
"relay:shadow:audit": "tsx src/server/cloudflare-shadow-cli.ts audit",
"relay:shadow:verify": "tsx src/server/cloudflare-shadow-cli.ts verify",
"relay:shadow:backfill:dry-run": "tsx src/server/cloudflare-shadow-cli.ts backfill:dry-run",
"relay:shadow:backfill:apply": "tsx src/server/cloudflare-shadow-cli.ts backfill:apply",
"weekly-digest:deliver": "tsx script/maintenance/trigger-weekly-digest-delivery.ts",
"bench": "node script/bench/run.ts",
"bench:inventory": "node script/bench/run.ts --inventory-only",
"bench:history": "node script/bench/history.ts",
"bench:loop": "node script/bench/loop.ts",
"bench:task": "node script/bench/loop.ts --skip-bench",
"bench:pass": "node script/bench/loop.ts --skip-bench",
"bench:execute": "node script/bench/loop.ts --skip-bench",
"bench:opt": "tsx script/bench-opt/entry.ts --write",
"bench:opt:autoloop": "tsx script/bench-opt/autoloop.ts",
"bench:opt:resume-latest": "tsx script/bench-opt/resume-latest.ts",
"bench:opt:list": "tsx script/bench-opt/entry.ts --list",
"bench:opt:status": "tsx script/bench-opt/status-latest.ts",
"bench:opt:capability-proof": "tsx script/bench-opt/capability-proof-entry.ts",
"bench:opt:loop": "node script/bench/loop.ts --use-bench-opt",
"bench:opt:execute": "pnpm bench:execute",
"bench:opt:dispatch": "pnpm bench:dispatch",
"bench:opt:history": "pnpm bench:history",
"bench:live": "tsx script/bench-live/entry.ts",
"bench:live:lane:source-core": "pnpm bench:live -- --scenario bench-live/page-translation-article-basic-source-bilingual && pnpm bench:live -- --scenario bench-live/page-translation-full-page-title-shadow-source && pnpm bench:live -- --scenario bench-live/article-extraction-proof && pnpm bench:live -- --scenario bench-live/dynamic-content-append && pnpm bench:live -- --scenario bench-live/frame-coordination-basic && pnpm bench:live -- --scenario bench-live/frame-coordination-cross-origin-fallback",
"bench:live:lane:extension-core": "pnpm bench:live -- --scenario bench-live/site-automation-autostart && pnpm bench:live -- --scenario bench-live/onboarding-smoke && pnpm bench:live -- --scenario bench-live/vocabulary-srs-smoke",
"bench:live:lane:release-proof": "pnpm bench:live:lane:source-core && pnpm bench:live:lane:extension-core && pnpm bench:live:lane:learning-loop && pnpm bench:live:lane:document-proof && pnpm bench:live:lane:youtube-proof && pnpm bench:live:lane:youtube-holdout",
"bench:live:lane:hover-selection": "pnpm bench:live -- --scenario bench-live/hover-translation-basic && pnpm bench:live -- --scenario bench-live/selection-explain-basic",
"bench:live:lane:popup-proof": "pnpm bench:live -- --scenario bench-live/popup-deep-read-proof",
"bench:live:lane:learning-loop": "pnpm bench:live:lane:popup-proof && pnpm bench:live -- --scenario bench-live/vocabulary-srs-smoke && pnpm bench:live -- --scenario bench-live/selection-save-review-loop && pnpm bench:live -- --scenario bench-live/learning-loop-revisit-smoke",
"bench:live:lane:document-proof": "pnpm bench:live -- --scenario bench-live/document-intake-basic && pnpm bench:live -- --scenario bench-live/document-intake-local-file-handoff && pnpm bench:live -- --scenario bench-live/pdf-reader-basic && pnpm bench:live -- --scenario bench-live/epub-reader-basic && pnpm bench:live -- --scenario bench-live/subtitle-file-basic",
"bench:live:lane:youtube-proof": "pnpm bench:live -- --scenario bench-live/youtube-subtitle-player-button && pnpm bench:live -- --scenario bench-live/youtube-subtitle-in-player-settings && pnpm bench:live -- --scenario bench-live/youtube-subtitle-basic-bilingual && pnpm bench:live -- --scenario bench-live/youtube-subtitle-seek-recovery && pnpm bench:live -- --scenario bench-live/youtube-subtitle-track-switch && pnpm bench:live -- --scenario bench-live/youtube-transcript-panel && pnpm bench:live -- --scenario bench-live/youtube-transcript-search-jump && pnpm bench:live -- --scenario bench-live/youtube-save-sentence-review-loop && pnpm bench:live -- --scenario bench-live/youtube-video-note-create",
"bench:live:lane:youtube-holdout": "pnpm bench:live -- --scenario bench-live/holdout/youtube-subtitle-race && pnpm bench:live -- --scenario bench-live/holdout/youtube-no-captions && pnpm bench:live -- --scenario bench-live/holdout/youtube-asr-only && pnpm bench:live -- --scenario bench-live/holdout/youtube-long-video && pnpm bench:live -- --scenario bench-live/holdout/youtube-fullscreen && pnpm bench:live -- --scenario bench-live/holdout/youtube-spa-navigation",
"bench:live:lane:beta-proof": "pnpm bench:live:lane:source-core && pnpm bench:live:lane:extension-core && pnpm bench:live:lane:learning-loop && pnpm bench:live -- --scenario bench-live/youtube-subtitle-player-button && pnpm bench:live -- --scenario bench-live/youtube-subtitle-in-player-settings && pnpm bench:live -- --scenario bench-live/youtube-subtitle-basic-bilingual && pnpm bench:live -- --scenario bench-live/youtube-subtitle-seek-recovery && pnpm bench:live -- --scenario bench-live/youtube-subtitle-track-switch && pnpm bench:live -- --scenario bench-live/youtube-transcript-panel && pnpm bench:live -- --scenario bench-live/youtube-transcript-search-jump && pnpm bench:live -- --scenario bench-live/youtube-save-sentence-review-loop && pnpm bench:live:lane:youtube-holdout",
"bench:live:source": "pnpm bench:live:lane:source-core",
"bench:live:extension": "pnpm bench:live:lane:extension-core",
"bench:live:smoke": "pnpm bench:live:lane:release-proof",
"bench:dispatch": "node script/bench/dispatch.ts",
"bench:drill": "node script/bench/loop.ts --skip-bench -- --drill-scenario hover/alt-success --drill-history-ready --drill-reason \"Synthetic history-backed ready path\"",
"bench:drill:current-failure": "node script/bench/loop.ts --skip-bench -- --drill-scenario hover/alt-success --drill-reason \"Synthetic current-failure drill\"",
"bench:drill:failure": "pnpm bench:drill:current-failure",
"bench:drill:dispatch": "pnpm bench:drill && pnpm bench:dispatch -- --mock-response \"## Summary\\nMock executor output\"",
"bench:drill:current-failure:dispatch": "pnpm bench:drill:current-failure && pnpm bench:dispatch -- --mock-response \"## Summary\\nMock executor output\"",
"test:web": "vitest run src/web/src",
"mobile:dev": "pnpm --dir apps/mobile start",
"mobile:ios": "pnpm --dir apps/mobile ios",
"mobile:android": "pnpm --dir apps/mobile android",
"mobile:doctor": "pnpm --dir apps/mobile doctor",
"mobile:prebuild:ios": "pnpm --dir apps/mobile prebuild:ios",
"mobile:prebuild:android": "pnpm --dir apps/mobile prebuild:android",
"mobile:xcode:list": "xcodebuild -list -project apps/mobile/ios/AstraReview.xcodeproj",
"mobile:ios:pods": "pnpm --dir apps/mobile ios:pods",
"mobile:ios:build:generic": "pnpm --dir apps/mobile ios:build:generic",
"mobile:android:assemble": "pnpm --dir apps/mobile android:assemble",
"mobile:build:ios": "pnpm --dir apps/mobile build:ios",
"mobile:build:android": "pnpm --dir apps/mobile build:android",
"mobile:verify": "pnpm --dir apps/mobile verify",
"test:mobile-domain": "vitest run apps/mobile/src",
"verify:mobile": "pnpm mobile:verify && pnpm test:mobile-domain"
},
"dependencies": {
"@adobe/react-spectrum": "^3.47.1",
"@ai-sdk/google": "^3.0.80",
"@ai-sdk/openai": "^3.0.67",
"ai": "^6.0.195",
"dexie": "^4.4.2",
"epubjs": "^0.3.93",
"jsdom": "^29.1.0",
"pdfjs-dist": "^5.7.284",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/jsdom": "^28.0.3",
"@types/react": "^19.2.16",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.2",
"@vitest/coverage-v8": "^4.1.8",
"@wxt-dev/module-react": "^1.2.2",
"esbuild": "^0.28.0",
"eslint": "^10.4.1",
"eslint-plugin-react-hooks": "^7.1.1",
"fake-indexeddb": "^6.2.5",
"globals": "^17.6.0",
"playwright": "^1.60.0",
"tsx": "^4.22.4",
"typescript": "^6.0.3",
"typescript-eslint": "^8.60.1",
"vite": "^8.0.16",
"vitest": "^4.1.8",
"web-ext": "^10.3.0",
"wxt": "^0.20.26"
},
"pnpm": {
"overrides": {
"defu": ">=6.1.5",
"lodash": ">=4.18.0",
"@xmldom/xmldom": ">=0.8.12",
"minimatch@3.1.5>brace-expansion": ">=1.1.13 <2.0.0"
},
"peerDependencyRules": {
"allowedVersions": {
"eslint-plugin-react-hooks>eslint": "10"
}
}
}
}