@upstash/workflow 0.2.8 → 0.2.10-hono-generics
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 +8 -3
- package/astro.d.ts +8 -3
- package/astro.js +393 -82
- package/astro.mjs +36 -8
- package/{chunk-BPUSHNSD.mjs → chunk-IPXJZU3K.mjs} +1226 -943
- package/cloudflare.d.mts +9 -4
- package/cloudflare.d.ts +9 -4
- package/cloudflare.js +392 -88
- package/cloudflare.mjs +35 -14
- package/express.d.mts +7 -3
- package/express.d.ts +7 -3
- package/express.js +400 -92
- package/express.mjs +43 -18
- package/h3.d.mts +9 -7
- package/h3.d.ts +9 -7
- package/h3.js +397 -95
- package/h3.mjs +40 -21
- package/hono.d.mts +10 -4
- package/hono.d.ts +10 -4
- package/hono.js +391 -90
- package/hono.mjs +34 -16
- package/index.d.mts +47 -33
- package/index.d.ts +47 -33
- package/index.js +315 -92
- package/index.mjs +32 -30
- package/nextjs.d.mts +14 -5
- package/nextjs.d.ts +14 -5
- package/nextjs.js +408 -77
- package/nextjs.mjs +63 -17
- package/package.json +1 -1
- package/serve-many-BVDpPsF-.d.mts +13 -0
- package/serve-many-e4zufyXN.d.ts +13 -0
- package/solidjs.d.mts +3 -3
- package/solidjs.d.ts +3 -3
- package/solidjs.js +289 -71
- package/solidjs.mjs +7 -10
- package/svelte.d.mts +13 -6
- package/svelte.d.ts +13 -6
- package/svelte.js +391 -88
- package/svelte.mjs +34 -14
- package/{types-B62AnIU3.d.mts → types-CYhDXnf8.d.mts} +74 -8
- package/{types-B62AnIU3.d.ts → types-CYhDXnf8.d.ts} +74 -8
package/cloudflare.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SDK_TELEMETRY,
|
|
3
|
-
serveBase
|
|
4
|
-
|
|
3
|
+
serveBase,
|
|
4
|
+
serveManyBase
|
|
5
|
+
} from "./chunk-IPXJZU3K.mjs";
|
|
5
6
|
|
|
6
7
|
// platforms/cloudflare.ts
|
|
7
8
|
var getArgs = (args) => {
|
|
@@ -22,24 +23,44 @@ var getArgs = (args) => {
|
|
|
22
23
|
}
|
|
23
24
|
throw new Error("Could not derive handler arguments from input. Please check how serve is used.");
|
|
24
25
|
};
|
|
26
|
+
var telemetry = {
|
|
27
|
+
sdk: SDK_TELEMETRY,
|
|
28
|
+
framework: "cloudflare"
|
|
29
|
+
};
|
|
25
30
|
var serve = (routeFunction, options) => {
|
|
26
31
|
const fetch = async (...args) => {
|
|
27
32
|
const { request, env } = getArgs(args);
|
|
28
|
-
const { handler: serveHandler } = serveBase(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
framework: "cloudflare"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
env,
|
|
36
|
-
...options
|
|
37
|
-
}
|
|
38
|
-
);
|
|
33
|
+
const { handler: serveHandler } = serveBase(routeFunction, telemetry, {
|
|
34
|
+
env,
|
|
35
|
+
...options
|
|
36
|
+
});
|
|
39
37
|
return await serveHandler(request);
|
|
40
38
|
};
|
|
41
39
|
return { fetch };
|
|
42
40
|
};
|
|
41
|
+
var createWorkflow = (...params) => {
|
|
42
|
+
const [routeFunction, options = {}] = params;
|
|
43
|
+
return {
|
|
44
|
+
workflowId: void 0,
|
|
45
|
+
routeFunction,
|
|
46
|
+
options
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var serveMany = (workflows, options) => {
|
|
50
|
+
return {
|
|
51
|
+
fetch: serveManyBase({
|
|
52
|
+
workflows,
|
|
53
|
+
getUrl(...params) {
|
|
54
|
+
const { request } = getArgs(params);
|
|
55
|
+
return request.url;
|
|
56
|
+
},
|
|
57
|
+
options,
|
|
58
|
+
serveMethod: (...params) => serve(...params).fetch
|
|
59
|
+
}).handler
|
|
60
|
+
};
|
|
61
|
+
};
|
|
43
62
|
export {
|
|
44
|
-
|
|
63
|
+
createWorkflow,
|
|
64
|
+
serve,
|
|
65
|
+
serveMany
|
|
45
66
|
};
|
package/express.d.mts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as express_serve_static_core from 'express-serve-static-core';
|
|
2
|
+
import { R as RouteFunction, W as WorkflowServeOptions, t as InvokableWorkflow } from './types-CYhDXnf8.mjs';
|
|
2
3
|
import { Router } from 'express';
|
|
4
|
+
import { s as serveManyBase } from './serve-many-BVDpPsF-.mjs';
|
|
3
5
|
import '@upstash/qstash';
|
|
4
6
|
import 'zod';
|
|
5
7
|
import 'ai';
|
|
6
8
|
import '@ai-sdk/openai';
|
|
7
9
|
|
|
8
|
-
declare function serve<TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
10
|
+
declare function serve<TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
11
|
+
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish"> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
|
|
12
|
+
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => express_serve_static_core.Router;
|
|
9
13
|
|
|
10
|
-
export { serve };
|
|
14
|
+
export { createWorkflow, serve, serveMany };
|
package/express.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as express_serve_static_core from 'express-serve-static-core';
|
|
2
|
+
import { R as RouteFunction, W as WorkflowServeOptions, t as InvokableWorkflow } from './types-CYhDXnf8.js';
|
|
2
3
|
import { Router } from 'express';
|
|
4
|
+
import { s as serveManyBase } from './serve-many-e4zufyXN.js';
|
|
3
5
|
import '@upstash/qstash';
|
|
4
6
|
import 'zod';
|
|
5
7
|
import 'ai';
|
|
6
8
|
import '@ai-sdk/openai';
|
|
7
9
|
|
|
8
|
-
declare function serve<TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
10
|
+
declare function serve<TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: Omit<WorkflowServeOptions<globalThis.Response, TInitialPayload>, "onStepFinish">): Router;
|
|
11
|
+
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish"> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
|
|
12
|
+
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => express_serve_static_core.Router;
|
|
9
13
|
|
|
10
|
-
export { serve };
|
|
14
|
+
export { createWorkflow, serve, serveMany };
|