@bluelibs/runner 5.2.1 → 5.4.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/README.md +54 -1
- package/dist/browser/index.cjs +977 -800
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.mjs +975 -801
- package/dist/browser/index.mjs.map +1 -1
- package/dist/edge/index.cjs +977 -800
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.mjs +975 -801
- package/dist/edge/index.mjs.map +1 -1
- package/dist/node/node.cjs +1994 -2056
- package/dist/node/node.cjs.map +1 -1
- package/dist/node/node.mjs +1990 -2010
- package/dist/node/node.mjs.map +1 -1
- package/dist/types/definers/builders/error/fluent-builder.interface.d.ts +6 -0
- package/dist/types/definers/builders/error/index.d.ts +10 -1
- package/dist/types/definers/builders/error/types.d.ts +2 -0
- package/dist/types/definers/builders/event/utils.d.ts +1 -4
- package/dist/types/definers/builders/hook/utils.d.ts +1 -4
- package/dist/types/definers/builders/middleware/utils.d.ts +1 -4
- package/dist/types/definers/builders/resource/utils.d.ts +1 -4
- package/dist/types/definers/builders/shared/mergeUtils.d.ts +5 -0
- package/dist/types/definers/builders/task/utils.d.ts +1 -4
- package/dist/types/definers/builders/utils.d.ts +1 -1
- package/dist/types/definers/defineError.d.ts +5 -3
- package/dist/types/defs.d.ts +1 -0
- package/dist/types/errors.d.ts +20 -21
- package/dist/types/globals/resources/tunnel/protocol.d.ts +3 -0
- package/dist/types/models/DependencyProcessor.d.ts +1 -1
- package/dist/types/models/MiddlewareManager.d.ts +2 -2
- package/dist/types/models/RunResult.d.ts +1 -1
- package/dist/types/models/Store.d.ts +15 -13
- package/dist/types/models/StoreRegistry.d.ts +19 -16
- package/dist/types/models/middleware/ResourceMiddlewareComposer.d.ts +2 -2
- package/dist/types/models/utils/buildDependencyGraph.d.ts +12 -0
- package/dist/types/models/utils/dependencyStrategies.d.ts +15 -0
- package/dist/types/models/utils/disposeOrder.d.ts +7 -0
- package/dist/types/node/durable/core/DurableResource.d.ts +24 -9
- package/dist/types/node/durable/core/DurableService.d.ts +15 -9
- package/dist/types/node/durable/core/interfaces/service.d.ts +27 -19
- package/dist/types/node/durable/core/interfaces/store.d.ts +1 -1
- package/dist/types/node/durable/core/managers/ExecutionManager.d.ts +34 -4
- package/dist/types/node/durable/core/managers/ScheduleManager.d.ts +5 -3
- package/dist/types/node/durable/core/managers/TaskRegistry.d.ts +5 -5
- package/dist/types/node/durable/core/managers/WaitManager.d.ts +1 -1
- package/dist/types/node/durable/core/resource.d.ts +5 -5
- package/dist/types/node/durable/index.d.ts +1 -0
- package/dist/types/node/durable/resources/memoryDurableResource.d.ts +5 -5
- package/dist/types/node/durable/resources/redisDurableResource.d.ts +5 -5
- package/dist/types/node/durable/tags/durableWorkflow.tag.d.ts +19 -0
- package/dist/types/node/exposure/requestContext.d.ts +1 -1
- package/dist/types/node/exposure/resource.d.ts +7 -7
- package/dist/types/node/http/http-mixed-client.factory.resource.d.ts +1 -1
- package/dist/types/node/http/http-smart-client.factory.resource.d.ts +1 -1
- package/dist/types/node/node.d.ts +1 -184
- package/dist/types/platform/adapters/edge.d.ts +17 -0
- package/dist/types/platform/adapters/universal-generic.d.ts +3 -0
- package/dist/types/platform/index.d.ts +1 -0
- package/dist/types/platform/types.d.ts +7 -1
- package/dist/types/public.d.ts +6 -1
- package/dist/types/testing.d.ts +0 -1
- package/dist/types/tools/LockableMap.d.ts +20 -0
- package/dist/types/types/error.d.ts +22 -1
- package/dist/types/types/resource.d.ts +2 -4
- package/dist/types/types/symbols.d.ts +3 -3
- package/dist/types/types/tagged.d.ts +18 -0
- package/dist/types/types/task.d.ts +1 -1
- package/dist/ui/assets/index-Bo7Gi6Vq.js +141 -0
- package/dist/ui/assets/index-Y_9aLumt.css +1 -0
- package/dist/ui/index.html +2 -3
- package/dist/universal/index.cjs +977 -800
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.mjs +975 -801
- package/dist/universal/index.mjs.map +1 -1
- package/package.json +1 -2
- package/readmes/AI.md +59 -12
- package/dist/ui/assets/index-2cb8f39f.js +0 -141
- package/dist/ui/assets/index-b1f988bf.css +0 -1
- /package/dist/types/{tunnels → tools}/buildUniversalManifest.d.ts +0 -0
- /package/dist/types/{processHooks.d.ts → tools/processShutdownHooks.d.ts} +0 -0
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import type { IEventDefinition } from "../../../../types/event";
|
|
2
|
+
import type { ITask } from "../../../../types/task";
|
|
2
3
|
import type { IDurableStore } from "./store";
|
|
3
4
|
import type { IDurableQueue } from "./queue";
|
|
4
5
|
import type { IEventBus } from "./bus";
|
|
5
6
|
import type { IDurableContext } from "./context";
|
|
6
7
|
import type { Schedule } from "../types";
|
|
7
8
|
import type { DurableAuditEmitter } from "../audit";
|
|
8
|
-
export interface DurableTask<TInput = unknown, TResult = unknown> {
|
|
9
|
-
id: string;
|
|
10
|
-
run(input: TInput, ...args: any[]): Promise<TResult>;
|
|
11
|
-
}
|
|
12
9
|
export interface ITaskExecutor {
|
|
13
|
-
run<TInput, TResult>(task:
|
|
10
|
+
run<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>, input?: TInput): Promise<TResult>;
|
|
14
11
|
}
|
|
15
12
|
export interface ScheduleConfig<TInput = unknown> {
|
|
16
13
|
id: string;
|
|
17
|
-
task:
|
|
14
|
+
task: ITask<TInput, Promise<any>, any, any, any, any> | string;
|
|
18
15
|
cron?: string;
|
|
19
16
|
interval?: number;
|
|
20
17
|
input: TInput;
|
|
@@ -51,7 +48,7 @@ export interface DurableServiceConfig {
|
|
|
51
48
|
* Resolves tasks by id for resuming/recovering executions.
|
|
52
49
|
* Useful in Runner environments where tasks are registered in the Store registry.
|
|
53
50
|
*/
|
|
54
|
-
taskResolver?: (taskId: string) =>
|
|
51
|
+
taskResolver?: (taskId: string) => ITask<any, Promise<any>, any, any, any, any> | undefined;
|
|
55
52
|
audit?: {
|
|
56
53
|
enabled?: boolean;
|
|
57
54
|
emitter?: DurableAuditEmitter;
|
|
@@ -66,7 +63,7 @@ export interface DurableServiceConfig {
|
|
|
66
63
|
maxAttempts?: number;
|
|
67
64
|
timeout?: number;
|
|
68
65
|
/**
|
|
69
|
-
* When a queue is configured, `
|
|
66
|
+
* When a queue is configured, `start()` persists the execution and then enqueues it.
|
|
70
67
|
* If enqueue fails (eg. broker outage), the execution would otherwise remain "pending" forever.
|
|
71
68
|
*
|
|
72
69
|
* This delay arms a small store-backed timer as a failsafe so workers can retry resuming it
|
|
@@ -75,7 +72,7 @@ export interface DurableServiceConfig {
|
|
|
75
72
|
kickoffFailsafeDelayMs?: number;
|
|
76
73
|
};
|
|
77
74
|
schedules?: ScheduleConfig[];
|
|
78
|
-
tasks?: Array<
|
|
75
|
+
tasks?: Array<ITask<any, Promise<any>, any, any, any, any>>;
|
|
79
76
|
}
|
|
80
77
|
export interface ExecuteOptions {
|
|
81
78
|
timeout?: number;
|
|
@@ -94,8 +91,15 @@ export interface ScheduleOptions {
|
|
|
94
91
|
cron?: string;
|
|
95
92
|
interval?: number;
|
|
96
93
|
}
|
|
94
|
+
export interface DurableStartAndWaitResult<TResult = unknown> {
|
|
95
|
+
durable: {
|
|
96
|
+
executionId: string;
|
|
97
|
+
};
|
|
98
|
+
data: TResult;
|
|
99
|
+
}
|
|
97
100
|
export interface IDurableService {
|
|
98
|
-
|
|
101
|
+
start<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>, input?: TInput, options?: ExecuteOptions): Promise<string>;
|
|
102
|
+
start(task: string, input?: unknown, options?: ExecuteOptions): Promise<string>;
|
|
99
103
|
/**
|
|
100
104
|
* Request cancellation for an execution.
|
|
101
105
|
* Cancellation is cooperative: it marks the execution as cancelled and unblocks waiters,
|
|
@@ -106,24 +110,28 @@ export interface IDurableService {
|
|
|
106
110
|
timeout?: number;
|
|
107
111
|
waitPollIntervalMs?: number;
|
|
108
112
|
}): Promise<TResult>;
|
|
109
|
-
execute<TInput, TResult>(task: DurableTask<TInput, TResult>, input?: TInput, options?: ExecuteOptions): Promise<TResult>;
|
|
110
113
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* This mirrors the runtime contract where `wait()`/`execute()` treat
|
|
115
|
-
* "completed without result" as an error.
|
|
114
|
+
* Starts a workflow and waits for completion.
|
|
115
|
+
* Returns the started execution id together with the workflow result payload.
|
|
116
116
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
startAndWait<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>, input?: TInput, options?: ExecuteOptions): Promise<DurableStartAndWaitResult<TResult>>;
|
|
118
|
+
startAndWait<TResult = unknown>(task: string, input?: unknown, options?: ExecuteOptions): Promise<DurableStartAndWaitResult<TResult>>;
|
|
119
|
+
schedule<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>, input: TInput | undefined, options: ScheduleOptions): Promise<string>;
|
|
120
|
+
schedule(task: string, input: unknown, options: ScheduleOptions): Promise<string>;
|
|
119
121
|
/**
|
|
120
122
|
* Idempotently create (or update) a recurring schedule (cron/interval) with a stable id.
|
|
121
123
|
* Safe to call concurrently from multiple processes.
|
|
122
124
|
*/
|
|
123
|
-
ensureSchedule<TInput>(task:
|
|
125
|
+
ensureSchedule<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>, input: TInput | undefined, options: ScheduleOptions & {
|
|
126
|
+
id: string;
|
|
127
|
+
}): Promise<string>;
|
|
128
|
+
ensureSchedule(task: string, input: unknown, options: ScheduleOptions & {
|
|
124
129
|
id: string;
|
|
125
130
|
}): Promise<string>;
|
|
126
131
|
recover(): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Starts the durable polling loop (timers/schedules processing).
|
|
134
|
+
*/
|
|
127
135
|
start(): void;
|
|
128
136
|
stop(): Promise<void>;
|
|
129
137
|
pauseSchedule(scheduleId: string): Promise<void>;
|
|
@@ -13,7 +13,7 @@ export interface IDurableStore {
|
|
|
13
13
|
listIncompleteExecutions(): Promise<Execution[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Optional execution-level idempotency mapping.
|
|
16
|
-
* If supported, allows `
|
|
16
|
+
* If supported, allows `start(..., { idempotencyKey })` to dedupe workflow starts.
|
|
17
17
|
*/
|
|
18
18
|
getExecutionIdByIdempotencyKey?(params: {
|
|
19
19
|
taskId: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IDurableStore } from "../interfaces/store";
|
|
2
2
|
import type { IDurableQueue } from "../interfaces/queue";
|
|
3
3
|
import type { IEventBus } from "../interfaces/bus";
|
|
4
|
-
import type {
|
|
4
|
+
import type { DurableStartAndWaitResult, DurableServiceConfig, ExecuteOptions, ITaskExecutor } from "../interfaces/service";
|
|
5
|
+
import type { ITask } from "../../../../types/task";
|
|
5
6
|
import { type Execution } from "../types";
|
|
6
7
|
import type { TaskRegistry } from "./TaskRegistry";
|
|
7
8
|
import type { AuditLogger } from "./AuditLogger";
|
|
@@ -37,12 +38,41 @@ export declare class ExecutionManager {
|
|
|
37
38
|
private readonly auditLogger;
|
|
38
39
|
private readonly waitManager;
|
|
39
40
|
constructor(config: ExecutionManagerConfig, taskRegistry: TaskRegistry, auditLogger: AuditLogger, waitManager: WaitManager);
|
|
40
|
-
|
|
41
|
+
start(taskRef: string | ITask<any, Promise<any>, any, any, any, any>, input?: unknown, options?: ExecuteOptions): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Start a workflow with deduplication: if the same (taskId, idempotencyKey)
|
|
44
|
+
* was already started, returns the existing executionId instead of creating
|
|
45
|
+
* a duplicate. Uses a distributed lock to prevent concurrent races.
|
|
46
|
+
*/
|
|
47
|
+
private startWithIdempotencyKey;
|
|
48
|
+
private assertCanExecute;
|
|
49
|
+
private assertStoreSupportsIdempotency;
|
|
50
|
+
/**
|
|
51
|
+
* Acquires a distributed lock around the idempotency check-and-set,
|
|
52
|
+
* falling back to lock-free operation when the store has no locking support.
|
|
53
|
+
*/
|
|
54
|
+
private withIdempotencyLock;
|
|
55
|
+
/**
|
|
56
|
+
* Recovery path: `setExecutionIdByIdempotencyKey` returned false (another
|
|
57
|
+
* writer won the race), so we re-read the mapping to get their executionId.
|
|
58
|
+
*/
|
|
59
|
+
private resolveRacedIdempotencyKey;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new execution record, persists it to the store, and logs an
|
|
62
|
+
* audit entry. Returns the executionId.
|
|
63
|
+
*/
|
|
64
|
+
private persistNewExecution;
|
|
65
|
+
/**
|
|
66
|
+
* Kicks off an execution with a failsafe timer for queue mode.
|
|
67
|
+
* If the queue enqueue succeeds, the timer is cleaned up immediately.
|
|
68
|
+
* If enqueue fails, the timer remains so the polling loop can retry later.
|
|
69
|
+
*/
|
|
70
|
+
private kickoffWithFailsafe;
|
|
41
71
|
cancelExecution(executionId: string, reason?: string): Promise<void>;
|
|
42
|
-
|
|
43
|
-
executeStrict<TInput, TResult>(task: undefined extends TResult ? never : DurableTask<TInput, TResult>, input?: TInput, options?: ExecuteOptions): Promise<TResult>;
|
|
72
|
+
startAndWait(taskRef: string | ITask<any, Promise<any>, any, any, any, any>, input?: unknown, options?: ExecuteOptions): Promise<DurableStartAndWaitResult<unknown>>;
|
|
44
73
|
processExecution(executionId: string): Promise<void>;
|
|
45
74
|
kickoffExecution(executionId: string): Promise<void>;
|
|
46
75
|
notifyExecutionFinished(execution: Execution): Promise<void>;
|
|
47
76
|
private runExecutionAttempt;
|
|
77
|
+
private resolveTaskReference;
|
|
48
78
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IDurableStore } from "../interfaces/store";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ScheduleOptions } from "../interfaces/service";
|
|
3
3
|
import { type Schedule } from "../types";
|
|
4
4
|
import type { TaskRegistry } from "./TaskRegistry";
|
|
5
|
+
import type { ITask } from "../../../../types/task";
|
|
5
6
|
/**
|
|
6
7
|
* Creates and maintains durable schedules.
|
|
7
8
|
*
|
|
@@ -13,10 +14,10 @@ export declare class ScheduleManager {
|
|
|
13
14
|
private readonly store;
|
|
14
15
|
private readonly taskRegistry;
|
|
15
16
|
constructor(store: IDurableStore, taskRegistry: TaskRegistry);
|
|
16
|
-
ensureSchedule
|
|
17
|
+
ensureSchedule(taskRef: string | ITask<any, Promise<any>, any, any, any, any>, input: unknown, options: ScheduleOptions & {
|
|
17
18
|
id: string;
|
|
18
19
|
}): Promise<string>;
|
|
19
|
-
schedule
|
|
20
|
+
schedule(taskRef: string | ITask<any, Promise<any>, any, any, any, any>, input: unknown, options: ScheduleOptions): Promise<string>;
|
|
20
21
|
reschedule(schedule: Schedule, options?: {
|
|
21
22
|
lastRunAt?: Date;
|
|
22
23
|
}): Promise<void>;
|
|
@@ -30,4 +31,5 @@ export declare class ScheduleManager {
|
|
|
30
31
|
input?: unknown;
|
|
31
32
|
}): Promise<void>;
|
|
32
33
|
remove(id: string): Promise<void>;
|
|
34
|
+
private resolveTaskReference;
|
|
33
35
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ITask } from "../../../../types/task";
|
|
2
2
|
/**
|
|
3
3
|
* In-memory durable task registry.
|
|
4
4
|
*
|
|
5
5
|
* Durable executions persist only a `taskId` in the store, so the runtime needs a way
|
|
6
|
-
* to resolve `taskId ->
|
|
6
|
+
* to resolve `taskId -> ITask` when resuming. This registry holds tasks that
|
|
7
7
|
* were registered on the current process and optionally delegates to an external
|
|
8
8
|
* resolver for tasks defined elsewhere (useful for modular apps).
|
|
9
9
|
*/
|
|
10
10
|
export declare class TaskRegistry {
|
|
11
11
|
private readonly externalResolver?;
|
|
12
12
|
private readonly tasks;
|
|
13
|
-
constructor(externalResolver?: ((taskId: string) =>
|
|
14
|
-
register<TInput, TResult>(task:
|
|
15
|
-
find(taskId: string):
|
|
13
|
+
constructor(externalResolver?: ((taskId: string) => ITask<any, Promise<any>, any, any, any, any> | undefined) | undefined);
|
|
14
|
+
register<TInput, TResult>(task: ITask<TInput, Promise<TResult>, any, any, any, any>): void;
|
|
15
|
+
find(taskId: string): ITask<any, Promise<any>, any, any, any, any> | undefined;
|
|
16
16
|
}
|
|
@@ -12,7 +12,7 @@ export interface WaitConfig {
|
|
|
12
12
|
* - otherwise (or on bus issues) fall back to polling the store
|
|
13
13
|
*
|
|
14
14
|
* The durable store remains the source of truth; this manager is purely a convenience layer
|
|
15
|
-
* for callers that want `await durable.wait(...)` / `await durable.
|
|
15
|
+
* for callers that want `await durable.wait(...)` / `await durable.startAndWait(...)`.
|
|
16
16
|
*/
|
|
17
17
|
export declare class WaitManager {
|
|
18
18
|
private readonly store;
|
|
@@ -7,8 +7,8 @@ export type DurableResourceRuntimeConfig = RunnerDurableRuntimeConfig;
|
|
|
7
7
|
* - `const durable = durableResource.fork("app.durable");`
|
|
8
8
|
* - Register it via `durable.with({ store, queue, eventBus, ... })`
|
|
9
9
|
*/
|
|
10
|
-
export declare const durableResource: import("
|
|
11
|
-
taskRunner: import("
|
|
12
|
-
eventManager: import("
|
|
13
|
-
runnerStore: import("
|
|
14
|
-
}, any, import("
|
|
10
|
+
export declare const durableResource: import("../../../defs").IResource<RunnerDurableRuntimeConfig, Promise<import("./DurableResource").DurableResource>, {
|
|
11
|
+
taskRunner: import("../../../defs").IResource<void, Promise<import("../../../models").TaskRunner>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
12
|
+
eventManager: import("../../../defs").IResource<void, Promise<import("../../../models").EventManager>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
13
|
+
runnerStore: import("../../../defs").IResource<void, Promise<import("../../../models").Store>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
14
|
+
}, any, import("../../../defs").IResourceMeta, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
@@ -28,6 +28,7 @@ export { NoopEventBus } from "./bus/NoopEventBus";
|
|
|
28
28
|
export { RedisEventBus } from "./bus/RedisEventBus";
|
|
29
29
|
export { createDurableTestSetup, waitUntil } from "./test-utils";
|
|
30
30
|
export type { DurableTestSetup, DurableTestSetupOptions } from "./test-utils";
|
|
31
|
+
export { durableWorkflowTag, type DurableWorkflowTagConfig, } from "./tags/durableWorkflow.tag";
|
|
31
32
|
export { memoryDurableResource } from "./resources/memoryDurableResource";
|
|
32
33
|
export type { MemoryDurableResourceConfig } from "./resources/memoryDurableResource";
|
|
33
34
|
export { redisDurableResource } from "./resources/redisDurableResource";
|
|
@@ -13,9 +13,9 @@ export type MemoryDurableResourceConfig = Omit<RunnerDurableRuntimeConfig, "stor
|
|
|
13
13
|
interface MemoryDurableResourceContext {
|
|
14
14
|
runtimeConfig: RunnerDurableRuntimeConfig | null;
|
|
15
15
|
}
|
|
16
|
-
export declare const memoryDurableResource: import("
|
|
17
|
-
taskRunner: import("
|
|
18
|
-
eventManager: import("
|
|
19
|
-
runnerStore: import("
|
|
20
|
-
}, MemoryDurableResourceContext, import("
|
|
16
|
+
export declare const memoryDurableResource: import("../../../defs").IResource<MemoryDurableResourceConfig, Promise<DurableResource>, {
|
|
17
|
+
taskRunner: import("../../../defs").IResource<void, Promise<import("../../../models").TaskRunner>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
18
|
+
eventManager: import("../../../defs").IResource<void, Promise<import("../../../models").EventManager>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
19
|
+
runnerStore: import("../../../defs").IResource<void, Promise<import("../../../models").Store>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
20
|
+
}, MemoryDurableResourceContext, import("../../../defs").IResourceMeta, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
21
21
|
export {};
|
|
@@ -27,9 +27,9 @@ export type RedisDurableResourceConfig = Omit<RunnerDurableRuntimeConfig, "store
|
|
|
27
27
|
interface RedisDurableResourceContext {
|
|
28
28
|
runtimeConfig: RunnerDurableRuntimeConfig | null;
|
|
29
29
|
}
|
|
30
|
-
export declare const redisDurableResource: import("
|
|
31
|
-
taskRunner: import("
|
|
32
|
-
eventManager: import("
|
|
33
|
-
runnerStore: import("
|
|
34
|
-
}, RedisDurableResourceContext, import("
|
|
30
|
+
export declare const redisDurableResource: import("../../../defs").IResource<RedisDurableResourceConfig, Promise<DurableResource>, {
|
|
31
|
+
taskRunner: import("../../../defs").IResource<void, Promise<import("../../../models").TaskRunner>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
32
|
+
eventManager: import("../../../defs").IResource<void, Promise<import("../../../models").EventManager>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
33
|
+
runnerStore: import("../../../defs").IResource<void, Promise<import("../../../models").Store>, {}, any, any, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
34
|
+
}, RedisDurableResourceContext, import("../../../defs").IResourceMeta, import("../../../defs").TagType[], import("../../../defs").ResourceMiddlewareAttachmentType[]>;
|
|
35
35
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DurableWorkflowTagConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Optional domain/category to group workflows (eg. "orders", "billing").
|
|
4
|
+
*/
|
|
5
|
+
category?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional default input used by `durable.describe(task)` when no explicit
|
|
8
|
+
* input argument is provided.
|
|
9
|
+
*/
|
|
10
|
+
defaults?: Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* Optional metadata for dashboards/tooling.
|
|
13
|
+
*/
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Marks a task as a durable workflow for runtime discovery.
|
|
18
|
+
*/
|
|
19
|
+
export declare const durableWorkflowTag: import("../../..").ITag<DurableWorkflowTagConfig, void, void>;
|
|
@@ -8,7 +8,7 @@ export interface ExposureRequestContextValue {
|
|
|
8
8
|
method?: string;
|
|
9
9
|
signal: AbortSignal;
|
|
10
10
|
}
|
|
11
|
-
export declare const ExposureRequestContext: import("
|
|
11
|
+
export declare const ExposureRequestContext: import("../..").IAsyncContext<ExposureRequestContextValue>;
|
|
12
12
|
export declare function useExposureContext(): ExposureRequestContextValue;
|
|
13
13
|
/**
|
|
14
14
|
* Checks if the exposure request context is currently available without throwing an error.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NodeExposureConfig } from "./resourceTypes";
|
|
2
2
|
export type { NodeExposureHttpAuthConfig } from "./authenticator";
|
|
3
|
-
export declare const nodeExposure: import("
|
|
4
|
-
store: import("
|
|
5
|
-
taskRunner: import("
|
|
6
|
-
eventManager: import("
|
|
7
|
-
logger: import("
|
|
8
|
-
serializer: import("
|
|
3
|
+
export declare const nodeExposure: import("../..").IResource<NodeExposureConfig, Promise<import("./resourceTypes").NodeExposureHandlers>, {
|
|
4
|
+
store: import("../..").IResource<void, Promise<import("../..").Store>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
5
|
+
taskRunner: import("../..").IResource<void, Promise<import("../..").TaskRunner>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
6
|
+
eventManager: import("../..").IResource<void, Promise<import("../..").EventManager>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
7
|
+
logger: import("../..").IResource<void, Promise<import("../..").Logger>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
8
|
+
serializer: import("../..").IResource<void, Promise<import("../..").SerializerLike>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
9
9
|
}, any, {
|
|
10
10
|
title: string;
|
|
11
11
|
description: string;
|
|
12
|
-
}, import("
|
|
12
|
+
}, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
@@ -13,5 +13,5 @@ export interface HttpMixedClientFactoryConfig {
|
|
|
13
13
|
}) => void | Promise<void>;
|
|
14
14
|
}
|
|
15
15
|
export type HttpMixedClientFactory = (config: HttpMixedClientFactoryConfig) => MixedHttpClient;
|
|
16
|
-
export declare const httpMixedClientFactory: import("
|
|
16
|
+
export declare const httpMixedClientFactory: import("../..").IResource<void, Promise<HttpMixedClientFactory>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
17
17
|
export type { MixedHttpClient };
|
|
@@ -12,5 +12,5 @@ export interface HttpSmartClientFactoryConfig {
|
|
|
12
12
|
}) => void | Promise<void>;
|
|
13
13
|
}
|
|
14
14
|
export type HttpSmartClientFactory = (config: HttpSmartClientFactoryConfig) => HttpSmartClient;
|
|
15
|
-
export declare const httpSmartClientFactory: import("
|
|
15
|
+
export declare const httpSmartClientFactory: import("../..").IResource<void, Promise<HttpSmartClientFactory>, {}, any, any, import("../..").TagType[], import("../..").ResourceMiddlewareAttachmentType[]>;
|
|
16
16
|
export type { HttpSmartClient };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
import type { RunResult } from "../models/RunResult";
|
|
3
|
-
import type { SerializerLike } from "../serializer";
|
|
1
|
+
export { run, globals } from "../public";
|
|
4
2
|
export { nodeExposure } from "./exposure";
|
|
5
3
|
export { hasExposureContext, useExposureContext, } from "./exposure/requestContext";
|
|
6
4
|
export type * from "./exposure/resourceTypes";
|
|
@@ -10,184 +8,3 @@ export { readInputFileToBuffer, writeInputFileToPath } from "./files";
|
|
|
10
8
|
export { createHttpSmartClient, createHttpMixedClient } from "./http";
|
|
11
9
|
export type { HttpSmartClient, HttpSmartClientAuthConfig, HttpSmartClientConfig, MixedHttpClient, MixedHttpClientAuthConfig, MixedHttpClientConfig, Readable, } from "./http";
|
|
12
10
|
export * from "./durable";
|
|
13
|
-
export declare const globals: {
|
|
14
|
-
resources: {
|
|
15
|
-
httpSmartClientFactory: import("./node").IResource<void, Promise<import("./http").HttpSmartClientFactory>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
16
|
-
httpMixedClientFactory: import("./node").IResource<void, Promise<import("./http").HttpMixedClientFactory>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
17
|
-
store: import("./node").IResource<void, Promise<import("./node").Store>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
18
|
-
middlewareManager: import("./node").IResource<void, Promise<import("./node").MiddlewareManager>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
19
|
-
eventManager: import("./node").IResource<void, Promise<import("./node").EventManager>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
20
|
-
taskRunner: import("./node").IResource<void, Promise<import("./node").TaskRunner>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
21
|
-
logger: import("./node").IResource<void, Promise<import("./node").Logger>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
22
|
-
serializer: import("./node").IResource<void, Promise<SerializerLike>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
23
|
-
cache: import("./node").IResource<import("./node").CacheResourceConfig, Promise<{
|
|
24
|
-
map: Map<string, import("./node").ICacheInstance>;
|
|
25
|
-
cacheFactoryTask: import("./node").TaskDependencyWithIntercept<import("lru-cache").LRUCache.Options<any, any, any>, Promise<import("./node").ICacheInstance>>;
|
|
26
|
-
defaultOptions: any;
|
|
27
|
-
}>, {
|
|
28
|
-
cacheFactoryTask: import("./node").ITask<import("lru-cache").LRUCache.Options<any, any, any>, Promise<import("./node").ICacheInstance>, any, any, import("./node").TagType[], import("./node").TaskMiddlewareAttachmentType[]>;
|
|
29
|
-
}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
30
|
-
queue: import("./node").IResource<void, Promise<{
|
|
31
|
-
map: Map<string, import("./node").Queue>;
|
|
32
|
-
run: <T>(id: string, task: (signal: AbortSignal) => Promise<T>) => Promise<T>;
|
|
33
|
-
}>, {}, {
|
|
34
|
-
map: Map<string, import("./node").Queue>;
|
|
35
|
-
}, {
|
|
36
|
-
title: string;
|
|
37
|
-
description: string;
|
|
38
|
-
}, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
39
|
-
httpClientFactory: import("./node").IResource<void, Promise<import("./node").HttpClientFactory>, {
|
|
40
|
-
serializer: import("./node").IResource<void, Promise<SerializerLike>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
41
|
-
store: import("./node").IResource<void, Promise<import("./node").Store>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
42
|
-
}, any, {
|
|
43
|
-
title: string;
|
|
44
|
-
description: string;
|
|
45
|
-
}, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
46
|
-
rateLimit: import("./node").IResource<void, Promise<{
|
|
47
|
-
states: WeakMap<import("./node").RateLimitMiddlewareConfig, import("./node").RateLimitState>;
|
|
48
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
49
|
-
metadata?: Record<string, any>;
|
|
50
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
51
|
-
circuitBreaker: import("./node").IResource<void, Promise<{
|
|
52
|
-
statusMap: Map<string, import("./node").CircuitBreakerStatus>;
|
|
53
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
54
|
-
metadata?: Record<string, any>;
|
|
55
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
56
|
-
temporal: import("./node").IResource<void, Promise<{
|
|
57
|
-
debounceStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").DebounceState>;
|
|
58
|
-
throttleStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").ThrottleState>;
|
|
59
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
60
|
-
metadata?: Record<string, any>;
|
|
61
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
62
|
-
concurrency: import("./node").IResource<void, Promise<{
|
|
63
|
-
semaphoresByConfig: WeakMap<import("./node").ConcurrencyMiddlewareConfig, import("./node").Semaphore>;
|
|
64
|
-
semaphoresByKey: Map<string, {
|
|
65
|
-
semaphore: import("./node").Semaphore;
|
|
66
|
-
limit: number;
|
|
67
|
-
}>;
|
|
68
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
69
|
-
metadata?: Record<string, any>;
|
|
70
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
71
|
-
};
|
|
72
|
-
events: {
|
|
73
|
-
readonly ready: import("./node").IEvent<void>;
|
|
74
|
-
};
|
|
75
|
-
middleware: {
|
|
76
|
-
requireContext: import("./node").ITaskMiddleware<import("./node").RequireContextMiddlewareConfig, void, void, any>;
|
|
77
|
-
task: {
|
|
78
|
-
requireContext: import("./node").ITaskMiddleware<import("./node").RequireContextMiddlewareConfig, void, void, any>;
|
|
79
|
-
cache: import("./node").ITaskMiddleware<any, void, void, {
|
|
80
|
-
cache: import("./node").IResource<import("./node").CacheResourceConfig, Promise<{
|
|
81
|
-
map: Map<string, import("./node").ICacheInstance>;
|
|
82
|
-
cacheFactoryTask: import("./node").TaskDependencyWithIntercept<import("lru-cache").LRUCache.Options<any, any, any>, Promise<import("./node").ICacheInstance>>;
|
|
83
|
-
defaultOptions: any;
|
|
84
|
-
}>, {
|
|
85
|
-
cacheFactoryTask: import("./node").ITask<import("lru-cache").LRUCache.Options<any, any, any>, Promise<import("./node").ICacheInstance>, any, any, import("./node").TagType[], import("./node").TaskMiddlewareAttachmentType[]>;
|
|
86
|
-
}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
87
|
-
}> & {
|
|
88
|
-
journalKeys: {
|
|
89
|
-
readonly hit: import("./node").JournalKey<boolean>;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
concurrency: import("./node").ITaskMiddleware<import("./node").ConcurrencyMiddlewareConfig, void, void, {
|
|
93
|
-
state: import("./node").IResource<void, Promise<{
|
|
94
|
-
semaphoresByConfig: WeakMap<import("./node").ConcurrencyMiddlewareConfig, import("./node").Semaphore>;
|
|
95
|
-
semaphoresByKey: Map<string, {
|
|
96
|
-
semaphore: import("./node").Semaphore;
|
|
97
|
-
limit: number;
|
|
98
|
-
}>;
|
|
99
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
100
|
-
metadata?: Record<string, any>;
|
|
101
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
102
|
-
}>;
|
|
103
|
-
debounce: import("./node").ITaskMiddleware<import("./node").TemporalMiddlewareConfig, void, void, {
|
|
104
|
-
state: import("./node").IResource<void, Promise<{
|
|
105
|
-
debounceStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").DebounceState>;
|
|
106
|
-
throttleStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").ThrottleState>;
|
|
107
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
108
|
-
metadata?: Record<string, any>;
|
|
109
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
110
|
-
}>;
|
|
111
|
-
throttle: import("./node").ITaskMiddleware<import("./node").TemporalMiddlewareConfig, void, void, {
|
|
112
|
-
state: import("./node").IResource<void, Promise<{
|
|
113
|
-
debounceStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").DebounceState>;
|
|
114
|
-
throttleStates: WeakMap<import("./node").TemporalMiddlewareConfig, import("./node").ThrottleState>;
|
|
115
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
116
|
-
metadata?: Record<string, any>;
|
|
117
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
118
|
-
}>;
|
|
119
|
-
fallback: import("./node").ITaskMiddleware<import("./node").FallbackMiddlewareConfig, void, void, {
|
|
120
|
-
taskRunner: import("./node").IResource<void, Promise<import("./node").TaskRunner>, {}, any, any, import("./node").TagType[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
121
|
-
}> & {
|
|
122
|
-
journalKeys: {
|
|
123
|
-
readonly active: import("./node").JournalKey<boolean>;
|
|
124
|
-
readonly error: import("./node").JournalKey<Error>;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
rateLimit: import("./node").ITaskMiddleware<import("./node").RateLimitMiddlewareConfig, void, void, {
|
|
128
|
-
state: import("./node").IResource<void, Promise<{
|
|
129
|
-
states: WeakMap<import("./node").RateLimitMiddlewareConfig, import("./node").RateLimitState>;
|
|
130
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
131
|
-
metadata?: Record<string, any>;
|
|
132
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
133
|
-
}> & {
|
|
134
|
-
journalKeys: {
|
|
135
|
-
readonly remaining: import("./node").JournalKey<number>;
|
|
136
|
-
readonly resetTime: import("./node").JournalKey<number>;
|
|
137
|
-
readonly limit: import("./node").JournalKey<number>;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
retry: import("./node").ITaskMiddleware<import("./node").RetryMiddlewareConfig, void, void, any> & {
|
|
141
|
-
journalKeys: {
|
|
142
|
-
readonly attempt: import("./node").JournalKey<number>;
|
|
143
|
-
readonly lastError: import("./node").JournalKey<Error>;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
timeout: import("./node").ITaskMiddleware<import("./node").TimeoutMiddlewareConfig, void, void, any> & {
|
|
147
|
-
journalKeys: {
|
|
148
|
-
readonly abortController: import("./node").JournalKey<AbortController>;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
circuitBreaker: import("./node").ITaskMiddleware<import("./node").CircuitBreakerMiddlewareConfig, void, void, {
|
|
152
|
-
state: import("./node").IResource<void, Promise<{
|
|
153
|
-
statusMap: Map<string, import("./node").CircuitBreakerStatus>;
|
|
154
|
-
}>, {}, any, any, import("./node").ITag<{
|
|
155
|
-
metadata?: Record<string, any>;
|
|
156
|
-
}, void, void>[], import("./node").ResourceMiddlewareAttachmentType[]>;
|
|
157
|
-
}> & {
|
|
158
|
-
journalKeys: {
|
|
159
|
-
readonly state: import("./node").JournalKey<import("./node").CircuitBreakerState>;
|
|
160
|
-
readonly failures: import("./node").JournalKey<number>;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
resource: {
|
|
165
|
-
retry: import("./node").IResourceMiddleware<import("./node").RetryMiddlewareConfig, void, void, any>;
|
|
166
|
-
timeout: import("./node").IResourceMiddleware<import("./node").TimeoutMiddlewareConfig, void, void, any>;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
tags: {
|
|
170
|
-
system: import("./node").ITag<{
|
|
171
|
-
metadata?: Record<string, any>;
|
|
172
|
-
}, void, void>;
|
|
173
|
-
excludeFromGlobalHooks: import("./node").ITag<{
|
|
174
|
-
metadata?: Record<string, any>;
|
|
175
|
-
}, void, void>;
|
|
176
|
-
debug: import("./node").ITag<import("./node").DebugFriendlyConfig, void, void>;
|
|
177
|
-
tunnel: import("./node").ITag<void, void, import("./node").TunnelRunner>;
|
|
178
|
-
tunnelPolicy: import("./node").ITag<import("./node").TunnelTaskMiddlewarePolicyConfig, void, void>;
|
|
179
|
-
authValidator: import("./node").ITag<void, void, void>;
|
|
180
|
-
};
|
|
181
|
-
tunnels: Readonly<{
|
|
182
|
-
http: Readonly<{
|
|
183
|
-
createClient(cfg: import("./node").HttpCreateClientConfig): import("./node").ExposureFetchClient;
|
|
184
|
-
}>;
|
|
185
|
-
}>;
|
|
186
|
-
debug: {
|
|
187
|
-
levels: {
|
|
188
|
-
normal: import("./node").DebugConfig;
|
|
189
|
-
verbose: import("./node").DebugConfig;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
export declare function run(root: any, config?: any): Promise<RunResult<any>>;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
import type { IAsyncLocalStorage } from "../types";
|
|
1
2
|
import { BrowserPlatformAdapter } from "./browser";
|
|
3
|
+
/**
|
|
4
|
+
* Edge runtimes (workers) are closer to browsers but may support
|
|
5
|
+
* AsyncLocalStorage via the `node:async_hooks` compat layer
|
|
6
|
+
* (e.g. Cloudflare Workers, Vercel Edge).
|
|
7
|
+
*/
|
|
2
8
|
export declare class EdgePlatformAdapter extends BrowserPlatformAdapter {
|
|
3
9
|
readonly id: "edge";
|
|
10
|
+
private alsClass;
|
|
11
|
+
private alsProbed;
|
|
12
|
+
init(): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Attempt to discover AsyncLocalStorage from the runtime.
|
|
15
|
+
* Checks globalThis first, then tries `import("node:async_hooks")`.
|
|
16
|
+
*/
|
|
17
|
+
private probeGlobalAsyncLocalStorage;
|
|
18
|
+
private probeAsyncLocalStorage;
|
|
4
19
|
onShutdownSignal(_handler: () => void): () => void;
|
|
20
|
+
hasAsyncLocalStorage(): boolean;
|
|
21
|
+
createAsyncLocalStorage<T>(): IAsyncLocalStorage<T>;
|
|
5
22
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { IAsyncLocalStorage, IPlatformAdapter } from "../types";
|
|
2
2
|
export declare class GenericUniversalPlatformAdapter implements IPlatformAdapter {
|
|
3
3
|
readonly id: "universal";
|
|
4
|
+
private alsClass;
|
|
5
|
+
private alsProbed;
|
|
4
6
|
init(): Promise<void>;
|
|
7
|
+
private probeAsyncLocalStorage;
|
|
5
8
|
onUncaughtException(handler: (error: any) => void): () => any;
|
|
6
9
|
onUnhandledRejection(handler: (reason: any) => void): () => any;
|
|
7
10
|
onShutdownSignal(handler: () => void): () => void;
|
|
@@ -8,6 +8,7 @@ export declare function getDetectedEnvironment(): PlatformId;
|
|
|
8
8
|
export declare function isNode(): boolean;
|
|
9
9
|
export declare function isBrowser(): boolean;
|
|
10
10
|
export declare function isUniversal(): boolean;
|
|
11
|
+
export declare function isEdge(): boolean;
|
|
11
12
|
export type { IPlatformAdapter, IAsyncLocalStorage, PlatformId, PlatformSetTimeout, PlatformClearTimeout, } from "./types";
|
|
12
13
|
export declare class PlatformAdapter implements IPlatformAdapter {
|
|
13
14
|
private inner;
|