@delali/narsil 0.1.2 → 0.1.3
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/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-CHNP2QCL.mjs';
|
|
2
|
+
export { getLanguage, registerLanguage } from './chunk-CHNP2QCL.mjs';
|
|
3
3
|
export { isSimdAvailable } from './chunk-GVN2W4VA.mjs';
|
|
4
4
|
import './chunk-WYC635GI.mjs';
|
|
5
5
|
import { NarsilError, ErrorCodes } from './chunk-7GKPWGCN.mjs';
|
|
@@ -93,6 +93,10 @@ function createWorkerExecutor(worker, config) {
|
|
|
93
93
|
function resolveEntryPoint() {
|
|
94
94
|
const base = import.meta.url;
|
|
95
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
|
+
}
|
|
96
100
|
return new URL("./workers/entry.mjs", base).href;
|
|
97
101
|
}
|
|
98
102
|
return base.replace(/\/src\/workers\/[^/]+$/, "/dist/workers/entry.mjs");
|
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-FF5KPZM4.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
|
+
"version": "0.1.3",
|
|
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)",
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/assetcorp/narsil/issues"
|
|
16
16
|
},
|
|
17
|
+
"imports": {
|
|
18
|
+
"#platform/worker-factory": {
|
|
19
|
+
"browser": "./src/workers/factory.browser.ts",
|
|
20
|
+
"default": "./src/workers/factory.ts"
|
|
21
|
+
},
|
|
22
|
+
"#platform/vector-promoter": {
|
|
23
|
+
"browser": "./src/vector/promoter.browser.ts",
|
|
24
|
+
"default": "./src/vector/promoter.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
17
27
|
"sideEffects": false,
|
|
18
28
|
"keywords": [
|
|
19
29
|
"search",
|
|
@@ -29,6 +39,10 @@
|
|
|
29
39
|
},
|
|
30
40
|
"exports": {
|
|
31
41
|
".": {
|
|
42
|
+
"browser": {
|
|
43
|
+
"import": "./dist/index.browser.mjs",
|
|
44
|
+
"types": "./dist/index.d.ts"
|
|
45
|
+
},
|
|
32
46
|
"import": "./dist/index.mjs",
|
|
33
47
|
"types": "./dist/index.d.ts"
|
|
34
48
|
},
|