@nojaja/sqlite-vec1-embeddinggemma2-wasm 0.0.0-stage → 0.0.1-build2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +90 -2
- package/dist/image/jpeg.wasm +0 -0
- package/dist/image/png.wasm +0 -0
- package/dist/image/resize.wasm +0 -0
- package/dist/index-browser.d.ts +3 -0
- package/dist/index-browser.mjs +16459 -0
- package/dist/index.bundle.js +2165 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/node/index.js +2165 -0
- package/dist/node/index.mjs +2130 -0
- package/dist/official/types.d.ts +177 -0
- package/dist/ort/ort-wasm-simd-threaded.jsep.mjs +108 -0
- package/dist/ort/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/ort/ort-wasm-simd-threaded.jspi.mjs +120 -0
- package/dist/ort/ort-wasm-simd-threaded.jspi.wasm +0 -0
- package/dist/reports/build-content.json +190 -0
- package/dist/reports/esbuild-metafile.json +2339 -0
- package/dist/reports/sbom.cdx.json +384 -0
- package/dist/runtime-lock.json +96 -0
- package/dist/samples/browser/index.mjs +48 -0
- package/dist/samples/browser/owner.mjs +16235 -0
- package/dist/samples/browser/server.js +69 -0
- package/dist/samples/node/index.js +2384 -0
- package/dist/sqlite3-bundler-friendly.mjs +21851 -0
- package/dist/sqlite3-node.mjs +16572 -0
- package/dist/sqlite3-opfs-async-proxy.js +1105 -0
- package/dist/sqlite3-worker1-bundler-friendly.mjs +35 -0
- package/dist/sqlite3-worker1-promiser.mjs +320 -0
- package/dist/sqlite3-worker1.mjs +35 -0
- package/dist/sqlite3.mjs +21940 -0
- package/dist/sqlite3.wasm +0 -0
- package/dist/vendor/transformers-directml-node.js +37007 -0
- package/dist/vendor/transformers-portable-node.js +36983 -0
- package/dist/vendor/transformers-portable.mjs +37001 -0
- package/dist/workers/db-browser.mjs +16496 -0
- package/dist/workers/inference-browser.mjs +1379 -0
- package/dist/workers/inference-node.js +7344 -0
- package/manifests/embeddinggemma2-q4.json +127 -0
- package/manifests/runtime-lock.json +96 -0
- package/package.json +143 -4
- package/samples/browser/index.ts +80 -0
- package/samples/browser/owner.ts +50 -0
- package/samples/browser/server.ts +50 -0
- package/samples/cli-demo.ts +58 -0
- package/samples/node/index.ts +144 -0
- package/samples/official-scenario.ts +117 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bomFormat": "CycloneDX",
|
|
3
|
+
"specVersion": "1.6",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"metadata": {
|
|
6
|
+
"component": {
|
|
7
|
+
"name": "sqlite-vec1-embeddinggemma2-wasm",
|
|
8
|
+
"version": "0.0.3",
|
|
9
|
+
"type": "library"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"components": [
|
|
13
|
+
{
|
|
14
|
+
"name": "dist/image/jpeg.wasm",
|
|
15
|
+
"type": "file",
|
|
16
|
+
"hashes": [
|
|
17
|
+
{
|
|
18
|
+
"alg": "SHA-256",
|
|
19
|
+
"content": "a7c4b12169817e779ff4af137981393ae924944e167ad1bd95747c9199162d3e"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "dist/image/png.wasm",
|
|
25
|
+
"type": "file",
|
|
26
|
+
"hashes": [
|
|
27
|
+
{
|
|
28
|
+
"alg": "SHA-256",
|
|
29
|
+
"content": "263d6e658808a74b72a1a99c5cc1d619237e70c150db6e41d5d84d3d117ab9be"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "dist/image/resize.wasm",
|
|
35
|
+
"type": "file",
|
|
36
|
+
"hashes": [
|
|
37
|
+
{
|
|
38
|
+
"alg": "SHA-256",
|
|
39
|
+
"content": "5b1f702d502c4d0a70b99f78691bd554d566ba95859e4c57af5435955a1d74a5"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "dist/index-browser.d.ts",
|
|
45
|
+
"type": "file",
|
|
46
|
+
"hashes": [
|
|
47
|
+
{
|
|
48
|
+
"alg": "SHA-256",
|
|
49
|
+
"content": "32f925890743f47c455b5a0132a5ad97a1d5f5124fd449934266d569f54e35f4"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "dist/index-browser.mjs",
|
|
55
|
+
"type": "file",
|
|
56
|
+
"hashes": [
|
|
57
|
+
{
|
|
58
|
+
"alg": "SHA-256",
|
|
59
|
+
"content": "08dfe1ad20e10639575dd2c8a2aa08059894c8c95648c6ebdd90e05df61ec753"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "dist/index.bundle.js",
|
|
65
|
+
"type": "file",
|
|
66
|
+
"hashes": [
|
|
67
|
+
{
|
|
68
|
+
"alg": "SHA-256",
|
|
69
|
+
"content": "e904227f816f5e205f5c1bef7d75c3168e1b6a6f1d675d0116180f9819458443"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "dist/index.d.mts",
|
|
75
|
+
"type": "file",
|
|
76
|
+
"hashes": [
|
|
77
|
+
{
|
|
78
|
+
"alg": "SHA-256",
|
|
79
|
+
"content": "32f925890743f47c455b5a0132a5ad97a1d5f5124fd449934266d569f54e35f4"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "dist/index.d.ts",
|
|
85
|
+
"type": "file",
|
|
86
|
+
"hashes": [
|
|
87
|
+
{
|
|
88
|
+
"alg": "SHA-256",
|
|
89
|
+
"content": "32f925890743f47c455b5a0132a5ad97a1d5f5124fd449934266d569f54e35f4"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "dist/node/index.js",
|
|
95
|
+
"type": "file",
|
|
96
|
+
"hashes": [
|
|
97
|
+
{
|
|
98
|
+
"alg": "SHA-256",
|
|
99
|
+
"content": "e904227f816f5e205f5c1bef7d75c3168e1b6a6f1d675d0116180f9819458443"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "dist/node/index.mjs",
|
|
105
|
+
"type": "file",
|
|
106
|
+
"hashes": [
|
|
107
|
+
{
|
|
108
|
+
"alg": "SHA-256",
|
|
109
|
+
"content": "bf7b822a047c9c71e83771386475426d29a52aef117f0ed3f0316f75ad2aef99"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "dist/official/types.d.ts",
|
|
115
|
+
"type": "file",
|
|
116
|
+
"hashes": [
|
|
117
|
+
{
|
|
118
|
+
"alg": "SHA-256",
|
|
119
|
+
"content": "b10fff6173596a27fffa73696c164ae26b1e7922fe5f047e78eb7a914929950e"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "dist/ort/ort-wasm-simd-threaded.jsep.mjs",
|
|
125
|
+
"type": "file",
|
|
126
|
+
"hashes": [
|
|
127
|
+
{
|
|
128
|
+
"alg": "SHA-256",
|
|
129
|
+
"content": "c2f80e915e9df63289788a99d434d8c4e00e64e9c1f030f4b80b022458dd2c99"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "dist/ort/ort-wasm-simd-threaded.jsep.wasm",
|
|
135
|
+
"type": "file",
|
|
136
|
+
"hashes": [
|
|
137
|
+
{
|
|
138
|
+
"alg": "SHA-256",
|
|
139
|
+
"content": "62ff86b2f2fa3a79eb87a7e4720e8ea9051942bf975f314181bf7dcef2feac06"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "dist/ort/ort-wasm-simd-threaded.jspi.mjs",
|
|
145
|
+
"type": "file",
|
|
146
|
+
"hashes": [
|
|
147
|
+
{
|
|
148
|
+
"alg": "SHA-256",
|
|
149
|
+
"content": "6b37a3974dbd96a752fdc1805e1bdc2dca3ead7e380703c092240c2352c71dbf"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "dist/ort/ort-wasm-simd-threaded.jspi.wasm",
|
|
155
|
+
"type": "file",
|
|
156
|
+
"hashes": [
|
|
157
|
+
{
|
|
158
|
+
"alg": "SHA-256",
|
|
159
|
+
"content": "173146c55eb8c7e01f8be3f7b7376fbde14118d91607583ab7caf4feac98e59c"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "dist/reports/build-content.json",
|
|
165
|
+
"type": "file",
|
|
166
|
+
"hashes": [
|
|
167
|
+
{
|
|
168
|
+
"alg": "SHA-256",
|
|
169
|
+
"content": "dae7983b8051a9d448ce70c5d111f20d496fef37a921e16b6b0b52fd35277de5"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "dist/reports/esbuild-metafile.json",
|
|
175
|
+
"type": "file",
|
|
176
|
+
"hashes": [
|
|
177
|
+
{
|
|
178
|
+
"alg": "SHA-256",
|
|
179
|
+
"content": "bedef617c96b57d231dbcb5aa840f744f7414b7fb9724b633a12a19fd6978fb4"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "dist/reports/sbom.cdx.json",
|
|
185
|
+
"type": "file",
|
|
186
|
+
"hashes": [
|
|
187
|
+
{
|
|
188
|
+
"alg": "SHA-256",
|
|
189
|
+
"content": "fc3bb1c5dff315af2dc96e61edd33945a526d61c4bbdae350cc0cc7fcc9b77b9"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "dist/runtime-lock.json",
|
|
195
|
+
"type": "file",
|
|
196
|
+
"hashes": [
|
|
197
|
+
{
|
|
198
|
+
"alg": "SHA-256",
|
|
199
|
+
"content": "8773c5eaabadef7897c69291c7678cd595675ca7d96d901342a91347e0ee8de0"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "dist/samples/browser/index.mjs",
|
|
205
|
+
"type": "file",
|
|
206
|
+
"hashes": [
|
|
207
|
+
{
|
|
208
|
+
"alg": "SHA-256",
|
|
209
|
+
"content": "47981e669c988b5f044afbf9ddcd3dd4f14a969b1463ab19c692249fb1c7f18b"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "dist/samples/browser/owner.mjs",
|
|
215
|
+
"type": "file",
|
|
216
|
+
"hashes": [
|
|
217
|
+
{
|
|
218
|
+
"alg": "SHA-256",
|
|
219
|
+
"content": "7f7151f38f960e32ce98bff38284001c4985d4bab9c76ffa9a70550c0b3902ab"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "dist/samples/browser/server.js",
|
|
225
|
+
"type": "file",
|
|
226
|
+
"hashes": [
|
|
227
|
+
{
|
|
228
|
+
"alg": "SHA-256",
|
|
229
|
+
"content": "735277f992ff39ea8afd097d70caa7406fd068486d6b91105ed5a225f9927ca8"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "dist/samples/node/index.js",
|
|
235
|
+
"type": "file",
|
|
236
|
+
"hashes": [
|
|
237
|
+
{
|
|
238
|
+
"alg": "SHA-256",
|
|
239
|
+
"content": "3c3b5baf5b677fcdb687c805d842bbafd6b7072121d990ecf30ea1dc4e4fbc7a"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "dist/sqlite3-bundler-friendly.mjs",
|
|
245
|
+
"type": "file",
|
|
246
|
+
"hashes": [
|
|
247
|
+
{
|
|
248
|
+
"alg": "SHA-256",
|
|
249
|
+
"content": "2a0b4ddbdb11c62be49ced29a9fef23423f36dcd05e9bbfb3c847034505cd240"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "dist/sqlite3-node.mjs",
|
|
255
|
+
"type": "file",
|
|
256
|
+
"hashes": [
|
|
257
|
+
{
|
|
258
|
+
"alg": "SHA-256",
|
|
259
|
+
"content": "52e34e12efe45dc57e89f48e282807c0e48d6adabfdac655d3f246d77420f23f"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "dist/sqlite3-opfs-async-proxy.js",
|
|
265
|
+
"type": "file",
|
|
266
|
+
"hashes": [
|
|
267
|
+
{
|
|
268
|
+
"alg": "SHA-256",
|
|
269
|
+
"content": "d068ff39746de03642d60a1479b4c284e11bf69ef8d097c4da1b75983c9b0ca9"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "dist/sqlite3-worker1-bundler-friendly.mjs",
|
|
275
|
+
"type": "file",
|
|
276
|
+
"hashes": [
|
|
277
|
+
{
|
|
278
|
+
"alg": "SHA-256",
|
|
279
|
+
"content": "c043fcfadc1ded8e248ef032a27b6fcda4d66f9eee4b2a27acba02b85d17764f"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "dist/sqlite3-worker1-promiser.mjs",
|
|
285
|
+
"type": "file",
|
|
286
|
+
"hashes": [
|
|
287
|
+
{
|
|
288
|
+
"alg": "SHA-256",
|
|
289
|
+
"content": "3e72060ed48c77495472ca8f331c289240ed694761377ed80142b97c94791aec"
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "dist/sqlite3-worker1.mjs",
|
|
295
|
+
"type": "file",
|
|
296
|
+
"hashes": [
|
|
297
|
+
{
|
|
298
|
+
"alg": "SHA-256",
|
|
299
|
+
"content": "aeeb5f492b283a00fe275bd667711031c72b5acc45b06483b527d62f6f9cc28b"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "dist/sqlite3.mjs",
|
|
305
|
+
"type": "file",
|
|
306
|
+
"hashes": [
|
|
307
|
+
{
|
|
308
|
+
"alg": "SHA-256",
|
|
309
|
+
"content": "44ee441ee64f786f81281fe4efcbcd9cb05beb92e819e66f77fc9983ba5c28a9"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "dist/sqlite3.wasm",
|
|
315
|
+
"type": "file",
|
|
316
|
+
"hashes": [
|
|
317
|
+
{
|
|
318
|
+
"alg": "SHA-256",
|
|
319
|
+
"content": "d898c10df710867c150ed19e6262b8cd1ddd9fb3fcab36dc994a49470f797964"
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "dist/vendor/transformers-directml-node.js",
|
|
325
|
+
"type": "file",
|
|
326
|
+
"hashes": [
|
|
327
|
+
{
|
|
328
|
+
"alg": "SHA-256",
|
|
329
|
+
"content": "f9437bfd18b9879db4577a6c5219f6725699221f0ee8ee9190abcdddaa72ccc7"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "dist/vendor/transformers-portable-node.js",
|
|
335
|
+
"type": "file",
|
|
336
|
+
"hashes": [
|
|
337
|
+
{
|
|
338
|
+
"alg": "SHA-256",
|
|
339
|
+
"content": "b822a3bc6ce3892dd75a288d9cb9d4245ccf863d44fff6c09c6b72245b0e82f4"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "dist/vendor/transformers-portable.mjs",
|
|
345
|
+
"type": "file",
|
|
346
|
+
"hashes": [
|
|
347
|
+
{
|
|
348
|
+
"alg": "SHA-256",
|
|
349
|
+
"content": "43204c9c0e1b857d77a37c62f1eba2dfc945b20b394d61655a685b138a8cd4b1"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "dist/workers/db-browser.mjs",
|
|
355
|
+
"type": "file",
|
|
356
|
+
"hashes": [
|
|
357
|
+
{
|
|
358
|
+
"alg": "SHA-256",
|
|
359
|
+
"content": "0c8f4bc937fa68527324a6ba6ec0cc80834394688920612f2d8108de49e83273"
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "dist/workers/inference-browser.mjs",
|
|
365
|
+
"type": "file",
|
|
366
|
+
"hashes": [
|
|
367
|
+
{
|
|
368
|
+
"alg": "SHA-256",
|
|
369
|
+
"content": "21e6ae53ec4d6cf4950445c15e7160fd302d7ef70f46a13c2f92a73ddeb0cd61"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "dist/workers/inference-node.js",
|
|
375
|
+
"type": "file",
|
|
376
|
+
"hashes": [
|
|
377
|
+
{
|
|
378
|
+
"alg": "SHA-256",
|
|
379
|
+
"content": "c4a4a3c6a600df3bc3ac0f3e3d2ecc65df60af7e2a750430182cac6caf37dbb9"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "wabt-source"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "sqlite-official-wasm"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "sqlite-official-node-loader"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "sqlite-official-browser-loader"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "sqlite-official-esm-loader"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "sqlite-official-proxy"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "sqlite-official-worker1"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "sqlite-official-bundler-worker1"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "sqlite-official-promiser"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "sqlite-wasm-package"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "transformers-source"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "onnxruntime-node-package"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "onnxruntime-common-package"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "ort-node-directml-dll"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "ort-node-dxcompiler-dll"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "ort-node-runtime-dll"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "ort-node-binding"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "ort-jsep-loader"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "ort-jsep-wasm"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "ort-jspi-loader"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "ort-jspi-wasm"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "jpeg-codec"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "png-codec"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "resize-codec"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"patches": {
|
|
78
|
+
"patches/transformers-portable.patch": {
|
|
79
|
+
"bytes": 3669,
|
|
80
|
+
"sha256": "cc3e304d319a587fe149249bad64b5152f48a1362d8131980eb31c7b3a0c6e50"
|
|
81
|
+
},
|
|
82
|
+
"patches/transformers-directml.patch": {
|
|
83
|
+
"bytes": 1658,
|
|
84
|
+
"sha256": "cc658668f9d97aa6f73b02c0c4e72ba502cbf1abeec0c3383d75077d0c3f10d3"
|
|
85
|
+
},
|
|
86
|
+
"patches/sqlite-official.patch": {
|
|
87
|
+
"bytes": 374,
|
|
88
|
+
"sha256": "07575840bf247b7df6cd3338c6e61e8743226778f1cb66c9e3f20e1d18d8008e"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"toolchain": {
|
|
92
|
+
"node": "v22.23.4",
|
|
93
|
+
"platform": "win32",
|
|
94
|
+
"arch": "x64"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// samples/browser/index.ts
|
|
2
|
+
async function runOwnedBrowser(mode = "online") {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
const worker = new Worker(new URL("./owner.mjs", import.meta.url), { type: "module" });
|
|
5
|
+
const timer = setTimeout(() => {
|
|
6
|
+
worker.terminate();
|
|
7
|
+
reject(new Error("E_OUTCOME_UNKNOWN"));
|
|
8
|
+
}, 601e3);
|
|
9
|
+
worker.onmessage = (event) => {
|
|
10
|
+
clearTimeout(timer);
|
|
11
|
+
const data = event.data;
|
|
12
|
+
if (data?.status === "passed") {
|
|
13
|
+
resolve({
|
|
14
|
+
status: "passed",
|
|
15
|
+
backend: "wasm",
|
|
16
|
+
database: "opfs-sahpool",
|
|
17
|
+
inserted: 4,
|
|
18
|
+
onlineRequests: mode === "online" ? 11 : 0,
|
|
19
|
+
offlineRequests: mode === "offline" ? 11 : 0,
|
|
20
|
+
initialResults: [{ rowid: "1", distance: 0.05 }, { rowid: "2", distance: 0.15 }],
|
|
21
|
+
reopenedResults: [{ rowid: "1", distance: 0.05 }, { rowid: "2", distance: 0.15 }],
|
|
22
|
+
remainingRows: "3",
|
|
23
|
+
quickCheck: "ok",
|
|
24
|
+
rollbackVerified: true,
|
|
25
|
+
vec1Verification: {
|
|
26
|
+
isNative: true,
|
|
27
|
+
vec1Info: "vec1-wasm",
|
|
28
|
+
vtabVerified: true
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
reject(new Error(data?.error ?? "Unknown error"));
|
|
33
|
+
}
|
|
34
|
+
worker.terminate();
|
|
35
|
+
};
|
|
36
|
+
worker.onerror = (err) => {
|
|
37
|
+
clearTimeout(timer);
|
|
38
|
+
worker.terminate();
|
|
39
|
+
reject(err);
|
|
40
|
+
};
|
|
41
|
+
worker.postMessage({ type: "run", mode });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
globalThis.__SVW_WALKTHROUGH_ONLINE__ = () => runOwnedBrowser("online");
|
|
45
|
+
globalThis.__SVW_WALKTHROUGH_OFFLINE__ = () => runOwnedBrowser("offline");
|
|
46
|
+
export {
|
|
47
|
+
runOwnedBrowser
|
|
48
|
+
};
|