@delali/narsil 0.1.3 → 0.1.5

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
- if (base.endsWith(".mjs") || base.endsWith(".js")) {
1001
- const distIndex = base.lastIndexOf("/dist/");
1002
- if (distIndex !== -1) {
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
  }
@@ -1,4 +1,4 @@
1
- export { createDirectExecutor } from './chunk-CHNP2QCL.mjs';
1
+ export { createDirectExecutor } from './chunk-TFWBALU4.mjs';
2
2
  import './chunk-GVN2W4VA.mjs';
3
3
  import './chunk-WYC635GI.mjs';
4
4
  import './chunk-7GKPWGCN.mjs';
@@ -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
- if (base.endsWith(".mjs") || base.endsWith(".js")) {
643
- const distIndex = base.lastIndexOf("/dist/");
644
- if (distIndex !== -1) {
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
- if (base.endsWith(".mjs") || base.endsWith(".js")) {
2415
- const distIndex = base.lastIndexOf("/dist/");
2416
- if (distIndex !== -1) {
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-CHNP2QCL.mjs';
2
- export { getLanguage, registerLanguage } from './chunk-CHNP2QCL.mjs';
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
- if (base.endsWith(".mjs") || base.endsWith(".js")) {
96
- const distIndex = base.lastIndexOf("/dist/");
97
- if (distIndex !== -1) {
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
  }
@@ -15,7 +15,7 @@ async function setup() {
15
15
  } catch {
16
16
  parentPort = null;
17
17
  }
18
- const { createDirectExecutor } = await import('../direct-executor-FF5KPZM4.mjs');
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delali/narsil",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "A distributed full-text search engine with cross-language portable binary format.",
6
6
  "author": "Delali (https://sondelali.com)",