@upstash/workflow 0.2.12 → 0.2.13
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 +2 -2
- package/astro.d.ts +2 -2
- package/astro.js +1205 -1036
- package/astro.mjs +1 -1
- package/{chunk-4GTHIL7S.mjs → chunk-XVNSBBDC.mjs} +870 -699
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +1205 -1036
- package/cloudflare.mjs +1 -1
- package/express.d.mts +2 -2
- package/express.d.ts +2 -2
- package/express.js +1221 -1052
- package/express.mjs +1 -1
- package/h3.d.mts +2 -2
- package/h3.d.ts +2 -2
- package/h3.js +1205 -1036
- package/h3.mjs +1 -1
- package/hono.d.mts +2 -2
- package/hono.d.ts +2 -2
- package/hono.js +1206 -1037
- package/hono.mjs +2 -2
- package/index.d.mts +10 -4
- package/index.d.ts +10 -4
- package/index.js +1184 -1008
- package/index.mjs +10 -3
- package/nextjs.d.mts +2 -2
- package/nextjs.d.ts +2 -2
- package/nextjs.js +1205 -1036
- package/nextjs.mjs +1 -1
- package/package.json +1 -1
- package/{serve-many-DLguU9iR.d.mts → serve-many-BF71QZHQ.d.mts} +1 -1
- package/{serve-many-BdMq5rFX.d.ts → serve-many-BMlN2PAB.d.ts} +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +1173 -1004
- package/solidjs.mjs +1 -1
- package/svelte.d.mts +2 -2
- package/svelte.d.ts +2 -2
- package/svelte.js +1205 -1036
- package/svelte.mjs +1 -1
- package/{types-D1W0VOpy.d.ts → types-C1WIgVLA.d.mts} +58 -45
- package/{types-D1W0VOpy.d.mts → types-C1WIgVLA.d.ts} +58 -45
package/hono.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
SDK_TELEMETRY,
|
|
3
3
|
serveBase,
|
|
4
4
|
serveManyBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XVNSBBDC.mjs";
|
|
6
6
|
|
|
7
7
|
// platforms/hono.ts
|
|
8
8
|
var telemetry = {
|
|
@@ -11,7 +11,7 @@ var telemetry = {
|
|
|
11
11
|
};
|
|
12
12
|
var serve = (routeFunction, options) => {
|
|
13
13
|
const handler = async (context) => {
|
|
14
|
-
const environment = context.env;
|
|
14
|
+
const environment = context.env ? context.env : typeof process === "undefined" ? {} : process.env;
|
|
15
15
|
const request = context.req.raw;
|
|
16
16
|
const { handler: serveHandler } = serveBase(routeFunction, telemetry, {
|
|
17
17
|
// when hono is used without cf workers, it sends a DebugHTTPServer
|
package/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RouteFunction, W as WorkflowServeOptions, E as ExclusiveValidationOptions, T as Telemetry, S as StepType, a as RawStep, N as NotifyResponse, b as Waiter, c as Step } from './types-
|
|
2
|
-
export { A as AsyncStepFunction, C as CallResponse, r as CallSettings, D as Duration, l as FailureFunctionPayload, F as FinishCondition, H as HeaderParams, t as InvokableWorkflow, s as InvokeStepResponse, I as InvokeWorkflowRequest, L as LazyInvokeStepParams, u as LogLevel, p as NotifyStepResponse, P as ParallelCallState, k as PublicServeOptions, m as RequiredExceptFields, j as StepFunction, h as StepTypes, i as SyncStepFunction, q as WaitEventOptions, n as WaitRequest, o as WaitStepResponse, f as WorkflowClient, e as WorkflowContext, w as WorkflowLogger, v as WorkflowLoggerOptions, g as WorkflowReceiver, d as WorkflowTool } from './types-
|
|
3
|
-
import { HTTPMethods, State, FlowControl, Client as Client$1, QstashError } from '@upstash/qstash';
|
|
1
|
+
import { R as RouteFunction, W as WorkflowServeOptions, E as ExclusiveValidationOptions, T as Telemetry, S as StepType, a as RawStep, N as NotifyResponse, b as Waiter, c as Step } from './types-C1WIgVLA.mjs';
|
|
2
|
+
export { A as AsyncStepFunction, C as CallResponse, r as CallSettings, D as Duration, l as FailureFunctionPayload, F as FinishCondition, H as HeaderParams, t as InvokableWorkflow, s as InvokeStepResponse, I as InvokeWorkflowRequest, L as LazyInvokeStepParams, u as LogLevel, p as NotifyStepResponse, P as ParallelCallState, k as PublicServeOptions, m as RequiredExceptFields, j as StepFunction, h as StepTypes, i as SyncStepFunction, q as WaitEventOptions, n as WaitRequest, o as WaitStepResponse, f as WorkflowClient, e as WorkflowContext, w as WorkflowLogger, v as WorkflowLoggerOptions, g as WorkflowReceiver, d as WorkflowTool } from './types-C1WIgVLA.mjs';
|
|
3
|
+
import { HTTPMethods, State, FlowControl, PublishRequest, Client as Client$1, QstashError } from '@upstash/qstash';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'ai';
|
|
6
6
|
import '@ai-sdk/openai';
|
|
@@ -423,15 +423,21 @@ declare class Client {
|
|
|
423
423
|
* with `wfr_`.
|
|
424
424
|
* @param retries retry to use in the initial request. in the rest of
|
|
425
425
|
* the workflow, `retries` option of the `serve` will be used.
|
|
426
|
+
* @param flowControl Settings for controlling the number of active requests
|
|
427
|
+
* and number of requests per second with the same key.
|
|
428
|
+
* @param delay Delay for the workflow run. This is used to delay the
|
|
429
|
+
* execution of the workflow run. The delay is in seconds or can be passed
|
|
430
|
+
* as a string with a time unit (e.g. "1h", "30m", "15s").
|
|
426
431
|
* @returns workflow run id
|
|
427
432
|
*/
|
|
428
|
-
trigger({ url, body, headers, workflowRunId, retries, flowControl, }: {
|
|
433
|
+
trigger({ url, body, headers, workflowRunId, retries, flowControl, delay, }: {
|
|
429
434
|
url: string;
|
|
430
435
|
body?: unknown;
|
|
431
436
|
headers?: Record<string, string>;
|
|
432
437
|
workflowRunId?: string;
|
|
433
438
|
retries?: number;
|
|
434
439
|
flowControl?: FlowControl;
|
|
440
|
+
delay?: PublishRequest["delay"];
|
|
435
441
|
}): Promise<{
|
|
436
442
|
workflowRunId: string;
|
|
437
443
|
}>;
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RouteFunction, W as WorkflowServeOptions, E as ExclusiveValidationOptions, T as Telemetry, S as StepType, a as RawStep, N as NotifyResponse, b as Waiter, c as Step } from './types-
|
|
2
|
-
export { A as AsyncStepFunction, C as CallResponse, r as CallSettings, D as Duration, l as FailureFunctionPayload, F as FinishCondition, H as HeaderParams, t as InvokableWorkflow, s as InvokeStepResponse, I as InvokeWorkflowRequest, L as LazyInvokeStepParams, u as LogLevel, p as NotifyStepResponse, P as ParallelCallState, k as PublicServeOptions, m as RequiredExceptFields, j as StepFunction, h as StepTypes, i as SyncStepFunction, q as WaitEventOptions, n as WaitRequest, o as WaitStepResponse, f as WorkflowClient, e as WorkflowContext, w as WorkflowLogger, v as WorkflowLoggerOptions, g as WorkflowReceiver, d as WorkflowTool } from './types-
|
|
3
|
-
import { HTTPMethods, State, FlowControl, Client as Client$1, QstashError } from '@upstash/qstash';
|
|
1
|
+
import { R as RouteFunction, W as WorkflowServeOptions, E as ExclusiveValidationOptions, T as Telemetry, S as StepType, a as RawStep, N as NotifyResponse, b as Waiter, c as Step } from './types-C1WIgVLA.js';
|
|
2
|
+
export { A as AsyncStepFunction, C as CallResponse, r as CallSettings, D as Duration, l as FailureFunctionPayload, F as FinishCondition, H as HeaderParams, t as InvokableWorkflow, s as InvokeStepResponse, I as InvokeWorkflowRequest, L as LazyInvokeStepParams, u as LogLevel, p as NotifyStepResponse, P as ParallelCallState, k as PublicServeOptions, m as RequiredExceptFields, j as StepFunction, h as StepTypes, i as SyncStepFunction, q as WaitEventOptions, n as WaitRequest, o as WaitStepResponse, f as WorkflowClient, e as WorkflowContext, w as WorkflowLogger, v as WorkflowLoggerOptions, g as WorkflowReceiver, d as WorkflowTool } from './types-C1WIgVLA.js';
|
|
3
|
+
import { HTTPMethods, State, FlowControl, PublishRequest, Client as Client$1, QstashError } from '@upstash/qstash';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'ai';
|
|
6
6
|
import '@ai-sdk/openai';
|
|
@@ -423,15 +423,21 @@ declare class Client {
|
|
|
423
423
|
* with `wfr_`.
|
|
424
424
|
* @param retries retry to use in the initial request. in the rest of
|
|
425
425
|
* the workflow, `retries` option of the `serve` will be used.
|
|
426
|
+
* @param flowControl Settings for controlling the number of active requests
|
|
427
|
+
* and number of requests per second with the same key.
|
|
428
|
+
* @param delay Delay for the workflow run. This is used to delay the
|
|
429
|
+
* execution of the workflow run. The delay is in seconds or can be passed
|
|
430
|
+
* as a string with a time unit (e.g. "1h", "30m", "15s").
|
|
426
431
|
* @returns workflow run id
|
|
427
432
|
*/
|
|
428
|
-
trigger({ url, body, headers, workflowRunId, retries, flowControl, }: {
|
|
433
|
+
trigger({ url, body, headers, workflowRunId, retries, flowControl, delay, }: {
|
|
429
434
|
url: string;
|
|
430
435
|
body?: unknown;
|
|
431
436
|
headers?: Record<string, string>;
|
|
432
437
|
workflowRunId?: string;
|
|
433
438
|
retries?: number;
|
|
434
439
|
flowControl?: FlowControl;
|
|
440
|
+
delay?: PublishRequest["delay"];
|
|
435
441
|
}): Promise<{
|
|
436
442
|
workflowRunId: string;
|
|
437
443
|
}>;
|