@meetploy/nextjs 1.12.0 → 1.14.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/dev.js +44 -5
- package/dist/dev.js.map +1 -1
- package/dist/dev.spec.js +30 -0
- package/dist/dev.spec.js.map +1 -1
- package/dist/email-inbound-runtime.d.ts +34 -0
- package/dist/email-inbound-runtime.js +81 -0
- package/dist/email-inbound-runtime.js.map +1 -0
- package/dist/handler.d.ts +2 -1
- package/dist/handler.js +74 -215
- package/dist/handler.js.map +1 -1
- package/dist/handler.spec.js +177 -0
- package/dist/handler.spec.js.map +1 -1
- package/dist/workflow-step-runtime.d.ts +44 -0
- package/dist/workflow-step-runtime.js +330 -0
- package/dist/workflow-step-runtime.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
export const WORKFLOW_SUSPENDABLE_HEADER = "X-Ploy-Workflow-Suspendable";
|
|
2
|
+
export function formatErrorForStorage(error) {
|
|
3
|
+
const maxCauseDepth = 10;
|
|
4
|
+
if (!(error instanceof Error)) {
|
|
5
|
+
return String(error);
|
|
6
|
+
}
|
|
7
|
+
let result = error.stack ?? `${error.name}: ${error.message}`;
|
|
8
|
+
let cause = error.cause;
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
let depth = 0;
|
|
11
|
+
while (cause !== null && cause !== undefined && depth < maxCauseDepth) {
|
|
12
|
+
if (seen.has(cause)) {
|
|
13
|
+
result += "\n\nCaused by: [cycle detected in error causes]";
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
seen.add(cause);
|
|
17
|
+
if (cause instanceof Error) {
|
|
18
|
+
result += `\n\nCaused by: ${cause.stack ?? `${cause.name}: ${cause.message}`}`;
|
|
19
|
+
cause = cause.cause;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
result += `\n\nCaused by: ${String(cause)}`;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
depth++;
|
|
26
|
+
}
|
|
27
|
+
if (cause !== null && cause !== undefined && depth >= maxCauseDepth) {
|
|
28
|
+
result += "\n\nCaused by: [additional error causes truncated]";
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
export function createWorkflowRuntime(options) {
|
|
33
|
+
const suspendedMarker = Symbol.for("ploy.workflow.suspended");
|
|
34
|
+
const { formatError, withLogContext } = options;
|
|
35
|
+
const post = (path, payload) => options.post(path, JSON.stringify(payload));
|
|
36
|
+
const inLogContext = (context, fn) => withLogContext ? withLogContext(context, fn) : fn();
|
|
37
|
+
const log = (level, message, context, payload) => {
|
|
38
|
+
if (!withLogContext) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
withLogContext(context, () => {
|
|
42
|
+
console[level](message, payload);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const startStep = async (body) => {
|
|
46
|
+
const response = await post("step/start", body);
|
|
47
|
+
if (!response.ok) {
|
|
48
|
+
throw new Error(`Failed to start step: ${await response.text()}`);
|
|
49
|
+
}
|
|
50
|
+
return (await response.json());
|
|
51
|
+
};
|
|
52
|
+
const completeStep = async (body) => {
|
|
53
|
+
const response = await post("step/complete", body);
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
throw new Error(`Failed to save step result: ${await response.text()}`);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const pendingSleep = (output) => {
|
|
59
|
+
const resumeAt = output && typeof output === "object"
|
|
60
|
+
? output.resumeAt
|
|
61
|
+
: undefined;
|
|
62
|
+
return typeof resumeAt === "number" && resumeAt > Date.now()
|
|
63
|
+
? resumeAt
|
|
64
|
+
: null;
|
|
65
|
+
};
|
|
66
|
+
const createStepContext = (executionId, defaultRetries, resume, state) => {
|
|
67
|
+
const suspendable = resume?.suspendable === true;
|
|
68
|
+
const completedSteps = resume?.completedSteps && typeof resume.completedSteps === "object"
|
|
69
|
+
? resume.completedSteps
|
|
70
|
+
: null;
|
|
71
|
+
const cachedStep = (stepName) => completedSteps &&
|
|
72
|
+
Object.prototype.hasOwnProperty.call(completedSteps, stepName)
|
|
73
|
+
? { output: completedSteps[stepName] }
|
|
74
|
+
: null;
|
|
75
|
+
const suspend = (resumeAt) => {
|
|
76
|
+
if (!state.suspension) {
|
|
77
|
+
const suspension = new Error("Workflow suspended");
|
|
78
|
+
suspension.name = "WorkflowSuspension";
|
|
79
|
+
suspension.resumeAt = resumeAt;
|
|
80
|
+
state.suspension = suspension;
|
|
81
|
+
}
|
|
82
|
+
throw state.suspension;
|
|
83
|
+
};
|
|
84
|
+
let stepIndex = 0;
|
|
85
|
+
return {
|
|
86
|
+
async run(stepName, fn, options) {
|
|
87
|
+
const currentStepIndex = stepIndex++;
|
|
88
|
+
if (state.suspension) {
|
|
89
|
+
throw state.suspension;
|
|
90
|
+
}
|
|
91
|
+
const cached = cachedStep(stepName);
|
|
92
|
+
if (cached) {
|
|
93
|
+
return cached.output;
|
|
94
|
+
}
|
|
95
|
+
if (suspendable && state.ranStep) {
|
|
96
|
+
suspend(null);
|
|
97
|
+
}
|
|
98
|
+
const maxRetries = options?.retries ?? defaultRetries;
|
|
99
|
+
const logContext = (attempt) => ({
|
|
100
|
+
workflowExecutionId: executionId,
|
|
101
|
+
stepName,
|
|
102
|
+
stepIndex: currentStepIndex,
|
|
103
|
+
attempt,
|
|
104
|
+
maxRetries,
|
|
105
|
+
});
|
|
106
|
+
const startResult = await startStep({
|
|
107
|
+
executionId,
|
|
108
|
+
stepName,
|
|
109
|
+
stepIndex: currentStepIndex,
|
|
110
|
+
input: options?.input,
|
|
111
|
+
});
|
|
112
|
+
if (startResult.alreadyCompleted) {
|
|
113
|
+
log("info", "Workflow step reused cached result", logContext(0), {
|
|
114
|
+
stepName,
|
|
115
|
+
stepIndex: currentStepIndex,
|
|
116
|
+
});
|
|
117
|
+
return startResult.output;
|
|
118
|
+
}
|
|
119
|
+
log("info", "Workflow step started", logContext(1), {
|
|
120
|
+
stepName,
|
|
121
|
+
stepIndex: currentStepIndex,
|
|
122
|
+
maxRetries,
|
|
123
|
+
});
|
|
124
|
+
const startTime = Date.now();
|
|
125
|
+
let lastError = null;
|
|
126
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
127
|
+
let result;
|
|
128
|
+
try {
|
|
129
|
+
result = await inLogContext(logContext(attempt + 1), () => fn());
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
lastError =
|
|
133
|
+
error instanceof Error ? error : new Error(String(error));
|
|
134
|
+
if (attempt < maxRetries) {
|
|
135
|
+
const durationMs = Date.now() - startTime;
|
|
136
|
+
const retryResponse = await post("step/retry", {
|
|
137
|
+
executionId,
|
|
138
|
+
stepName,
|
|
139
|
+
input: options?.input,
|
|
140
|
+
error: formatError(lastError),
|
|
141
|
+
durationMs,
|
|
142
|
+
attempt: attempt + 1,
|
|
143
|
+
maxRetries,
|
|
144
|
+
});
|
|
145
|
+
if (!retryResponse.ok) {
|
|
146
|
+
throw new Error(`Failed to record step retry: ${await retryResponse.text()}`);
|
|
147
|
+
}
|
|
148
|
+
log("warn", "Workflow step retry scheduled", logContext(attempt + 1), {
|
|
149
|
+
stepName,
|
|
150
|
+
stepIndex: currentStepIndex,
|
|
151
|
+
error: formatError(lastError),
|
|
152
|
+
durationMs,
|
|
153
|
+
attempt: attempt + 1,
|
|
154
|
+
maxRetries,
|
|
155
|
+
});
|
|
156
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(1000 * Math.pow(2, attempt), 30000)));
|
|
157
|
+
}
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
const durationMs = Date.now() - startTime;
|
|
161
|
+
await completeStep({
|
|
162
|
+
executionId,
|
|
163
|
+
stepName,
|
|
164
|
+
input: options?.input,
|
|
165
|
+
output: result,
|
|
166
|
+
durationMs,
|
|
167
|
+
attempt: attempt + 1,
|
|
168
|
+
maxRetries,
|
|
169
|
+
});
|
|
170
|
+
state.ranStep = true;
|
|
171
|
+
log("info", "Workflow step finished", logContext(attempt + 1), {
|
|
172
|
+
stepName,
|
|
173
|
+
stepIndex: currentStepIndex,
|
|
174
|
+
durationMs,
|
|
175
|
+
attempt: attempt + 1,
|
|
176
|
+
maxRetries,
|
|
177
|
+
});
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
const failure = lastError ?? new Error("Step execution failed");
|
|
181
|
+
const durationMs = Date.now() - startTime;
|
|
182
|
+
await post("step/fail", {
|
|
183
|
+
executionId,
|
|
184
|
+
stepName,
|
|
185
|
+
input: options?.input,
|
|
186
|
+
error: formatError(failure),
|
|
187
|
+
durationMs,
|
|
188
|
+
attempt: maxRetries + 1,
|
|
189
|
+
maxRetries,
|
|
190
|
+
});
|
|
191
|
+
log("error", "Workflow step failed", logContext(maxRetries + 1), {
|
|
192
|
+
stepName,
|
|
193
|
+
stepIndex: currentStepIndex,
|
|
194
|
+
error: formatError(failure),
|
|
195
|
+
durationMs,
|
|
196
|
+
attempt: maxRetries + 1,
|
|
197
|
+
maxRetries,
|
|
198
|
+
});
|
|
199
|
+
throw failure;
|
|
200
|
+
},
|
|
201
|
+
async sleep(durationMs) {
|
|
202
|
+
const sleepStepIndex = stepIndex++;
|
|
203
|
+
const stepName = `__sleep_${String(sleepStepIndex)}`;
|
|
204
|
+
if (state.suspension) {
|
|
205
|
+
throw state.suspension;
|
|
206
|
+
}
|
|
207
|
+
const input = { sleptMs: durationMs };
|
|
208
|
+
if (suspendable) {
|
|
209
|
+
const cached = cachedStep(stepName);
|
|
210
|
+
if (cached) {
|
|
211
|
+
const resumeAt = pendingSleep(cached.output);
|
|
212
|
+
if (resumeAt !== null) {
|
|
213
|
+
suspend(resumeAt);
|
|
214
|
+
}
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const startResult = await startStep({
|
|
218
|
+
executionId,
|
|
219
|
+
stepName,
|
|
220
|
+
stepIndex: sleepStepIndex,
|
|
221
|
+
input,
|
|
222
|
+
});
|
|
223
|
+
if (startResult.alreadyCompleted) {
|
|
224
|
+
const resumeAt = pendingSleep(startResult.output);
|
|
225
|
+
if (resumeAt !== null) {
|
|
226
|
+
suspend(resumeAt);
|
|
227
|
+
}
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
const resumeAt = Date.now() + durationMs;
|
|
231
|
+
await completeStep({
|
|
232
|
+
executionId,
|
|
233
|
+
stepName,
|
|
234
|
+
input,
|
|
235
|
+
output: { sleptMs: durationMs, resumeAt },
|
|
236
|
+
durationMs: 0,
|
|
237
|
+
attempt: 1,
|
|
238
|
+
maxRetries: 0,
|
|
239
|
+
});
|
|
240
|
+
suspend(resumeAt);
|
|
241
|
+
}
|
|
242
|
+
const logContext = {
|
|
243
|
+
workflowExecutionId: executionId,
|
|
244
|
+
stepName,
|
|
245
|
+
stepIndex: sleepStepIndex,
|
|
246
|
+
attempt: 1,
|
|
247
|
+
maxRetries: 0,
|
|
248
|
+
};
|
|
249
|
+
const startResult = await startStep({
|
|
250
|
+
executionId,
|
|
251
|
+
stepName,
|
|
252
|
+
stepIndex: sleepStepIndex,
|
|
253
|
+
input,
|
|
254
|
+
});
|
|
255
|
+
if (startResult.alreadyCompleted) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
log("info", "Workflow step started", logContext, {
|
|
259
|
+
stepName,
|
|
260
|
+
stepIndex: sleepStepIndex,
|
|
261
|
+
maxRetries: 0,
|
|
262
|
+
});
|
|
263
|
+
await inLogContext(logContext, () => new Promise((resolve) => setTimeout(resolve, durationMs)));
|
|
264
|
+
await post("step/complete", {
|
|
265
|
+
executionId,
|
|
266
|
+
stepName,
|
|
267
|
+
input,
|
|
268
|
+
output: input,
|
|
269
|
+
durationMs,
|
|
270
|
+
attempt: 1,
|
|
271
|
+
maxRetries: 0,
|
|
272
|
+
});
|
|
273
|
+
log("info", "Workflow step finished", logContext, {
|
|
274
|
+
stepName,
|
|
275
|
+
stepIndex: sleepStepIndex,
|
|
276
|
+
durationMs,
|
|
277
|
+
attempt: 1,
|
|
278
|
+
maxRetries: 0,
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
return {
|
|
284
|
+
async executeWorkflow(executionId, workflowFn, input, env, defaultRetries = 3, onError, resume) {
|
|
285
|
+
const state = { ranStep: false, suspension: null };
|
|
286
|
+
const step = createStepContext(executionId, defaultRetries, resume, state);
|
|
287
|
+
const context = {
|
|
288
|
+
input,
|
|
289
|
+
env,
|
|
290
|
+
step,
|
|
291
|
+
};
|
|
292
|
+
const suspended = (suspension) => ({
|
|
293
|
+
[suspendedMarker]: true,
|
|
294
|
+
resumeAt: suspension.resumeAt,
|
|
295
|
+
});
|
|
296
|
+
try {
|
|
297
|
+
const output = await workflowFn(context);
|
|
298
|
+
if (state.suspension) {
|
|
299
|
+
return suspended(state.suspension);
|
|
300
|
+
}
|
|
301
|
+
await post("complete", { executionId, output });
|
|
302
|
+
return output;
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
if (state.suspension) {
|
|
306
|
+
return suspended(state.suspension);
|
|
307
|
+
}
|
|
308
|
+
if (onError) {
|
|
309
|
+
try {
|
|
310
|
+
await onError(error instanceof Error ? error : new Error(String(error)), context);
|
|
311
|
+
}
|
|
312
|
+
catch (hookError) {
|
|
313
|
+
console.error("[workflow] onError hook threw:", hookError);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
await post("fail", {
|
|
317
|
+
executionId,
|
|
318
|
+
error: formatError(error),
|
|
319
|
+
});
|
|
320
|
+
throw error;
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
isSuspended(value) {
|
|
324
|
+
return (typeof value === "object" &&
|
|
325
|
+
value !== null &&
|
|
326
|
+
value[suspendedMarker] === true);
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=workflow-step-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-step-run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EAAE,MAAM,EAAE,CAAC,CAAC;gBAChD,OAAO,MAAM,CAAC;YACf,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;oBACtB,OAAO,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBACpC,CAAC;gBACD,IAAI,OAAO,EAAE,CAAC;oBACb,IAAI,CAAC;wBACJ,MAAM,OAAO,CACZ,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EACzD,OAAO,CACP,CAAC;oBACH,CAAC;oBAAC,OAAO,SAAS,EAAE,CAAC;wBAEpB,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,SAAS,CAAC,CAAC;oBAC5D,CAAC;gBACF,CAAC;gBACD,MAAM,IAAI,CAAC,MAAM,EAAE;oBAClB,WAAW;oBACX,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC;iBACzB,CAAC,CAAC;gBACH,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,WAAW,CAAC,KAAc;YACzB,OAAO,CACN,OAAO,KAAK,KAAK,QAAQ;gBACzB,KAAK,KAAK,IAAI;gBACb,KAAiC,CAAC,eAAe,CAAC,KAAK,IAAI,CAC5D,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meetploy/nextjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dist/"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "tsc && resolve-tspaths",
|
|
47
|
+
"build": "cp ../shared/src/workflow-step-runtime.ts src/workflow-step-runtime.ts && cp ../shared/src/email-inbound-runtime.ts src/email-inbound-runtime.ts && tsc && resolve-tspaths",
|
|
48
48
|
"dev": "tsc-watch --onSuccess 'resolve-tspaths'",
|
|
49
49
|
"format": "eslint --fix . && prettier --write .",
|
|
50
50
|
"lint": "eslint . && prettier --check ."
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@meetploy/types": "*"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"@meetploy/shared": "*",
|
|
56
57
|
"@types/react": "^19.0.0",
|
|
57
58
|
"next": "16.3.0",
|
|
58
59
|
"react": "^19.2.3"
|