@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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Setups the WASM module
|
|
5
|
-
*/
|
|
6
|
-
export function start(): void;
|
|
7
3
|
/**
|
|
8
4
|
* This will set the log level of the overall log subscriber.
|
|
9
5
|
*/
|
|
10
6
|
export function set_log_level(level: LogLevel): void;
|
|
11
7
|
export function cancel_handle(): number;
|
|
8
|
+
/**
|
|
9
|
+
* Setups the WASM module
|
|
10
|
+
*/
|
|
11
|
+
export function start(): void;
|
|
12
12
|
export enum LogLevel {
|
|
13
13
|
TRACE = 0,
|
|
14
14
|
DEBUG = 1,
|
|
@@ -37,17 +37,6 @@ export enum WasmCommandType {
|
|
|
37
37
|
CompleteAwakeable = 17,
|
|
38
38
|
CancelInvocation = 18,
|
|
39
39
|
}
|
|
40
|
-
export interface WasmFailureMetadata {
|
|
41
|
-
key: string;
|
|
42
|
-
value: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface WasmFailure {
|
|
46
|
-
code: number;
|
|
47
|
-
message: string;
|
|
48
|
-
metadata: WasmFailureMetadata[];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
40
|
export interface WasmExponentialRetryConfig {
|
|
52
41
|
initial_interval: number | undefined;
|
|
53
42
|
factor: number;
|
|
@@ -56,12 +45,25 @@ export interface WasmExponentialRetryConfig {
|
|
|
56
45
|
max_duration: number | undefined;
|
|
57
46
|
}
|
|
58
47
|
|
|
48
|
+
export interface WasmSendHandle {
|
|
49
|
+
invocation_id_completion_id: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
59
52
|
export interface WasmAwakeable {
|
|
60
53
|
id: string;
|
|
61
54
|
handle: number;
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
export
|
|
57
|
+
export interface WasmFailure {
|
|
58
|
+
code: number;
|
|
59
|
+
message: string;
|
|
60
|
+
metadata: WasmFailureMetadata[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface WasmFailureMetadata {
|
|
64
|
+
key: string;
|
|
65
|
+
value: string;
|
|
66
|
+
}
|
|
65
67
|
|
|
66
68
|
export type WasmDoProgressResult = "AnyCompleted" | "ReadFromInput" | "WaitingPendingRun" | { ExecuteRun: number } | "CancelSignalReceived";
|
|
67
69
|
|
|
@@ -70,9 +72,7 @@ export interface WasmCallHandle {
|
|
|
70
72
|
call_completion_id: number;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
export
|
|
74
|
-
invocation_id_completion_id: number;
|
|
75
|
-
}
|
|
75
|
+
export type WasmAsyncResultValue = "NotReady" | "Empty" | { Success: Uint8Array } | { Failure: WasmFailure } | { StateKeys: string[] } | { InvocationId: string };
|
|
76
76
|
|
|
77
77
|
export class WasmHeader {
|
|
78
78
|
free(): void;
|
|
@@ -82,8 +82,8 @@ export class WasmHeader {
|
|
|
82
82
|
}
|
|
83
83
|
export class WasmIdentityVerifier {
|
|
84
84
|
free(): void;
|
|
85
|
-
constructor(keys: string[]);
|
|
86
85
|
verify_identity(path: string, headers: WasmHeader[]): void;
|
|
86
|
+
constructor(keys: string[]);
|
|
87
87
|
}
|
|
88
88
|
export class WasmInput {
|
|
89
89
|
private constructor();
|
|
@@ -102,46 +102,46 @@ export class WasmResponseHead {
|
|
|
102
102
|
}
|
|
103
103
|
export class WasmVM {
|
|
104
104
|
free(): void;
|
|
105
|
-
|
|
106
|
-
get_response_head(): WasmResponseHead;
|
|
107
|
-
notify_input(buffer: Uint8Array): void;
|
|
108
|
-
notify_input_closed(): void;
|
|
109
|
-
notify_error(error_message: string, stacktrace?: string | null): void;
|
|
110
|
-
notify_error_with_delay_override(error_message: string, stacktrace?: string | null, delay_override?: bigint | null): void;
|
|
111
|
-
notify_error_for_next_command(error_message: string, stacktrace: string | null | undefined, wasm_command_type: WasmCommandType): void;
|
|
112
|
-
notify_error_for_specific_command(error_message: string, stacktrace: string | null | undefined, wasm_command_type: WasmCommandType, command_index: number, command_name?: string | null): void;
|
|
105
|
+
do_progress(handles: Uint32Array): WasmDoProgressResult;
|
|
113
106
|
take_output(): any;
|
|
114
|
-
is_ready_to_execute(): boolean;
|
|
115
107
|
is_completed(handle: number): boolean;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
notify_error(error_message: string, stacktrace?: string | null): void;
|
|
109
|
+
notify_input(buffer: Uint8Array): void;
|
|
110
|
+
is_processing(): boolean;
|
|
111
|
+
sys_awakeable(): WasmAwakeable;
|
|
119
112
|
sys_get_state(key: string): number;
|
|
120
|
-
sys_get_state_keys(): number;
|
|
121
113
|
sys_set_state(key: string, buffer: Uint8Array): void;
|
|
122
114
|
sys_clear_state(key: string): void;
|
|
115
|
+
sys_get_promise(key: string): number;
|
|
116
|
+
sys_peek_promise(key: string): number;
|
|
117
|
+
get_response_head(): WasmResponseHead;
|
|
118
|
+
take_notification(handle: number): WasmAsyncResultValue;
|
|
119
|
+
last_command_index(): number;
|
|
120
|
+
sys_get_state_keys(): number;
|
|
121
|
+
is_ready_to_execute(): boolean;
|
|
122
|
+
notify_input_closed(): void;
|
|
123
123
|
sys_clear_all_state(): void;
|
|
124
|
-
sys_sleep(millis: bigint, name?: string | null): number;
|
|
125
124
|
sys_attach_invocation(invocation_id: string): number;
|
|
125
|
+
sys_cancel_invocation(target_invocation_id: string): void;
|
|
126
|
+
sys_write_output_failure(value: WasmFailure): void;
|
|
127
|
+
sys_write_output_success(buffer: Uint8Array): void;
|
|
126
128
|
sys_get_invocation_output(invocation_id: string): number;
|
|
127
|
-
sys_call(service: string, handler: string, buffer: Uint8Array, key: string | null | undefined, headers: WasmHeader[], idempotency_key?: string | null, name?: string | null): WasmCallHandle;
|
|
128
|
-
sys_send(service: string, handler: string, buffer: Uint8Array, key: string | null | undefined, headers: WasmHeader[], delay?: bigint | null, idempotency_key?: string | null, name?: string | null): WasmSendHandle;
|
|
129
|
-
sys_awakeable(): WasmAwakeable;
|
|
130
|
-
sys_complete_awakeable_success(id: string, buffer: Uint8Array): void;
|
|
131
|
-
sys_complete_awakeable_failure(id: string, value: WasmFailure): void;
|
|
132
|
-
sys_get_promise(key: string): number;
|
|
133
|
-
sys_peek_promise(key: string): number;
|
|
134
|
-
sys_complete_promise_success(key: string, buffer: Uint8Array): number;
|
|
135
129
|
sys_complete_promise_failure(key: string, value: WasmFailure): number;
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
sys_complete_promise_success(key: string, buffer: Uint8Array): number;
|
|
131
|
+
notify_error_for_next_command(error_message: string, stacktrace: string | null | undefined, wasm_command_type: WasmCommandType): void;
|
|
138
132
|
propose_run_completion_failure(handle: number, value: WasmFailure): void;
|
|
133
|
+
propose_run_completion_success(handle: number, buffer: Uint8Array): void;
|
|
134
|
+
sys_complete_awakeable_failure(id: string, value: WasmFailure): void;
|
|
135
|
+
sys_complete_awakeable_success(id: string, buffer: Uint8Array): void;
|
|
136
|
+
notify_error_with_delay_override(error_message: string, stacktrace?: string | null, delay_override?: bigint | null): void;
|
|
137
|
+
notify_error_for_specific_command(error_message: string, stacktrace: string | null | undefined, wasm_command_type: WasmCommandType, command_index: number, command_name?: string | null): void;
|
|
138
|
+
constructor(headers: WasmHeader[], log_level: LogLevel, logger_id: number, disable_payload_checks: boolean);
|
|
139
139
|
propose_run_completion_failure_transient(handle: number, error_message: string, error_stacktrace: string | null | undefined, attempt_duration: bigint, config?: WasmExponentialRetryConfig | null): void;
|
|
140
140
|
propose_run_completion_failure_transient_with_delay_override(handle: number, error_message: string, error_stacktrace: string | null | undefined, attempt_duration: bigint, delay_override?: bigint | null, max_retry_attempts_override?: number | null, max_retry_duration_override?: bigint | null): void;
|
|
141
|
-
sys_cancel_invocation(target_invocation_id: string): void;
|
|
142
|
-
sys_write_output_success(buffer: Uint8Array): void;
|
|
143
|
-
sys_write_output_failure(value: WasmFailure): void;
|
|
144
141
|
sys_end(): void;
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
sys_run(name: string): number;
|
|
143
|
+
sys_call(service: string, handler: string, buffer: Uint8Array, key: string | null | undefined, headers: WasmHeader[], idempotency_key?: string | null, name?: string | null): WasmCallHandle;
|
|
144
|
+
sys_send(service: string, handler: string, buffer: Uint8Array, key: string | null | undefined, headers: WasmHeader[], delay?: bigint | null, idempotency_key?: string | null, name?: string | null): WasmSendHandle;
|
|
145
|
+
sys_input(): WasmInput;
|
|
146
|
+
sys_sleep(millis: bigint, name?: string | null): number;
|
|
147
147
|
}
|