@diaryx/wasm-node 1.4.1-dev.75575c3 → 1.4.1-dev.adede70
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/diaryx_wasm.d.ts +0 -7
- package/diaryx_wasm.js +2 -227
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +0 -1
- package/package.json +1 -1
package/diaryx_wasm.d.ts
CHANGED
|
@@ -164,12 +164,6 @@ export class DiaryxBackend {
|
|
|
164
164
|
* ```
|
|
165
165
|
*/
|
|
166
166
|
execute(command_json: string): Promise<string>;
|
|
167
|
-
/**
|
|
168
|
-
* Execute a command from a JavaScript object directly.
|
|
169
|
-
*
|
|
170
|
-
* This avoids JSON serialization overhead for better performance.
|
|
171
|
-
*/
|
|
172
|
-
executeJs(command: any): Promise<any>;
|
|
173
167
|
/**
|
|
174
168
|
* Check if this backend has native sync support.
|
|
175
169
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -294,7 +288,6 @@ export interface InitOutput {
|
|
|
294
288
|
readonly diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
295
289
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
296
290
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
297
|
-
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
298
291
|
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
299
292
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
300
293
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
package/diaryx_wasm.js
CHANGED
|
@@ -126,17 +126,6 @@ export class DiaryxBackend {
|
|
|
126
126
|
const ret = wasm.diaryxbackend_execute(this.__wbg_ptr, ptr0, len0);
|
|
127
127
|
return ret;
|
|
128
128
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Execute a command from a JavaScript object directly.
|
|
131
|
-
*
|
|
132
|
-
* This avoids JSON serialization overhead for better performance.
|
|
133
|
-
* @param {any} command
|
|
134
|
-
* @returns {Promise<any>}
|
|
135
|
-
*/
|
|
136
|
-
executeJs(command) {
|
|
137
|
-
const ret = wasm.diaryxbackend_executeJs(this.__wbg_ptr, command);
|
|
138
|
-
return ret;
|
|
139
|
-
}
|
|
140
129
|
/**
|
|
141
130
|
* Check if this backend has native sync support.
|
|
142
131
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -340,72 +329,19 @@ export function today_formatted(format) {
|
|
|
340
329
|
function __wbg_get_imports() {
|
|
341
330
|
const import0 = {
|
|
342
331
|
__proto__: null,
|
|
343
|
-
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
344
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
345
|
-
return ret;
|
|
346
|
-
},
|
|
347
|
-
__wbg_Number_a5a435bd7bbec835: function(arg0) {
|
|
348
|
-
const ret = Number(arg0);
|
|
349
|
-
return ret;
|
|
350
|
-
},
|
|
351
|
-
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
352
|
-
const ret = String(arg1);
|
|
353
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
354
|
-
const len1 = WASM_VECTOR_LEN;
|
|
355
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
356
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
357
|
-
},
|
|
358
|
-
__wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
|
|
359
|
-
const v = arg1;
|
|
360
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
361
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
362
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
363
|
-
},
|
|
364
332
|
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
365
333
|
const v = arg0;
|
|
366
334
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
367
335
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
368
336
|
},
|
|
369
|
-
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
370
|
-
const ret = debugString(arg1);
|
|
371
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
372
|
-
const len1 = WASM_VECTOR_LEN;
|
|
373
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
374
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
375
|
-
},
|
|
376
|
-
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
377
|
-
const ret = arg0 in arg1;
|
|
378
|
-
return ret;
|
|
379
|
-
},
|
|
380
|
-
__wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
|
|
381
|
-
const ret = typeof(arg0) === 'bigint';
|
|
382
|
-
return ret;
|
|
383
|
-
},
|
|
384
337
|
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
385
338
|
const ret = typeof(arg0) === 'function';
|
|
386
339
|
return ret;
|
|
387
340
|
},
|
|
388
|
-
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
389
|
-
const val = arg0;
|
|
390
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
391
|
-
return ret;
|
|
392
|
-
},
|
|
393
|
-
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
394
|
-
const ret = typeof(arg0) === 'string';
|
|
395
|
-
return ret;
|
|
396
|
-
},
|
|
397
341
|
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
398
342
|
const ret = arg0 === undefined;
|
|
399
343
|
return ret;
|
|
400
344
|
},
|
|
401
|
-
__wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
|
|
402
|
-
const ret = arg0 === arg1;
|
|
403
|
-
return ret;
|
|
404
|
-
},
|
|
405
|
-
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
406
|
-
const ret = arg0 == arg1;
|
|
407
|
-
return ret;
|
|
408
|
-
},
|
|
409
345
|
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
410
346
|
const obj = arg1;
|
|
411
347
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
@@ -453,21 +389,9 @@ function __wbg_get_imports() {
|
|
|
453
389
|
const ret = DiaryxBackend.__wrap(arg0);
|
|
454
390
|
return ret;
|
|
455
391
|
},
|
|
456
|
-
__wbg_done_08ce71ee07e3bd17: function(arg0) {
|
|
457
|
-
const ret = arg0.done;
|
|
458
|
-
return ret;
|
|
459
|
-
},
|
|
460
|
-
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
461
|
-
const ret = Object.entries(arg0);
|
|
462
|
-
return ret;
|
|
463
|
-
},
|
|
464
392
|
__wbg_error_1eece6b0039034ce: function(arg0, arg1, arg2, arg3) {
|
|
465
393
|
console.error(arg0, arg1, arg2, arg3);
|
|
466
394
|
},
|
|
467
|
-
__wbg_fromCodePoint_4a02c6dcced1d233: function() { return handleError(function (arg0) {
|
|
468
|
-
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
469
|
-
return ret;
|
|
470
|
-
}, arguments); },
|
|
471
395
|
__wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
|
|
472
396
|
const ret = arg0.getTime();
|
|
473
397
|
return ret;
|
|
@@ -476,10 +400,6 @@ function __wbg_get_imports() {
|
|
|
476
400
|
const ret = arg0.getTimezoneOffset();
|
|
477
401
|
return ret;
|
|
478
402
|
},
|
|
479
|
-
__wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
|
|
480
|
-
const ret = Reflect.get(arg0, arg1);
|
|
481
|
-
return ret;
|
|
482
|
-
}, arguments); },
|
|
483
403
|
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
484
404
|
const ret = Reflect.get(arg0, arg1);
|
|
485
405
|
return ret;
|
|
@@ -488,37 +408,9 @@ function __wbg_get_imports() {
|
|
|
488
408
|
const ret = arg0[arg1 >>> 0];
|
|
489
409
|
return ret;
|
|
490
410
|
},
|
|
491
|
-
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
492
|
-
const ret = arg0[arg1 >>> 0];
|
|
493
|
-
return ret;
|
|
494
|
-
},
|
|
495
|
-
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
496
|
-
const ret = arg0[arg1];
|
|
497
|
-
return ret;
|
|
498
|
-
},
|
|
499
411
|
__wbg_info_0194681687b5ab04: function(arg0, arg1, arg2, arg3) {
|
|
500
412
|
console.info(arg0, arg1, arg2, arg3);
|
|
501
413
|
},
|
|
502
|
-
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
503
|
-
let result;
|
|
504
|
-
try {
|
|
505
|
-
result = arg0 instanceof ArrayBuffer;
|
|
506
|
-
} catch (_) {
|
|
507
|
-
result = false;
|
|
508
|
-
}
|
|
509
|
-
const ret = result;
|
|
510
|
-
return ret;
|
|
511
|
-
},
|
|
512
|
-
__wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
|
|
513
|
-
let result;
|
|
514
|
-
try {
|
|
515
|
-
result = arg0 instanceof Map;
|
|
516
|
-
} catch (_) {
|
|
517
|
-
result = false;
|
|
518
|
-
}
|
|
519
|
-
const ret = result;
|
|
520
|
-
return ret;
|
|
521
|
-
},
|
|
522
414
|
__wbg_instanceof_Object_be1962063fcc0c9f: function(arg0) {
|
|
523
415
|
let result;
|
|
524
416
|
try {
|
|
@@ -553,14 +445,6 @@ function __wbg_get_imports() {
|
|
|
553
445
|
const ret = Array.isArray(arg0);
|
|
554
446
|
return ret;
|
|
555
447
|
},
|
|
556
|
-
__wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
|
|
557
|
-
const ret = Number.isSafeInteger(arg0);
|
|
558
|
-
return ret;
|
|
559
|
-
},
|
|
560
|
-
__wbg_iterator_d8f549ec8fb061b1: function() {
|
|
561
|
-
const ret = Symbol.iterator;
|
|
562
|
-
return ret;
|
|
563
|
-
},
|
|
564
448
|
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
565
449
|
const ret = arg0.length;
|
|
566
450
|
return ret;
|
|
@@ -576,22 +460,10 @@ function __wbg_get_imports() {
|
|
|
576
460
|
const ret = new Date();
|
|
577
461
|
return ret;
|
|
578
462
|
},
|
|
579
|
-
__wbg_new_49d5571bd3f0c4d4: function() {
|
|
580
|
-
const ret = new Map();
|
|
581
|
-
return ret;
|
|
582
|
-
},
|
|
583
|
-
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
584
|
-
const ret = new Uint8Array(arg0);
|
|
585
|
-
return ret;
|
|
586
|
-
},
|
|
587
463
|
__wbg_new_a70fbab9066b301f: function() {
|
|
588
464
|
const ret = new Array();
|
|
589
465
|
return ret;
|
|
590
466
|
},
|
|
591
|
-
__wbg_new_ab79df5bd7c26067: function() {
|
|
592
|
-
const ret = new Object();
|
|
593
|
-
return ret;
|
|
594
|
-
},
|
|
595
467
|
__wbg_new_fd94ca5c9639abd2: function(arg0) {
|
|
596
468
|
const ret = new Date(arg0);
|
|
597
469
|
return ret;
|
|
@@ -622,14 +494,6 @@ function __wbg_get_imports() {
|
|
|
622
494
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
623
495
|
return ret;
|
|
624
496
|
},
|
|
625
|
-
__wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
|
|
626
|
-
const ret = arg0.next();
|
|
627
|
-
return ret;
|
|
628
|
-
}, arguments); },
|
|
629
|
-
__wbg_next_e01a967809d1aa68: function(arg0) {
|
|
630
|
-
const ret = arg0.next;
|
|
631
|
-
return ret;
|
|
632
|
-
},
|
|
633
497
|
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
634
498
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
635
499
|
},
|
|
@@ -648,19 +512,9 @@ function __wbg_get_imports() {
|
|
|
648
512
|
const ret = Promise.resolve(arg0);
|
|
649
513
|
return ret;
|
|
650
514
|
},
|
|
651
|
-
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
652
|
-
arg0[arg1 >>> 0] = arg2;
|
|
653
|
-
},
|
|
654
|
-
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
655
|
-
arg0[arg1] = arg2;
|
|
656
|
-
},
|
|
657
515
|
__wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
|
|
658
516
|
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
659
517
|
},
|
|
660
|
-
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
661
|
-
const ret = arg0.set(arg1, arg2);
|
|
662
|
-
return ret;
|
|
663
|
-
},
|
|
664
518
|
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
665
519
|
const ret = typeof global === 'undefined' ? null : global;
|
|
666
520
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
@@ -689,15 +543,11 @@ function __wbg_get_imports() {
|
|
|
689
543
|
const ret = arg0.toString();
|
|
690
544
|
return ret;
|
|
691
545
|
},
|
|
692
|
-
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
693
|
-
const ret = arg0.value;
|
|
694
|
-
return ret;
|
|
695
|
-
},
|
|
696
546
|
__wbg_warn_809cad1bfc2b3a42: function(arg0, arg1, arg2, arg3) {
|
|
697
547
|
console.warn(arg0, arg1, arg2, arg3);
|
|
698
548
|
},
|
|
699
549
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
700
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
550
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 415, function: Function { arguments: [Externref], shim_idx: 416, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
701
551
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc0ecfed3f77ea255, wasm_bindgen__convert__closures_____invoke__h2b2515b80a4dcf5e);
|
|
702
552
|
return ret;
|
|
703
553
|
},
|
|
@@ -706,21 +556,11 @@ function __wbg_get_imports() {
|
|
|
706
556
|
const ret = arg0;
|
|
707
557
|
return ret;
|
|
708
558
|
},
|
|
709
|
-
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
710
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
711
|
-
const ret = arg0;
|
|
712
|
-
return ret;
|
|
713
|
-
},
|
|
714
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
559
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
715
560
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
716
561
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
717
562
|
return ret;
|
|
718
563
|
},
|
|
719
|
-
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
720
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
721
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
722
|
-
return ret;
|
|
723
|
-
},
|
|
724
564
|
__wbindgen_init_externref_table: function() {
|
|
725
565
|
const table = wasm.__wbindgen_externrefs;
|
|
726
566
|
const offset = table.grow(4);
|
|
@@ -765,71 +605,6 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
|
765
605
|
? { register: () => {}, unregister: () => {} }
|
|
766
606
|
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
767
607
|
|
|
768
|
-
function debugString(val) {
|
|
769
|
-
// primitive types
|
|
770
|
-
const type = typeof val;
|
|
771
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
772
|
-
return `${val}`;
|
|
773
|
-
}
|
|
774
|
-
if (type == 'string') {
|
|
775
|
-
return `"${val}"`;
|
|
776
|
-
}
|
|
777
|
-
if (type == 'symbol') {
|
|
778
|
-
const description = val.description;
|
|
779
|
-
if (description == null) {
|
|
780
|
-
return 'Symbol';
|
|
781
|
-
} else {
|
|
782
|
-
return `Symbol(${description})`;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
if (type == 'function') {
|
|
786
|
-
const name = val.name;
|
|
787
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
788
|
-
return `Function(${name})`;
|
|
789
|
-
} else {
|
|
790
|
-
return 'Function';
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
// objects
|
|
794
|
-
if (Array.isArray(val)) {
|
|
795
|
-
const length = val.length;
|
|
796
|
-
let debug = '[';
|
|
797
|
-
if (length > 0) {
|
|
798
|
-
debug += debugString(val[0]);
|
|
799
|
-
}
|
|
800
|
-
for(let i = 1; i < length; i++) {
|
|
801
|
-
debug += ', ' + debugString(val[i]);
|
|
802
|
-
}
|
|
803
|
-
debug += ']';
|
|
804
|
-
return debug;
|
|
805
|
-
}
|
|
806
|
-
// Test for built-in
|
|
807
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
808
|
-
let className;
|
|
809
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
810
|
-
className = builtInMatches[1];
|
|
811
|
-
} else {
|
|
812
|
-
// Failed to match the standard '[object ClassName]'
|
|
813
|
-
return toString.call(val);
|
|
814
|
-
}
|
|
815
|
-
if (className == 'Object') {
|
|
816
|
-
// we're a user defined class or Object
|
|
817
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
818
|
-
// easier than looping through ownProperties of `val`.
|
|
819
|
-
try {
|
|
820
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
821
|
-
} catch (_) {
|
|
822
|
-
return 'Object';
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
// errors
|
|
826
|
-
if (val instanceof Error) {
|
|
827
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
828
|
-
}
|
|
829
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
830
|
-
return className;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
608
|
function getArrayU8FromWasm0(ptr, len) {
|
|
834
609
|
ptr = ptr >>> 0;
|
|
835
610
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export const diaryxbackend_createInMemory: () => [number, number, number];
|
|
|
9
9
|
export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
10
10
|
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
11
11
|
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
12
|
-
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
13
12
|
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
14
13
|
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
15
14
|
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@diaryx/wasm-node",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for Diaryx core functionality",
|
|
5
|
-
"version": "1.4.1-dev.
|
|
5
|
+
"version": "1.4.1-dev.adede70",
|
|
6
6
|
"license": "SEE LICENSE IN ../../LICENSE.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|