@restatedev/restate-sdk 1.17.3 → 1.18.0
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/common_api.d.cts +2 -2
- package/dist/common_api.d.cts.map +1 -1
- package/dist/common_api.d.ts +2 -2
- package/dist/common_api.d.ts.map +1 -1
- package/dist/common_api.js.map +1 -1
- package/dist/context.d.cts +25 -8
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +25 -8
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js.map +1 -1
- package/dist/context_impl.cjs +10 -10
- package/dist/context_impl.js +10 -10
- package/dist/context_impl.js.map +1 -1
- package/dist/endpoint/components.cjs +39 -7
- package/dist/endpoint/components.js +39 -8
- package/dist/endpoint/components.js.map +1 -1
- package/dist/endpoint/handlers/discovery.cjs +12 -2
- package/dist/endpoint/handlers/discovery.js +12 -2
- package/dist/endpoint/handlers/discovery.js.map +1 -1
- package/dist/endpoint/handlers/generic.cjs +1 -1
- package/dist/endpoint/handlers/generic.js +1 -1
- package/dist/endpoint/handlers/generic.js.map +1 -1
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.cjs +31 -13
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.js +31 -13
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.js.map +1 -1
- package/dist/fetch.d.cts +3 -3
- package/dist/fetch.d.ts +3 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/internal.cjs +27 -0
- package/dist/internal.d.cts +30 -1
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.ts +30 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +27 -0
- package/dist/internal.js.map +1 -1
- package/dist/lambda.d.cts +3 -3
- package/dist/lambda.d.ts +3 -3
- package/dist/node.d.cts +3 -3
- package/dist/node.d.ts +3 -3
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/types/errors.cjs +4 -2
- package/dist/types/errors.d.cts.map +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +4 -2
- package/dist/types/errors.js.map +1 -1
- package/dist/types/rpc.d.cts +45 -28
- package/dist/types/rpc.d.cts.map +1 -1
- package/dist/types/rpc.d.ts +45 -28
- package/dist/types/rpc.d.ts.map +1 -1
- package/dist/types/rpc.js.map +1 -1
- package/package.json +2 -2
- package/dist/context_impl.d.ts.map +0 -1
- package/dist/endpoint/components.d.ts.map +0 -1
- package/dist/endpoint/discovery.d.ts +0 -184
- package/dist/endpoint/discovery.d.ts.map +0 -1
- package/dist/endpoint/discovery.js +0 -7
- package/dist/endpoint/discovery.js.map +0 -1
- package/dist/endpoint/endpoint.d.ts.map +0 -1
- package/dist/endpoint/handlers/core_logging.d.ts +0 -14
- package/dist/endpoint/handlers/core_logging.d.ts.map +0 -1
- package/dist/endpoint/handlers/discovery.d.ts +0 -5
- package/dist/endpoint/handlers/discovery.d.ts.map +0 -1
- package/dist/endpoint/handlers/fetch.d.ts +0 -5
- package/dist/endpoint/handlers/fetch.d.ts.map +0 -1
- package/dist/endpoint/handlers/generic.d.ts +0 -5
- package/dist/endpoint/handlers/generic.d.ts.map +0 -1
- package/dist/endpoint/handlers/lambda.d.ts +0 -10
- package/dist/endpoint/handlers/lambda.d.ts.map +0 -1
- package/dist/endpoint/handlers/preview.d.ts +0 -5
- package/dist/endpoint/handlers/preview.d.ts.map +0 -1
- package/dist/endpoint/handlers/types.d.ts.map +0 -1
- package/dist/endpoint/handlers/types.js +0 -2
- package/dist/endpoint/handlers/types.js.map +0 -1
- package/dist/endpoint/handlers/utils.d.ts +0 -23
- package/dist/endpoint/handlers/utils.d.ts.map +0 -1
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts +0 -446
- package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts.map +0 -1
- package/dist/endpoint/node_endpoint.d.ts +0 -28
- package/dist/endpoint/node_endpoint.d.ts.map +0 -1
- package/dist/endpoint/types.js +0 -2
- package/dist/endpoint/types.js.map +0 -1
- package/dist/endpoint/withOptions.d.ts +0 -4
- package/dist/endpoint/withOptions.d.ts.map +0 -1
- package/dist/endpoint.js +0 -12
- package/dist/endpoint.js.map +0 -1
- package/dist/error_sanitization.d.ts +0 -13
- package/dist/error_sanitization.d.ts.map +0 -1
- package/dist/hooks.js +0 -2
- package/dist/hooks.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/io.d.ts.map +0 -1
- package/dist/logging/console_logger_transport.d.ts +0 -5
- package/dist/logging/console_logger_transport.d.ts.map +0 -1
- package/dist/logging/logger.d.ts.map +0 -1
- package/dist/user_agent.d.ts +0 -2
- package/dist/user_agent.d.ts.map +0 -1
- package/dist/utils/external_progress_channel.d.ts +0 -19
- package/dist/utils/external_progress_channel.d.ts.map +0 -1
- package/dist/utils/rand.d.ts +0 -13
- package/dist/utils/rand.d.ts.map +0 -1
package/dist/fetch.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request as Request$1, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request as Request$1, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
|
|
7
7
|
import { internal_d_exports } from "./internal.cjs";
|
|
@@ -52,5 +52,5 @@ interface FetchEndpointOptions extends EndpointOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
declare function createEndpointHandler(options: FetchEndpointOptions): (request: Request, ...extraArgs: unknown[]) => Promise<Response>;
|
|
54
54
|
//#endregion
|
|
55
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, type FetchEndpoint, FetchEndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request$1 as Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
55
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, type FetchEndpoint, FetchEndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request$1 as Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
56
56
|
//# sourceMappingURL=fetch.d.cts.map
|
package/dist/fetch.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request as Request$1, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request as Request$1, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
|
|
7
7
|
import { internal_d_exports } from "./internal.js";
|
|
@@ -52,5 +52,5 @@ interface FetchEndpointOptions extends EndpointOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
declare function createEndpointHandler(options: FetchEndpointOptions): (request: Request, ...extraArgs: unknown[]) => Promise<Response>;
|
|
54
54
|
//#endregion
|
|
55
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, type FetchEndpoint, FetchEndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request$1 as Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
55
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, type FetchEndpoint, FetchEndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request$1 as Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
56
56
|
//# sourceMappingURL=fetch.d.ts.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
|
|
7
7
|
import { internal_d_exports } from "./internal.cjs";
|
|
@@ -10,4 +10,4 @@ import { FnOf, ObjectImplHandlers, ObjectPerHandlerOpts, ServiceImplHandlers, Se
|
|
|
10
10
|
import { EndpointOptions } from "./endpoint/types.cjs";
|
|
11
11
|
import { CombineablePromise, Descriptor, DescriptorOpts, Duration, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, JournalValueCodec, ObjectDescriptor, ObjectHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceInterface, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowSharedHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, iface, serde } from "./common_api.cjs";
|
|
12
12
|
import { NodeEndpointOptions, ServeOptions, createEndpointHandler, endpoint, serve } from "./node.cjs";
|
|
13
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
13
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
|
|
7
7
|
import { internal_d_exports } from "./internal.js";
|
|
@@ -10,4 +10,4 @@ import { FnOf, ObjectImplHandlers, ObjectPerHandlerOpts, ServiceImplHandlers, Se
|
|
|
10
10
|
import { EndpointOptions } from "./endpoint/types.js";
|
|
11
11
|
import { CombineablePromise, Descriptor, DescriptorOpts, Duration, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, JournalValueCodec, ObjectDescriptor, ObjectHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceInterface, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowSharedHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, iface, serde } from "./common_api.js";
|
|
12
12
|
import { NodeEndpointOptions, ServeOptions, createEndpointHandler, endpoint, serve } from "./node.js";
|
|
13
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
13
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
package/dist/internal.cjs
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_errors = require('./types/errors.cjs');
|
|
3
|
+
const require_components = require('./endpoint/components.cjs');
|
|
3
4
|
|
|
4
5
|
//#region src/internal.ts
|
|
5
6
|
var internal_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
6
7
|
asInternal: () => asInternal,
|
|
8
|
+
explicitRecovery: () => explicitRecovery,
|
|
7
9
|
isSuspendedError: () => require_errors.isSuspendedError
|
|
8
10
|
});
|
|
9
11
|
/**
|
|
12
|
+
* Run the handlers with explicit recovery: a retried or resumed invocation doesn't replay the journal of its earlier attempts,
|
|
13
|
+
* but runs the handler again from the start, executing every context operation anew, e.g. reading the current state.
|
|
14
|
+
*
|
|
15
|
+
* The handler takes care of recovering from the effects of the earlier attempts, which might repeat (at least once):
|
|
16
|
+
* * Each attempt's calls and sends are new requests. To reach the invocation an earlier attempt started, give it an idempotency key that is the same on every attempt, such as one made from `ctx.request().id`.
|
|
17
|
+
* * `ctx.run` executes its action again on every attempt.
|
|
18
|
+
* * Awakeables are not supported.
|
|
19
|
+
*
|
|
20
|
+
* Spread the returned options into the service or handler options. Handler options take precedence over service options.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const counter = restate.object({
|
|
25
|
+
* name: "counter",
|
|
26
|
+
* handlers: { ... },
|
|
27
|
+
* options: { ...restate.internal.explicitRecovery() },
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @experimental
|
|
32
|
+
*/
|
|
33
|
+
function explicitRecovery() {
|
|
34
|
+
return { [require_components.EXPLICIT_RECOVERY]: true };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
10
37
|
* Downcast the given context to {@link ContextInternal}, to access the internal APIs.
|
|
11
38
|
*
|
|
12
39
|
* Works with every context type passed to handlers, e.g. `Context`, `ObjectContext`, `ObjectSharedContext`, `WorkflowContext`.
|
package/dist/internal.d.cts
CHANGED
|
@@ -4,8 +4,37 @@ import { Serde } from "@restatedev/restate-sdk-core";
|
|
|
4
4
|
|
|
5
5
|
//#region src/internal.d.ts
|
|
6
6
|
declare namespace internal_d_exports {
|
|
7
|
-
export { ContextInternal, GetProjectOptions, asInternal, isSuspendedError };
|
|
7
|
+
export { ContextInternal, ExplicitRecoveryOptions, GetProjectOptions, asInternal, explicitRecovery, isSuspendedError };
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Options set by {@link explicitRecovery}, to spread into the options of a service, virtual object, workflow or handler.
|
|
11
|
+
*
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
type ExplicitRecoveryOptions = Record<never, never>;
|
|
15
|
+
/**
|
|
16
|
+
* Run the handlers with explicit recovery: a retried or resumed invocation doesn't replay the journal of its earlier attempts,
|
|
17
|
+
* but runs the handler again from the start, executing every context operation anew, e.g. reading the current state.
|
|
18
|
+
*
|
|
19
|
+
* The handler takes care of recovering from the effects of the earlier attempts, which might repeat (at least once):
|
|
20
|
+
* * Each attempt's calls and sends are new requests. To reach the invocation an earlier attempt started, give it an idempotency key that is the same on every attempt, such as one made from `ctx.request().id`.
|
|
21
|
+
* * `ctx.run` executes its action again on every attempt.
|
|
22
|
+
* * Awakeables are not supported.
|
|
23
|
+
*
|
|
24
|
+
* Spread the returned options into the service or handler options. Handler options take precedence over service options.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const counter = restate.object({
|
|
29
|
+
* name: "counter",
|
|
30
|
+
* handlers: { ... },
|
|
31
|
+
* options: { ...restate.internal.explicitRecovery() },
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
declare function explicitRecovery(): ExplicitRecoveryOptions;
|
|
9
38
|
/**
|
|
10
39
|
* Downcast the given context to {@link ContextInternal}, to access the internal APIs.
|
|
11
40
|
*
|
package/dist/internal.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.cts","names":[],"sources":["../src/internal.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.cts","names":[],"sources":["../src/internal.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAWY,uBAAA,GAA0B;;;;;;AAAtC;AAwBA;AAiBA;AAWA;;;;;;;;;;;;;;AAAgD,iBA5BhC,gBAAA,CAAA,CA4BgC,EA5BZ,uBA4BY;AAuJhD;;;;;;;;;;;;iBAlKgB,UAAA,MAAgB,UAAU;;;;;;;;UAWzB,eAAA,SAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgGvB;;;;;;;;;;yBAWO,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAkChB,kBAAkB,UAAU,QAAQ,oBAC9C,kBAAkB,QAAQ,WACnC,eAAe;;;;;;;KAQR;;;;UAIF,MAAM;;;;;;;gBAQA,MAAM"}
|
package/dist/internal.d.ts
CHANGED
|
@@ -4,8 +4,37 @@ import { Serde } from "@restatedev/restate-sdk-core";
|
|
|
4
4
|
|
|
5
5
|
//#region src/internal.d.ts
|
|
6
6
|
declare namespace internal_d_exports {
|
|
7
|
-
export { ContextInternal, GetProjectOptions, asInternal, isSuspendedError };
|
|
7
|
+
export { ContextInternal, ExplicitRecoveryOptions, GetProjectOptions, asInternal, explicitRecovery, isSuspendedError };
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Options set by {@link explicitRecovery}, to spread into the options of a service, virtual object, workflow or handler.
|
|
11
|
+
*
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
type ExplicitRecoveryOptions = Record<never, never>;
|
|
15
|
+
/**
|
|
16
|
+
* Run the handlers with explicit recovery: a retried or resumed invocation doesn't replay the journal of its earlier attempts,
|
|
17
|
+
* but runs the handler again from the start, executing every context operation anew, e.g. reading the current state.
|
|
18
|
+
*
|
|
19
|
+
* The handler takes care of recovering from the effects of the earlier attempts, which might repeat (at least once):
|
|
20
|
+
* * Each attempt's calls and sends are new requests. To reach the invocation an earlier attempt started, give it an idempotency key that is the same on every attempt, such as one made from `ctx.request().id`.
|
|
21
|
+
* * `ctx.run` executes its action again on every attempt.
|
|
22
|
+
* * Awakeables are not supported.
|
|
23
|
+
*
|
|
24
|
+
* Spread the returned options into the service or handler options. Handler options take precedence over service options.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const counter = restate.object({
|
|
29
|
+
* name: "counter",
|
|
30
|
+
* handlers: { ... },
|
|
31
|
+
* options: { ...restate.internal.explicitRecovery() },
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
declare function explicitRecovery(): ExplicitRecoveryOptions;
|
|
9
38
|
/**
|
|
10
39
|
* Downcast the given context to {@link ContextInternal}, to access the internal APIs.
|
|
11
40
|
*
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/internal.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","names":[],"sources":["../src/internal.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAWY,uBAAA,GAA0B;;;;;;AAAtC;AAwBA;AAiBA;AAWA;;;;;;;;;;;;;;AAAgD,iBA5BhC,gBAAA,CAAA,CA4BgC,EA5BZ,uBA4BY;AAuJhD;;;;;;;;;;;;iBAlKgB,UAAA,MAAgB,UAAU;;;;;;;;UAWzB,eAAA,SAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgGvB;;;;;;;;;;yBAWO,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAkChB,kBAAkB,UAAU,QAAQ,oBAC9C,kBAAkB,QAAQ,WACnC,eAAe;;;;;;;KAQR;;;;UAIF,MAAM;;;;;;;gBAQA,MAAM"}
|
package/dist/internal.js
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
import { __export } from "./_virtual/rolldown_runtime.js";
|
|
2
2
|
import { isSuspendedError } from "./types/errors.js";
|
|
3
|
+
import { EXPLICIT_RECOVERY } from "./endpoint/components.js";
|
|
3
4
|
|
|
4
5
|
//#region src/internal.ts
|
|
5
6
|
var internal_exports = /* @__PURE__ */ __export({
|
|
6
7
|
asInternal: () => asInternal,
|
|
8
|
+
explicitRecovery: () => explicitRecovery,
|
|
7
9
|
isSuspendedError: () => isSuspendedError
|
|
8
10
|
});
|
|
9
11
|
/**
|
|
12
|
+
* Run the handlers with explicit recovery: a retried or resumed invocation doesn't replay the journal of its earlier attempts,
|
|
13
|
+
* but runs the handler again from the start, executing every context operation anew, e.g. reading the current state.
|
|
14
|
+
*
|
|
15
|
+
* The handler takes care of recovering from the effects of the earlier attempts, which might repeat (at least once):
|
|
16
|
+
* * Each attempt's calls and sends are new requests. To reach the invocation an earlier attempt started, give it an idempotency key that is the same on every attempt, such as one made from `ctx.request().id`.
|
|
17
|
+
* * `ctx.run` executes its action again on every attempt.
|
|
18
|
+
* * Awakeables are not supported.
|
|
19
|
+
*
|
|
20
|
+
* Spread the returned options into the service or handler options. Handler options take precedence over service options.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const counter = restate.object({
|
|
25
|
+
* name: "counter",
|
|
26
|
+
* handlers: { ... },
|
|
27
|
+
* options: { ...restate.internal.explicitRecovery() },
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @experimental
|
|
32
|
+
*/
|
|
33
|
+
function explicitRecovery() {
|
|
34
|
+
return { [EXPLICIT_RECOVERY]: true };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
10
37
|
* Downcast the given context to {@link ContextInternal}, to access the internal APIs.
|
|
11
38
|
*
|
|
12
39
|
* Works with every context type passed to handlers, e.g. `Context`, `ObjectContext`, `ObjectSharedContext`, `WorkflowContext`.
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","names":[],"sources":["../src/internal.ts"],"sourcesContent":["import { Context, InvocationId, RestatePromise } from \"./context.js\";\nimport type { Serde } from \"@restatedev/restate-sdk-core\";\n\nexport { isSuspendedError } from \"./types/errors.js\";\n\n/**\n * Downcast the given context to {@link ContextInternal}, to access the internal APIs.\n *\n * Works with every context type passed to handlers, e.g. `Context`, `ObjectContext`, `ObjectSharedContext`, `WorkflowContext`.\n *\n * @example\n * ```ts\n * const ctxInternal = restate.internal.asInternal(ctx);\n * ```\n *\n * @experimental\n */\nexport function asInternal(ctx: Context): ContextInternal {\n return ctx as ContextInternal;\n}\n\n/**\n * Internal {@link Context} interface exposing additional features.\n *\n * Please note that this API is to be considered experimental and might change without notice.\n *\n * @experimental\n */\nexport interface ContextInternal extends Context {\n /**\n * Returns true if the handler is in the processing phase.\n * This is the mechanism used by `ctx.console` to distinguish whether we should log or not in replaying/processing.\n *\n * **WARNING**: This method should not be used to influence control flow, as it will **surely** lead to non-determinism errors!\n *\n * @experimental\n */\n isProcessing(): boolean;\n\n /**\n * Returns a {@link RestatePromise} that resolves with `undefined` when Restate signals cancellation\n * of the current invocation.\n *\n * This method **MUST** only be used when the handler (or its parent service/endpoint) is configured\n * with `explicitCancellation: true`. Without configuring this option, cancellations are propagated automatically,\n * and this promise will **NEVER** resolve.\n *\n * **Promise reuse:** calling this method multiple times returns the **same** promise instance as long as\n * the current cancellation signal has not yet arrived. Once the promise resolves (cancellation received),\n * later calls return a **new** promise that will resolve on the next cancellation signal.\n *\n * @example Race a long-running side effect against cancellation\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const result = await RestatePromise.race([\n * ctx.run(() => longRunningTask(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Cancelled\") }),\n * ]);\n * return result;\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @example Use the cancellation promise to create an AbortSignal for ctx.run\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const controller = new AbortController();\n * const cancellation = ctxInternal.cancellation()\n * .map(() => {\n * controller.abort();\n * throw new restate.TerminalError(\"Cancelled\");\n * });\n *\n * return RestatePromise.race([\n * ctx.run(() => fetch(`https://api.example.com/greet/${name}`, { signal: controller.signal })),\n * cancellation,\n * ]);\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @example Handle cancellation, perform cleanup, then listen for the next cancellation\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * try {\n * return await RestatePromise.race([\n * ctx.run(() => longRunningTask(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Cancelled\") }),\n * ]);\n * } catch (e) {\n * // Perform cleanup\n * await ctx.run(() => cleanupResources(name));\n *\n * // After cancellation is resolved, ctx.cancellation() returns a fresh promise.\n * // Race cleanup confirmation against the next cancellation signal.\n * await RestatePromise.race([\n * ctx.run(() => confirmCleanup(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Canceled during cleanup\") }),\n * ]);\n * }\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @experimental\n */\n cancellation(): RestatePromise<void>;\n\n /**\n * Cancel all previous calls made from this handler.\n *\n * This method **MUST** only be used when the handler (or its parent service/endpoint) is configured\n * with `explicitCancellation: true`. Without configuring this option, this operation will always be a no-op.\n *\n * @return the invocation id of the canceled calls.\n * @experimental\n */\n cancelPreviousCalls(): RestatePromise<InvocationId[]>;\n\n /**\n * Get state from the Restate runtime, apply the given `projection` to it,\n * and record in the journal only the result of the projection.\n *\n * Use this to read big state values when you need only a small part of them:\n * unlike `ctx.get`, the complete state value is not recorded in the journal,\n * only its projection.\n *\n * It will appear in the UI as run(project:state_key).\n *\n * This method **MUST** only be used within Virtual Object and Workflow handlers.\n *\n * **NOTE:** Requires Restate >= 1.8 with service protocol V8 enabled, and **does not** work with request/response protocol mode (e.g. with AWS Lambda).\n *\n * @param name key of the state to retrieve\n * @param projection function receiving the state value, or `null` if the state is empty.\n * @param options serde for the state value, and serde for the projection result.\n * @returns a {@link RestatePromise} resolved with the result of the projection.\n *\n * @example\n * ```ts\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const itemsCount = await ctxInternal.getProject<Item[], number>(\n * \"items\",\n * (items) => items?.length ?? 0\n * );\n * ```\n *\n * @experimental\n */\n getProject<TValue, TResult>(\n name: string,\n projection: (value: TValue | null) => TResult | Promise<TResult>,\n options?: GetProjectOptions<TValue, TResult>\n ): RestatePromise<TResult>;\n}\n\n/**\n * Options for {@link ContextInternal.getProject}.\n *\n * @experimental\n */\nexport type GetProjectOptions<TValue, TResult> = {\n /**\n * Serde used to deserialize the state value.\n */\n serde?: Serde<TValue>;\n\n /**\n * Serde used to serialize the projection result, recorded in the journal.\n *\n * If not set, defaults to {@link GetProjectOptions.serde} when that is set,\n * otherwise to the default serde.\n */\n resultSerde?: Serde<TResult>;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.js","names":[],"sources":["../src/internal.ts"],"sourcesContent":["import { Context, InvocationId, RestatePromise } from \"./context.js\";\nimport type { Serde } from \"@restatedev/restate-sdk-core\";\nimport { EXPLICIT_RECOVERY } from \"./endpoint/components.js\";\n\nexport { isSuspendedError } from \"./types/errors.js\";\n\n/**\n * Options set by {@link explicitRecovery}, to spread into the options of a service, virtual object, workflow or handler.\n *\n * @experimental\n */\nexport type ExplicitRecoveryOptions = Record<never, never>;\n\n/**\n * Run the handlers with explicit recovery: a retried or resumed invocation doesn't replay the journal of its earlier attempts,\n * but runs the handler again from the start, executing every context operation anew, e.g. reading the current state.\n *\n * The handler takes care of recovering from the effects of the earlier attempts, which might repeat (at least once):\n * * Each attempt's calls and sends are new requests. To reach the invocation an earlier attempt started, give it an idempotency key that is the same on every attempt, such as one made from `ctx.request().id`.\n * * `ctx.run` executes its action again on every attempt.\n * * Awakeables are not supported.\n *\n * Spread the returned options into the service or handler options. Handler options take precedence over service options.\n *\n * @example\n * ```ts\n * const counter = restate.object({\n * name: \"counter\",\n * handlers: { ... },\n * options: { ...restate.internal.explicitRecovery() },\n * });\n * ```\n *\n * @experimental\n */\nexport function explicitRecovery(): ExplicitRecoveryOptions {\n const options = { [EXPLICIT_RECOVERY]: true };\n return options;\n}\n\n/**\n * Downcast the given context to {@link ContextInternal}, to access the internal APIs.\n *\n * Works with every context type passed to handlers, e.g. `Context`, `ObjectContext`, `ObjectSharedContext`, `WorkflowContext`.\n *\n * @example\n * ```ts\n * const ctxInternal = restate.internal.asInternal(ctx);\n * ```\n *\n * @experimental\n */\nexport function asInternal(ctx: Context): ContextInternal {\n return ctx as ContextInternal;\n}\n\n/**\n * Internal {@link Context} interface exposing additional features.\n *\n * Please note that this API is to be considered experimental and might change without notice.\n *\n * @experimental\n */\nexport interface ContextInternal extends Context {\n /**\n * Returns true if the handler is in the processing phase.\n * This is the mechanism used by `ctx.console` to distinguish whether we should log or not in replaying/processing.\n *\n * **WARNING**: This method should not be used to influence control flow, as it will **surely** lead to non-determinism errors!\n *\n * @experimental\n */\n isProcessing(): boolean;\n\n /**\n * Returns a {@link RestatePromise} that resolves with `undefined` when Restate signals cancellation\n * of the current invocation.\n *\n * This method **MUST** only be used when the handler (or its parent service/endpoint) is configured\n * with `explicitCancellation: true`. Without configuring this option, cancellations are propagated automatically,\n * and this promise will **NEVER** resolve.\n *\n * **Promise reuse:** calling this method multiple times returns the **same** promise instance as long as\n * the current cancellation signal has not yet arrived. Once the promise resolves (cancellation received),\n * later calls return a **new** promise that will resolve on the next cancellation signal.\n *\n * @example Race a long-running side effect against cancellation\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const result = await RestatePromise.race([\n * ctx.run(() => longRunningTask(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Cancelled\") }),\n * ]);\n * return result;\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @example Use the cancellation promise to create an AbortSignal for ctx.run\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const controller = new AbortController();\n * const cancellation = ctxInternal.cancellation()\n * .map(() => {\n * controller.abort();\n * throw new restate.TerminalError(\"Cancelled\");\n * });\n *\n * return RestatePromise.race([\n * ctx.run(() => fetch(`https://api.example.com/greet/${name}`, { signal: controller.signal })),\n * cancellation,\n * ]);\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @example Handle cancellation, perform cleanup, then listen for the next cancellation\n * ```ts\n * const greeter = restate.service({\n * name: \"greeter\",\n * handlers: {\n * greet: async (ctx: restate.Context, name: string) => {\n * const ctxInternal = restate.internal.asInternal(ctx);\n * try {\n * return await RestatePromise.race([\n * ctx.run(() => longRunningTask(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Cancelled\") }),\n * ]);\n * } catch (e) {\n * // Perform cleanup\n * await ctx.run(() => cleanupResources(name));\n *\n * // After cancellation is resolved, ctx.cancellation() returns a fresh promise.\n * // Race cleanup confirmation against the next cancellation signal.\n * await RestatePromise.race([\n * ctx.run(() => confirmCleanup(name)),\n * ctxInternal.cancellation().map(() => { throw new restate.TerminalError(\"Canceled during cleanup\") }),\n * ]);\n * }\n * },\n * },\n * options: { explicitCancellation: true },\n * });\n * ```\n *\n * @experimental\n */\n cancellation(): RestatePromise<void>;\n\n /**\n * Cancel all previous calls made from this handler.\n *\n * This method **MUST** only be used when the handler (or its parent service/endpoint) is configured\n * with `explicitCancellation: true`. Without configuring this option, this operation will always be a no-op.\n *\n * @return the invocation id of the canceled calls.\n * @experimental\n */\n cancelPreviousCalls(): RestatePromise<InvocationId[]>;\n\n /**\n * Get state from the Restate runtime, apply the given `projection` to it,\n * and record in the journal only the result of the projection.\n *\n * Use this to read big state values when you need only a small part of them:\n * unlike `ctx.get`, the complete state value is not recorded in the journal,\n * only its projection.\n *\n * It will appear in the UI as run(project:state_key).\n *\n * This method **MUST** only be used within Virtual Object and Workflow handlers.\n *\n * **NOTE:** Requires Restate >= 1.8 with service protocol V8 enabled, and **does not** work with request/response protocol mode (e.g. with AWS Lambda).\n *\n * @param name key of the state to retrieve\n * @param projection function receiving the state value, or `null` if the state is empty.\n * @param options serde for the state value, and serde for the projection result.\n * @returns a {@link RestatePromise} resolved with the result of the projection.\n *\n * @example\n * ```ts\n * const ctxInternal = restate.internal.asInternal(ctx);\n * const itemsCount = await ctxInternal.getProject<Item[], number>(\n * \"items\",\n * (items) => items?.length ?? 0\n * );\n * ```\n *\n * @experimental\n */\n getProject<TValue, TResult>(\n name: string,\n projection: (value: TValue | null) => TResult | Promise<TResult>,\n options?: GetProjectOptions<TValue, TResult>\n ): RestatePromise<TResult>;\n}\n\n/**\n * Options for {@link ContextInternal.getProject}.\n *\n * @experimental\n */\nexport type GetProjectOptions<TValue, TResult> = {\n /**\n * Serde used to deserialize the state value.\n */\n serde?: Serde<TValue>;\n\n /**\n * Serde used to serialize the projection result, recorded in the journal.\n *\n * If not set, defaults to {@link GetProjectOptions.serde} when that is set,\n * otherwise to the default serde.\n */\n resultSerde?: Serde<TResult>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,mBAA4C;AAE1D,QADgB,GAAG,oBAAoB,MAAM;;;;;;;;;;;;;;AAgB/C,SAAgB,WAAW,KAA+B;AACxD,QAAO"}
|
package/dist/lambda.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
|
|
7
7
|
import { internal_d_exports } from "./internal.cjs";
|
|
@@ -32,5 +32,5 @@ declare function endpoint(): LambdaEndpoint;
|
|
|
32
32
|
*/
|
|
33
33
|
declare function createEndpointHandler(options: EndpointOptions): (event: any, ctx: any) => Promise<any>;
|
|
34
34
|
//#endregion
|
|
35
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
35
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
36
36
|
//# sourceMappingURL=lambda.d.cts.map
|
package/dist/lambda.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
|
|
7
7
|
import { internal_d_exports } from "./internal.js";
|
|
@@ -32,5 +32,5 @@ declare function endpoint(): LambdaEndpoint;
|
|
|
32
32
|
*/
|
|
33
33
|
declare function createEndpointHandler(options: EndpointOptions): (event: any, ctx: any) => Promise<any>;
|
|
34
34
|
//#endregion
|
|
35
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
35
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
|
|
36
36
|
//# sourceMappingURL=lambda.d.ts.map
|
package/dist/node.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
|
|
7
7
|
import { internal_d_exports } from "./internal.cjs";
|
|
@@ -87,5 +87,5 @@ declare function serve({
|
|
|
87
87
|
...options
|
|
88
88
|
}: ServeOptions): Promise<number>;
|
|
89
89
|
//#endregion
|
|
90
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
90
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
91
91
|
//# sourceMappingURL=node.d.cts.map
|
package/dist/node.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
|
|
2
2
|
import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
|
|
3
|
-
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
-
import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
3
|
+
import { Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendClientFromDescriptors, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, StatePreload, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
|
|
4
|
+
import { Context, ContextDate, DurablePromise, EntryOptions, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
|
|
5
5
|
import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
|
|
6
6
|
import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
|
|
7
7
|
import { internal_d_exports } from "./internal.js";
|
|
@@ -87,5 +87,5 @@ declare function serve({
|
|
|
87
87
|
...options
|
|
88
88
|
}: ServeOptions): Promise<number>;
|
|
89
89
|
//#endregion
|
|
90
|
-
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
90
|
+
export { CancelledError, Client, ClientCallOptions, ClientFromDescriptors, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, Descriptor, DescriptorOpts, DurablePromise, Duration, EndpointOptions, EntryOptions, FnOf, GenericCall, GenericSend, HandlerDescriptor, Hooks, HooksProvider, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferArg, InferInput, InferOutput, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectDescriptor, ObjectHandler, ObjectHandlerOpts, ObjectImplHandlers, ObjectOptions, ObjectOpts, ObjectPerHandlerOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendClientFromDescriptors, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceDescriptor, ServiceHandler, ServiceHandlerOpts, ServiceImplHandlers, ServiceInterface, ServiceOptions, ServiceOpts, ServicePerHandlerOpts, SignalReference, StatePreload, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowDescriptor, WorkflowHandler, WorkflowHandlerOpts, WorkflowImplHandlers, WorkflowOptions, WorkflowOpts, WorkflowPerHandlerOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, iface, implement, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
|
|
91
91
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/package.cjs
CHANGED
package/dist/package.js
CHANGED
package/dist/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.18.0\",\n \"description\": \"Typescript SDK for Restate\",\n \"author\": \"Restate Developers\",\n \"email\": \"code@restate.dev\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/restatedev/sdk-typescript#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/restatedev/sdk-typescript.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/restatedev/sdk-typescript/issues\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./fetch\": {\n \"import\": \"./dist/fetch.js\",\n \"require\": \"./dist/fetch.cjs\"\n },\n \"./lambda\": {\n \"import\": \"./dist/lambda.js\",\n \"require\": \"./dist/lambda.cjs\"\n },\n \"./node\": {\n \"import\": \"./dist/node.js\",\n \"require\": \"./dist/node.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"test\": \"turbo run _test --filter={.}...\",\n \"_test\": \"vitest run\",\n \"build\": \"turbo run _build --filter={.}...\",\n \"_build\": \"tsc --noEmit && tsdown\",\n \"dev\": \"tsc --noEmit --watch\",\n \"clean\": \"rm -rf dist *.tsbuildinfo .turbo\",\n \"check:types\": \"turbo run _check:types --filter={.}...\",\n \"_check:types\": \"tsc --noEmit --project tsconfig.build.json\",\n \"lint\": \"eslint .\",\n \"check:exports\": \"turbo run _check:exports --filter={.}...\",\n \"_check:exports\": \"attw --pack .\",\n \"check:api\": \"turbo run _check:api --filter={.}...\",\n \"_check:api\": \"api-extractor run --local && api-extractor run --local --config api-extractor.fetch.json && api-extractor run --local --config api-extractor.lambda.json && api-extractor run --local --config api-extractor.node.json\"\n },\n \"dependencies\": {\n \"@restatedev/restate-sdk-core\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/aws-lambda\": \"^8.10.115\"\n },\n \"typesVersions\": {\n \"*\": {\n \"fetch\": [\n \"./dist/fetch.d.ts\"\n ],\n \"lambda\": [\n \"./dist/lambda.d.ts\"\n ],\n \"node\": [\n \"./dist/node.d.ts\"\n ]\n }\n }\n}\n"],"mappings":";cAEa"}
|
package/dist/types/errors.cjs
CHANGED
|
@@ -92,8 +92,9 @@ var RetryableError = class RetryableError extends RestateError {
|
|
|
92
92
|
*/
|
|
93
93
|
static from(cause, options) {
|
|
94
94
|
const error = ensureError(cause);
|
|
95
|
+
const errorCode = error instanceof RestateError ? error.code : error["errorCode"];
|
|
95
96
|
return new RetryableError(error.message, {
|
|
96
|
-
errorCode
|
|
97
|
+
errorCode,
|
|
97
98
|
cause,
|
|
98
99
|
...options
|
|
99
100
|
});
|
|
@@ -118,8 +119,9 @@ var PauseError = class PauseError extends RestateError {
|
|
|
118
119
|
*/
|
|
119
120
|
static from(cause) {
|
|
120
121
|
const error = ensureError(cause);
|
|
122
|
+
const errorCode = error instanceof RestateError ? error.code : error["errorCode"];
|
|
121
123
|
return new PauseError(error.message, {
|
|
122
|
-
errorCode
|
|
124
|
+
errorCode,
|
|
123
125
|
cause
|
|
124
126
|
});
|
|
125
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.cts","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":[],"mappings":";;;;AAwHa,cA3CA,YAAA,SAAqB,KAAA,CA2Ca;EAWlC,SAAA,IAAA,EAAA,MAAe;EAQX,IAAA,EAAA,MAAA;EAaJ,WAAA,CAAA,OAAe,EAAA,MAAA,EAAA,OAuBQ,CAvBR,EAAA;IAGJ,SAAA,CAAA,EAAA,MAAA;IAIV,KAAA,CAAA,EAAA,GAAA;EAgBsB,CAAA;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.cts","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":[],"mappings":";;;;AAwHa,cA3CA,YAAA,SAAqB,KAAA,CA2Ca;EAWlC,SAAA,IAAA,EAAA,MAAe;EAQX,IAAA,EAAA,MAAA;EAaJ,WAAA,CAAA,OAAe,EAAA,MAAA,EAAA,OAuBQ,CAvBR,EAAA;IAGJ,SAAA,CAAA,EAAA,MAAA;IAIV,KAAA,CAAA,EAAA,GAAA;EAgBsB,CAAA;;;;AAoBpC;AA2CA;;cAlJa,aAAA,SAAsB,YAAA;;sBAEN;;;;;;;;;;;;eAeZ;;;;;;cAWJ,YAAA,SAAqB,aAAA;;;;;;;cAWrB,cAAA,SAAuB,aAAA;;;;UAQnB,qBAAA;;;;eAIF;;;;;;;;cASF,cAAA,SAAuB,YAAA;;wBAGZ;yCAIV;;;;;;;oCAgBsB,wBAAwB;;;;;;;;cAoB/C,UAAA,SAAmB,YAAA;;;;;;;;;2BAoBL;;;;;;;;;;;iBAuBX,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":[],"mappings":";;;;AAwHa,cA3CA,YAAA,SAAqB,KAAA,CA2Ca;EAWlC,SAAA,IAAA,EAAA,MAAe;EAQX,IAAA,EAAA,MAAA;EAaJ,WAAA,CAAA,OAAe,EAAA,MAAA,EAAA,OAuBQ,CAvBR,EAAA;IAGJ,SAAA,CAAA,EAAA,MAAA;IAIV,KAAA,CAAA,EAAA,GAAA;EAgBsB,CAAA;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":[],"mappings":";;;;AAwHa,cA3CA,YAAA,SAAqB,KAAA,CA2Ca;EAWlC,SAAA,IAAA,EAAA,MAAe;EAQX,IAAA,EAAA,MAAA;EAaJ,WAAA,CAAA,OAAe,EAAA,MAAA,EAAA,OAuBQ,CAvBR,EAAA;IAGJ,SAAA,CAAA,EAAA,MAAA;IAIV,KAAA,CAAA,EAAA,GAAA;EAgBsB,CAAA;;;;AAoBpC;AA2CA;;cAlJa,aAAA,SAAsB,YAAA;;sBAEN;;;;;;;;;;;;eAeZ;;;;;;cAWJ,YAAA,SAAqB,aAAA;;;;;;;cAWrB,cAAA,SAAuB,aAAA;;;;UAQnB,qBAAA;;;;eAIF;;;;;;;;cASF,cAAA,SAAuB,YAAA;;wBAGZ;yCAIV;;;;;;;oCAgBsB,wBAAwB;;;;;;;;cAoB/C,UAAA,SAAmB,YAAA;;;;;;;;;2BAoBL;;;;;;;;;;;iBAuBX,gBAAA"}
|
package/dist/types/errors.js
CHANGED
|
@@ -91,8 +91,9 @@ var RetryableError = class RetryableError extends RestateError {
|
|
|
91
91
|
*/
|
|
92
92
|
static from(cause, options) {
|
|
93
93
|
const error = ensureError(cause);
|
|
94
|
+
const errorCode = error instanceof RestateError ? error.code : error["errorCode"];
|
|
94
95
|
return new RetryableError(error.message, {
|
|
95
|
-
errorCode
|
|
96
|
+
errorCode,
|
|
96
97
|
cause,
|
|
97
98
|
...options
|
|
98
99
|
});
|
|
@@ -117,8 +118,9 @@ var PauseError = class PauseError extends RestateError {
|
|
|
117
118
|
*/
|
|
118
119
|
static from(cause) {
|
|
119
120
|
const error = ensureError(cause);
|
|
121
|
+
const errorCode = error instanceof RestateError ? error.code : error["errorCode"];
|
|
120
122
|
return new PauseError(error.message, {
|
|
121
|
-
errorCode
|
|
123
|
+
errorCode,
|
|
122
124
|
cause
|
|
123
125
|
});
|
|
124
126
|
}
|
package/dist/types/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH\n *\n * This file is part of the Restate SDK for Node.js/TypeScript,\n * which is released under the MIT license.\n *\n * You can find a copy of the license in file LICENSE in the root\n * directory of this repository or package, or at\n * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Duration } from \"@restatedev/restate-sdk-core\";\n\nexport const INTERNAL_ERROR_CODE = 500;\nexport const TIMEOUT_ERROR_CODE = 408;\nexport const CANCEL_ERROR_CODE = 409;\nexport const UNKNOWN_ERROR_CODE = 500;\n\n// From shared core!\nexport const CLOSED_ERROR_CODE = 598;\nexport const SUSPENDED_ERROR_CODE = 599;\n\nexport function ensureError(\n e: unknown,\n asTerminalError?: (error: any) => TerminalError | undefined\n): Error {\n if (e instanceof TerminalError) {\n return e;\n }\n // Try convert to terminal error\n const maybeTerminalError = asTerminalError ? asTerminalError(e) : undefined;\n if (maybeTerminalError) {\n return maybeTerminalError;\n }\n\n if (e instanceof Error) {\n return e;\n }\n if (typeof e === \"object\" && e !== null && \"code\" in e && \"message\" in e) {\n // This is an error from the VM\n return new RestateError(e.message as string, {\n errorCode: e.code as number,\n });\n }\n\n // None of the types we know\n let msg;\n try {\n msg = JSON.stringify(e);\n } catch {\n msg = \"(no JSON representation)\";\n }\n\n return new Error(\"Non-Error value: \" + msg);\n}\n\nexport function logError(log: Console, e: unknown) {\n if (e instanceof RestateError) {\n if (e.code === SUSPENDED_ERROR_CODE) {\n log.info(\"Invocation suspended\");\n return;\n } else if (e.code === CLOSED_ERROR_CODE) {\n log.error(\n \"DANGER! The invocation is closed, but some related operation is still running. \\n\" +\n \"This might indicate that a RestatePromise is being awaited on an asynchronous task, outside the handler, or you're awaiting a RestatePromise inside a ctx.run.\\n\" +\n \"This is dangerous, and can lead the service to deadlock. Please fix the issue.\\n\" +\n \"Diagnostic: \",\n e\n );\n return;\n }\n }\n log.warn(\"Error when processing a Restate context operation.\\n\", e);\n}\n\nexport class RestateError extends Error {\n public readonly code: number;\n public override name = \"RestateError\";\n\n constructor(message: string, options?: { errorCode?: number; cause?: any }) {\n super(message, { cause: options?.cause });\n this.code = options?.errorCode ?? INTERNAL_ERROR_CODE;\n }\n}\n\n/**\n * Does not lead to Restate retries.\n *\n * Leads to an output message with a failure defined.\n */\nexport class TerminalError extends RestateError {\n public override name = \"TerminalError\";\n public readonly metadata?: Record<string, string>;\n\n constructor(\n message: string,\n options?: {\n /**\n * Error code. This should be an HTTP status code, and in case the service was invoked from the ingress, this will be propagated back to the caller.\n */\n errorCode?: number;\n /**\n * Metadata key-value pairs to attach to the terminal error.\n * These will be recorded together with error message and code.\n *\n * **Note **: requires Restate 1.6+.\n */\n metadata?: Record<string, string>;\n }\n ) {\n super(message, options);\n this.metadata = options?.metadata ?? {};\n }\n}\n\n/**\n * Returned by `RestatePromise.withTimeout` when the timeout is reached.\n */\nexport class TimeoutError extends TerminalError {\n public override name = \"TimeoutError\";\n\n constructor() {\n super(\"Timeout occurred\", { errorCode: TIMEOUT_ERROR_CODE });\n }\n}\n\n/**\n * Returned when the invocation was cancelled.\n */\nexport class CancelledError extends TerminalError {\n public override name = \"CancelledError\";\n\n constructor() {\n super(\"Cancelled\", { errorCode: CANCEL_ERROR_CODE });\n }\n}\n\nexport interface RetryableErrorOptions {\n /**\n * In how long it should retry.\n */\n retryAfter?: Duration | number;\n}\n\n/**\n * Error that Restate will retry. By using this error type within a `ctx.run` closure,\n * you can dynamically provide the retry delay specified in {@link RetryableErrorOptions}.\n *\n * You can wrap another error using {@link from}.\n */\nexport class RetryableError extends RestateError {\n public override name = \"RetryableError\";\n\n readonly retryAfter?: Duration | number;\n\n constructor(\n message: string,\n options?: RetryableErrorOptions & {\n errorCode?: number;\n cause?: any;\n }\n ) {\n super(message, {\n errorCode: options?.errorCode,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n cause: options?.cause,\n });\n this.retryAfter = options?.retryAfter;\n }\n\n /**\n * Create a `RetryableError` from the given cause.\n */\n static from(cause: any, options?: RetryableErrorOptions): RetryableError {\n const error = ensureError(cause);\n
|
|
1
|
+
{"version":3,"file":"errors.js","names":[],"sources":["../../src/types/errors.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH\n *\n * This file is part of the Restate SDK for Node.js/TypeScript,\n * which is released under the MIT license.\n *\n * You can find a copy of the license in file LICENSE in the root\n * directory of this repository or package, or at\n * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Duration } from \"@restatedev/restate-sdk-core\";\n\nexport const INTERNAL_ERROR_CODE = 500;\nexport const TIMEOUT_ERROR_CODE = 408;\nexport const CANCEL_ERROR_CODE = 409;\nexport const UNKNOWN_ERROR_CODE = 500;\n\n// From shared core!\nexport const CLOSED_ERROR_CODE = 598;\nexport const SUSPENDED_ERROR_CODE = 599;\n\nexport function ensureError(\n e: unknown,\n asTerminalError?: (error: any) => TerminalError | undefined\n): Error {\n if (e instanceof TerminalError) {\n return e;\n }\n // Try convert to terminal error\n const maybeTerminalError = asTerminalError ? asTerminalError(e) : undefined;\n if (maybeTerminalError) {\n return maybeTerminalError;\n }\n\n if (e instanceof Error) {\n return e;\n }\n if (typeof e === \"object\" && e !== null && \"code\" in e && \"message\" in e) {\n // This is an error from the VM\n return new RestateError(e.message as string, {\n errorCode: e.code as number,\n });\n }\n\n // None of the types we know\n let msg;\n try {\n msg = JSON.stringify(e);\n } catch {\n msg = \"(no JSON representation)\";\n }\n\n return new Error(\"Non-Error value: \" + msg);\n}\n\nexport function logError(log: Console, e: unknown) {\n if (e instanceof RestateError) {\n if (e.code === SUSPENDED_ERROR_CODE) {\n log.info(\"Invocation suspended\");\n return;\n } else if (e.code === CLOSED_ERROR_CODE) {\n log.error(\n \"DANGER! The invocation is closed, but some related operation is still running. \\n\" +\n \"This might indicate that a RestatePromise is being awaited on an asynchronous task, outside the handler, or you're awaiting a RestatePromise inside a ctx.run.\\n\" +\n \"This is dangerous, and can lead the service to deadlock. Please fix the issue.\\n\" +\n \"Diagnostic: \",\n e\n );\n return;\n }\n }\n log.warn(\"Error when processing a Restate context operation.\\n\", e);\n}\n\nexport class RestateError extends Error {\n public readonly code: number;\n public override name = \"RestateError\";\n\n constructor(message: string, options?: { errorCode?: number; cause?: any }) {\n super(message, { cause: options?.cause });\n this.code = options?.errorCode ?? INTERNAL_ERROR_CODE;\n }\n}\n\n/**\n * Does not lead to Restate retries.\n *\n * Leads to an output message with a failure defined.\n */\nexport class TerminalError extends RestateError {\n public override name = \"TerminalError\";\n public readonly metadata?: Record<string, string>;\n\n constructor(\n message: string,\n options?: {\n /**\n * Error code. This should be an HTTP status code, and in case the service was invoked from the ingress, this will be propagated back to the caller.\n */\n errorCode?: number;\n /**\n * Metadata key-value pairs to attach to the terminal error.\n * These will be recorded together with error message and code.\n *\n * **Note **: requires Restate 1.6+.\n */\n metadata?: Record<string, string>;\n }\n ) {\n super(message, options);\n this.metadata = options?.metadata ?? {};\n }\n}\n\n/**\n * Returned by `RestatePromise.withTimeout` when the timeout is reached.\n */\nexport class TimeoutError extends TerminalError {\n public override name = \"TimeoutError\";\n\n constructor() {\n super(\"Timeout occurred\", { errorCode: TIMEOUT_ERROR_CODE });\n }\n}\n\n/**\n * Returned when the invocation was cancelled.\n */\nexport class CancelledError extends TerminalError {\n public override name = \"CancelledError\";\n\n constructor() {\n super(\"Cancelled\", { errorCode: CANCEL_ERROR_CODE });\n }\n}\n\nexport interface RetryableErrorOptions {\n /**\n * In how long it should retry.\n */\n retryAfter?: Duration | number;\n}\n\n/**\n * Error that Restate will retry. By using this error type within a `ctx.run` closure,\n * you can dynamically provide the retry delay specified in {@link RetryableErrorOptions}.\n *\n * You can wrap another error using {@link from}.\n */\nexport class RetryableError extends RestateError {\n public override name = \"RetryableError\";\n\n readonly retryAfter?: Duration | number;\n\n constructor(\n message: string,\n options?: RetryableErrorOptions & {\n errorCode?: number;\n cause?: any;\n }\n ) {\n super(message, {\n errorCode: options?.errorCode,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n cause: options?.cause,\n });\n this.retryAfter = options?.retryAfter;\n }\n\n /**\n * Create a `RetryableError` from the given cause.\n */\n static from(cause: any, options?: RetryableErrorOptions): RetryableError {\n const error = ensureError(cause);\n const errorCode =\n error instanceof RestateError\n ? error.code\n : (error[\"errorCode\" as keyof typeof error] as number | undefined);\n return new RetryableError(error.message, {\n errorCode,\n cause: cause,\n ...options,\n });\n }\n}\n\n/**\n * When thrown, Restate will pause the execution of the current invocation.\n * This error type MUST be used only within a `ctx.run` closure. If thrown outside a `ctx.run` closure, pause will be ignored.\n *\n * You can wrap another error using {@link from}.\n */\nexport class PauseError extends RestateError {\n public override name = \"PauseError\";\n\n constructor(\n message: string,\n options?: {\n errorCode?: number;\n cause?: any;\n }\n ) {\n super(message, {\n errorCode: options?.errorCode,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n cause: options?.cause,\n });\n }\n\n /**\n * Create a `PauseError` from the given cause.\n */\n static from(cause: any): PauseError {\n const error = ensureError(cause);\n const errorCode =\n error instanceof RestateError\n ? error.code\n : (error[\"errorCode\" as keyof typeof error] as number | undefined);\n return new PauseError(error.message, {\n errorCode,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n cause: cause,\n });\n }\n}\n\n/**\n * Returns true if the error indicates the current attempt is ending without\n * a failure — e.g. the runtime suspended the invocation (waiting for\n * `ctx.sleep()` or `ctx.call()`), or the connection was dropped (kill).\n *\n * Use this in handler interceptor catch blocks to distinguish attempt-ending\n * signals from real errors (e.g. to avoid logging it as a failure or to set\n * a neutral span status).\n */\nexport function isSuspendedError(e: unknown): boolean {\n return e instanceof RestateError && e.code === SUSPENDED_ERROR_CODE;\n}\n"],"mappings":";AAeA,MAAa,sBAAsB;AACnC,MAAa,qBAAqB;AAClC,MAAa,oBAAoB;AACjC,MAAa,qBAAqB;AAGlC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AAEpC,SAAgB,YACd,GACA,iBACO;AACP,KAAI,aAAa,cACf,QAAO;CAGT,MAAM,qBAAqB,kBAAkB,gBAAgB,EAAE,GAAG;AAClE,KAAI,mBACF,QAAO;AAGT,KAAI,aAAa,MACf,QAAO;AAET,KAAI,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,aAAa,EAErE,QAAO,IAAI,aAAa,EAAE,SAAmB,EAC3C,WAAW,EAAE,MACd,CAAC;CAIJ,IAAI;AACJ,KAAI;AACF,QAAM,KAAK,UAAU,EAAE;SACjB;AACN,QAAM;;AAGR,wBAAO,IAAI,MAAM,sBAAsB,IAAI;;AAG7C,SAAgB,SAAS,KAAc,GAAY;AACjD,KAAI,aAAa,cACf;MAAI,EAAE,SAAS,sBAAsB;AACnC,OAAI,KAAK,uBAAuB;AAChC;aACS,EAAE,SAAS,mBAAmB;AACvC,OAAI,MACF,iVAIA,EACD;AACD;;;AAGJ,KAAI,KAAK,wDAAwD,EAAE;;AAGrE,IAAa,eAAb,cAAkC,MAAM;CACtC,AAAgB;CAChB,AAAgB,OAAO;CAEvB,YAAY,SAAiB,SAA+C;AAC1E,QAAM,SAAS,EAAE,OAAO,SAAS,OAAO,CAAC;AACzC,OAAK,OAAO,SAAS,aAAa;;;;;;;;AAStC,IAAa,gBAAb,cAAmC,aAAa;CAC9C,AAAgB,OAAO;CACvB,AAAgB;CAEhB,YACE,SACA,SAaA;AACA,QAAM,SAAS,QAAQ;AACvB,OAAK,WAAW,SAAS,YAAY,EAAE;;;;;;AAO3C,IAAa,eAAb,cAAkC,cAAc;CAC9C,AAAgB,OAAO;CAEvB,cAAc;AACZ,QAAM,oBAAoB,EAAE,WAAW,oBAAoB,CAAC;;;;;;AAOhE,IAAa,iBAAb,cAAoC,cAAc;CAChD,AAAgB,OAAO;CAEvB,cAAc;AACZ,QAAM,aAAa,EAAE,WAAW,mBAAmB,CAAC;;;;;;;;;AAiBxD,IAAa,iBAAb,MAAa,uBAAuB,aAAa;CAC/C,AAAgB,OAAO;CAEvB,AAAS;CAET,YACE,SACA,SAIA;AACA,QAAM,SAAS;GACb,WAAW,SAAS;GAEpB,OAAO,SAAS;GACjB,CAAC;AACF,OAAK,aAAa,SAAS;;;;;CAM7B,OAAO,KAAK,OAAY,SAAiD;EACvE,MAAM,QAAQ,YAAY,MAAM;EAChC,MAAM,YACJ,iBAAiB,eACb,MAAM,OACL,MAAM;AACb,SAAO,IAAI,eAAe,MAAM,SAAS;GACvC;GACO;GACP,GAAG;GACJ,CAAC;;;;;;;;;AAUN,IAAa,aAAb,MAAa,mBAAmB,aAAa;CAC3C,AAAgB,OAAO;CAEvB,YACE,SACA,SAIA;AACA,QAAM,SAAS;GACb,WAAW,SAAS;GAEpB,OAAO,SAAS;GACjB,CAAC;;;;;CAMJ,OAAO,KAAK,OAAwB;EAClC,MAAM,QAAQ,YAAY,MAAM;EAChC,MAAM,YACJ,iBAAiB,eACb,MAAM,OACL,MAAM;AACb,SAAO,IAAI,WAAW,MAAM,SAAS;GACnC;GAEO;GACR,CAAC;;;;;;;;;;;;AAaN,SAAgB,iBAAiB,GAAqB;AACpD,QAAO,aAAa,gBAAgB,EAAE,SAAS"}
|