@upstash/workflow 0.1.2 → 0.1.3-crpyto-canary
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.d.mts +9 -0
- package/astro.d.ts +9 -0
- package/astro.js +2128 -0
- package/astro.mjs +18 -0
- package/{chunk-EKVRVBHL.mjs → chunk-VIOVJ6QS.mjs} +36 -1
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +1 -1
- package/cloudflare.mjs +1 -1
- package/express.d.mts +7 -0
- package/express.d.ts +7 -0
- package/express.js +26087 -0
- package/express.mjs +23967 -0
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +4 -1
- package/h3.mjs +4 -1
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +1 -1
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/nextjs.d.mts +1 -1
- package/nextjs.d.ts +1 -1
- package/nextjs.js +1 -1
- package/nextjs.mjs +1 -1
- package/package.json +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +1 -1
- package/solidjs.mjs +1 -1
- package/svelte.d.mts +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +1 -1
- package/svelte.mjs +1 -1
- package/{types-p7sxktVE.d.mts → types-CI-2skYU.d.mts} +5 -4
- package/{types-p7sxktVE.d.ts → types-CI-2skYU.d.ts} +5 -4
package/astro.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serve
|
|
3
|
+
} from "./chunk-VIOVJ6QS.mjs";
|
|
4
|
+
|
|
5
|
+
// platforms/astro.ts
|
|
6
|
+
function serve2(routeFunction, options) {
|
|
7
|
+
const POST = (apiContext) => {
|
|
8
|
+
const { handler } = serve(
|
|
9
|
+
(workflowContext) => routeFunction(workflowContext, apiContext),
|
|
10
|
+
options
|
|
11
|
+
);
|
|
12
|
+
return handler(apiContext.request);
|
|
13
|
+
};
|
|
14
|
+
return { POST };
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
serve2 as serve
|
|
18
|
+
};
|
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
+
});
|
|
13
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
32
|
+
|
|
1
33
|
// src/error.ts
|
|
2
34
|
import { QstashError } from "@upstash/qstash";
|
|
3
35
|
var QStashWorkflowError = class extends QstashError {
|
|
@@ -1100,7 +1132,7 @@ var validateParallelSteps = (lazySteps, stepsFromRequest) => {
|
|
|
1100
1132
|
};
|
|
1101
1133
|
var sortSteps = (steps) => {
|
|
1102
1134
|
const getStepId = (step) => step.targetStep || step.stepId;
|
|
1103
|
-
return steps.
|
|
1135
|
+
return [...steps].sort((step, stepOther) => getStepId(step) - getStepId(stepOther));
|
|
1104
1136
|
};
|
|
1105
1137
|
|
|
1106
1138
|
// src/client/utils.ts
|
|
@@ -2162,6 +2194,9 @@ var Client3 = class {
|
|
|
2162
2194
|
};
|
|
2163
2195
|
|
|
2164
2196
|
export {
|
|
2197
|
+
__require,
|
|
2198
|
+
__commonJS,
|
|
2199
|
+
__toESM,
|
|
2165
2200
|
QStashWorkflowError,
|
|
2166
2201
|
QStashWorkflowAbort,
|
|
2167
2202
|
StepTypes,
|
package/cloudflare.d.mts
CHANGED
package/cloudflare.d.ts
CHANGED
package/cloudflare.js
CHANGED
|
@@ -1126,7 +1126,7 @@ var validateParallelSteps = (lazySteps, stepsFromRequest) => {
|
|
|
1126
1126
|
};
|
|
1127
1127
|
var sortSteps = (steps) => {
|
|
1128
1128
|
const getStepId = (step) => step.targetStep || step.stepId;
|
|
1129
|
-
return steps.
|
|
1129
|
+
return [...steps].sort((step, stepOther) => getStepId(step) - getStepId(stepOther));
|
|
1130
1130
|
};
|
|
1131
1131
|
|
|
1132
1132
|
// src/client/utils.ts
|
package/cloudflare.mjs
CHANGED
package/express.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { R as RouteFunction, W as WorkflowServeOptions } from './types-CI-2skYU.mjs';
|
|
2
|
+
import { Router } from 'express';
|
|
3
|
+
import '@upstash/qstash';
|
|
4
|
+
|
|
5
|
+
declare function serve<TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
6
|
+
|
|
7
|
+
export { serve };
|
package/express.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { R as RouteFunction, W as WorkflowServeOptions } from './types-CI-2skYU.js';
|
|
2
|
+
import { Router } from 'express';
|
|
3
|
+
import '@upstash/qstash';
|
|
4
|
+
|
|
5
|
+
declare function serve<TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
6
|
+
|
|
7
|
+
export { serve };
|