@upstash/workflow 0.2.8-rc-invoke → 0.2.9
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 +4 -4
- package/astro.d.ts +4 -4
- package/astro.js +282 -135
- package/astro.mjs +17 -15
- package/{chunk-IWAW7GIG.mjs → chunk-IPXJZU3K.mjs} +851 -592
- package/cloudflare.d.mts +4 -4
- package/cloudflare.d.ts +4 -4
- package/cloudflare.js +278 -135
- package/cloudflare.mjs +13 -15
- package/express.d.mts +4 -4
- package/express.d.ts +4 -4
- package/express.js +281 -144
- package/express.mjs +16 -22
- package/h3.d.mts +4 -4
- package/h3.d.ts +4 -4
- package/h3.js +275 -135
- package/h3.mjs +10 -15
- package/hono.d.mts +4 -4
- package/hono.d.ts +4 -4
- package/hono.js +277 -134
- package/hono.mjs +12 -14
- package/index.d.mts +268 -5
- package/index.d.ts +268 -5
- package/index.js +297 -43
- package/index.mjs +60 -3
- package/nextjs.d.mts +6 -6
- package/nextjs.d.ts +6 -6
- package/nextjs.js +286 -143
- package/nextjs.mjs +21 -23
- 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 +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +207 -41
- package/solidjs.mjs +1 -1
- package/svelte.d.mts +8 -9
- package/svelte.d.ts +8 -9
- package/svelte.js +278 -135
- package/svelte.mjs +13 -15
- package/{types-C7Y7WUQd.d.mts → types-CYhDXnf8.d.mts} +110 -18
- package/{types-C7Y7WUQd.d.ts → types-CYhDXnf8.d.ts} +110 -18
- package/chunk-LCZMBGEM.mjs +0 -95
- package/serve-many-BlBvXfBS.d.mts +0 -10
- package/serve-many-Dw-UUnH6.d.ts +0 -10
package/express.mjs
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInvokeCallback,
|
|
3
|
-
serveManyBase
|
|
4
|
-
} from "./chunk-LCZMBGEM.mjs";
|
|
5
1
|
import {
|
|
6
2
|
SDK_TELEMETRY,
|
|
7
3
|
__commonJS,
|
|
8
4
|
__require,
|
|
9
5
|
__toESM,
|
|
10
|
-
serveBase
|
|
11
|
-
|
|
6
|
+
serveBase,
|
|
7
|
+
serveManyBase
|
|
8
|
+
} from "./chunk-IPXJZU3K.mjs";
|
|
12
9
|
|
|
13
10
|
// node_modules/depd/index.js
|
|
14
11
|
var require_depd = __commonJS({
|
|
@@ -23704,14 +23701,10 @@ function createExpressHandler(params) {
|
|
|
23704
23701
|
headers: new Headers(request_.headers),
|
|
23705
23702
|
body: requestBody
|
|
23706
23703
|
});
|
|
23707
|
-
const { handler: serveHandler } = serveBase(
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23711
|
-
...options,
|
|
23712
|
-
useJSONContent: true
|
|
23713
|
-
}
|
|
23714
|
-
);
|
|
23704
|
+
const { handler: serveHandler } = serveBase(routeFunction, telemetry, {
|
|
23705
|
+
...options,
|
|
23706
|
+
useJSONContent: true
|
|
23707
|
+
});
|
|
23715
23708
|
const response = await serveHandler(webRequest);
|
|
23716
23709
|
res.status(response.status).json(await response.json());
|
|
23717
23710
|
};
|
|
@@ -23723,21 +23716,22 @@ function serve(routeFunction, options) {
|
|
|
23723
23716
|
return router;
|
|
23724
23717
|
}
|
|
23725
23718
|
var createWorkflow = (...params) => {
|
|
23726
|
-
const
|
|
23719
|
+
const [routeFunction, options = {}] = params;
|
|
23727
23720
|
return {
|
|
23728
|
-
|
|
23729
|
-
|
|
23721
|
+
routeFunction,
|
|
23722
|
+
options,
|
|
23730
23723
|
workflowId: void 0
|
|
23731
23724
|
};
|
|
23732
23725
|
};
|
|
23733
|
-
var serveMany = (workflows) => {
|
|
23726
|
+
var serveMany = (workflows, options) => {
|
|
23734
23727
|
const router = (0, import_express.Router)();
|
|
23735
23728
|
const { handler } = serveManyBase({
|
|
23736
23729
|
workflows,
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
|
|
23730
|
+
getUrl(...params) {
|
|
23731
|
+
return params[0].url;
|
|
23732
|
+
},
|
|
23733
|
+
serveMethod: (...params) => createExpressHandler(params),
|
|
23734
|
+
options
|
|
23741
23735
|
});
|
|
23742
23736
|
router.all("*", handler);
|
|
23743
23737
|
return router;
|
package/h3.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
|
-
import { R as RouteFunction,
|
|
3
|
-
import { s as serveManyBase } from './serve-many-
|
|
2
|
+
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-CYhDXnf8.mjs';
|
|
3
|
+
import { s as serveManyBase } from './serve-many-BVDpPsF-.mjs';
|
|
4
4
|
import '@upstash/qstash';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'ai';
|
|
@@ -9,8 +9,8 @@ import '@ai-sdk/openai';
|
|
|
9
9
|
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload>) => {
|
|
10
10
|
handler: h3.EventHandler<h3.EventHandlerRequest, Promise<Response>>;
|
|
11
11
|
};
|
|
12
|
-
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult
|
|
13
|
-
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"]) => {
|
|
12
|
+
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
|
|
13
|
+
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => {
|
|
14
14
|
handler: (event: h3.H3Event<h3.EventHandlerRequest>) => Promise<any>;
|
|
15
15
|
};
|
|
16
16
|
|
package/h3.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as h3 from 'h3';
|
|
2
|
-
import { R as RouteFunction,
|
|
3
|
-
import { s as serveManyBase } from './serve-many-
|
|
2
|
+
import { R as RouteFunction, k as PublicServeOptions, t as InvokableWorkflow } from './types-CYhDXnf8.js';
|
|
3
|
+
import { s as serveManyBase } from './serve-many-e4zufyXN.js';
|
|
4
4
|
import '@upstash/qstash';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'ai';
|
|
@@ -9,8 +9,8 @@ import '@ai-sdk/openai';
|
|
|
9
9
|
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload>) => {
|
|
10
10
|
handler: h3.EventHandler<h3.EventHandlerRequest, Promise<Response>>;
|
|
11
11
|
};
|
|
12
|
-
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult
|
|
13
|
-
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"]) => {
|
|
12
|
+
declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
|
|
13
|
+
declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => {
|
|
14
14
|
handler: (event: h3.H3Event<h3.EventHandlerRequest>) => Promise<any>;
|
|
15
15
|
};
|
|
16
16
|
|