@upstash/qstash 2.7.6 → 2.7.7

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/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  ![npm (scoped)](https://img.shields.io/npm/v/@upstash/qstash)
4
4
 
5
- > [!NOTE]
6
- > **This project is in GA Stage.**
5
+ > [!NOTE] > **This project is in GA Stage.**
7
6
  > The Upstash Professional Support fully covers this project. It receives regular updates, and bug fixes.
8
7
  > The Upstash team is committed to maintaining and improving its functionality.
9
8
 
@@ -1159,6 +1159,17 @@ var Client = class {
1159
1159
  }
1160
1160
  };
1161
1161
 
1162
+ // src/client/workflow/constants.ts
1163
+ var WORKFLOW_ID_HEADER = "Upstash-Workflow-RunId";
1164
+ var WORKFLOW_INIT_HEADER = "Upstash-Workflow-Init";
1165
+ var WORKFLOW_URL_HEADER = "Upstash-Workflow-Url";
1166
+ var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1167
+ var WORKFLOW_PROTOCOL_VERSION = "1";
1168
+ var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1169
+ var DEFAULT_CONTENT_TYPE = "application/json";
1170
+ var NO_CONCURRENCY = 1;
1171
+ var DEFAULT_RETRIES = 3;
1172
+
1162
1173
  // node_modules/neverthrow/dist/index.es.js
1163
1174
  var defaultErrorConfig = {
1164
1175
  withStackTrace: false
@@ -1531,28 +1542,19 @@ var Err = class {
1531
1542
  };
1532
1543
  var fromThrowable = Result.fromThrowable;
1533
1544
 
1534
- // src/client/workflow/constants.ts
1535
- var WORKFLOW_ID_HEADER = "Upstash-Workflow-RunId";
1536
- var WORKFLOW_INIT_HEADER = "Upstash-Workflow-Init";
1537
- var WORKFLOW_URL_HEADER = "Upstash-Workflow-Url";
1538
- var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1539
- var WORKFLOW_PROTOCOL_VERSION = "1";
1540
- var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1541
- var DEFAULT_CONTENT_TYPE = "application/json";
1542
- var NO_CONCURRENCY = 1;
1543
-
1544
1545
  // src/client/workflow/types.ts
1545
1546
  var StepTypes = ["Initial", "Run", "SleepFor", "SleepUntil", "Call"];
1546
1547
 
1547
1548
  // src/client/workflow/workflow-requests.ts
1548
- var triggerFirstInvocation = async (workflowContext, debug) => {
1549
+ var triggerFirstInvocation = async (workflowContext, retries, debug) => {
1549
1550
  const headers = getHeaders(
1550
1551
  "true",
1551
1552
  workflowContext.workflowRunId,
1552
1553
  workflowContext.url,
1553
1554
  workflowContext.headers,
1554
1555
  void 0,
1555
- workflowContext.failureUrl
1556
+ workflowContext.failureUrl,
1557
+ retries
1556
1558
  );
1557
1559
  await debug?.log("SUBMIT", "SUBMIT_FIRST_INVOCATION", {
1558
1560
  headers,
@@ -1607,7 +1609,7 @@ var recreateUserHeaders = (headers) => {
1607
1609
  }
1608
1610
  return filteredHeaders;
1609
1611
  };
1610
- var handleThirdPartyCallResult = async (request, requestPayload, client, workflowUrl, failureUrl, debug) => {
1612
+ var handleThirdPartyCallResult = async (request, requestPayload, client, workflowUrl, failureUrl, retries, debug) => {
1611
1613
  try {
1612
1614
  if (request.headers.get("Upstash-Workflow-Callback")) {
1613
1615
  const callbackMessage = JSON.parse(requestPayload);
@@ -1647,7 +1649,8 @@ ${atob(callbackMessage.body)}`
1647
1649
  workflowUrl,
1648
1650
  userHeaders,
1649
1651
  void 0,
1650
- failureUrl
1652
+ failureUrl,
1653
+ retries
1651
1654
  );
1652
1655
  const callResultStep = {
1653
1656
  stepId: Number(stepIdString),
@@ -1683,7 +1686,7 @@ ${atob(callbackMessage.body)}`
1683
1686
  );
1684
1687
  }
1685
1688
  };
1686
- var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step, failureUrl) => {
1689
+ var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step, failureUrl, retries) => {
1687
1690
  const baseHeaders = {
1688
1691
  [WORKFLOW_INIT_HEADER]: initHeaderValue,
1689
1692
  [WORKFLOW_ID_HEADER]: workflowRunId,
@@ -1692,7 +1695,10 @@ var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step
1692
1695
  ...failureUrl ? {
1693
1696
  [`Upstash-Failure-Callback-Forward-${WORKFLOW_FAILURE_HEADER}`]: "true",
1694
1697
  "Upstash-Failure-Callback": failureUrl
1695
- } : {}
1698
+ } : {},
1699
+ ...retries === void 0 ? {} : {
1700
+ "Upstash-Retries": retries.toString()
1701
+ }
1696
1702
  };
1697
1703
  if (userHeaders) {
1698
1704
  for (const header of userHeaders.keys()) {
@@ -1987,7 +1993,8 @@ var AutoExecutor = class _AutoExecutor {
1987
1993
  this.context.url,
1988
1994
  this.context.headers,
1989
1995
  singleStep,
1990
- this.context.failureUrl
1996
+ this.context.failureUrl,
1997
+ this.context.retries
1991
1998
  );
1992
1999
  const willWait = singleStep.concurrent === NO_CONCURRENCY || singleStep.stepId === 0;
1993
2000
  return singleStep.callUrl ? (
@@ -2356,6 +2363,10 @@ var WorkflowContext = class {
2356
2363
  * Default value is set to `process.env`.
2357
2364
  */
2358
2365
  env;
2366
+ /**
2367
+ * Number of retries
2368
+ */
2369
+ retries;
2359
2370
  constructor({
2360
2371
  qstashClient,
2361
2372
  workflowRunId,
@@ -2366,7 +2377,8 @@ var WorkflowContext = class {
2366
2377
  debug,
2367
2378
  initialPayload,
2368
2379
  rawInitialPayload,
2369
- env
2380
+ env,
2381
+ retries
2370
2382
  }) {
2371
2383
  this.qstashClient = qstashClient;
2372
2384
  this.workflowRunId = workflowRunId;
@@ -2377,6 +2389,7 @@ var WorkflowContext = class {
2377
2389
  this.requestPayload = initialPayload;
2378
2390
  this.rawInitialPayload = rawInitialPayload ?? JSON.stringify(this.requestPayload);
2379
2391
  this.env = env ?? {};
2392
+ this.retries = retries ?? DEFAULT_RETRIES;
2380
2393
  this.executor = new AutoExecutor(this, this.steps, debug);
2381
2394
  }
2382
2395
  /**
@@ -2513,7 +2526,8 @@ var DisabledWorkflowContext = class _DisabledWorkflowContext extends WorkflowCon
2513
2526
  failureUrl: context.failureUrl,
2514
2527
  initialPayload: context.requestPayload,
2515
2528
  rawInitialPayload: context.rawInitialPayload,
2516
- env: context.env
2529
+ env: context.env,
2530
+ retries: context.retries
2517
2531
  });
2518
2532
  try {
2519
2533
  await routeFunction(disabledContext);
@@ -2751,6 +2765,7 @@ var processOptions = (options) => {
2751
2765
  }) : void 0,
2752
2766
  baseUrl: environment.UPSTASH_WORKFLOW_URL,
2753
2767
  env: environment,
2768
+ retries: DEFAULT_RETRIES,
2754
2769
  ...options
2755
2770
  };
2756
2771
  };
@@ -2765,7 +2780,8 @@ var serve = (routeFunction, options) => {
2765
2780
  failureUrl,
2766
2781
  failureFunction,
2767
2782
  baseUrl,
2768
- env
2783
+ env,
2784
+ retries
2769
2785
  } = processOptions(options);
2770
2786
  const debug = WorkflowLogger.getLogger(verbose);
2771
2787
  const handler = async (request) => {
@@ -2835,6 +2851,7 @@ var serve = (routeFunction, options) => {
2835
2851
  qstashClient,
2836
2852
  workflowUrl,
2837
2853
  workflowFailureUrl,
2854
+ retries,
2838
2855
  debug
2839
2856
  );
2840
2857
  if (callReturnCheck.isErr()) {
@@ -2843,7 +2860,7 @@ var serve = (routeFunction, options) => {
2843
2860
  });
2844
2861
  throw callReturnCheck.error;
2845
2862
  } else if (callReturnCheck.value === "continue-workflow") {
2846
- const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, debug) : await triggerRouteFunction({
2863
+ const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, retries, debug) : await triggerRouteFunction({
2847
2864
  onStep: async () => routeFunction(workflowContext),
2848
2865
  onCleanup: async () => {
2849
2866
  await triggerWorkflowDelete(workflowContext, debug);
@@ -1159,6 +1159,17 @@ var Client = class {
1159
1159
  }
1160
1160
  };
1161
1161
 
1162
+ // src/client/workflow/constants.ts
1163
+ var WORKFLOW_ID_HEADER = "Upstash-Workflow-RunId";
1164
+ var WORKFLOW_INIT_HEADER = "Upstash-Workflow-Init";
1165
+ var WORKFLOW_URL_HEADER = "Upstash-Workflow-Url";
1166
+ var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1167
+ var WORKFLOW_PROTOCOL_VERSION = "1";
1168
+ var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1169
+ var DEFAULT_CONTENT_TYPE = "application/json";
1170
+ var NO_CONCURRENCY = 1;
1171
+ var DEFAULT_RETRIES = 3;
1172
+
1162
1173
  // node_modules/neverthrow/dist/index.es.js
1163
1174
  var defaultErrorConfig = {
1164
1175
  withStackTrace: false
@@ -1531,28 +1542,19 @@ var Err = class {
1531
1542
  };
1532
1543
  var fromThrowable = Result.fromThrowable;
1533
1544
 
1534
- // src/client/workflow/constants.ts
1535
- var WORKFLOW_ID_HEADER = "Upstash-Workflow-RunId";
1536
- var WORKFLOW_INIT_HEADER = "Upstash-Workflow-Init";
1537
- var WORKFLOW_URL_HEADER = "Upstash-Workflow-Url";
1538
- var WORKFLOW_FAILURE_HEADER = "Upstash-Workflow-Is-Failure";
1539
- var WORKFLOW_PROTOCOL_VERSION = "1";
1540
- var WORKFLOW_PROTOCOL_VERSION_HEADER = "Upstash-Workflow-Sdk-Version";
1541
- var DEFAULT_CONTENT_TYPE = "application/json";
1542
- var NO_CONCURRENCY = 1;
1543
-
1544
1545
  // src/client/workflow/types.ts
1545
1546
  var StepTypes = ["Initial", "Run", "SleepFor", "SleepUntil", "Call"];
1546
1547
 
1547
1548
  // src/client/workflow/workflow-requests.ts
1548
- var triggerFirstInvocation = async (workflowContext, debug) => {
1549
+ var triggerFirstInvocation = async (workflowContext, retries, debug) => {
1549
1550
  const headers = getHeaders(
1550
1551
  "true",
1551
1552
  workflowContext.workflowRunId,
1552
1553
  workflowContext.url,
1553
1554
  workflowContext.headers,
1554
1555
  void 0,
1555
- workflowContext.failureUrl
1556
+ workflowContext.failureUrl,
1557
+ retries
1556
1558
  );
1557
1559
  await _optionalChain([debug, 'optionalAccess', _33 => _33.log, 'call', _34 => _34("SUBMIT", "SUBMIT_FIRST_INVOCATION", {
1558
1560
  headers,
@@ -1607,7 +1609,7 @@ var recreateUserHeaders = (headers) => {
1607
1609
  }
1608
1610
  return filteredHeaders;
1609
1611
  };
1610
- var handleThirdPartyCallResult = async (request, requestPayload, client, workflowUrl, failureUrl, debug) => {
1612
+ var handleThirdPartyCallResult = async (request, requestPayload, client, workflowUrl, failureUrl, retries, debug) => {
1611
1613
  try {
1612
1614
  if (request.headers.get("Upstash-Workflow-Callback")) {
1613
1615
  const callbackMessage = JSON.parse(requestPayload);
@@ -1647,7 +1649,8 @@ ${atob(callbackMessage.body)}`
1647
1649
  workflowUrl,
1648
1650
  userHeaders,
1649
1651
  void 0,
1650
- failureUrl
1652
+ failureUrl,
1653
+ retries
1651
1654
  );
1652
1655
  const callResultStep = {
1653
1656
  stepId: Number(stepIdString),
@@ -1683,7 +1686,7 @@ ${atob(callbackMessage.body)}`
1683
1686
  );
1684
1687
  }
1685
1688
  };
1686
- var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step, failureUrl) => {
1689
+ var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step, failureUrl, retries) => {
1687
1690
  const baseHeaders = {
1688
1691
  [WORKFLOW_INIT_HEADER]: initHeaderValue,
1689
1692
  [WORKFLOW_ID_HEADER]: workflowRunId,
@@ -1692,7 +1695,10 @@ var getHeaders = (initHeaderValue, workflowRunId, workflowUrl, userHeaders, step
1692
1695
  ...failureUrl ? {
1693
1696
  [`Upstash-Failure-Callback-Forward-${WORKFLOW_FAILURE_HEADER}`]: "true",
1694
1697
  "Upstash-Failure-Callback": failureUrl
1695
- } : {}
1698
+ } : {},
1699
+ ...retries === void 0 ? {} : {
1700
+ "Upstash-Retries": retries.toString()
1701
+ }
1696
1702
  };
1697
1703
  if (userHeaders) {
1698
1704
  for (const header of userHeaders.keys()) {
@@ -1987,7 +1993,8 @@ var AutoExecutor = (_class3 = class _AutoExecutor {
1987
1993
  this.context.url,
1988
1994
  this.context.headers,
1989
1995
  singleStep,
1990
- this.context.failureUrl
1996
+ this.context.failureUrl,
1997
+ this.context.retries
1991
1998
  );
1992
1999
  const willWait = singleStep.concurrent === NO_CONCURRENCY || singleStep.stepId === 0;
1993
2000
  return singleStep.callUrl ? (
@@ -2356,6 +2363,10 @@ var WorkflowContext = class {
2356
2363
  * Default value is set to `process.env`.
2357
2364
  */
2358
2365
 
2366
+ /**
2367
+ * Number of retries
2368
+ */
2369
+
2359
2370
  constructor({
2360
2371
  qstashClient,
2361
2372
  workflowRunId,
@@ -2366,7 +2377,8 @@ var WorkflowContext = class {
2366
2377
  debug,
2367
2378
  initialPayload,
2368
2379
  rawInitialPayload,
2369
- env
2380
+ env,
2381
+ retries
2370
2382
  }) {
2371
2383
  this.qstashClient = qstashClient;
2372
2384
  this.workflowRunId = workflowRunId;
@@ -2377,6 +2389,7 @@ var WorkflowContext = class {
2377
2389
  this.requestPayload = initialPayload;
2378
2390
  this.rawInitialPayload = _nullishCoalesce(rawInitialPayload, () => ( JSON.stringify(this.requestPayload)));
2379
2391
  this.env = _nullishCoalesce(env, () => ( {}));
2392
+ this.retries = _nullishCoalesce(retries, () => ( DEFAULT_RETRIES));
2380
2393
  this.executor = new AutoExecutor(this, this.steps, debug);
2381
2394
  }
2382
2395
  /**
@@ -2513,7 +2526,8 @@ var DisabledWorkflowContext = (_class8 = class _DisabledWorkflowContext extends
2513
2526
  failureUrl: context.failureUrl,
2514
2527
  initialPayload: context.requestPayload,
2515
2528
  rawInitialPayload: context.rawInitialPayload,
2516
- env: context.env
2529
+ env: context.env,
2530
+ retries: context.retries
2517
2531
  });
2518
2532
  try {
2519
2533
  await routeFunction(disabledContext);
@@ -2751,6 +2765,7 @@ var processOptions = (options) => {
2751
2765
  }) : void 0,
2752
2766
  baseUrl: environment.UPSTASH_WORKFLOW_URL,
2753
2767
  env: environment,
2768
+ retries: DEFAULT_RETRIES,
2754
2769
  ...options
2755
2770
  };
2756
2771
  };
@@ -2765,7 +2780,8 @@ var serve = (routeFunction, options) => {
2765
2780
  failureUrl,
2766
2781
  failureFunction,
2767
2782
  baseUrl,
2768
- env
2783
+ env,
2784
+ retries
2769
2785
  } = processOptions(options);
2770
2786
  const debug = WorkflowLogger.getLogger(verbose);
2771
2787
  const handler = async (request) => {
@@ -2835,6 +2851,7 @@ var serve = (routeFunction, options) => {
2835
2851
  qstashClient,
2836
2852
  workflowUrl,
2837
2853
  workflowFailureUrl,
2854
+ retries,
2838
2855
  debug
2839
2856
  );
2840
2857
  if (callReturnCheck.isErr()) {
@@ -2843,7 +2860,7 @@ var serve = (routeFunction, options) => {
2843
2860
  })]);
2844
2861
  throw callReturnCheck.error;
2845
2862
  } else if (callReturnCheck.value === "continue-workflow") {
2846
- const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, debug) : await triggerRouteFunction({
2863
+ const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, retries, debug) : await triggerRouteFunction({
2847
2864
  onStep: async () => routeFunction(workflowContext),
2848
2865
  onCleanup: async () => {
2849
2866
  await triggerWorkflowDelete(workflowContext, debug);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Receiver,
3
3
  serve
4
- } from "./chunk-B3NB4QLV.mjs";
4
+ } from "./chunk-3SZNLYUN.mjs";
5
5
 
6
6
  // node_modules/defu/dist/defu.mjs
7
7
  function isPlainObject(value) {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
4
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
5
5
 
6
6
  // node_modules/defu/dist/defu.mjs
7
7
  function isPlainObject(value) {
@@ -340,7 +340,7 @@ var verifySignatureH3 = (handler, config) => {
340
340
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
341
341
  );
342
342
  }
343
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
343
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
344
344
  currentSigningKey,
345
345
  nextSigningKey
346
346
  });
@@ -391,7 +391,7 @@ var serve2 = (routeFunction, options) => {
391
391
  body: await readRawBody(event),
392
392
  method: "POST"
393
393
  });
394
- const serveHandler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, options);
394
+ const serveHandler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, options);
395
395
  return await serveHandler(request);
396
396
  });
397
397
  return handler;
@@ -1103,7 +1103,11 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1103
1103
  * Default value is set to `process.env`.
1104
1104
  */
1105
1105
  readonly env: Record<string, string | undefined>;
1106
- constructor({ qstashClient, workflowRunId, headers, steps, url, failureUrl, debug, initialPayload, rawInitialPayload, env, }: {
1106
+ /**
1107
+ * Number of retries
1108
+ */
1109
+ readonly retries: number;
1110
+ constructor({ qstashClient, workflowRunId, headers, steps, url, failureUrl, debug, initialPayload, rawInitialPayload, env, retries, }: {
1107
1111
  qstashClient: WorkflowClient;
1108
1112
  workflowRunId: string;
1109
1113
  headers: Headers;
@@ -1114,6 +1118,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1114
1118
  initialPayload: TInitialPayload;
1115
1119
  rawInitialPayload?: string;
1116
1120
  env?: Record<string, string | undefined>;
1121
+ retries?: number;
1117
1122
  });
1118
1123
  /**
1119
1124
  * Executes a workflow step
@@ -1401,6 +1406,12 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1401
1406
  * Useful in cases like cloudflare with hono.
1402
1407
  */
1403
1408
  env?: Record<string, string | undefined>;
1409
+ /**
1410
+ * Number of retries to use in workflow requests
1411
+ *
1412
+ * 3 by default
1413
+ */
1414
+ retries?: number;
1404
1415
  };
1405
1416
  /**
1406
1417
  * Payload passed as body in failureFunction
@@ -1103,7 +1103,11 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1103
1103
  * Default value is set to `process.env`.
1104
1104
  */
1105
1105
  readonly env: Record<string, string | undefined>;
1106
- constructor({ qstashClient, workflowRunId, headers, steps, url, failureUrl, debug, initialPayload, rawInitialPayload, env, }: {
1106
+ /**
1107
+ * Number of retries
1108
+ */
1109
+ readonly retries: number;
1110
+ constructor({ qstashClient, workflowRunId, headers, steps, url, failureUrl, debug, initialPayload, rawInitialPayload, env, retries, }: {
1107
1111
  qstashClient: WorkflowClient;
1108
1112
  workflowRunId: string;
1109
1113
  headers: Headers;
@@ -1114,6 +1118,7 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1114
1118
  initialPayload: TInitialPayload;
1115
1119
  rawInitialPayload?: string;
1116
1120
  env?: Record<string, string | undefined>;
1121
+ retries?: number;
1117
1122
  });
1118
1123
  /**
1119
1124
  * Executes a workflow step
@@ -1401,6 +1406,12 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1401
1406
  * Useful in cases like cloudflare with hono.
1402
1407
  */
1403
1408
  env?: Record<string, string | undefined>;
1409
+ /**
1410
+ * Number of retries to use in workflow requests
1411
+ *
1412
+ * 3 by default
1413
+ */
1414
+ retries?: number;
1404
1415
  };
1405
1416
  /**
1406
1417
  * Payload passed as body in failureFunction
package/cloudflare.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
1
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
2
2
  import 'neverthrow';
3
3
 
4
4
  type WorkflowBindings = {
package/cloudflare.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
1
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
2
2
  import 'neverthrow';
3
3
 
4
4
  type WorkflowBindings = {
package/cloudflare.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
3
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
4
4
 
5
5
  // platforms/cloudflare.ts
6
6
  var getArgs = (args) => {
@@ -24,7 +24,7 @@ var getArgs = (args) => {
24
24
  var serve2 = (routeFunction, options) => {
25
25
  const handler = async (...args) => {
26
26
  const { request, env } = getArgs(args);
27
- const serveHandler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, {
27
+ const serveHandler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, {
28
28
  env,
29
29
  ...options
30
30
  });
package/cloudflare.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serve
3
- } from "./chunk-B3NB4QLV.mjs";
3
+ } from "./chunk-3SZNLYUN.mjs";
4
4
 
5
5
  // platforms/cloudflare.ts
6
6
  var getArgs = (args) => {
package/h3.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
3
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/h3.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
3
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/h3.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkNMSGEGBPjs = require('./chunk-NMSGEGBP.js');
4
+ var _chunkXJKBRKZEjs = require('./chunk-XJKBRKZE.js');
5
5
  require('./chunk-IJ5AEYLN.js');
6
- require('./chunk-WQZ4U6LJ.js');
6
+ require('./chunk-FBNCATUF.js');
7
7
 
8
8
 
9
9
 
10
- exports.serve = _chunkNMSGEGBPjs.serve; exports.verifySignatureH3 = _chunkNMSGEGBPjs.verifySignatureH3;
10
+ exports.serve = _chunkXJKBRKZEjs.serve; exports.verifySignatureH3 = _chunkXJKBRKZEjs.verifySignatureH3;
package/h3.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  serve,
3
3
  verifySignatureH3
4
- } from "./chunk-IJ3475FO.mjs";
4
+ } from "./chunk-SDSVXZLR.mjs";
5
5
  import "./chunk-S7JMIMW4.mjs";
6
- import "./chunk-B3NB4QLV.mjs";
6
+ import "./chunk-3SZNLYUN.mjs";
7
7
  export {
8
8
  serve,
9
9
  verifySignatureH3
package/hono.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Context } from 'hono';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type WorkflowBindings = {
package/hono.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Context } from 'hono';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type WorkflowBindings = {
package/hono.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
3
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
4
4
 
5
5
  // platforms/hono.ts
6
6
  var serve2 = (routeFunction, options) => {
7
7
  const handler = async (context) => {
8
8
  const environment = context.env;
9
9
  const request = context.req.raw;
10
- const serveHandler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, {
10
+ const serveHandler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, {
11
11
  // when hono is used without cf workers, it sends a DebugHTTPServer
12
12
  // object in `context.env`. don't pass env if this is the case:
13
13
  env: "QSTASH_TOKEN" in environment ? environment : void 0,
package/hono.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serve
3
- } from "./chunk-B3NB4QLV.mjs";
3
+ } from "./chunk-3SZNLYUN.mjs";
4
4
 
5
5
  // platforms/hono.ts
6
6
  var serve2 = (routeFunction, options) => {
package/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-aUVEwn93.mjs';
2
- export { A as AddEndpointsRequest, $ as AnalyticsConfig, a0 as AnalyticsSetup, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, a1 as setupAnalytics, Z as upstash } from './client-aUVEwn93.mjs';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-BsCzCprQ.mjs';
2
+ export { A as AddEndpointsRequest, $ as AnalyticsConfig, a0 as AnalyticsSetup, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, a1 as setupAnalytics, Z as upstash } from './client-BsCzCprQ.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  /**
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-aUVEwn93.js';
2
- export { A as AddEndpointsRequest, $ as AnalyticsConfig, a0 as AnalyticsSetup, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, a1 as setupAnalytics, Z as upstash } from './client-aUVEwn93.js';
1
+ import { R as RateLimit, C as ChatRateLimit, S as Step, F as FailureFunctionPayload } from './client-BsCzCprQ.js';
2
+ export { A as AddEndpointsRequest, $ as AnalyticsConfig, a0 as AnalyticsSetup, B as BodyInit, y as Chat, D as ChatCompletion, I as ChatCompletionChunk, z as ChatCompletionMessage, T as ChatRequest, f as Client, n as CreateScheduleRequest, p as Endpoint, t as Event, u as EventPayload, E as EventsRequest, v as GetEventsPayload, G as GetEventsResponse, H as HTTPMethods, w as HeadersInit, M as Message, k as MessagePayload, l as Messages, O as OpenAIChatModel, N as PromptChatRequest, _ as ProviderReturnType, P as PublishBatchRequest, e as PublishJsonRequest, d as PublishRequest, j as PublishResponse, g as PublishToApiResponse, i as PublishToUrlGroupsResponse, h as PublishToUrlResponse, Q as QueueRequest, c as Receiver, a as ReceiverConfig, q as RemoveEndpointsRequest, x as RequestOptions, m as Schedule, o as Schedules, b as SignatureError, s as State, K as StreamDisabled, J as StreamEnabled, L as StreamParameter, U as UrlGroup, r as UrlGroups, V as VerifyRequest, W as WithCursor, X as custom, Y as openai, a1 as setupAnalytics, Z as upstash } from './client-BsCzCprQ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  /**
package/index.js CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
21
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
22
22
 
23
23
 
24
24
 
@@ -38,4 +38,4 @@ var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
38
38
 
39
39
 
40
40
 
41
- exports.Chat = _chunkWQZ4U6LJjs.Chat; exports.Client = _chunkWQZ4U6LJjs.Client; exports.Messages = _chunkWQZ4U6LJjs.Messages; exports.QStashWorkflowAbort = _chunkWQZ4U6LJjs.QStashWorkflowAbort; exports.QStashWorkflowError = _chunkWQZ4U6LJjs.QStashWorkflowError; exports.QstashChatRatelimitError = _chunkWQZ4U6LJjs.QstashChatRatelimitError; exports.QstashDailyRatelimitError = _chunkWQZ4U6LJjs.QstashDailyRatelimitError; exports.QstashError = _chunkWQZ4U6LJjs.QstashError; exports.QstashRatelimitError = _chunkWQZ4U6LJjs.QstashRatelimitError; exports.Receiver = _chunkWQZ4U6LJjs.Receiver; exports.Schedules = _chunkWQZ4U6LJjs.Schedules; exports.SignatureError = _chunkWQZ4U6LJjs.SignatureError; exports.UrlGroups = _chunkWQZ4U6LJjs.UrlGroups; exports.custom = _chunkWQZ4U6LJjs.custom; exports.formatWorkflowError = _chunkWQZ4U6LJjs.formatWorkflowError; exports.openai = _chunkWQZ4U6LJjs.openai; exports.setupAnalytics = _chunkWQZ4U6LJjs.setupAnalytics; exports.upstash = _chunkWQZ4U6LJjs.upstash;
41
+ exports.Chat = _chunkFBNCATUFjs.Chat; exports.Client = _chunkFBNCATUFjs.Client; exports.Messages = _chunkFBNCATUFjs.Messages; exports.QStashWorkflowAbort = _chunkFBNCATUFjs.QStashWorkflowAbort; exports.QStashWorkflowError = _chunkFBNCATUFjs.QStashWorkflowError; exports.QstashChatRatelimitError = _chunkFBNCATUFjs.QstashChatRatelimitError; exports.QstashDailyRatelimitError = _chunkFBNCATUFjs.QstashDailyRatelimitError; exports.QstashError = _chunkFBNCATUFjs.QstashError; exports.QstashRatelimitError = _chunkFBNCATUFjs.QstashRatelimitError; exports.Receiver = _chunkFBNCATUFjs.Receiver; exports.Schedules = _chunkFBNCATUFjs.Schedules; exports.SignatureError = _chunkFBNCATUFjs.SignatureError; exports.UrlGroups = _chunkFBNCATUFjs.UrlGroups; exports.custom = _chunkFBNCATUFjs.custom; exports.formatWorkflowError = _chunkFBNCATUFjs.formatWorkflowError; exports.openai = _chunkFBNCATUFjs.openai; exports.setupAnalytics = _chunkFBNCATUFjs.setupAnalytics; exports.upstash = _chunkFBNCATUFjs.upstash;
package/index.mjs CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  openai,
19
19
  setupAnalytics,
20
20
  upstash
21
- } from "./chunk-B3NB4QLV.mjs";
21
+ } from "./chunk-3SZNLYUN.mjs";
22
22
  export {
23
23
  Chat,
24
24
  Client,
package/nextjs.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextApiHandler } from 'next';
2
2
  import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
3
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
3
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nextjs.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextApiHandler } from 'next';
2
2
  import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
3
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
3
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
4
4
  import 'neverthrow';
5
5
 
6
6
  type VerifySignatureConfig = {
package/nextjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
4
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
5
5
 
6
6
  // platforms/nextjs.ts
7
7
  var _server = require('next/server');
@@ -19,7 +19,7 @@ function verifySignature(handler, config) {
19
19
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
20
20
  );
21
21
  }
22
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
22
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
23
23
  currentSigningKey,
24
24
  nextSigningKey
25
25
  });
@@ -71,7 +71,7 @@ function verifySignatureEdge(handler, config) {
71
71
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
72
72
  );
73
73
  }
74
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
74
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
75
75
  currentSigningKey,
76
76
  nextSigningKey
77
77
  });
@@ -111,7 +111,7 @@ function verifySignatureAppRouter(handler, config) {
111
111
  "nextSigningKey is required, either in the config or as env variable QSTASH_NEXT_SIGNING_KEY"
112
112
  );
113
113
  }
114
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
114
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
115
115
  currentSigningKey,
116
116
  nextSigningKey
117
117
  });
@@ -139,7 +139,7 @@ function verifySignatureAppRouter(handler, config) {
139
139
  };
140
140
  }
141
141
  var serve2 = (routeFunction, options) => {
142
- const handler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, {
142
+ const handler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, {
143
143
  onStepFinish: (workflowRunId) => new (0, _server.NextResponse)(JSON.stringify({ workflowRunId }), { status: 200 }),
144
144
  ...options
145
145
  });
@@ -148,7 +148,7 @@ var serve2 = (routeFunction, options) => {
148
148
  };
149
149
  };
150
150
  var servePagesRouter = (routeFunction, options) => {
151
- const handler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, options);
151
+ const handler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, options);
152
152
  return async (req, res) => {
153
153
  if (_optionalChain([req, 'access', _10 => _10.method, 'optionalAccess', _11 => _11.toUpperCase, 'call', _12 => _12()]) !== "POST") {
154
154
  res.status(405).json("Only POST requests are allowed in worklfows");
package/nextjs.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Receiver,
3
3
  serve
4
- } from "./chunk-B3NB4QLV.mjs";
4
+ } from "./chunk-3SZNLYUN.mjs";
5
5
 
6
6
  // platforms/nextjs.ts
7
7
  import { NextResponse } from "next/server";
package/nuxt.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNMSGEGBPjs = require('./chunk-NMSGEGBP.js');
3
+ var _chunkXJKBRKZEjs = require('./chunk-XJKBRKZE.js');
4
4
  require('./chunk-IJ5AEYLN.js');
5
- require('./chunk-WQZ4U6LJ.js');
5
+ require('./chunk-FBNCATUF.js');
6
6
 
7
7
  // platforms/nuxt.ts
8
- var verifySignatureNuxt = _chunkNMSGEGBPjs.verifySignatureH3;
8
+ var verifySignatureNuxt = _chunkXJKBRKZEjs.verifySignatureH3;
9
9
 
10
10
 
11
11
  exports.verifySignatureNuxt = verifySignatureNuxt;
package/nuxt.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  verifySignatureH3
3
- } from "./chunk-IJ3475FO.mjs";
3
+ } from "./chunk-SDSVXZLR.mjs";
4
4
  import "./chunk-S7JMIMW4.mjs";
5
- import "./chunk-B3NB4QLV.mjs";
5
+ import "./chunk-3SZNLYUN.mjs";
6
6
 
7
7
  // platforms/nuxt.ts
8
8
  var verifySignatureNuxt = verifySignatureH3;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"version":"v2.7.6","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/sdk-qstash-ts#readme","repository":{"type":"git","url":"git+https://github.com/upstash/sdk-qstash-ts.git"},"bugs":{"url":"https://github.com/upstash/sdk-qstash-ts/issues"},"main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./**"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./nextjs":{"import":"./nextjs.js","require":"./nextjs.js"},"./dist/nextjs":{"import":"./nextjs.js","require":"./nextjs.js"},"./h3":{"types":"./h3.d.ts","import":"./h3.mjs","require":"./h3.js"},"./nuxt":{"types":"./nuxt.d.ts","import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"types":"./svelte.d.ts","import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"types":"./solidjs.d.ts","import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"types":"./workflow.d.ts","import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"types":"./hono.d.ts","import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"types":"./cloudflare.d.ts","import":"./cloudflare.mjs","require":"./cloudflare.js"}},"typesVersions":{"*":{"nextjs":["./nextjs.d.ts"]}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^7.0.1","@typescript-eslint/parser":"^7.0.1","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^8","eslint-plugin-unicorn":"^51.0.1","h3":"^1.12.0","hono":"^4.5.8","husky":"^9.0.10","neverthrow":"^7.0.1","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"crypto-js":">=4.2.0","jose":"^5.2.3"}}
1
+ {"version":"v2.7.7","name":"@upstash/qstash","description":"Official Typescript client for QStash","author":"Andreas Thomas <dev@chronark.com>","license":"MIT","homepage":"https://github.com/upstash/sdk-qstash-ts#readme","repository":{"type":"git","url":"git+https://github.com/upstash/sdk-qstash-ts.git"},"bugs":{"url":"https://github.com/upstash/sdk-qstash-ts/issues"},"main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./**"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./nextjs":{"import":"./nextjs.js","require":"./nextjs.js"},"./dist/nextjs":{"import":"./nextjs.js","require":"./nextjs.js"},"./h3":{"types":"./h3.d.ts","import":"./h3.mjs","require":"./h3.js"},"./nuxt":{"types":"./nuxt.d.ts","import":"./nuxt.mjs","require":"./nuxt.js"},"./svelte":{"types":"./svelte.d.ts","import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"types":"./solidjs.d.ts","import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"types":"./workflow.d.ts","import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"types":"./hono.d.ts","import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"types":"./cloudflare.d.ts","import":"./cloudflare.mjs","require":"./cloudflare.js"}},"typesVersions":{"*":{"nextjs":["./nextjs.d.ts"]}},"keywords":["qstash","queue","events","serverless","upstash"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test src","fmt":"prettier --write .","lint":"tsc && eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix"},"devDependencies":{"@commitlint/cli":"^19.2.2","@commitlint/config-conventional":"^19.2.2","@solidjs/start":"^1.0.6","@sveltejs/kit":"^2.5.18","@types/bun":"^1.1.1","@types/crypto-js":"^4.2.0","@typescript-eslint/eslint-plugin":"^7.0.1","@typescript-eslint/parser":"^7.0.1","ai":"^3.1.28","bun-types":"^1.1.7","eslint":"^8","eslint-plugin-unicorn":"^51.0.1","h3":"^1.12.0","hono":"^4.5.8","husky":"^9.0.10","neverthrow":"^7.0.1","next":"^14.0.2","prettier":"^3.2.5","tsup":"latest","typescript":"^5.4.5","undici-types":"^6.16.0","vitest":"latest"},"dependencies":{"crypto-js":">=4.2.0","jose":"^5.2.3"}}
package/solidjs.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APIHandler, APIEvent } from '@solidjs/start/server';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/solidjs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { APIHandler, APIEvent } from '@solidjs/start/server';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/solidjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
5
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
6
6
 
7
7
  // platforms/solidjs.ts
8
8
  var verifySignatureSolidjs = (handler, config) => {
@@ -14,7 +14,7 @@ var verifySignatureSolidjs = (handler, config) => {
14
14
  if (!nextSigningKey) {
15
15
  throw new Error("nextSigningKey is required, either in the config or from the env");
16
16
  }
17
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
17
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
18
18
  currentSigningKey,
19
19
  nextSigningKey
20
20
  });
@@ -45,7 +45,7 @@ var serve2 = (routeFunction, options) => {
45
45
  if (method.toUpperCase() !== "POST") {
46
46
  return new Response("Only POST requests are allowed in worklfows", { status: 405 });
47
47
  }
48
- const serveHandler = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, options);
48
+ const serveHandler = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, options);
49
49
  return await serveHandler(event.request);
50
50
  };
51
51
  return handler;
package/solidjs.mjs CHANGED
@@ -2,7 +2,7 @@ import "./chunk-S7JMIMW4.mjs";
2
2
  import {
3
3
  Receiver,
4
4
  serve
5
- } from "./chunk-B3NB4QLV.mjs";
5
+ } from "./chunk-3SZNLYUN.mjs";
6
6
 
7
7
  // platforms/solidjs.ts
8
8
  var verifySignatureSolidjs = (handler, config) => {
package/svelte.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler } from '@sveltejs/kit';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.mjs';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.mjs';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/svelte.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler } from '@sveltejs/kit';
2
- import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-aUVEwn93.js';
2
+ import { a2 as RouteFunction, a3 as WorkflowServeOptions } from './client-BsCzCprQ.js';
3
3
  import 'neverthrow';
4
4
 
5
5
  type VerifySignatureConfig = {
package/svelte.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
5
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
6
6
 
7
7
  // platforms/svelte.ts
8
8
  var verifySignatureSvelte = (handler, config) => {
@@ -14,7 +14,7 @@ var verifySignatureSvelte = (handler, config) => {
14
14
  if (!nextSigningKey) {
15
15
  throw new Error("nextSigningKey is required, either in the config or from the env");
16
16
  }
17
- const receiver = new (0, _chunkWQZ4U6LJjs.Receiver)({
17
+ const receiver = new (0, _chunkFBNCATUFjs.Receiver)({
18
18
  currentSigningKey,
19
19
  nextSigningKey
20
20
  });
@@ -42,7 +42,7 @@ var verifySignatureSvelte = (handler, config) => {
42
42
  };
43
43
  var serve2 = (routeFunction, options) => {
44
44
  const handler = async ({ request }) => {
45
- const serveMethod = _chunkWQZ4U6LJjs.serve.call(void 0, routeFunction, options);
45
+ const serveMethod = _chunkFBNCATUFjs.serve.call(void 0, routeFunction, options);
46
46
  return await serveMethod(request);
47
47
  };
48
48
  return handler;
package/svelte.mjs CHANGED
@@ -2,7 +2,7 @@ import "./chunk-S7JMIMW4.mjs";
2
2
  import {
3
3
  Receiver,
4
4
  serve
5
- } from "./chunk-B3NB4QLV.mjs";
5
+ } from "./chunk-3SZNLYUN.mjs";
6
6
 
7
7
  // platforms/svelte.ts
8
8
  var verifySignatureSvelte = (handler, config) => {
package/workflow.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { af as AsyncStepFunction, a8 as DisabledWorkflowContext, F as FailureFunctionPayload, ai as FinishCondition, ak as LogLevel, ah as ParallelCallState, ad as RawStep, aj as RequiredExceptFields, a2 as RouteFunction, S as Step, ag as StepFunction, ac as StepType, ab as StepTypes, ae as SyncStepFunction, a4 as Workflow, a9 as WorkflowClient, a7 as WorkflowContext, am as WorkflowLogger, al as WorkflowLoggerOptions, aa as WorkflowReceiver, a3 as WorkflowServeOptions, a5 as processOptions, a6 as serve } from './client-aUVEwn93.mjs';
1
+ export { af as AsyncStepFunction, a8 as DisabledWorkflowContext, F as FailureFunctionPayload, ai as FinishCondition, ak as LogLevel, ah as ParallelCallState, ad as RawStep, aj as RequiredExceptFields, a2 as RouteFunction, S as Step, ag as StepFunction, ac as StepType, ab as StepTypes, ae as SyncStepFunction, a4 as Workflow, a9 as WorkflowClient, a7 as WorkflowContext, am as WorkflowLogger, al as WorkflowLoggerOptions, aa as WorkflowReceiver, a3 as WorkflowServeOptions, a5 as processOptions, a6 as serve } from './client-BsCzCprQ.mjs';
2
2
  import 'neverthrow';
package/workflow.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { af as AsyncStepFunction, a8 as DisabledWorkflowContext, F as FailureFunctionPayload, ai as FinishCondition, ak as LogLevel, ah as ParallelCallState, ad as RawStep, aj as RequiredExceptFields, a2 as RouteFunction, S as Step, ag as StepFunction, ac as StepType, ab as StepTypes, ae as SyncStepFunction, a4 as Workflow, a9 as WorkflowClient, a7 as WorkflowContext, am as WorkflowLogger, al as WorkflowLoggerOptions, aa as WorkflowReceiver, a3 as WorkflowServeOptions, a5 as processOptions, a6 as serve } from './client-aUVEwn93.js';
1
+ export { af as AsyncStepFunction, a8 as DisabledWorkflowContext, F as FailureFunctionPayload, ai as FinishCondition, ak as LogLevel, ah as ParallelCallState, ad as RawStep, aj as RequiredExceptFields, a2 as RouteFunction, S as Step, ag as StepFunction, ac as StepType, ab as StepTypes, ae as SyncStepFunction, a4 as Workflow, a9 as WorkflowClient, a7 as WorkflowContext, am as WorkflowLogger, al as WorkflowLoggerOptions, aa as WorkflowReceiver, a3 as WorkflowServeOptions, a5 as processOptions, a6 as serve } from './client-BsCzCprQ.js';
2
2
  import 'neverthrow';
package/workflow.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
9
+ var _chunkFBNCATUFjs = require('./chunk-FBNCATUF.js');
10
10
 
11
11
 
12
12
 
@@ -15,4 +15,4 @@ var _chunkWQZ4U6LJjs = require('./chunk-WQZ4U6LJ.js');
15
15
 
16
16
 
17
17
 
18
- exports.DisabledWorkflowContext = _chunkWQZ4U6LJjs.DisabledWorkflowContext; exports.StepTypes = _chunkWQZ4U6LJjs.StepTypes; exports.Workflow = _chunkWQZ4U6LJjs.Workflow; exports.WorkflowContext = _chunkWQZ4U6LJjs.WorkflowContext; exports.WorkflowLogger = _chunkWQZ4U6LJjs.WorkflowLogger; exports.processOptions = _chunkWQZ4U6LJjs.processOptions; exports.serve = _chunkWQZ4U6LJjs.serve;
18
+ exports.DisabledWorkflowContext = _chunkFBNCATUFjs.DisabledWorkflowContext; exports.StepTypes = _chunkFBNCATUFjs.StepTypes; exports.Workflow = _chunkFBNCATUFjs.Workflow; exports.WorkflowContext = _chunkFBNCATUFjs.WorkflowContext; exports.WorkflowLogger = _chunkFBNCATUFjs.WorkflowLogger; exports.processOptions = _chunkFBNCATUFjs.processOptions; exports.serve = _chunkFBNCATUFjs.serve;
package/workflow.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  WorkflowLogger,
7
7
  processOptions,
8
8
  serve
9
- } from "./chunk-B3NB4QLV.mjs";
9
+ } from "./chunk-3SZNLYUN.mjs";
10
10
  export {
11
11
  DisabledWorkflowContext,
12
12
  StepTypes,