@upstash/qstash 2.10.0 → 2.11.0
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/{chunk-FAMFGAMR.mjs → chunk-7DSF3QVE.mjs} +1 -1
- package/{chunk-FE7GQ4RU.mjs → chunk-JQP6NQUW.mjs} +1 -1
- package/{chunk-X3MMU3BQ.mjs → chunk-LB3C5PJP.mjs} +486 -11
- package/{client-CsM1dTnz.d.ts → client-CUioGZfg.d.mts} +19 -0
- package/{client-CsM1dTnz.d.mts → client-CUioGZfg.d.ts} +19 -0
- package/cloudflare.d.mts +1 -1
- package/cloudflare.d.ts +1 -1
- package/cloudflare.js +484 -11
- package/cloudflare.mjs +1 -1
- package/h3.d.mts +1 -1
- package/h3.d.ts +1 -1
- package/h3.js +484 -11
- package/h3.mjs +3 -3
- package/hono.d.mts +1 -1
- package/hono.d.ts +1 -1
- package/hono.js +484 -11
- package/hono.mjs +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +484 -11
- package/index.mjs +2 -2
- package/nextjs.d.mts +33 -2
- package/nextjs.d.ts +33 -2
- package/nextjs.js +505 -17
- package/nextjs.mjs +24 -8
- package/nuxt.js +70 -3
- package/nuxt.mjs +3 -3
- package/package.json +1 -1
- package/solidjs.d.mts +1 -1
- package/solidjs.d.ts +1 -1
- package/solidjs.js +484 -11
- package/solidjs.mjs +2 -2
- package/svelte.d.mts +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +484 -11
- package/svelte.mjs +2 -2
- package/workflow.d.mts +1 -1
- package/workflow.d.ts +1 -1
- package/workflow.js +484 -11
- package/workflow.mjs +1 -1
package/nextjs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextApiHandler } from 'next';
|
|
2
2
|
import { NextRequest, NextFetchEvent } from 'next/server';
|
|
3
|
-
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-
|
|
3
|
+
import { ae as RouteFunction, af as WorkflowServeOptions } from './client-CUioGZfg.js';
|
|
4
4
|
import 'neverthrow';
|
|
5
5
|
|
|
6
6
|
type VerifySignatureConfig = {
|
|
@@ -18,6 +18,17 @@ type VerifySignatureConfig = {
|
|
|
18
18
|
* @default 0
|
|
19
19
|
*/
|
|
20
20
|
clockTolerance?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Use the local dev server signing keys. Pair this with
|
|
23
|
+
* `new Client({ devMode: true })` for end-to-end local development.
|
|
24
|
+
*
|
|
25
|
+
* - `true`: use dev server signing keys
|
|
26
|
+
* - `false`: never use dev server signing keys (ignores QSTASH_DEV env var)
|
|
27
|
+
* - `undefined`: check QSTASH_DEV env var
|
|
28
|
+
*
|
|
29
|
+
* @default undefined
|
|
30
|
+
*/
|
|
31
|
+
devMode?: boolean;
|
|
21
32
|
};
|
|
22
33
|
declare function verifySignature(handler: NextApiHandler, config?: VerifySignatureConfig): NextApiHandler;
|
|
23
34
|
declare function verifySignatureEdge(handler: (request: NextRequest, nfe?: NextFetchEvent) => Response | Promise<Response>, config?: VerifySignatureConfig): (request: NextRequest, nfe: NextFetchEvent) => Promise<Response>;
|
|
@@ -43,5 +54,25 @@ declare const serve: <TInitialPayload = unknown>(routeFunction: RouteFunction<TI
|
|
|
43
54
|
* Migration Guide: https://upstash.com/docs/workflow/migration
|
|
44
55
|
*/
|
|
45
56
|
declare const servePagesRouter: <TInitialPayload = unknown>(routeFunction: RouteFunction<TInitialPayload>, options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish">) => NextApiHandler;
|
|
57
|
+
/**
|
|
58
|
+
* Start the QStash dev server early during Next.js initialization.
|
|
59
|
+
*
|
|
60
|
+
* Call this inside your `instrumentation.ts` `register()` function so
|
|
61
|
+
* the dev server is ready before any request — including edge routes
|
|
62
|
+
* that cannot start it themselves.
|
|
63
|
+
*
|
|
64
|
+
* No-op in production, during `next build`, or in edge runtime.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* // instrumentation.ts
|
|
69
|
+
* import { registerQStashDev } from "@upstash/qstash/nextjs";
|
|
70
|
+
*
|
|
71
|
+
* export function register() {
|
|
72
|
+
* registerQStashDev();
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare function registerQStashDev(): Promise<void>;
|
|
46
77
|
|
|
47
|
-
export { type VerifySignatureConfig, serve, servePagesRouter, verifySignature, verifySignatureAppRouter, verifySignatureEdge };
|
|
78
|
+
export { type VerifySignatureConfig, registerQStashDev, serve, servePagesRouter, verifySignature, verifySignatureAppRouter, verifySignatureEdge };
|