-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathpackage.json
More file actions
218 lines (218 loc) · 9.88 KB
/
Copy pathpackage.json
File metadata and controls
218 lines (218 loc) · 9.88 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{
"name": "knownote",
"version": "1.5.1",
"description": "A local-first knowledge note-taking tool that transforms your PDFs, documents, and web pages into a queryable, citable, and traceable personal knowledge base using RAG technology",
"main": "./out/main/index.js",
"author": "MrSibe",
"homepage": "https://github.com/MrSibe/KnowNote",
"license": "GPL-3.0",
"repository": {
"type": "git",
"url": "https://github.com/MrSibe/KnowNote.git"
},
"bugs": {
"url": "https://github.com/MrSibe/KnowNote/issues"
},
"scripts": {
"format": "prettier --write .",
"lint": "eslint --cache .",
"check:design": "node scripts/check-design-tokens.mjs",
"check:version": "node scripts/check-version.mjs",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck:test": "tsc -p tsconfig.test.json",
"typecheck": "npm run typecheck:node && npm run typecheck:web && npm run typecheck:test",
"test": "node --experimental-transform-types --disable-warning=ExperimentalWarning --import ./test/ts-resolve.mjs --disable-warning=MODULE_TYPELESS_PACKAGE_JSON --test \"test/**/*.test.ts\"",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"build": "npm run typecheck && electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
"smoke:packaged": "node scripts/smoke-packaged.mjs",
"eval:prepare": "npm run build && node scripts/eval.mjs --prepare",
"eval": "npm run build && node scripts/eval.mjs",
"eval:chunking": "npm run build && node scripts/eval-chunking.mjs",
"build:win": "npm run build && electron-builder --win",
"build:mac": "npm run build && electron-builder --mac",
"build:linux": "npm run build && electron-builder --linux",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio",
"eval:retrieval": "npm run build && node scripts/eval-retrieval.mjs"
},
"//test": [
"`node --test` strips TypeScript types rather than compiling them, and strip-only",
"mode rejects the enums the production sources use (src/shared/utils/logger.ts is",
"on every loader's import path). `--experimental-transform-types` lets those",
"modules load unmodified, so parser tests can import the real loaders instead of",
"a test-only copy."
],
"//dependencies": [
"ONLY packages that cannot be bundled belong here.",
"electron-vite defaults build.externalizeDeps to true, so every `dependencies`",
"entry stays a runtime `require()` in out/main and out/preload. Those imports",
"must exist inside app.asar, and electron-builder's node-module collector is",
"what puts them there. Keeping this list tiny is the point.",
"",
"KnowNote uses npm, not pnpm, because that collector is built around npm's",
"node_modules layout. Under pnpm's virtual store it silently dropped transitive",
"dependencies (jsdom -> whatwg-url -> tr46, http-proxy-agent -> debug -> ms) and",
"v1.2.1 shipped an app.asar that crashed with MODULE_NOT_FOUND. Hand-listing",
"those transitives here was the old workaround; do not reintroduce it. Instead",
"keep this list minimal and rely on `allowMissingDependencies: false` in",
"electron-builder.yml, which fails the build if collection ever misses a",
"production dependency instead of shipping a broken app.",
"",
"1. better-sqlite3, sqlite-vec - native addons; rollup cannot inline .node or",
" .dylib. Also listed in asarUnpack so they stay loadable from disk.",
"2. jsdom - rollup's commonjs plugin cannot parse a generated file inside its",
" cssstyle dependency (the source is valid JS, `node --check` accepts it), so",
" jsdom cannot be bundled and its whole subtree has to be collected intact.",
"3. @mixmark-io/domino - turndown calls require('@mixmark-io/domino') while its",
" module body runs, which rollup leaves as a runtime require. It has zero",
" dependencies, so collecting it is trivially safe.",
"4. anki-apkg-export - its dist branches on `typeof window` to choose between",
" require('script-loader!sql.js') (a webpack-only loader prefix) and a plain",
" require('sql.js'). Inlining it makes rollup hoist that dead browser require",
" to the top of the bundle, so the packaged app dies at startup with",
" `Cannot find module 'script-loader!sql.js'`. Keeping it external lets the",
" packaged copy run its real Node branch instead.",
"5. pdfjs-dist - its Node branch polyfills DOMMatrix/ImageData/Path2D by",
" `createRequire(import.meta.url)`-ing its optional dependency",
" @napi-rs/canvas, and then runs `new DOMMatrix()` at module scope. Bundling",
" it keeps the polyfill from finding that package, and because pdfjs-dist was",
" a devDependency the package was never shipped either, so the main process",
" died with `ReferenceError: DOMMatrix is not defined`. External makes pdfjs",
" resolve its own optional native peer normally; @napi-rs/canvas and its",
" platform binary are collected as ordinary production dependencies and the",
" .node is unpacked by asarUnpack.",
"6. @huggingface/transformers - the built-in local embedding backend loads it",
" at runtime for ONNX inference. It brings native onnxruntime-node (and, via",
" its module-load-time `import sharp`, sharp's platform packages), which",
" rollup cannot inline. Keeping it external lets the node build resolve its",
" own native deps. onnxruntime-node and sharp are also listed here directly",
" because they are runtime-resolved natives rather than code we bundle, and",
" both are in asarUnpack so they are loadable from disk.",
"",
"Everything else lives in devDependencies and is bundled into out/main by rollup."
],
"dependencies": {
"@huggingface/transformers": "^4.3.0",
"@mixmark-io/domino": "^2.2.0",
"@modelcontextprotocol/server": "^2.1.0",
"anki-apkg-export": "^4.0.0",
"better-sqlite3": "^12.6.2",
"jsdom": "^27.4.0",
"onnxruntime-node": "^1.30.0",
"pdfjs-dist": "^6.3.289",
"sharp": "^0.35.4",
"sqlite-vec": "0.1.7-alpha.2"
},
"//devDependencies": [
"Everything else, including packages the main process uses. electron-vite",
"bundles devDependencies into out/main and out/renderer, and electron-builder",
"excludes devDependencies from the package, so these end up in the bundle",
"rather than in app.asar."
],
"devDependencies": {
"@ai-sdk/anthropic": "^2.0.105",
"@ai-sdk/google": "^2.0.99",
"@ai-sdk/openai": "^2.0.89",
"@ai-sdk/openai-compatible": "^1.0.31",
"@ai-sdk/provider": "^2.0.5",
"@dagrejs/dagre": "^1.1.8",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
"@electron-toolkit/eslint-config-ts": "^3.1.0",
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/tsconfig": "^2.0.0",
"@electron-toolkit/utils": "^4.0.0",
"@modelcontextprotocol/client": "^2.1.0",
"@mozilla/readability": "^0.6.0",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.24",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/vite": "^4.1.18",
"@tiptap/extensions": "^3.18.0",
"@tiptap/pm": "^3.18.0",
"@tiptap/react": "^3.18.0",
"@tiptap/starter-kit": "^3.18.0",
"@types/better-sqlite3": "^7.6.13",
"@types/jsdom": "^27.0.0",
"@types/lodash": "^4.17.23",
"@types/mdast": "^4.0.4",
"@types/node": "^22.19.7",
"@types/react": "^19.2.10",
"@types/react-dom": "^19.2.3",
"@types/turndown": "^5.0.6",
"@vitejs/plugin-react": "^5.1.2",
"@xyflow/react": "^12.10.0",
"ai": "^5.0.123",
"autoprefixer": "^10.4.23",
"cheerio": "^1.2.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"dompurify": "^3.3.1",
"drizzle-kit": "^0.31.8",
"drizzle-orm": "^0.45.1",
"electron": "^39.4.0",
"electron-builder": "^26.16.1",
"electron-store": "^11.0.2",
"electron-updater": "^6.7.3",
"electron-vite": "^5.0.0",
"eslint": "^9.39.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.26",
"highlight.js": "^11.11.1",
"html-to-image": "1.11.11",
"i18next": "^25.8.0",
"i18next-browser-languagedetector": "^8.2.0",
"katex": "^0.16.28",
"lodash": "^4.17.23",
"lucide-react": "^0.556.0",
"mammoth": "^1.11.0",
"nanoid": "^3.3.11",
"next-themes": "^0.4.6",
"officeparser": "^5.2.2",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-i18next": "^16.5.4",
"react-markdown": "^10.1.0",
"react-router-dom": "^7.13.0",
"rehype-highlight": "^7.0.2",
"rehype-katex": "^7.0.1",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"remark-parse": "^11.0.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.18",
"tiptap-markdown": "^0.9.0",
"turndown": "^7.2.2",
"typescript": "^5.9.3",
"unified": "^11.0.5",
"unist-util-visit": "^5.1.0",
"vite": "^7.3.1",
"zod": "^4.3.6",
"zustand": "^5.0.10"
}
}