@restatedev/restate-sdk-cloudflare-workers 1.10.3 → 1.10.4
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/_virtual/rolldown_runtime.js +13 -0
- package/dist/common_api.cjs +1 -0
- package/dist/common_api.d.cts +1 -0
- package/dist/common_api.d.cts.map +1 -1
- package/dist/common_api.d.ts +1 -0
- package/dist/common_api.d.ts.map +1 -1
- package/dist/common_api.js +1 -0
- package/dist/common_api.js.map +1 -1
- package/dist/context_impl.cjs +3 -0
- package/dist/context_impl.js +3 -0
- package/dist/context_impl.js.map +1 -1
- package/dist/endpoint/handlers/generic.cjs +6 -1
- package/dist/endpoint/handlers/generic.js +6 -1
- package/dist/endpoint/handlers/generic.js.map +1 -1
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts +49 -49
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.js +325 -325
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm +0 -0
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm.d.ts +44 -45
- package/dist/fetch.cjs +7 -0
- package/dist/fetch.d.cts +2 -1
- package/dist/fetch.d.cts.map +1 -1
- package/dist/fetch.d.ts +2 -1
- package/dist/fetch.d.ts.map +1 -1
- package/dist/fetch.js.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/internal.cjs +11 -0
- package/dist/internal.d.cts +27 -0
- package/dist/internal.d.cts.map +1 -0
- package/dist/internal.d.ts +27 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +6 -0
- package/dist/internal.js.map +1 -0
- package/dist/lambda.cjs +7 -0
- package/dist/lambda.d.cts +2 -1
- package/dist/lambda.d.cts.map +1 -1
- package/dist/lambda.d.ts +2 -1
- package/dist/lambda.d.ts.map +1 -1
- package/dist/lambda.js +2 -1
- package/dist/lambda.js.map +1 -1
- package/dist/node.cjs +7 -0
- package/dist/node.d.cts +2 -1
- package/dist/node.d.cts.map +1 -1
- package/dist/node.d.ts +2 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -1
- package/dist/node.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +3 -3
|
@@ -181,20 +181,6 @@ function debugString(val) {
|
|
|
181
181
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
182
182
|
return className;
|
|
183
183
|
}
|
|
184
|
-
/**
|
|
185
|
-
* Setups the WASM module
|
|
186
|
-
*/
|
|
187
|
-
export function start() {
|
|
188
|
-
wasm.start();
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* This will set the log level of the overall log subscriber.
|
|
193
|
-
* @param {LogLevel} level
|
|
194
|
-
*/
|
|
195
|
-
export function set_log_level(level) {
|
|
196
|
-
wasm.set_log_level(level);
|
|
197
|
-
}
|
|
198
184
|
|
|
199
185
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
200
186
|
ptr = ptr >>> 0;
|
|
@@ -206,6 +192,28 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
206
192
|
wasm.__externref_drop_slice(ptr, len);
|
|
207
193
|
return result;
|
|
208
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* This will set the log level of the overall log subscriber.
|
|
197
|
+
* @param {LogLevel} level
|
|
198
|
+
*/
|
|
199
|
+
export function set_log_level(level) {
|
|
200
|
+
wasm.set_log_level(level);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @returns {number}
|
|
205
|
+
*/
|
|
206
|
+
export function cancel_handle() {
|
|
207
|
+
const ret = wasm.cancel_handle();
|
|
208
|
+
return ret >>> 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Setups the WASM module
|
|
213
|
+
*/
|
|
214
|
+
export function start() {
|
|
215
|
+
wasm.start();
|
|
216
|
+
}
|
|
209
217
|
|
|
210
218
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
211
219
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
@@ -223,13 +231,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
223
231
|
return value;
|
|
224
232
|
}
|
|
225
233
|
|
|
226
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
227
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
228
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
229
|
-
WASM_VECTOR_LEN = arg.length;
|
|
230
|
-
return ptr;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
234
|
let cachedUint32ArrayMemory0 = null;
|
|
234
235
|
|
|
235
236
|
function getUint32ArrayMemory0() {
|
|
@@ -245,14 +246,13 @@ function passArray32ToWasm0(arg, malloc) {
|
|
|
245
246
|
WASM_VECTOR_LEN = arg.length;
|
|
246
247
|
return ptr;
|
|
247
248
|
}
|
|
248
|
-
/**
|
|
249
|
-
* @returns {number}
|
|
250
|
-
*/
|
|
251
|
-
export function cancel_handle() {
|
|
252
|
-
const ret = wasm.cancel_handle();
|
|
253
|
-
return ret >>> 0;
|
|
254
|
-
}
|
|
255
249
|
|
|
250
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
251
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
252
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
253
|
+
WASM_VECTOR_LEN = arg.length;
|
|
254
|
+
return ptr;
|
|
255
|
+
}
|
|
256
256
|
/**
|
|
257
257
|
* @enum {0 | 1 | 2 | 3 | 4}
|
|
258
258
|
*/
|
|
@@ -320,6 +320,20 @@ export class WasmHeader {
|
|
|
320
320
|
const ptr = this.__destroy_into_raw();
|
|
321
321
|
wasm.__wbg_wasmheader_free(ptr, 0);
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* @param {string} key
|
|
325
|
+
* @param {string} value
|
|
326
|
+
*/
|
|
327
|
+
constructor(key, value) {
|
|
328
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
+
const len0 = WASM_VECTOR_LEN;
|
|
330
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
|
+
const len1 = WASM_VECTOR_LEN;
|
|
332
|
+
const ret = wasm.wasmheader_new(ptr0, len0, ptr1, len1);
|
|
333
|
+
this.__wbg_ptr = ret >>> 0;
|
|
334
|
+
WasmHeaderFinalization.register(this, this.__wbg_ptr, this);
|
|
335
|
+
return this;
|
|
336
|
+
}
|
|
323
337
|
/**
|
|
324
338
|
* @returns {string}
|
|
325
339
|
*/
|
|
@@ -350,20 +364,6 @@ export class WasmHeader {
|
|
|
350
364
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
351
365
|
}
|
|
352
366
|
}
|
|
353
|
-
/**
|
|
354
|
-
* @param {string} key
|
|
355
|
-
* @param {string} value
|
|
356
|
-
*/
|
|
357
|
-
constructor(key, value) {
|
|
358
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
|
-
const len0 = WASM_VECTOR_LEN;
|
|
360
|
-
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
361
|
-
const len1 = WASM_VECTOR_LEN;
|
|
362
|
-
const ret = wasm.wasmheader_new(ptr0, len0, ptr1, len1);
|
|
363
|
-
this.__wbg_ptr = ret >>> 0;
|
|
364
|
-
WasmHeaderFinalization.register(this, this.__wbg_ptr, this);
|
|
365
|
-
return this;
|
|
366
|
-
}
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
const WasmIdentityVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -383,20 +383,6 @@ export class WasmIdentityVerifier {
|
|
|
383
383
|
const ptr = this.__destroy_into_raw();
|
|
384
384
|
wasm.__wbg_wasmidentityverifier_free(ptr, 0);
|
|
385
385
|
}
|
|
386
|
-
/**
|
|
387
|
-
* @param {string[]} keys
|
|
388
|
-
*/
|
|
389
|
-
constructor(keys) {
|
|
390
|
-
const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
|
|
391
|
-
const len0 = WASM_VECTOR_LEN;
|
|
392
|
-
const ret = wasm.wasmidentityverifier_new(ptr0, len0);
|
|
393
|
-
if (ret[2]) {
|
|
394
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
395
|
-
}
|
|
396
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
397
|
-
WasmIdentityVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
398
|
-
return this;
|
|
399
|
-
}
|
|
400
386
|
/**
|
|
401
387
|
* @param {string} path
|
|
402
388
|
* @param {WasmHeader[]} headers
|
|
@@ -411,6 +397,20 @@ export class WasmIdentityVerifier {
|
|
|
411
397
|
throw takeFromExternrefTable0(ret[0]);
|
|
412
398
|
}
|
|
413
399
|
}
|
|
400
|
+
/**
|
|
401
|
+
* @param {string[]} keys
|
|
402
|
+
*/
|
|
403
|
+
constructor(keys) {
|
|
404
|
+
const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
|
|
405
|
+
const len0 = WASM_VECTOR_LEN;
|
|
406
|
+
const ret = wasm.wasmidentityverifier_new(ptr0, len0);
|
|
407
|
+
if (ret[2]) {
|
|
408
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
409
|
+
}
|
|
410
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
411
|
+
WasmIdentityVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
412
|
+
return this;
|
|
413
|
+
}
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
const WasmInputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -554,39 +554,32 @@ export class WasmVM {
|
|
|
554
554
|
wasm.__wbg_wasmvm_free(ptr, 0);
|
|
555
555
|
}
|
|
556
556
|
/**
|
|
557
|
-
* @param {
|
|
558
|
-
* @
|
|
559
|
-
* @param {number} logger_id
|
|
560
|
-
* @param {boolean} disable_payload_checks
|
|
557
|
+
* @param {Uint32Array} handles
|
|
558
|
+
* @returns {WasmDoProgressResult}
|
|
561
559
|
*/
|
|
562
|
-
|
|
563
|
-
const ptr0 =
|
|
560
|
+
do_progress(handles) {
|
|
561
|
+
const ptr0 = passArray32ToWasm0(handles, wasm.__wbindgen_malloc);
|
|
564
562
|
const len0 = WASM_VECTOR_LEN;
|
|
565
|
-
const ret = wasm.
|
|
563
|
+
const ret = wasm.wasmvm_do_progress(this.__wbg_ptr, ptr0, len0);
|
|
566
564
|
if (ret[2]) {
|
|
567
565
|
throw takeFromExternrefTable0(ret[1]);
|
|
568
566
|
}
|
|
569
|
-
|
|
570
|
-
WasmVMFinalization.register(this, this.__wbg_ptr, this);
|
|
571
|
-
return this;
|
|
567
|
+
return takeFromExternrefTable0(ret[0]);
|
|
572
568
|
}
|
|
573
569
|
/**
|
|
574
|
-
* @returns {
|
|
570
|
+
* @returns {any}
|
|
575
571
|
*/
|
|
576
|
-
|
|
577
|
-
const ret = wasm.
|
|
578
|
-
return
|
|
572
|
+
take_output() {
|
|
573
|
+
const ret = wasm.wasmvm_take_output(this.__wbg_ptr);
|
|
574
|
+
return ret;
|
|
579
575
|
}
|
|
580
576
|
/**
|
|
581
|
-
* @param {
|
|
577
|
+
* @param {number} handle
|
|
578
|
+
* @returns {boolean}
|
|
582
579
|
*/
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
wasm.wasmvm_notify_input(this.__wbg_ptr, ptr0, len0);
|
|
587
|
-
}
|
|
588
|
-
notify_input_closed() {
|
|
589
|
-
wasm.wasmvm_notify_input_closed(this.__wbg_ptr);
|
|
580
|
+
is_completed(handle) {
|
|
581
|
+
const ret = wasm.wasmvm_is_completed(this.__wbg_ptr, handle);
|
|
582
|
+
return ret !== 0;
|
|
590
583
|
}
|
|
591
584
|
/**
|
|
592
585
|
* @param {string} error_message
|
|
@@ -600,104 +593,30 @@ export class WasmVM {
|
|
|
600
593
|
wasm.wasmvm_notify_error(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
601
594
|
}
|
|
602
595
|
/**
|
|
603
|
-
* @param {
|
|
604
|
-
* @param {string | null} [stacktrace]
|
|
605
|
-
* @param {bigint | null} [delay_override]
|
|
606
|
-
*/
|
|
607
|
-
notify_error_with_delay_override(error_message, stacktrace, delay_override) {
|
|
608
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
609
|
-
const len0 = WASM_VECTOR_LEN;
|
|
610
|
-
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
611
|
-
var len1 = WASM_VECTOR_LEN;
|
|
612
|
-
wasm.wasmvm_notify_error_with_delay_override(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override);
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* @param {string} error_message
|
|
616
|
-
* @param {string | null | undefined} stacktrace
|
|
617
|
-
* @param {WasmCommandType} wasm_command_type
|
|
618
|
-
*/
|
|
619
|
-
notify_error_for_next_command(error_message, stacktrace, wasm_command_type) {
|
|
620
|
-
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
621
|
-
const len0 = WASM_VECTOR_LEN;
|
|
622
|
-
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
623
|
-
var len1 = WASM_VECTOR_LEN;
|
|
624
|
-
wasm.wasmvm_notify_error_for_next_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type);
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* @param {string} error_message
|
|
628
|
-
* @param {string | null | undefined} stacktrace
|
|
629
|
-
* @param {WasmCommandType} wasm_command_type
|
|
630
|
-
* @param {number} command_index
|
|
631
|
-
* @param {string | null} [command_name]
|
|
596
|
+
* @param {Uint8Array} buffer
|
|
632
597
|
*/
|
|
633
|
-
|
|
634
|
-
const ptr0 =
|
|
598
|
+
notify_input(buffer) {
|
|
599
|
+
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
635
600
|
const len0 = WASM_VECTOR_LEN;
|
|
636
|
-
|
|
637
|
-
var len1 = WASM_VECTOR_LEN;
|
|
638
|
-
var ptr2 = isLikeNone(command_name) ? 0 : passStringToWasm0(command_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
639
|
-
var len2 = WASM_VECTOR_LEN;
|
|
640
|
-
wasm.wasmvm_notify_error_for_specific_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type, command_index, ptr2, len2);
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* @returns {any}
|
|
644
|
-
*/
|
|
645
|
-
take_output() {
|
|
646
|
-
const ret = wasm.wasmvm_take_output(this.__wbg_ptr);
|
|
647
|
-
return ret;
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* @returns {boolean}
|
|
651
|
-
*/
|
|
652
|
-
is_ready_to_execute() {
|
|
653
|
-
const ret = wasm.wasmvm_is_ready_to_execute(this.__wbg_ptr);
|
|
654
|
-
if (ret[2]) {
|
|
655
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
656
|
-
}
|
|
657
|
-
return ret[0] !== 0;
|
|
601
|
+
wasm.wasmvm_notify_input(this.__wbg_ptr, ptr0, len0);
|
|
658
602
|
}
|
|
659
603
|
/**
|
|
660
|
-
* @param {number} handle
|
|
661
604
|
* @returns {boolean}
|
|
662
605
|
*/
|
|
663
|
-
|
|
664
|
-
const ret = wasm.
|
|
606
|
+
is_processing() {
|
|
607
|
+
const ret = wasm.wasmvm_is_processing(this.__wbg_ptr);
|
|
665
608
|
return ret !== 0;
|
|
666
609
|
}
|
|
667
610
|
/**
|
|
668
|
-
* @
|
|
669
|
-
* @returns {WasmDoProgressResult}
|
|
670
|
-
*/
|
|
671
|
-
do_progress(handles) {
|
|
672
|
-
const ptr0 = passArray32ToWasm0(handles, wasm.__wbindgen_malloc);
|
|
673
|
-
const len0 = WASM_VECTOR_LEN;
|
|
674
|
-
const ret = wasm.wasmvm_do_progress(this.__wbg_ptr, ptr0, len0);
|
|
675
|
-
if (ret[2]) {
|
|
676
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
677
|
-
}
|
|
678
|
-
return takeFromExternrefTable0(ret[0]);
|
|
679
|
-
}
|
|
680
|
-
/**
|
|
681
|
-
* @param {number} handle
|
|
682
|
-
* @returns {WasmAsyncResultValue}
|
|
611
|
+
* @returns {WasmAwakeable}
|
|
683
612
|
*/
|
|
684
|
-
|
|
685
|
-
const ret = wasm.
|
|
613
|
+
sys_awakeable() {
|
|
614
|
+
const ret = wasm.wasmvm_sys_awakeable(this.__wbg_ptr);
|
|
686
615
|
if (ret[2]) {
|
|
687
616
|
throw takeFromExternrefTable0(ret[1]);
|
|
688
617
|
}
|
|
689
618
|
return takeFromExternrefTable0(ret[0]);
|
|
690
619
|
}
|
|
691
|
-
/**
|
|
692
|
-
* @returns {WasmInput}
|
|
693
|
-
*/
|
|
694
|
-
sys_input() {
|
|
695
|
-
const ret = wasm.wasmvm_sys_input(this.__wbg_ptr);
|
|
696
|
-
if (ret[2]) {
|
|
697
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
698
|
-
}
|
|
699
|
-
return WasmInput.__wrap(ret[0]);
|
|
700
|
-
}
|
|
701
620
|
/**
|
|
702
621
|
* @param {string} key
|
|
703
622
|
* @returns {number}
|
|
@@ -711,16 +630,6 @@ export class WasmVM {
|
|
|
711
630
|
}
|
|
712
631
|
return ret[0] >>> 0;
|
|
713
632
|
}
|
|
714
|
-
/**
|
|
715
|
-
* @returns {number}
|
|
716
|
-
*/
|
|
717
|
-
sys_get_state_keys() {
|
|
718
|
-
const ret = wasm.wasmvm_sys_get_state_keys(this.__wbg_ptr);
|
|
719
|
-
if (ret[2]) {
|
|
720
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
721
|
-
}
|
|
722
|
-
return ret[0] >>> 0;
|
|
723
|
-
}
|
|
724
633
|
/**
|
|
725
634
|
* @param {string} key
|
|
726
635
|
* @param {Uint8Array} buffer
|
|
@@ -746,159 +655,138 @@ export class WasmVM {
|
|
|
746
655
|
throw takeFromExternrefTable0(ret[0]);
|
|
747
656
|
}
|
|
748
657
|
}
|
|
749
|
-
sys_clear_all_state() {
|
|
750
|
-
const ret = wasm.wasmvm_sys_clear_all_state(this.__wbg_ptr);
|
|
751
|
-
if (ret[1]) {
|
|
752
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
658
|
/**
|
|
756
|
-
* @param {
|
|
757
|
-
* @param {string | null} [name]
|
|
659
|
+
* @param {string} key
|
|
758
660
|
* @returns {number}
|
|
759
661
|
*/
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
const ret = wasm.
|
|
662
|
+
sys_get_promise(key) {
|
|
663
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
664
|
+
const len0 = WASM_VECTOR_LEN;
|
|
665
|
+
const ret = wasm.wasmvm_sys_get_promise(this.__wbg_ptr, ptr0, len0);
|
|
764
666
|
if (ret[2]) {
|
|
765
667
|
throw takeFromExternrefTable0(ret[1]);
|
|
766
668
|
}
|
|
767
669
|
return ret[0] >>> 0;
|
|
768
670
|
}
|
|
769
671
|
/**
|
|
770
|
-
* @param {string}
|
|
672
|
+
* @param {string} key
|
|
771
673
|
* @returns {number}
|
|
772
674
|
*/
|
|
773
|
-
|
|
774
|
-
const ptr0 = passStringToWasm0(
|
|
675
|
+
sys_peek_promise(key) {
|
|
676
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
775
677
|
const len0 = WASM_VECTOR_LEN;
|
|
776
|
-
const ret = wasm.
|
|
678
|
+
const ret = wasm.wasmvm_sys_peek_promise(this.__wbg_ptr, ptr0, len0);
|
|
777
679
|
if (ret[2]) {
|
|
778
680
|
throw takeFromExternrefTable0(ret[1]);
|
|
779
681
|
}
|
|
780
682
|
return ret[0] >>> 0;
|
|
781
683
|
}
|
|
782
684
|
/**
|
|
783
|
-
* @
|
|
784
|
-
* @returns {number}
|
|
685
|
+
* @returns {WasmResponseHead}
|
|
785
686
|
*/
|
|
786
|
-
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
687
|
+
get_response_head() {
|
|
688
|
+
const ret = wasm.wasmvm_get_response_head(this.__wbg_ptr);
|
|
689
|
+
return WasmResponseHead.__wrap(ret);
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* @param {number} handle
|
|
693
|
+
* @returns {WasmAsyncResultValue}
|
|
694
|
+
*/
|
|
695
|
+
take_notification(handle) {
|
|
696
|
+
const ret = wasm.wasmvm_take_notification(this.__wbg_ptr, handle);
|
|
790
697
|
if (ret[2]) {
|
|
791
698
|
throw takeFromExternrefTable0(ret[1]);
|
|
792
699
|
}
|
|
793
|
-
return ret[0]
|
|
700
|
+
return takeFromExternrefTable0(ret[0]);
|
|
794
701
|
}
|
|
795
702
|
/**
|
|
796
|
-
* @
|
|
797
|
-
* @param {string} handler
|
|
798
|
-
* @param {Uint8Array} buffer
|
|
799
|
-
* @param {string | null | undefined} key
|
|
800
|
-
* @param {WasmHeader[]} headers
|
|
801
|
-
* @param {string | null} [idempotency_key]
|
|
802
|
-
* @param {string | null} [name]
|
|
803
|
-
* @returns {WasmCallHandle}
|
|
703
|
+
* @returns {number}
|
|
804
704
|
*/
|
|
805
|
-
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
815
|
-
const len4 = WASM_VECTOR_LEN;
|
|
816
|
-
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
817
|
-
var len5 = WASM_VECTOR_LEN;
|
|
818
|
-
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
|
-
var len6 = WASM_VECTOR_LEN;
|
|
820
|
-
const ret = wasm.wasmvm_sys_call(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
705
|
+
last_command_index() {
|
|
706
|
+
const ret = wasm.wasmvm_last_command_index(this.__wbg_ptr);
|
|
707
|
+
return ret;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* @returns {number}
|
|
711
|
+
*/
|
|
712
|
+
sys_get_state_keys() {
|
|
713
|
+
const ret = wasm.wasmvm_sys_get_state_keys(this.__wbg_ptr);
|
|
821
714
|
if (ret[2]) {
|
|
822
715
|
throw takeFromExternrefTable0(ret[1]);
|
|
823
716
|
}
|
|
824
|
-
return
|
|
717
|
+
return ret[0] >>> 0;
|
|
825
718
|
}
|
|
826
719
|
/**
|
|
827
|
-
* @
|
|
828
|
-
* @param {string} handler
|
|
829
|
-
* @param {Uint8Array} buffer
|
|
830
|
-
* @param {string | null | undefined} key
|
|
831
|
-
* @param {WasmHeader[]} headers
|
|
832
|
-
* @param {bigint | null} [delay]
|
|
833
|
-
* @param {string | null} [idempotency_key]
|
|
834
|
-
* @param {string | null} [name]
|
|
835
|
-
* @returns {WasmSendHandle}
|
|
720
|
+
* @returns {boolean}
|
|
836
721
|
*/
|
|
837
|
-
|
|
838
|
-
const
|
|
839
|
-
const len0 = WASM_VECTOR_LEN;
|
|
840
|
-
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
841
|
-
const len1 = WASM_VECTOR_LEN;
|
|
842
|
-
const ptr2 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
843
|
-
const len2 = WASM_VECTOR_LEN;
|
|
844
|
-
var ptr3 = isLikeNone(key) ? 0 : passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
845
|
-
var len3 = WASM_VECTOR_LEN;
|
|
846
|
-
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
847
|
-
const len4 = WASM_VECTOR_LEN;
|
|
848
|
-
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
|
-
var len5 = WASM_VECTOR_LEN;
|
|
850
|
-
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
851
|
-
var len6 = WASM_VECTOR_LEN;
|
|
852
|
-
const ret = wasm.wasmvm_sys_send(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(delay), isLikeNone(delay) ? BigInt(0) : delay, ptr5, len5, ptr6, len6);
|
|
722
|
+
is_ready_to_execute() {
|
|
723
|
+
const ret = wasm.wasmvm_is_ready_to_execute(this.__wbg_ptr);
|
|
853
724
|
if (ret[2]) {
|
|
854
725
|
throw takeFromExternrefTable0(ret[1]);
|
|
855
726
|
}
|
|
856
|
-
return
|
|
727
|
+
return ret[0] !== 0;
|
|
728
|
+
}
|
|
729
|
+
notify_input_closed() {
|
|
730
|
+
wasm.wasmvm_notify_input_closed(this.__wbg_ptr);
|
|
731
|
+
}
|
|
732
|
+
sys_clear_all_state() {
|
|
733
|
+
const ret = wasm.wasmvm_sys_clear_all_state(this.__wbg_ptr);
|
|
734
|
+
if (ret[1]) {
|
|
735
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
736
|
+
}
|
|
857
737
|
}
|
|
858
738
|
/**
|
|
859
|
-
* @
|
|
739
|
+
* @param {string} invocation_id
|
|
740
|
+
* @returns {number}
|
|
860
741
|
*/
|
|
861
|
-
|
|
862
|
-
const
|
|
742
|
+
sys_attach_invocation(invocation_id) {
|
|
743
|
+
const ptr0 = passStringToWasm0(invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
744
|
+
const len0 = WASM_VECTOR_LEN;
|
|
745
|
+
const ret = wasm.wasmvm_sys_attach_invocation(this.__wbg_ptr, ptr0, len0);
|
|
863
746
|
if (ret[2]) {
|
|
864
747
|
throw takeFromExternrefTable0(ret[1]);
|
|
865
748
|
}
|
|
866
|
-
return
|
|
749
|
+
return ret[0] >>> 0;
|
|
867
750
|
}
|
|
868
751
|
/**
|
|
869
|
-
* @param {string}
|
|
870
|
-
* @param {Uint8Array} buffer
|
|
752
|
+
* @param {string} target_invocation_id
|
|
871
753
|
*/
|
|
872
|
-
|
|
873
|
-
const ptr0 = passStringToWasm0(
|
|
754
|
+
sys_cancel_invocation(target_invocation_id) {
|
|
755
|
+
const ptr0 = passStringToWasm0(target_invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
874
756
|
const len0 = WASM_VECTOR_LEN;
|
|
875
|
-
const
|
|
876
|
-
const len1 = WASM_VECTOR_LEN;
|
|
877
|
-
const ret = wasm.wasmvm_sys_complete_awakeable_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
757
|
+
const ret = wasm.wasmvm_sys_cancel_invocation(this.__wbg_ptr, ptr0, len0);
|
|
878
758
|
if (ret[1]) {
|
|
879
759
|
throw takeFromExternrefTable0(ret[0]);
|
|
880
760
|
}
|
|
881
761
|
}
|
|
882
762
|
/**
|
|
883
|
-
* @param {string} id
|
|
884
763
|
* @param {WasmFailure} value
|
|
885
764
|
*/
|
|
886
|
-
|
|
887
|
-
const
|
|
765
|
+
sys_write_output_failure(value) {
|
|
766
|
+
const ret = wasm.wasmvm_sys_write_output_failure(this.__wbg_ptr, value);
|
|
767
|
+
if (ret[1]) {
|
|
768
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* @param {Uint8Array} buffer
|
|
773
|
+
*/
|
|
774
|
+
sys_write_output_success(buffer) {
|
|
775
|
+
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
888
776
|
const len0 = WASM_VECTOR_LEN;
|
|
889
|
-
const ret = wasm.
|
|
777
|
+
const ret = wasm.wasmvm_sys_write_output_success(this.__wbg_ptr, ptr0, len0);
|
|
890
778
|
if (ret[1]) {
|
|
891
779
|
throw takeFromExternrefTable0(ret[0]);
|
|
892
780
|
}
|
|
893
781
|
}
|
|
894
782
|
/**
|
|
895
|
-
* @param {string}
|
|
783
|
+
* @param {string} invocation_id
|
|
896
784
|
* @returns {number}
|
|
897
785
|
*/
|
|
898
|
-
|
|
899
|
-
const ptr0 = passStringToWasm0(
|
|
786
|
+
sys_get_invocation_output(invocation_id) {
|
|
787
|
+
const ptr0 = passStringToWasm0(invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
900
788
|
const len0 = WASM_VECTOR_LEN;
|
|
901
|
-
const ret = wasm.
|
|
789
|
+
const ret = wasm.wasmvm_sys_get_invocation_output(this.__wbg_ptr, ptr0, len0);
|
|
902
790
|
if (ret[2]) {
|
|
903
791
|
throw takeFromExternrefTable0(ret[1]);
|
|
904
792
|
}
|
|
@@ -906,12 +794,13 @@ export class WasmVM {
|
|
|
906
794
|
}
|
|
907
795
|
/**
|
|
908
796
|
* @param {string} key
|
|
797
|
+
* @param {WasmFailure} value
|
|
909
798
|
* @returns {number}
|
|
910
799
|
*/
|
|
911
|
-
|
|
800
|
+
sys_complete_promise_failure(key, value) {
|
|
912
801
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
913
802
|
const len0 = WASM_VECTOR_LEN;
|
|
914
|
-
const ret = wasm.
|
|
803
|
+
const ret = wasm.wasmvm_sys_complete_promise_failure(this.__wbg_ptr, ptr0, len0, value);
|
|
915
804
|
if (ret[2]) {
|
|
916
805
|
throw takeFromExternrefTable0(ret[1]);
|
|
917
806
|
}
|
|
@@ -934,31 +823,26 @@ export class WasmVM {
|
|
|
934
823
|
return ret[0] >>> 0;
|
|
935
824
|
}
|
|
936
825
|
/**
|
|
937
|
-
* @param {string}
|
|
938
|
-
* @param {
|
|
939
|
-
* @
|
|
826
|
+
* @param {string} error_message
|
|
827
|
+
* @param {string | null | undefined} stacktrace
|
|
828
|
+
* @param {WasmCommandType} wasm_command_type
|
|
940
829
|
*/
|
|
941
|
-
|
|
942
|
-
const ptr0 = passStringToWasm0(
|
|
830
|
+
notify_error_for_next_command(error_message, stacktrace, wasm_command_type) {
|
|
831
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
943
832
|
const len0 = WASM_VECTOR_LEN;
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
}
|
|
948
|
-
return ret[0] >>> 0;
|
|
833
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
834
|
+
var len1 = WASM_VECTOR_LEN;
|
|
835
|
+
wasm.wasmvm_notify_error_for_next_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type);
|
|
949
836
|
}
|
|
950
837
|
/**
|
|
951
|
-
* @param {
|
|
952
|
-
* @
|
|
838
|
+
* @param {number} handle
|
|
839
|
+
* @param {WasmFailure} value
|
|
953
840
|
*/
|
|
954
|
-
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
if (ret[2]) {
|
|
959
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
841
|
+
propose_run_completion_failure(handle, value) {
|
|
842
|
+
const ret = wasm.wasmvm_propose_run_completion_failure(this.__wbg_ptr, handle, value);
|
|
843
|
+
if (ret[1]) {
|
|
844
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
960
845
|
}
|
|
961
|
-
return ret[0] >>> 0;
|
|
962
846
|
}
|
|
963
847
|
/**
|
|
964
848
|
* @param {number} handle
|
|
@@ -973,15 +857,76 @@ export class WasmVM {
|
|
|
973
857
|
}
|
|
974
858
|
}
|
|
975
859
|
/**
|
|
976
|
-
* @param {
|
|
860
|
+
* @param {string} id
|
|
977
861
|
* @param {WasmFailure} value
|
|
978
862
|
*/
|
|
979
|
-
|
|
980
|
-
const
|
|
863
|
+
sys_complete_awakeable_failure(id, value) {
|
|
864
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
865
|
+
const len0 = WASM_VECTOR_LEN;
|
|
866
|
+
const ret = wasm.wasmvm_sys_complete_awakeable_failure(this.__wbg_ptr, ptr0, len0, value);
|
|
867
|
+
if (ret[1]) {
|
|
868
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* @param {string} id
|
|
873
|
+
* @param {Uint8Array} buffer
|
|
874
|
+
*/
|
|
875
|
+
sys_complete_awakeable_success(id, buffer) {
|
|
876
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
|
+
const len0 = WASM_VECTOR_LEN;
|
|
878
|
+
const ptr1 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
879
|
+
const len1 = WASM_VECTOR_LEN;
|
|
880
|
+
const ret = wasm.wasmvm_sys_complete_awakeable_success(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
981
881
|
if (ret[1]) {
|
|
982
882
|
throw takeFromExternrefTable0(ret[0]);
|
|
983
883
|
}
|
|
984
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
* @param {string} error_message
|
|
887
|
+
* @param {string | null} [stacktrace]
|
|
888
|
+
* @param {bigint | null} [delay_override]
|
|
889
|
+
*/
|
|
890
|
+
notify_error_with_delay_override(error_message, stacktrace, delay_override) {
|
|
891
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
892
|
+
const len0 = WASM_VECTOR_LEN;
|
|
893
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
894
|
+
var len1 = WASM_VECTOR_LEN;
|
|
895
|
+
wasm.wasmvm_notify_error_with_delay_override(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(delay_override), isLikeNone(delay_override) ? BigInt(0) : delay_override);
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* @param {string} error_message
|
|
899
|
+
* @param {string | null | undefined} stacktrace
|
|
900
|
+
* @param {WasmCommandType} wasm_command_type
|
|
901
|
+
* @param {number} command_index
|
|
902
|
+
* @param {string | null} [command_name]
|
|
903
|
+
*/
|
|
904
|
+
notify_error_for_specific_command(error_message, stacktrace, wasm_command_type, command_index, command_name) {
|
|
905
|
+
const ptr0 = passStringToWasm0(error_message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
906
|
+
const len0 = WASM_VECTOR_LEN;
|
|
907
|
+
var ptr1 = isLikeNone(stacktrace) ? 0 : passStringToWasm0(stacktrace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
908
|
+
var len1 = WASM_VECTOR_LEN;
|
|
909
|
+
var ptr2 = isLikeNone(command_name) ? 0 : passStringToWasm0(command_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
910
|
+
var len2 = WASM_VECTOR_LEN;
|
|
911
|
+
wasm.wasmvm_notify_error_for_specific_command(this.__wbg_ptr, ptr0, len0, ptr1, len1, wasm_command_type, command_index, ptr2, len2);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* @param {WasmHeader[]} headers
|
|
915
|
+
* @param {LogLevel} log_level
|
|
916
|
+
* @param {number} logger_id
|
|
917
|
+
* @param {boolean} disable_payload_checks
|
|
918
|
+
*/
|
|
919
|
+
constructor(headers, log_level, logger_id, disable_payload_checks) {
|
|
920
|
+
const ptr0 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
921
|
+
const len0 = WASM_VECTOR_LEN;
|
|
922
|
+
const ret = wasm.wasmvm_new(ptr0, len0, log_level, logger_id, disable_payload_checks);
|
|
923
|
+
if (ret[2]) {
|
|
924
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
925
|
+
}
|
|
926
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
927
|
+
WasmVMFinalization.register(this, this.__wbg_ptr, this);
|
|
928
|
+
return this;
|
|
929
|
+
}
|
|
985
930
|
/**
|
|
986
931
|
* @param {number} handle
|
|
987
932
|
* @param {string} error_message
|
|
@@ -1018,56 +963,111 @@ export class WasmVM {
|
|
|
1018
963
|
throw takeFromExternrefTable0(ret[0]);
|
|
1019
964
|
}
|
|
1020
965
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
*/
|
|
1024
|
-
sys_cancel_invocation(target_invocation_id) {
|
|
1025
|
-
const ptr0 = passStringToWasm0(target_invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1026
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1027
|
-
const ret = wasm.wasmvm_sys_cancel_invocation(this.__wbg_ptr, ptr0, len0);
|
|
966
|
+
sys_end() {
|
|
967
|
+
const ret = wasm.wasmvm_sys_end(this.__wbg_ptr);
|
|
1028
968
|
if (ret[1]) {
|
|
1029
969
|
throw takeFromExternrefTable0(ret[0]);
|
|
1030
970
|
}
|
|
1031
971
|
}
|
|
1032
972
|
/**
|
|
1033
|
-
* @param {
|
|
973
|
+
* @param {string} name
|
|
974
|
+
* @returns {number}
|
|
1034
975
|
*/
|
|
1035
|
-
|
|
1036
|
-
const ptr0 =
|
|
976
|
+
sys_run(name) {
|
|
977
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1037
978
|
const len0 = WASM_VECTOR_LEN;
|
|
1038
|
-
const ret = wasm.
|
|
1039
|
-
if (ret[
|
|
1040
|
-
throw takeFromExternrefTable0(ret[
|
|
979
|
+
const ret = wasm.wasmvm_sys_run(this.__wbg_ptr, ptr0, len0);
|
|
980
|
+
if (ret[2]) {
|
|
981
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1041
982
|
}
|
|
983
|
+
return ret[0] >>> 0;
|
|
1042
984
|
}
|
|
1043
985
|
/**
|
|
1044
|
-
* @param {
|
|
986
|
+
* @param {string} service
|
|
987
|
+
* @param {string} handler
|
|
988
|
+
* @param {Uint8Array} buffer
|
|
989
|
+
* @param {string | null | undefined} key
|
|
990
|
+
* @param {WasmHeader[]} headers
|
|
991
|
+
* @param {string | null} [idempotency_key]
|
|
992
|
+
* @param {string | null} [name]
|
|
993
|
+
* @returns {WasmCallHandle}
|
|
1045
994
|
*/
|
|
1046
|
-
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
|
|
995
|
+
sys_call(service, handler, buffer, key, headers, idempotency_key, name) {
|
|
996
|
+
const ptr0 = passStringToWasm0(service, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
997
|
+
const len0 = WASM_VECTOR_LEN;
|
|
998
|
+
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
999
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1000
|
+
const ptr2 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
1001
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1002
|
+
var ptr3 = isLikeNone(key) ? 0 : passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1003
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1004
|
+
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
1005
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1006
|
+
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1007
|
+
var len5 = WASM_VECTOR_LEN;
|
|
1008
|
+
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1009
|
+
var len6 = WASM_VECTOR_LEN;
|
|
1010
|
+
const ret = wasm.wasmvm_sys_call(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
1011
|
+
if (ret[2]) {
|
|
1012
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1050
1013
|
}
|
|
1014
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1051
1015
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* @param {string} service
|
|
1018
|
+
* @param {string} handler
|
|
1019
|
+
* @param {Uint8Array} buffer
|
|
1020
|
+
* @param {string | null | undefined} key
|
|
1021
|
+
* @param {WasmHeader[]} headers
|
|
1022
|
+
* @param {bigint | null} [delay]
|
|
1023
|
+
* @param {string | null} [idempotency_key]
|
|
1024
|
+
* @param {string | null} [name]
|
|
1025
|
+
* @returns {WasmSendHandle}
|
|
1026
|
+
*/
|
|
1027
|
+
sys_send(service, handler, buffer, key, headers, delay, idempotency_key, name) {
|
|
1028
|
+
const ptr0 = passStringToWasm0(service, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1029
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1030
|
+
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1031
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1032
|
+
const ptr2 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
1033
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1034
|
+
var ptr3 = isLikeNone(key) ? 0 : passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1035
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1036
|
+
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
1037
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1038
|
+
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1039
|
+
var len5 = WASM_VECTOR_LEN;
|
|
1040
|
+
var ptr6 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
+
var len6 = WASM_VECTOR_LEN;
|
|
1042
|
+
const ret = wasm.wasmvm_sys_send(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(delay), isLikeNone(delay) ? BigInt(0) : delay, ptr5, len5, ptr6, len6);
|
|
1043
|
+
if (ret[2]) {
|
|
1044
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1056
1045
|
}
|
|
1046
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1057
1047
|
}
|
|
1058
1048
|
/**
|
|
1059
|
-
* @returns {
|
|
1049
|
+
* @returns {WasmInput}
|
|
1060
1050
|
*/
|
|
1061
|
-
|
|
1062
|
-
const ret = wasm.
|
|
1063
|
-
|
|
1051
|
+
sys_input() {
|
|
1052
|
+
const ret = wasm.wasmvm_sys_input(this.__wbg_ptr);
|
|
1053
|
+
if (ret[2]) {
|
|
1054
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1055
|
+
}
|
|
1056
|
+
return WasmInput.__wrap(ret[0]);
|
|
1064
1057
|
}
|
|
1065
1058
|
/**
|
|
1059
|
+
* @param {bigint} millis
|
|
1060
|
+
* @param {string | null} [name]
|
|
1066
1061
|
* @returns {number}
|
|
1067
1062
|
*/
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1063
|
+
sys_sleep(millis, name) {
|
|
1064
|
+
var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1065
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1066
|
+
const ret = wasm.wasmvm_sys_sleep(this.__wbg_ptr, millis, ptr0, len0);
|
|
1067
|
+
if (ret[2]) {
|
|
1068
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1069
|
+
}
|
|
1070
|
+
return ret[0] >>> 0;
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
@@ -1094,7 +1094,7 @@ export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg
|
|
|
1094
1094
|
return ret;
|
|
1095
1095
|
}, arguments) };
|
|
1096
1096
|
|
|
1097
|
-
export function
|
|
1097
|
+
export function __wbg_crypto_86f2631e91b51511(arg0) {
|
|
1098
1098
|
const ret = arg0.crypto;
|
|
1099
1099
|
return ret;
|
|
1100
1100
|
};
|
|
@@ -1121,7 +1121,7 @@ export function __wbg_from_2a5d3e218e67aa85(arg0) {
|
|
|
1121
1121
|
return ret;
|
|
1122
1122
|
};
|
|
1123
1123
|
|
|
1124
|
-
export function
|
|
1124
|
+
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
1125
1125
|
arg0.getRandomValues(arg1);
|
|
1126
1126
|
}, arguments) };
|
|
1127
1127
|
|
|
@@ -1192,7 +1192,7 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
1192
1192
|
return ret;
|
|
1193
1193
|
};
|
|
1194
1194
|
|
|
1195
|
-
export function
|
|
1195
|
+
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
1196
1196
|
const ret = arg0.msCrypto;
|
|
1197
1197
|
return ret;
|
|
1198
1198
|
};
|
|
@@ -1247,7 +1247,7 @@ export function __wbg_next_6574e1a8a62d1055() { return handleError(function (arg
|
|
|
1247
1247
|
return ret;
|
|
1248
1248
|
}, arguments) };
|
|
1249
1249
|
|
|
1250
|
-
export function
|
|
1250
|
+
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1251
1251
|
const ret = arg0.node;
|
|
1252
1252
|
return ret;
|
|
1253
1253
|
};
|
|
@@ -1257,16 +1257,16 @@ export function __wbg_now_807e54c39636c349() {
|
|
|
1257
1257
|
return ret;
|
|
1258
1258
|
};
|
|
1259
1259
|
|
|
1260
|
-
export function
|
|
1260
|
+
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1261
1261
|
const ret = arg0.process;
|
|
1262
1262
|
return ret;
|
|
1263
1263
|
};
|
|
1264
1264
|
|
|
1265
|
-
export function
|
|
1265
|
+
export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
|
|
1266
1266
|
arg0.randomFillSync(arg1);
|
|
1267
1267
|
}, arguments) };
|
|
1268
1268
|
|
|
1269
|
-
export function
|
|
1269
|
+
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
1270
1270
|
const ret = module.require;
|
|
1271
1271
|
return ret;
|
|
1272
1272
|
}, arguments) };
|
|
@@ -1325,7 +1325,7 @@ export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
|
|
1325
1325
|
return ret;
|
|
1326
1326
|
};
|
|
1327
1327
|
|
|
1328
|
-
export function
|
|
1328
|
+
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
1329
1329
|
const ret = arg0.versions;
|
|
1330
1330
|
return ret;
|
|
1331
1331
|
};
|