logic-mesh 0.1.5 → 0.1.7
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/logic_mesh.d.ts +19 -1
- package/logic_mesh_bg.js +68 -21
- package/logic_mesh_bg.wasm +0 -0
- package/package.json +1 -1
package/logic_mesh.d.ts
CHANGED
|
@@ -65,9 +65,10 @@ export class EngineCommand {
|
|
|
65
65
|
* to be immediately scheduled for execution
|
|
66
66
|
* @param {string} block_name
|
|
67
67
|
* @param {string | undefined} [block_uuid]
|
|
68
|
+
* @param {string | undefined} [lib]
|
|
68
69
|
* @returns {Promise<string>}
|
|
69
70
|
*/
|
|
70
|
-
addBlock(block_name: string, block_uuid?: string): Promise<string>;
|
|
71
|
+
addBlock(block_name: string, block_uuid?: string, lib?: string): Promise<string>;
|
|
71
72
|
/**
|
|
72
73
|
* Removes a block instance from the engine
|
|
73
74
|
* to be immediately unscheduled for execution
|
|
@@ -161,6 +162,23 @@ export class EngineCommand {
|
|
|
161
162
|
*/
|
|
162
163
|
inspectBlock(block_uuid: string): Promise<any>;
|
|
163
164
|
/**
|
|
165
|
+
* Evaluates a block by name
|
|
166
|
+
* This will create a block instance and execute it.
|
|
167
|
+
*
|
|
168
|
+
* # Arguments
|
|
169
|
+
* * `block_name` - The name of the block to evaluate
|
|
170
|
+
* * `inputs` - The input values to the block
|
|
171
|
+
* * `lib` - Optional, the library to load the block from, defaults to "core"
|
|
172
|
+
*
|
|
173
|
+
* # Returns
|
|
174
|
+
* A list of values representing the outputs of the block
|
|
175
|
+
* @param {string} block_name
|
|
176
|
+
* @param {any[]} inputs
|
|
177
|
+
* @param {string | undefined} [lib]
|
|
178
|
+
* @returns {Promise<any>}
|
|
179
|
+
*/
|
|
180
|
+
evalBlock(block_name: string, inputs: any[], lib?: string): Promise<any>;
|
|
181
|
+
/**
|
|
164
182
|
* Creates a watch on block changes
|
|
165
183
|
* @param {Function} callback
|
|
166
184
|
* @returns {Promise<void>}
|
package/logic_mesh_bg.js
CHANGED
|
@@ -248,6 +248,24 @@ export function start() {
|
|
|
248
248
|
wasm.start();
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
let cachedUint32Memory0 = null;
|
|
252
|
+
|
|
253
|
+
function getUint32Memory0() {
|
|
254
|
+
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
|
|
255
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
256
|
+
}
|
|
257
|
+
return cachedUint32Memory0;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
261
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
262
|
+
const mem = getUint32Memory0();
|
|
263
|
+
for (let i = 0; i < array.length; i++) {
|
|
264
|
+
mem[ptr / 4 + i] = addHeapObject(array[i]);
|
|
265
|
+
}
|
|
266
|
+
WASM_VECTOR_LEN = array.length;
|
|
267
|
+
return ptr;
|
|
268
|
+
}
|
|
251
269
|
/**
|
|
252
270
|
*/
|
|
253
271
|
export function init_panic_hook() {
|
|
@@ -261,7 +279,7 @@ function handleError(f, args) {
|
|
|
261
279
|
wasm.__wbindgen_export_5(addHeapObject(e));
|
|
262
280
|
}
|
|
263
281
|
}
|
|
264
|
-
function
|
|
282
|
+
function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
|
|
265
283
|
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
266
284
|
}
|
|
267
285
|
|
|
@@ -394,14 +412,17 @@ export class EngineCommand {
|
|
|
394
412
|
* to be immediately scheduled for execution
|
|
395
413
|
* @param {string} block_name
|
|
396
414
|
* @param {string | undefined} [block_uuid]
|
|
415
|
+
* @param {string | undefined} [lib]
|
|
397
416
|
* @returns {Promise<string>}
|
|
398
417
|
*/
|
|
399
|
-
addBlock(block_name, block_uuid) {
|
|
418
|
+
addBlock(block_name, block_uuid, lib) {
|
|
400
419
|
const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
401
420
|
const len0 = WASM_VECTOR_LEN;
|
|
402
421
|
var ptr1 = isLikeNone(block_uuid) ? 0 : passStringToWasm0(block_uuid, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
403
422
|
var len1 = WASM_VECTOR_LEN;
|
|
404
|
-
|
|
423
|
+
var ptr2 = isLikeNone(lib) ? 0 : passStringToWasm0(lib, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
424
|
+
var len2 = WASM_VECTOR_LEN;
|
|
425
|
+
const ret = wasm.enginecommand_addBlock(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
405
426
|
return takeObject(ret);
|
|
406
427
|
}
|
|
407
428
|
/**
|
|
@@ -540,6 +561,32 @@ export class EngineCommand {
|
|
|
540
561
|
return takeObject(ret);
|
|
541
562
|
}
|
|
542
563
|
/**
|
|
564
|
+
* Evaluates a block by name
|
|
565
|
+
* This will create a block instance and execute it.
|
|
566
|
+
*
|
|
567
|
+
* # Arguments
|
|
568
|
+
* * `block_name` - The name of the block to evaluate
|
|
569
|
+
* * `inputs` - The input values to the block
|
|
570
|
+
* * `lib` - Optional, the library to load the block from, defaults to "core"
|
|
571
|
+
*
|
|
572
|
+
* # Returns
|
|
573
|
+
* A list of values representing the outputs of the block
|
|
574
|
+
* @param {string} block_name
|
|
575
|
+
* @param {any[]} inputs
|
|
576
|
+
* @param {string | undefined} [lib]
|
|
577
|
+
* @returns {Promise<any>}
|
|
578
|
+
*/
|
|
579
|
+
evalBlock(block_name, inputs, lib) {
|
|
580
|
+
const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
581
|
+
const len0 = WASM_VECTOR_LEN;
|
|
582
|
+
const ptr1 = passArrayJsValueToWasm0(inputs, wasm.__wbindgen_export_0);
|
|
583
|
+
const len1 = WASM_VECTOR_LEN;
|
|
584
|
+
var ptr2 = isLikeNone(lib) ? 0 : passStringToWasm0(lib, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
585
|
+
var len2 = WASM_VECTOR_LEN;
|
|
586
|
+
const ret = wasm.enginecommand_evalBlock(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
587
|
+
return takeObject(ret);
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
543
590
|
* Creates a watch on block changes
|
|
544
591
|
* @param {Function} callback
|
|
545
592
|
* @returns {Promise<void>}
|
|
@@ -593,11 +640,6 @@ export function __wbindgen_is_array(arg0) {
|
|
|
593
640
|
return ret;
|
|
594
641
|
};
|
|
595
642
|
|
|
596
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
597
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
598
|
-
return addHeapObject(ret);
|
|
599
|
-
};
|
|
600
|
-
|
|
601
643
|
export function __wbindgen_string_new(arg0, arg1) {
|
|
602
644
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
603
645
|
return addHeapObject(ret);
|
|
@@ -661,6 +703,11 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
|
661
703
|
return addHeapObject(ret);
|
|
662
704
|
};
|
|
663
705
|
|
|
706
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
707
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
708
|
+
return addHeapObject(ret);
|
|
709
|
+
};
|
|
710
|
+
|
|
664
711
|
export function __wbindgen_object_clone_ref(arg0) {
|
|
665
712
|
const ret = getObject(arg0);
|
|
666
713
|
return addHeapObject(ret);
|
|
@@ -705,16 +752,6 @@ export function __wbg_warn_52c5b3e773c3a056(arg0, arg1) {
|
|
|
705
752
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
706
753
|
};
|
|
707
754
|
|
|
708
|
-
export function __wbg_queueMicrotask_adae4bc085237231(arg0) {
|
|
709
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
710
|
-
return addHeapObject(ret);
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
export function __wbindgen_is_function(arg0) {
|
|
714
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
715
|
-
return ret;
|
|
716
|
-
};
|
|
717
|
-
|
|
718
755
|
export function __wbindgen_cb_drop(arg0) {
|
|
719
756
|
const obj = takeObject(arg0).original;
|
|
720
757
|
if (obj.cnt-- == 1) {
|
|
@@ -729,6 +766,16 @@ export function __wbg_queueMicrotask_4d890031a6a5a50c(arg0) {
|
|
|
729
766
|
queueMicrotask(getObject(arg0));
|
|
730
767
|
};
|
|
731
768
|
|
|
769
|
+
export function __wbg_queueMicrotask_adae4bc085237231(arg0) {
|
|
770
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
771
|
+
return addHeapObject(ret);
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
export function __wbindgen_is_function(arg0) {
|
|
775
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
776
|
+
return ret;
|
|
777
|
+
};
|
|
778
|
+
|
|
732
779
|
export function __wbg_new_abda76e883ba8a5f() {
|
|
733
780
|
const ret = new Error();
|
|
734
781
|
return addHeapObject(ret);
|
|
@@ -950,7 +997,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
|
|
|
950
997
|
const a = state0.a;
|
|
951
998
|
state0.a = 0;
|
|
952
999
|
try {
|
|
953
|
-
return
|
|
1000
|
+
return __wbg_adapter_155(a, state0.b, arg0, arg1);
|
|
954
1001
|
} finally {
|
|
955
1002
|
state0.a = a;
|
|
956
1003
|
}
|
|
@@ -1046,8 +1093,8 @@ export function __wbindgen_memory() {
|
|
|
1046
1093
|
return addHeapObject(ret);
|
|
1047
1094
|
};
|
|
1048
1095
|
|
|
1049
|
-
export function
|
|
1050
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1096
|
+
export function __wbindgen_closure_wrapper3486(arg0, arg1, arg2) {
|
|
1097
|
+
const ret = makeMutClosure(arg0, arg1, 1194, __wbg_adapter_50);
|
|
1051
1098
|
return addHeapObject(ret);
|
|
1052
1099
|
};
|
|
1053
1100
|
|
package/logic_mesh_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED