@upstash/workflow 0.2.22-rc → 0.3.0-rc

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/express.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  SDK_TELEMETRY,
3
3
  serveBase,
4
4
  serveManyBase
5
- } from "./chunk-CAQSUCHB.mjs";
5
+ } from "./chunk-AGYYZKP7.mjs";
6
6
 
7
7
  // platforms/express.ts
8
8
  import {
@@ -49,7 +49,8 @@ function createExpressHandler(params) {
49
49
  for (const [key, value] of response.headers.entries()) {
50
50
  res.setHeader(key, value);
51
51
  }
52
- res.status(response.status).json(await response.json());
52
+ const responseData = await response.json();
53
+ res.status(response.status).json(responseData);
53
54
  };
54
55
  }
55
56
  function serve(routeFunction, options) {
package/h3.d.mts CHANGED
@@ -1,15 +1,13 @@
1
1
  import * as h3 from 'h3';
2
- import { R as RouteFunction, n as PublicServeOptions, y as InvokableWorkflow } from './types-Q3dM0UlR.mjs';
3
- import { s as serveManyBase } from './serve-many-BNusWYgt.mjs';
2
+ import { R as RouteFunction, n as PublicServeOptions, y as InvokableWorkflow } from './types-DESkn7K9.mjs';
3
+ import { s as serveManyBase } from './serve-many-DEwKPF6H.mjs';
4
4
  import '@upstash/qstash';
5
5
  import 'zod';
6
- import 'ai';
7
- import '@ai-sdk/openai';
8
6
 
9
7
  declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload>) => {
10
8
  handler: h3.EventHandler<h3.EventHandlerRequest, Promise<Response>>;
11
9
  };
12
- declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
10
+ declare const createWorkflow: <TInitialPayload, TResult>(...params: Parameters<typeof serve<TInitialPayload, TResult>>) => InvokableWorkflow<TInitialPayload, TResult>;
13
11
  declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => {
14
12
  handler: (event: h3.H3Event<h3.EventHandlerRequest>) => Promise<any>;
15
13
  };
package/h3.d.ts CHANGED
@@ -1,15 +1,13 @@
1
1
  import * as h3 from 'h3';
2
- import { R as RouteFunction, n as PublicServeOptions, y as InvokableWorkflow } from './types-Q3dM0UlR.js';
3
- import { s as serveManyBase } from './serve-many-CXqQP3RI.js';
2
+ import { R as RouteFunction, n as PublicServeOptions, y as InvokableWorkflow } from './types-DESkn7K9.js';
3
+ import { s as serveManyBase } from './serve-many-DVtHRxeg.js';
4
4
  import '@upstash/qstash';
5
5
  import 'zod';
6
- import 'ai';
7
- import '@ai-sdk/openai';
8
6
 
9
7
  declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload>) => {
10
8
  handler: h3.EventHandler<h3.EventHandlerRequest, Promise<Response>>;
11
9
  };
12
- declare const createWorkflow: <TInitialPayload, TResult>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: PublicServeOptions<TInitialPayload> | undefined) => InvokableWorkflow<TInitialPayload, TResult>;
10
+ declare const createWorkflow: <TInitialPayload, TResult>(...params: Parameters<typeof serve<TInitialPayload, TResult>>) => InvokableWorkflow<TInitialPayload, TResult>;
13
11
  declare const serveMany: (workflows: Parameters<typeof serveManyBase>[0]["workflows"], options?: Parameters<typeof serveManyBase>[0]["options"]) => {
14
12
  handler: (event: h3.H3Event<h3.EventHandlerRequest>) => Promise<any>;
15
13
  };