@restatedev/restate-sdk-cloudflare-workers 1.10.2 → 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.d.cts +8 -0
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js.map +1 -1
- package/dist/context_impl.cjs +5 -2
- package/dist/context_impl.js +5 -2
- 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 -319
- 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/dist/types/rpc.cjs +4 -2
- package/dist/types/rpc.d.cts +8 -0
- package/dist/types/rpc.d.cts.map +1 -1
- package/dist/types/rpc.d.ts +8 -0
- package/dist/types/rpc.d.ts.map +1 -1
- package/dist/types/rpc.js +4 -2
- package/dist/types/rpc.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,153 +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
|
-
* @returns {WasmCallHandle}
|
|
703
|
+
* @returns {number}
|
|
803
704
|
*/
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
814
|
-
const len4 = WASM_VECTOR_LEN;
|
|
815
|
-
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
816
|
-
var len5 = WASM_VECTOR_LEN;
|
|
817
|
-
const ret = wasm.wasmvm_sys_call(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
|
|
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);
|
|
818
714
|
if (ret[2]) {
|
|
819
715
|
throw takeFromExternrefTable0(ret[1]);
|
|
820
716
|
}
|
|
821
|
-
return
|
|
717
|
+
return ret[0] >>> 0;
|
|
822
718
|
}
|
|
823
719
|
/**
|
|
824
|
-
* @
|
|
825
|
-
* @param {string} handler
|
|
826
|
-
* @param {Uint8Array} buffer
|
|
827
|
-
* @param {string | null | undefined} key
|
|
828
|
-
* @param {WasmHeader[]} headers
|
|
829
|
-
* @param {bigint | null} [delay]
|
|
830
|
-
* @param {string | null} [idempotency_key]
|
|
831
|
-
* @returns {WasmSendHandle}
|
|
720
|
+
* @returns {boolean}
|
|
832
721
|
*/
|
|
833
|
-
|
|
834
|
-
const
|
|
835
|
-
const len0 = WASM_VECTOR_LEN;
|
|
836
|
-
const ptr1 = passStringToWasm0(handler, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
837
|
-
const len1 = WASM_VECTOR_LEN;
|
|
838
|
-
const ptr2 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
839
|
-
const len2 = WASM_VECTOR_LEN;
|
|
840
|
-
var ptr3 = isLikeNone(key) ? 0 : passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
841
|
-
var len3 = WASM_VECTOR_LEN;
|
|
842
|
-
const ptr4 = passArrayJsValueToWasm0(headers, wasm.__wbindgen_malloc);
|
|
843
|
-
const len4 = WASM_VECTOR_LEN;
|
|
844
|
-
var ptr5 = isLikeNone(idempotency_key) ? 0 : passStringToWasm0(idempotency_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
845
|
-
var len5 = WASM_VECTOR_LEN;
|
|
846
|
-
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);
|
|
722
|
+
is_ready_to_execute() {
|
|
723
|
+
const ret = wasm.wasmvm_is_ready_to_execute(this.__wbg_ptr);
|
|
847
724
|
if (ret[2]) {
|
|
848
725
|
throw takeFromExternrefTable0(ret[1]);
|
|
849
726
|
}
|
|
850
|
-
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
|
+
}
|
|
851
737
|
}
|
|
852
738
|
/**
|
|
853
|
-
* @
|
|
739
|
+
* @param {string} invocation_id
|
|
740
|
+
* @returns {number}
|
|
854
741
|
*/
|
|
855
|
-
|
|
856
|
-
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);
|
|
857
746
|
if (ret[2]) {
|
|
858
747
|
throw takeFromExternrefTable0(ret[1]);
|
|
859
748
|
}
|
|
860
|
-
return
|
|
749
|
+
return ret[0] >>> 0;
|
|
861
750
|
}
|
|
862
751
|
/**
|
|
863
|
-
* @param {string}
|
|
864
|
-
* @param {Uint8Array} buffer
|
|
752
|
+
* @param {string} target_invocation_id
|
|
865
753
|
*/
|
|
866
|
-
|
|
867
|
-
const ptr0 = passStringToWasm0(
|
|
754
|
+
sys_cancel_invocation(target_invocation_id) {
|
|
755
|
+
const ptr0 = passStringToWasm0(target_invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
868
756
|
const len0 = WASM_VECTOR_LEN;
|
|
869
|
-
const
|
|
870
|
-
const len1 = WASM_VECTOR_LEN;
|
|
871
|
-
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);
|
|
872
758
|
if (ret[1]) {
|
|
873
759
|
throw takeFromExternrefTable0(ret[0]);
|
|
874
760
|
}
|
|
875
761
|
}
|
|
876
762
|
/**
|
|
877
|
-
* @param {string} id
|
|
878
763
|
* @param {WasmFailure} value
|
|
879
764
|
*/
|
|
880
|
-
|
|
881
|
-
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);
|
|
882
776
|
const len0 = WASM_VECTOR_LEN;
|
|
883
|
-
const ret = wasm.
|
|
777
|
+
const ret = wasm.wasmvm_sys_write_output_success(this.__wbg_ptr, ptr0, len0);
|
|
884
778
|
if (ret[1]) {
|
|
885
779
|
throw takeFromExternrefTable0(ret[0]);
|
|
886
780
|
}
|
|
887
781
|
}
|
|
888
782
|
/**
|
|
889
|
-
* @param {string}
|
|
783
|
+
* @param {string} invocation_id
|
|
890
784
|
* @returns {number}
|
|
891
785
|
*/
|
|
892
|
-
|
|
893
|
-
const ptr0 = passStringToWasm0(
|
|
786
|
+
sys_get_invocation_output(invocation_id) {
|
|
787
|
+
const ptr0 = passStringToWasm0(invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
894
788
|
const len0 = WASM_VECTOR_LEN;
|
|
895
|
-
const ret = wasm.
|
|
789
|
+
const ret = wasm.wasmvm_sys_get_invocation_output(this.__wbg_ptr, ptr0, len0);
|
|
896
790
|
if (ret[2]) {
|
|
897
791
|
throw takeFromExternrefTable0(ret[1]);
|
|
898
792
|
}
|
|
@@ -900,12 +794,13 @@ export class WasmVM {
|
|
|
900
794
|
}
|
|
901
795
|
/**
|
|
902
796
|
* @param {string} key
|
|
797
|
+
* @param {WasmFailure} value
|
|
903
798
|
* @returns {number}
|
|
904
799
|
*/
|
|
905
|
-
|
|
800
|
+
sys_complete_promise_failure(key, value) {
|
|
906
801
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
907
802
|
const len0 = WASM_VECTOR_LEN;
|
|
908
|
-
const ret = wasm.
|
|
803
|
+
const ret = wasm.wasmvm_sys_complete_promise_failure(this.__wbg_ptr, ptr0, len0, value);
|
|
909
804
|
if (ret[2]) {
|
|
910
805
|
throw takeFromExternrefTable0(ret[1]);
|
|
911
806
|
}
|
|
@@ -928,31 +823,26 @@ export class WasmVM {
|
|
|
928
823
|
return ret[0] >>> 0;
|
|
929
824
|
}
|
|
930
825
|
/**
|
|
931
|
-
* @param {string}
|
|
932
|
-
* @param {
|
|
933
|
-
* @
|
|
826
|
+
* @param {string} error_message
|
|
827
|
+
* @param {string | null | undefined} stacktrace
|
|
828
|
+
* @param {WasmCommandType} wasm_command_type
|
|
934
829
|
*/
|
|
935
|
-
|
|
936
|
-
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);
|
|
937
832
|
const len0 = WASM_VECTOR_LEN;
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
}
|
|
942
|
-
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);
|
|
943
836
|
}
|
|
944
837
|
/**
|
|
945
|
-
* @param {
|
|
946
|
-
* @
|
|
838
|
+
* @param {number} handle
|
|
839
|
+
* @param {WasmFailure} value
|
|
947
840
|
*/
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
if (ret[2]) {
|
|
953
|
-
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]);
|
|
954
845
|
}
|
|
955
|
-
return ret[0] >>> 0;
|
|
956
846
|
}
|
|
957
847
|
/**
|
|
958
848
|
* @param {number} handle
|
|
@@ -967,15 +857,76 @@ export class WasmVM {
|
|
|
967
857
|
}
|
|
968
858
|
}
|
|
969
859
|
/**
|
|
970
|
-
* @param {
|
|
860
|
+
* @param {string} id
|
|
971
861
|
* @param {WasmFailure} value
|
|
972
862
|
*/
|
|
973
|
-
|
|
974
|
-
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);
|
|
975
867
|
if (ret[1]) {
|
|
976
868
|
throw takeFromExternrefTable0(ret[0]);
|
|
977
869
|
}
|
|
978
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);
|
|
881
|
+
if (ret[1]) {
|
|
882
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
883
|
+
}
|
|
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
|
+
}
|
|
979
930
|
/**
|
|
980
931
|
* @param {number} handle
|
|
981
932
|
* @param {string} error_message
|
|
@@ -1012,56 +963,111 @@ export class WasmVM {
|
|
|
1012
963
|
throw takeFromExternrefTable0(ret[0]);
|
|
1013
964
|
}
|
|
1014
965
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
*/
|
|
1018
|
-
sys_cancel_invocation(target_invocation_id) {
|
|
1019
|
-
const ptr0 = passStringToWasm0(target_invocation_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1020
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1021
|
-
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);
|
|
1022
968
|
if (ret[1]) {
|
|
1023
969
|
throw takeFromExternrefTable0(ret[0]);
|
|
1024
970
|
}
|
|
1025
971
|
}
|
|
1026
972
|
/**
|
|
1027
|
-
* @param {
|
|
973
|
+
* @param {string} name
|
|
974
|
+
* @returns {number}
|
|
1028
975
|
*/
|
|
1029
|
-
|
|
1030
|
-
const ptr0 =
|
|
976
|
+
sys_run(name) {
|
|
977
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1031
978
|
const len0 = WASM_VECTOR_LEN;
|
|
1032
|
-
const ret = wasm.
|
|
1033
|
-
if (ret[
|
|
1034
|
-
throw takeFromExternrefTable0(ret[
|
|
979
|
+
const ret = wasm.wasmvm_sys_run(this.__wbg_ptr, ptr0, len0);
|
|
980
|
+
if (ret[2]) {
|
|
981
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1035
982
|
}
|
|
983
|
+
return ret[0] >>> 0;
|
|
1036
984
|
}
|
|
1037
985
|
/**
|
|
1038
|
-
* @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}
|
|
1039
994
|
*/
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
|
|
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]);
|
|
1044
1013
|
}
|
|
1014
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1045
1015
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
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]);
|
|
1050
1045
|
}
|
|
1046
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1051
1047
|
}
|
|
1052
1048
|
/**
|
|
1053
|
-
* @returns {
|
|
1049
|
+
* @returns {WasmInput}
|
|
1054
1050
|
*/
|
|
1055
|
-
|
|
1056
|
-
const ret = wasm.
|
|
1057
|
-
|
|
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]);
|
|
1058
1057
|
}
|
|
1059
1058
|
/**
|
|
1059
|
+
* @param {bigint} millis
|
|
1060
|
+
* @param {string | null} [name]
|
|
1060
1061
|
* @returns {number}
|
|
1061
1062
|
*/
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
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;
|
|
1065
1071
|
}
|
|
1066
1072
|
}
|
|
1067
1073
|
|
|
@@ -1088,7 +1094,7 @@ export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg
|
|
|
1088
1094
|
return ret;
|
|
1089
1095
|
}, arguments) };
|
|
1090
1096
|
|
|
1091
|
-
export function
|
|
1097
|
+
export function __wbg_crypto_86f2631e91b51511(arg0) {
|
|
1092
1098
|
const ret = arg0.crypto;
|
|
1093
1099
|
return ret;
|
|
1094
1100
|
};
|
|
@@ -1115,7 +1121,7 @@ export function __wbg_from_2a5d3e218e67aa85(arg0) {
|
|
|
1115
1121
|
return ret;
|
|
1116
1122
|
};
|
|
1117
1123
|
|
|
1118
|
-
export function
|
|
1124
|
+
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
1119
1125
|
arg0.getRandomValues(arg1);
|
|
1120
1126
|
}, arguments) };
|
|
1121
1127
|
|
|
@@ -1186,7 +1192,7 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
1186
1192
|
return ret;
|
|
1187
1193
|
};
|
|
1188
1194
|
|
|
1189
|
-
export function
|
|
1195
|
+
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
1190
1196
|
const ret = arg0.msCrypto;
|
|
1191
1197
|
return ret;
|
|
1192
1198
|
};
|
|
@@ -1241,7 +1247,7 @@ export function __wbg_next_6574e1a8a62d1055() { return handleError(function (arg
|
|
|
1241
1247
|
return ret;
|
|
1242
1248
|
}, arguments) };
|
|
1243
1249
|
|
|
1244
|
-
export function
|
|
1250
|
+
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1245
1251
|
const ret = arg0.node;
|
|
1246
1252
|
return ret;
|
|
1247
1253
|
};
|
|
@@ -1251,16 +1257,16 @@ export function __wbg_now_807e54c39636c349() {
|
|
|
1251
1257
|
return ret;
|
|
1252
1258
|
};
|
|
1253
1259
|
|
|
1254
|
-
export function
|
|
1260
|
+
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1255
1261
|
const ret = arg0.process;
|
|
1256
1262
|
return ret;
|
|
1257
1263
|
};
|
|
1258
1264
|
|
|
1259
|
-
export function
|
|
1265
|
+
export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
|
|
1260
1266
|
arg0.randomFillSync(arg1);
|
|
1261
1267
|
}, arguments) };
|
|
1262
1268
|
|
|
1263
|
-
export function
|
|
1269
|
+
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
1264
1270
|
const ret = module.require;
|
|
1265
1271
|
return ret;
|
|
1266
1272
|
}, arguments) };
|
|
@@ -1319,7 +1325,7 @@ export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
|
|
1319
1325
|
return ret;
|
|
1320
1326
|
};
|
|
1321
1327
|
|
|
1322
|
-
export function
|
|
1328
|
+
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
1323
1329
|
const ret = arg0.versions;
|
|
1324
1330
|
return ret;
|
|
1325
1331
|
};
|