@aikirun/workflow 0.9.2 → 0.10.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/index.d.ts +2 -2
- package/dist/index.js +2 -8
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -255,7 +255,7 @@ interface WorkflowVersion<Input, Output, AppContext, TEventsDefinition extends E
|
|
|
255
255
|
with(): WorkflowBuilder<Input, Output, AppContext, TEventsDefinition>;
|
|
256
256
|
start: (client: Client<AppContext>, ...args: Input extends void ? [] : [Input]) => Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
257
257
|
startAsChild: <ParentInput, ParentEventsDefinition extends EventsDefinition>(parentRun: WorkflowRunContext<ParentInput, AppContext, ParentEventsDefinition>, ...args: Input extends void ? [] : [Input]) => Promise<ChildWorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
258
|
-
getHandle: (client: Client<AppContext>, runId:
|
|
258
|
+
getHandle: (client: Client<AppContext>, runId: string) => Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
259
259
|
[INTERNAL]: {
|
|
260
260
|
eventsDefinition: TEventsDefinition;
|
|
261
261
|
handler: (run: WorkflowRunContext<Input, AppContext, TEventsDefinition>, input: Input, context: AppContext) => Promise<void>;
|
|
@@ -277,7 +277,7 @@ declare class WorkflowVersionImpl<Input, Output, AppContext, TEventsDefinition e
|
|
|
277
277
|
start(client: Client<AppContext>, ...args: Input extends void ? [] : [Input]): Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
278
278
|
startAsChild(parentRun: WorkflowRunContext<unknown, AppContext, EventsDefinition>, ...args: Input extends void ? [] : [Input]): Promise<ChildWorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
279
279
|
private assertUniqueChildRunReferenceId;
|
|
280
|
-
getHandle(client: Client<AppContext>, runId:
|
|
280
|
+
getHandle(client: Client<AppContext>, runId: string): Promise<WorkflowRunHandle<Input, Output, AppContext, TEventsDefinition>>;
|
|
281
281
|
private handler;
|
|
282
282
|
private tryExecuteWorkflow;
|
|
283
283
|
private assertRetryAllowed;
|
package/dist/index.js
CHANGED
|
@@ -648,7 +648,7 @@ function createSleeper(handle, logger) {
|
|
|
648
648
|
if (!sleepState) {
|
|
649
649
|
try {
|
|
650
650
|
await handle[INTERNAL3].transitionState({ status: "sleeping", sleepName, durationMs });
|
|
651
|
-
logger.info("
|
|
651
|
+
logger.info("Going to sleeping", {
|
|
652
652
|
"aiki.sleepName": sleepName,
|
|
653
653
|
"aiki.durationMs": durationMs
|
|
654
654
|
});
|
|
@@ -692,11 +692,6 @@ function createSleeper(handle, logger) {
|
|
|
692
692
|
});
|
|
693
693
|
durationMs -= sleepState.durationMs;
|
|
694
694
|
} else {
|
|
695
|
-
logger.warn("Lower sleep duration encountered during replay. Already slept enough", {
|
|
696
|
-
"aiki.sleepName": sleepName,
|
|
697
|
-
"aiki.historicDurationMs": sleepState.durationMs,
|
|
698
|
-
"aiki.latestDurationMs": durationMs
|
|
699
|
-
});
|
|
700
695
|
return { cancelled: false };
|
|
701
696
|
}
|
|
702
697
|
try {
|
|
@@ -1007,9 +1002,8 @@ var WorkflowVersionImpl = class _WorkflowVersionImpl {
|
|
|
1007
1002
|
for (const [key, value] of Object.entries(awaitingRetryState)) {
|
|
1008
1003
|
logMeta[`aiki.${key}`] = value;
|
|
1009
1004
|
}
|
|
1010
|
-
run.logger.info("Workflow
|
|
1005
|
+
run.logger.info("Workflow awaiting retry", {
|
|
1011
1006
|
"aiki.attempts": attempts,
|
|
1012
|
-
"aiki.delayMs": retryParams.delayMs,
|
|
1013
1007
|
...logMeta
|
|
1014
1008
|
});
|
|
1015
1009
|
throw new WorkflowRunSuspendedError4(run.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikirun/workflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Workflow SDK for Aiki - define durable workflows with tasks, sleeps, waits, and event handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "tsup"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@aikirun/types": "0.
|
|
21
|
+
"@aikirun/types": "0.10.0"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|