@upstash/workflow 0.2.15 → 0.2.16
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/astro.js +12 -2
- package/astro.mjs +1 -1
- package/{chunk-AC5CQCN3.mjs → chunk-TGEGSOSN.mjs} +12 -2
- package/cloudflare.js +12 -2
- package/cloudflare.mjs +1 -1
- package/express.js +12 -2
- package/express.mjs +1 -1
- package/h3.js +12 -2
- package/h3.mjs +1 -1
- package/hono.js +12 -2
- package/hono.mjs +1 -1
- package/index.js +12 -2
- package/index.mjs +1 -1
- package/nextjs.js +12 -2
- package/nextjs.mjs +1 -1
- package/package.json +1 -1
- package/solidjs.js +12 -2
- package/solidjs.mjs +1 -1
- package/svelte.js +12 -2
- package/svelte.mjs +1 -1
package/astro.js
CHANGED
|
@@ -3171,7 +3171,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3171
3171
|
try {
|
|
3172
3172
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3173
3173
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3174
|
-
|
|
3174
|
+
let errorMessage = "";
|
|
3175
|
+
try {
|
|
3176
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3177
|
+
if (errorPayload.message) {
|
|
3178
|
+
errorMessage = errorPayload.message;
|
|
3179
|
+
}
|
|
3180
|
+
} catch {
|
|
3181
|
+
}
|
|
3182
|
+
if (!errorMessage) {
|
|
3183
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3184
|
+
}
|
|
3175
3185
|
const workflowContext = new WorkflowContext({
|
|
3176
3186
|
qstashClient,
|
|
3177
3187
|
workflowRunId,
|
|
@@ -3200,7 +3210,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3200
3210
|
await failureFunction({
|
|
3201
3211
|
context: workflowContext,
|
|
3202
3212
|
failStatus: status,
|
|
3203
|
-
failResponse:
|
|
3213
|
+
failResponse: errorMessage,
|
|
3204
3214
|
failHeaders: header
|
|
3205
3215
|
});
|
|
3206
3216
|
} catch (error) {
|
package/astro.mjs
CHANGED
|
@@ -3215,7 +3215,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3215
3215
|
try {
|
|
3216
3216
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3217
3217
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3218
|
-
|
|
3218
|
+
let errorMessage = "";
|
|
3219
|
+
try {
|
|
3220
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3221
|
+
if (errorPayload.message) {
|
|
3222
|
+
errorMessage = errorPayload.message;
|
|
3223
|
+
}
|
|
3224
|
+
} catch {
|
|
3225
|
+
}
|
|
3226
|
+
if (!errorMessage) {
|
|
3227
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3228
|
+
}
|
|
3219
3229
|
const workflowContext = new WorkflowContext({
|
|
3220
3230
|
qstashClient,
|
|
3221
3231
|
workflowRunId,
|
|
@@ -3244,7 +3254,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3244
3254
|
await failureFunction({
|
|
3245
3255
|
context: workflowContext,
|
|
3246
3256
|
failStatus: status,
|
|
3247
|
-
failResponse:
|
|
3257
|
+
failResponse: errorMessage,
|
|
3248
3258
|
failHeaders: header
|
|
3249
3259
|
});
|
|
3250
3260
|
} catch (error) {
|
package/cloudflare.js
CHANGED
|
@@ -3171,7 +3171,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3171
3171
|
try {
|
|
3172
3172
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3173
3173
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3174
|
-
|
|
3174
|
+
let errorMessage = "";
|
|
3175
|
+
try {
|
|
3176
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3177
|
+
if (errorPayload.message) {
|
|
3178
|
+
errorMessage = errorPayload.message;
|
|
3179
|
+
}
|
|
3180
|
+
} catch {
|
|
3181
|
+
}
|
|
3182
|
+
if (!errorMessage) {
|
|
3183
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3184
|
+
}
|
|
3175
3185
|
const workflowContext = new WorkflowContext({
|
|
3176
3186
|
qstashClient,
|
|
3177
3187
|
workflowRunId,
|
|
@@ -3200,7 +3210,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3200
3210
|
await failureFunction({
|
|
3201
3211
|
context: workflowContext,
|
|
3202
3212
|
failStatus: status,
|
|
3203
|
-
failResponse:
|
|
3213
|
+
failResponse: errorMessage,
|
|
3204
3214
|
failHeaders: header
|
|
3205
3215
|
});
|
|
3206
3216
|
} catch (error) {
|
package/cloudflare.mjs
CHANGED
package/express.js
CHANGED
|
@@ -26843,7 +26843,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
26843
26843
|
try {
|
|
26844
26844
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
26845
26845
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
26846
|
-
|
|
26846
|
+
let errorMessage = "";
|
|
26847
|
+
try {
|
|
26848
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
26849
|
+
if (errorPayload.message) {
|
|
26850
|
+
errorMessage = errorPayload.message;
|
|
26851
|
+
}
|
|
26852
|
+
} catch {
|
|
26853
|
+
}
|
|
26854
|
+
if (!errorMessage) {
|
|
26855
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
26856
|
+
}
|
|
26847
26857
|
const workflowContext = new WorkflowContext({
|
|
26848
26858
|
qstashClient,
|
|
26849
26859
|
workflowRunId,
|
|
@@ -26872,7 +26882,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
26872
26882
|
await failureFunction({
|
|
26873
26883
|
context: workflowContext,
|
|
26874
26884
|
failStatus: status,
|
|
26875
|
-
failResponse:
|
|
26885
|
+
failResponse: errorMessage,
|
|
26876
26886
|
failHeaders: header
|
|
26877
26887
|
});
|
|
26878
26888
|
} catch (error) {
|
package/express.mjs
CHANGED
package/h3.js
CHANGED
|
@@ -3483,7 +3483,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3483
3483
|
try {
|
|
3484
3484
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3485
3485
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3486
|
-
|
|
3486
|
+
let errorMessage = "";
|
|
3487
|
+
try {
|
|
3488
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3489
|
+
if (errorPayload.message) {
|
|
3490
|
+
errorMessage = errorPayload.message;
|
|
3491
|
+
}
|
|
3492
|
+
} catch {
|
|
3493
|
+
}
|
|
3494
|
+
if (!errorMessage) {
|
|
3495
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3496
|
+
}
|
|
3487
3497
|
const workflowContext = new WorkflowContext({
|
|
3488
3498
|
qstashClient,
|
|
3489
3499
|
workflowRunId,
|
|
@@ -3512,7 +3522,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3512
3522
|
await failureFunction({
|
|
3513
3523
|
context: workflowContext,
|
|
3514
3524
|
failStatus: status,
|
|
3515
|
-
failResponse:
|
|
3525
|
+
failResponse: errorMessage,
|
|
3516
3526
|
failHeaders: header
|
|
3517
3527
|
});
|
|
3518
3528
|
} catch (error) {
|
package/h3.mjs
CHANGED
package/hono.js
CHANGED
|
@@ -3171,7 +3171,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3171
3171
|
try {
|
|
3172
3172
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3173
3173
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3174
|
-
|
|
3174
|
+
let errorMessage = "";
|
|
3175
|
+
try {
|
|
3176
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3177
|
+
if (errorPayload.message) {
|
|
3178
|
+
errorMessage = errorPayload.message;
|
|
3179
|
+
}
|
|
3180
|
+
} catch {
|
|
3181
|
+
}
|
|
3182
|
+
if (!errorMessage) {
|
|
3183
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3184
|
+
}
|
|
3175
3185
|
const workflowContext = new WorkflowContext({
|
|
3176
3186
|
qstashClient,
|
|
3177
3187
|
workflowRunId,
|
|
@@ -3200,7 +3210,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3200
3210
|
await failureFunction({
|
|
3201
3211
|
context: workflowContext,
|
|
3202
3212
|
failStatus: status,
|
|
3203
|
-
failResponse:
|
|
3213
|
+
failResponse: errorMessage,
|
|
3204
3214
|
failHeaders: header
|
|
3205
3215
|
});
|
|
3206
3216
|
} catch (error) {
|
package/hono.mjs
CHANGED
package/index.js
CHANGED
|
@@ -3154,7 +3154,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3154
3154
|
try {
|
|
3155
3155
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3156
3156
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3157
|
-
|
|
3157
|
+
let errorMessage = "";
|
|
3158
|
+
try {
|
|
3159
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3160
|
+
if (errorPayload.message) {
|
|
3161
|
+
errorMessage = errorPayload.message;
|
|
3162
|
+
}
|
|
3163
|
+
} catch {
|
|
3164
|
+
}
|
|
3165
|
+
if (!errorMessage) {
|
|
3166
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3167
|
+
}
|
|
3158
3168
|
const workflowContext = new WorkflowContext({
|
|
3159
3169
|
qstashClient,
|
|
3160
3170
|
workflowRunId,
|
|
@@ -3183,7 +3193,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3183
3193
|
await failureFunction({
|
|
3184
3194
|
context: workflowContext,
|
|
3185
3195
|
failStatus: status,
|
|
3186
|
-
failResponse:
|
|
3196
|
+
failResponse: errorMessage,
|
|
3187
3197
|
failHeaders: header
|
|
3188
3198
|
});
|
|
3189
3199
|
} catch (error) {
|
package/index.mjs
CHANGED
package/nextjs.js
CHANGED
|
@@ -3174,7 +3174,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3174
3174
|
try {
|
|
3175
3175
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3176
3176
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3177
|
-
|
|
3177
|
+
let errorMessage = "";
|
|
3178
|
+
try {
|
|
3179
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3180
|
+
if (errorPayload.message) {
|
|
3181
|
+
errorMessage = errorPayload.message;
|
|
3182
|
+
}
|
|
3183
|
+
} catch {
|
|
3184
|
+
}
|
|
3185
|
+
if (!errorMessage) {
|
|
3186
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3187
|
+
}
|
|
3178
3188
|
const workflowContext = new WorkflowContext({
|
|
3179
3189
|
qstashClient,
|
|
3180
3190
|
workflowRunId,
|
|
@@ -3203,7 +3213,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3203
3213
|
await failureFunction({
|
|
3204
3214
|
context: workflowContext,
|
|
3205
3215
|
failStatus: status,
|
|
3206
|
-
failResponse:
|
|
3216
|
+
failResponse: errorMessage,
|
|
3207
3217
|
failHeaders: header
|
|
3208
3218
|
});
|
|
3209
3219
|
} catch (error) {
|
package/nextjs.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@upstash/workflow","version":"v0.2.
|
|
1
|
+
{"name":"@upstash/workflow","version":"v0.2.16","description":"Durable, Reliable and Performant Serverless Functions","main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./*"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./dist/nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./h3":{"import":"./h3.mjs","require":"./h3.js"},"./svelte":{"import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./astro":{"import":"./astro.mjs","require":"./astro.js"},"./express":{"import":"./express.mjs","require":"./express.js"}},"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"{src,platforms}/**/*.{js,ts,tsx}\" --quiet --fix","check-exports":"bun run build && cd dist && attw -P"},"repository":{"type":"git","url":"git+https://github.com/upstash/workflow-ts.git"},"keywords":["upstash","qstash","workflow","serverless"],"author":"Cahid Arda Oz","license":"MIT","bugs":{"url":"https://github.com/upstash/workflow-ts/issues"},"homepage":"https://github.com/upstash/workflow-ts#readme","devDependencies":{"@ai-sdk/anthropic":"^1.1.15","@commitlint/cli":"^19.5.0","@commitlint/config-conventional":"^19.5.0","@eslint/js":"^9.11.1","@solidjs/start":"^1.0.8","@sveltejs/kit":"^2.6.1","@types/bun":"^1.1.10","@types/express":"^5.0.1","astro":"^4.16.7","eslint":"^9.11.1","eslint-plugin-unicorn":"^55.0.0","express":"^4.21.1","globals":"^15.10.0","h3":"^1.12.0","hono":"^4.6.20","husky":"^9.1.6","next":"^14.2.14","prettier":"3.3.3","tsup":"^8.3.0","typescript":"^5.7.2","typescript-eslint":"^8.18.0"},"dependencies":{"@ai-sdk/openai":"^1.2.1","@upstash/qstash":"^2.8.1","ai":"^4.1.54","zod":"^3.24.1"},"directories":{"example":"examples"}}
|
package/solidjs.js
CHANGED
|
@@ -3108,7 +3108,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3108
3108
|
try {
|
|
3109
3109
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3110
3110
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3111
|
-
|
|
3111
|
+
let errorMessage = "";
|
|
3112
|
+
try {
|
|
3113
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3114
|
+
if (errorPayload.message) {
|
|
3115
|
+
errorMessage = errorPayload.message;
|
|
3116
|
+
}
|
|
3117
|
+
} catch {
|
|
3118
|
+
}
|
|
3119
|
+
if (!errorMessage) {
|
|
3120
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3121
|
+
}
|
|
3112
3122
|
const workflowContext = new WorkflowContext({
|
|
3113
3123
|
qstashClient,
|
|
3114
3124
|
workflowRunId,
|
|
@@ -3137,7 +3147,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3137
3147
|
await failureFunction({
|
|
3138
3148
|
context: workflowContext,
|
|
3139
3149
|
failStatus: status,
|
|
3140
|
-
failResponse:
|
|
3150
|
+
failResponse: errorMessage,
|
|
3141
3151
|
failHeaders: header
|
|
3142
3152
|
});
|
|
3143
3153
|
} catch (error) {
|
package/solidjs.mjs
CHANGED
package/svelte.js
CHANGED
|
@@ -3171,7 +3171,17 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3171
3171
|
try {
|
|
3172
3172
|
const { status, header, body, url, sourceBody, workflowRunId } = JSON.parse(requestPayload);
|
|
3173
3173
|
const decodedBody = body ? decodeBase64(body) : "{}";
|
|
3174
|
-
|
|
3174
|
+
let errorMessage = "";
|
|
3175
|
+
try {
|
|
3176
|
+
const errorPayload = JSON.parse(decodedBody);
|
|
3177
|
+
if (errorPayload.message) {
|
|
3178
|
+
errorMessage = errorPayload.message;
|
|
3179
|
+
}
|
|
3180
|
+
} catch {
|
|
3181
|
+
}
|
|
3182
|
+
if (!errorMessage) {
|
|
3183
|
+
errorMessage = `Couldn't parse 'failResponse' in 'failureFunction', received: '${decodedBody}'`;
|
|
3184
|
+
}
|
|
3175
3185
|
const workflowContext = new WorkflowContext({
|
|
3176
3186
|
qstashClient,
|
|
3177
3187
|
workflowRunId,
|
|
@@ -3200,7 +3210,7 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
3200
3210
|
await failureFunction({
|
|
3201
3211
|
context: workflowContext,
|
|
3202
3212
|
failStatus: status,
|
|
3203
|
-
failResponse:
|
|
3213
|
+
failResponse: errorMessage,
|
|
3204
3214
|
failHeaders: header
|
|
3205
3215
|
});
|
|
3206
3216
|
} catch (error) {
|