@lix-js/sdk 0.12.2 → 0.12.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/bundled-plugins/plugin_csv.lixplugin +0 -0
- package/dist/bundled-plugins/plugin_markdown.lixplugin +0 -0
- package/dist/lix.js +4 -7
- package/dist/remote/server-protocol.js +0 -3
- package/dist/wasm/lix_js_sdk.d.ts +2 -2
- package/dist/wasm/lix_js_sdk.js +10 -10
- package/dist/wasm/lix_js_sdk_bg.wasm +0 -0
- package/dist/wasm/lix_js_sdk_bg.wasm.d.ts +2 -2
- package/dist/worker/factory.node.d.ts +1 -0
- package/dist/worker/factory.node.js +15 -2
- package/package.json +5 -5
|
Binary file
|
|
Binary file
|
package/dist/lix.js
CHANGED
|
@@ -118,7 +118,10 @@ export class Lix {
|
|
|
118
118
|
async close() {
|
|
119
119
|
if (!this.closePromise) {
|
|
120
120
|
if (this.#transactionsOpening > 0 || this.#activeTransactions > 0) {
|
|
121
|
-
|
|
121
|
+
const error = new Error("cannot close Lix while an explicit transaction is active");
|
|
122
|
+
error.name = "LixError";
|
|
123
|
+
error.code = "LIX_INVALID_TRANSACTION_STATE";
|
|
124
|
+
throw error;
|
|
122
125
|
}
|
|
123
126
|
// Flip the public lifecycle gate before the first await. Operations that
|
|
124
127
|
// already entered the gate are allowed to finish; later calls fail closed.
|
|
@@ -161,12 +164,6 @@ export class Lix {
|
|
|
161
164
|
throw error;
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
|
-
function activeTransactionCloseError() {
|
|
165
|
-
const error = new Error("cannot close Lix while an explicit transaction is active");
|
|
166
|
-
error.name = "LixError";
|
|
167
|
-
error.code = "LIX_INVALID_TRANSACTION_STATE";
|
|
168
|
-
return error;
|
|
169
|
-
}
|
|
170
167
|
export class ObserveEvents {
|
|
171
168
|
onClose;
|
|
172
169
|
setup = {};
|
|
@@ -265,9 +265,6 @@ export function record(value, description) {
|
|
|
265
265
|
}
|
|
266
266
|
return value;
|
|
267
267
|
}
|
|
268
|
-
function isRecord(value) {
|
|
269
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
270
|
-
}
|
|
271
268
|
function decodeWireValue(value) {
|
|
272
269
|
const wire = record(value, "wire value");
|
|
273
270
|
switch (wire.kind) {
|
|
@@ -78,8 +78,8 @@ export interface InitOutput {
|
|
|
78
78
|
readonly wasmlixtransaction_rollback: (a: number) => number;
|
|
79
79
|
readonly wasmobserveevents_close: (a: number) => void;
|
|
80
80
|
readonly wasmobserveevents_next: (a: number) => number;
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
81
|
+
readonly __wasm_bindgen_func_elem_119238: (a: number, b: number, c: number, d: number) => void;
|
|
82
|
+
readonly __wasm_bindgen_func_elem_119240: (a: number, b: number, c: number, d: number) => void;
|
|
83
83
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
84
84
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
85
85
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/wasm/lix_js_sdk.js
CHANGED
|
@@ -362,7 +362,7 @@ function __wbg_get_imports() {
|
|
|
362
362
|
__wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) {
|
|
363
363
|
getObject(arg0)._wbg_cb_unref();
|
|
364
364
|
},
|
|
365
|
-
|
|
365
|
+
__wbg_applyChanges_fa5b3bf30f8b61a3: function(arg0, arg1) {
|
|
366
366
|
const ret = getObject(arg0).applyChanges(takeObject(arg1));
|
|
367
367
|
return addHeapObject(ret);
|
|
368
368
|
},
|
|
@@ -374,7 +374,7 @@ function __wbg_get_imports() {
|
|
|
374
374
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
375
375
|
return addHeapObject(ret);
|
|
376
376
|
}, arguments); },
|
|
377
|
-
|
|
377
|
+
__wbg_close_65d6792c6f40ad89: function(arg0) {
|
|
378
378
|
const ret = getObject(arg0).close();
|
|
379
379
|
return addHeapObject(ret);
|
|
380
380
|
},
|
|
@@ -481,7 +481,7 @@ function __wbg_get_imports() {
|
|
|
481
481
|
const ret = getObject(arg0).length;
|
|
482
482
|
return ret;
|
|
483
483
|
},
|
|
484
|
-
|
|
484
|
+
__wbg_loadEntries_032470abc2177798: function(arg0) {
|
|
485
485
|
const ret = getObject(arg0).loadEntries();
|
|
486
486
|
return addHeapObject(ret);
|
|
487
487
|
},
|
|
@@ -520,7 +520,7 @@ function __wbg_get_imports() {
|
|
|
520
520
|
const a = state0.a;
|
|
521
521
|
state0.a = 0;
|
|
522
522
|
try {
|
|
523
|
-
return
|
|
523
|
+
return __wasm_bindgen_func_elem_119240(a, state0.b, arg0, arg1);
|
|
524
524
|
} finally {
|
|
525
525
|
state0.a = a;
|
|
526
526
|
}
|
|
@@ -634,8 +634,8 @@ function __wbg_get_imports() {
|
|
|
634
634
|
return addHeapObject(ret);
|
|
635
635
|
},
|
|
636
636
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
637
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
638
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
637
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 28366, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
638
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_119238);
|
|
639
639
|
return addHeapObject(ret);
|
|
640
640
|
},
|
|
641
641
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -684,10 +684,10 @@ function __wbg_get_imports() {
|
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
function
|
|
687
|
+
function __wasm_bindgen_func_elem_119238(arg0, arg1, arg2) {
|
|
688
688
|
try {
|
|
689
689
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
690
|
-
wasm.
|
|
690
|
+
wasm.__wasm_bindgen_func_elem_119238(retptr, arg0, arg1, addHeapObject(arg2));
|
|
691
691
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
692
692
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
693
693
|
if (r1) {
|
|
@@ -698,8 +698,8 @@ function __wasm_bindgen_func_elem_119241(arg0, arg1, arg2) {
|
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
function
|
|
702
|
-
wasm.
|
|
701
|
+
function __wasm_bindgen_func_elem_119240(arg0, arg1, arg2, arg3) {
|
|
702
|
+
wasm.__wasm_bindgen_func_elem_119240(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
const WasmLixFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|
|
@@ -28,8 +28,8 @@ export const wasmlixtransaction_execute: (a: number, b: number, c: number, d: nu
|
|
|
28
28
|
export const wasmlixtransaction_rollback: (a: number) => number;
|
|
29
29
|
export const wasmobserveevents_close: (a: number) => void;
|
|
30
30
|
export const wasmobserveevents_next: (a: number) => number;
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
31
|
+
export const __wasm_bindgen_func_elem_119238: (a: number, b: number, c: number, d: number) => void;
|
|
32
|
+
export const __wasm_bindgen_func_elem_119240: (a: number, b: number, c: number, d: number) => void;
|
|
33
33
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
34
34
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
35
35
|
export const __wbindgen_export3: (a: number) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LixBinding, LixStorageConfig, TelemetryDispatch } from "../binding-types.js";
|
|
2
2
|
import type { WorkerConnection } from "./protocol.js";
|
|
3
3
|
export declare function createWorkerConnection(): WorkerConnection;
|
|
4
|
+
export declare function workerExecArgv(execArgv: readonly string[]): string[];
|
|
4
5
|
export declare const openDirectLixBinding: (storage: LixStorageConfig, telemetry?: TelemetryDispatch) => Promise<LixBinding | undefined>;
|
|
@@ -3,8 +3,7 @@ import { openNativeLixBinding } from "../binding.node.js";
|
|
|
3
3
|
export function createWorkerConnection() {
|
|
4
4
|
const worker = new Worker(new URL("./entry.node.js", import.meta.url), {
|
|
5
5
|
name: "lix",
|
|
6
|
-
execArgv: process.execArgv
|
|
7
|
-
!(index > 0 && args[index - 1] === "--input-type")),
|
|
6
|
+
execArgv: workerExecArgv(process.execArgv),
|
|
8
7
|
});
|
|
9
8
|
let terminating = false;
|
|
10
9
|
return {
|
|
@@ -36,6 +35,20 @@ export function createWorkerConnection() {
|
|
|
36
35
|
},
|
|
37
36
|
};
|
|
38
37
|
}
|
|
38
|
+
export function workerExecArgv(execArgv) {
|
|
39
|
+
const filtered = [];
|
|
40
|
+
for (let index = 0; index < execArgv.length; index++) {
|
|
41
|
+
const arg = execArgv[index];
|
|
42
|
+
if (arg === "--input-type") {
|
|
43
|
+
index += 1;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (arg === "--expose-gc" || arg.startsWith("--input-type="))
|
|
47
|
+
continue;
|
|
48
|
+
filtered.push(arg);
|
|
49
|
+
}
|
|
50
|
+
return filtered;
|
|
51
|
+
}
|
|
39
52
|
/// Native Lix already owns a dedicated serialized engine actor. Routing it
|
|
40
53
|
/// through a second JavaScript worker adds two message-port hops per query
|
|
41
54
|
/// without adding isolation or concurrency.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lix-js/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"typecheck": "tsc -p tsconfig.test.json --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"optionalDependencies": {
|
|
56
|
-
"@lix-js/sdk-darwin-arm64": "0.12.
|
|
57
|
-
"@lix-js/sdk-linux-arm64": "0.12.
|
|
58
|
-
"@lix-js/sdk-linux-x64": "0.12.
|
|
59
|
-
"@lix-js/sdk-win32-x64": "0.12.
|
|
56
|
+
"@lix-js/sdk-darwin-arm64": "0.12.3",
|
|
57
|
+
"@lix-js/sdk-linux-arm64": "0.12.3",
|
|
58
|
+
"@lix-js/sdk-linux-x64": "0.12.3",
|
|
59
|
+
"@lix-js/sdk-win32-x64": "0.12.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@vitest/browser-playwright": "4.1.10",
|