@delali/narsil 0.1.4 → 0.1.6
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.
|
@@ -997,12 +997,9 @@ function buildWorkerRequest(engine, hnswConfig) {
|
|
|
997
997
|
}
|
|
998
998
|
function resolveWorkerUrl() {
|
|
999
999
|
const base = import.meta.url;
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
return new URL("vector/hnsw-build-worker.mjs", base.slice(0, distIndex + 6)).href;
|
|
1004
|
-
}
|
|
1005
|
-
return new URL("./hnsw-build-worker.mjs", base).href;
|
|
1000
|
+
const distIndex = base.lastIndexOf("/dist/");
|
|
1001
|
+
if (distIndex !== -1) {
|
|
1002
|
+
return new URL("vector/hnsw-build-worker.mjs", base.slice(0, distIndex + 6)).href;
|
|
1006
1003
|
}
|
|
1007
1004
|
return base.replace(/\/src\/vector\/[^/]+$/, "/dist/vector/hnsw-build-worker.mjs");
|
|
1008
1005
|
}
|
package/dist/index.browser.mjs
CHANGED
|
@@ -639,12 +639,9 @@ function createWorkerExecutor(worker, config) {
|
|
|
639
639
|
// src/workers/factory.browser.ts
|
|
640
640
|
function resolveEntryPoint() {
|
|
641
641
|
const base = import.meta.url;
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
return new URL("workers/entry.mjs", base.slice(0, distIndex + 6)).href;
|
|
646
|
-
}
|
|
647
|
-
return new URL("./workers/entry.mjs", base).href;
|
|
642
|
+
const distIndex = base.lastIndexOf("/dist/");
|
|
643
|
+
if (distIndex !== -1) {
|
|
644
|
+
return new URL("workers/entry.mjs", base.slice(0, distIndex + 6)).href;
|
|
648
645
|
}
|
|
649
646
|
return base.replace(/\/src\/workers\/[^/]+$/, "/dist/workers/entry.mjs");
|
|
650
647
|
}
|
|
@@ -2411,12 +2408,9 @@ function buildWorkerRequest(engine, hnswConfig) {
|
|
|
2411
2408
|
}
|
|
2412
2409
|
function resolveWorkerUrl() {
|
|
2413
2410
|
const base = import.meta.url;
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
return new URL("vector/hnsw-build-worker.mjs", base.slice(0, distIndex + 6)).href;
|
|
2418
|
-
}
|
|
2419
|
-
return new URL("./hnsw-build-worker.mjs", base).href;
|
|
2411
|
+
const distIndex = base.lastIndexOf("/dist/");
|
|
2412
|
+
if (distIndex !== -1) {
|
|
2413
|
+
return new URL("vector/hnsw-build-worker.mjs", base.slice(0, distIndex + 6)).href;
|
|
2420
2414
|
}
|
|
2421
2415
|
return base.replace(/\/src\/vector\/[^/]+$/, "/dist/vector/hnsw-build-worker.mjs");
|
|
2422
2416
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createDirectExecutor, createPartitionRouter, getLanguage, validateSchema, deserializePayloadV2, tokenize, fanOutQuery, createPartitionIndex, detectRuntime, fnv1a, kWayMerge } from './chunk-
|
|
2
|
-
export { getLanguage, registerLanguage } from './chunk-
|
|
1
|
+
import { createDirectExecutor, createPartitionRouter, getLanguage, validateSchema, deserializePayloadV2, tokenize, fanOutQuery, createPartitionIndex, detectRuntime, fnv1a, kWayMerge } from './chunk-TFWBALU4.mjs';
|
|
2
|
+
export { getLanguage, registerLanguage } from './chunk-TFWBALU4.mjs';
|
|
3
3
|
export { isSimdAvailable } from './chunk-GVN2W4VA.mjs';
|
|
4
4
|
import './chunk-WYC635GI.mjs';
|
|
5
5
|
import { NarsilError, ErrorCodes } from './chunk-7GKPWGCN.mjs';
|
|
@@ -92,12 +92,9 @@ function createWorkerExecutor(worker, config) {
|
|
|
92
92
|
// src/workers/factory.ts
|
|
93
93
|
function resolveEntryPoint() {
|
|
94
94
|
const base = import.meta.url;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return new URL("workers/entry.mjs", base.slice(0, distIndex + 6)).href;
|
|
99
|
-
}
|
|
100
|
-
return new URL("./workers/entry.mjs", base).href;
|
|
95
|
+
const distIndex = base.lastIndexOf("/dist/");
|
|
96
|
+
if (distIndex !== -1) {
|
|
97
|
+
return new URL("workers/entry.mjs", base.slice(0, distIndex + 6)).href;
|
|
101
98
|
}
|
|
102
99
|
return base.replace(/\/src\/workers\/[^/]+$/, "/dist/workers/entry.mjs");
|
|
103
100
|
}
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -15,7 +15,7 @@ async function setup() {
|
|
|
15
15
|
} catch {
|
|
16
16
|
parentPort = null;
|
|
17
17
|
}
|
|
18
|
-
const { createDirectExecutor } = await import('../direct-executor-
|
|
18
|
+
const { createDirectExecutor } = await import('../direct-executor-6TSG7GWH.mjs');
|
|
19
19
|
const executor = createDirectExecutor();
|
|
20
20
|
function buildErrorResponse(requestId, code, message) {
|
|
21
21
|
return { type: "error", requestId, code, message };
|
package/package.json
CHANGED