@upstash/workflow 0.3.0-rc → 1.0.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/astro.d.mts +3 -3
- package/astro.d.ts +3 -3
- package/astro.js +877 -655
- package/astro.mjs +1 -1
- package/{chunk-AGYYZKP7.mjs → chunk-5GWDM6XJ.mjs} +871 -650
- package/cloudflare.d.mts +3 -3
- package/cloudflare.d.ts +3 -3
- package/cloudflare.js +877 -655
- package/cloudflare.mjs +1 -1
- package/express.d.mts +3 -3
- package/express.d.ts +3 -3
- package/express.js +887 -660
- package/express.mjs +11 -6
- package/h3.d.mts +3 -3
- package/h3.d.ts +3 -3
- package/h3.js +882 -656
- package/h3.mjs +6 -2
- package/hono.d.mts +3 -3
- package/hono.d.ts +3 -3
- package/hono.js +877 -655
- package/hono.mjs +1 -1
- package/index.d.mts +73 -64
- package/index.d.ts +73 -64
- package/index.js +906 -669
- package/index.mjs +30 -15
- package/nextjs.d.mts +4 -4
- package/nextjs.d.ts +4 -4
- package/nextjs.js +878 -656
- package/nextjs.mjs +2 -2
- package/package.json +1 -1
- package/{serve-many-DEwKPF6H.d.mts → serve-many-CFlNO2Iq.d.ts} +2 -2
- package/{serve-many-DVtHRxeg.d.ts → serve-many-qpxb-yr-.d.mts} +2 -2
- package/solidjs.d.mts +2 -2
- package/solidjs.d.ts +2 -2
- package/solidjs.js +882 -656
- package/solidjs.mjs +6 -2
- package/svelte.d.mts +5 -6
- package/svelte.d.ts +5 -6
- package/svelte.js +890 -661
- package/svelte.mjs +14 -7
- package/tanstack.d.mts +3 -3
- package/tanstack.d.ts +3 -3
- package/tanstack.js +877 -655
- package/tanstack.mjs +1 -1
- package/{types-DESkn7K9.d.ts → types-ByzQdZjb.d.mts} +206 -238
- package/{types-DESkn7K9.d.mts → types-ByzQdZjb.d.ts} +206 -238
package/nextjs.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
SDK_TELEMETRY,
|
|
3
3
|
serveBase,
|
|
4
4
|
serveManyBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5GWDM6XJ.mjs";
|
|
6
6
|
|
|
7
7
|
// platforms/nextjs.ts
|
|
8
8
|
var appTelemetry = {
|
|
@@ -48,7 +48,7 @@ var serveMany = (workflows, options) => {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
var servePagesRouter = (routeFunction, options) => {
|
|
51
|
-
const { handler: serveHandler } = serveBase(routeFunction, pagesTelemetry, options);
|
|
51
|
+
const { handler: serveHandler } = serveBase(routeFunction, pagesTelemetry, options, void 0);
|
|
52
52
|
const handler = async (request_, res) => {
|
|
53
53
|
if (request_.method?.toUpperCase() !== "POST") {
|
|
54
54
|
res.status(405).json("Only POST requests are allowed in worklfows");
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@upstash/workflow","version":"
|
|
1
|
+
{"name":"@upstash/workflow","version":"v1.0.0","description":"Durable, Reliable and Performant Serverless Functions","main":"./index.js","module":"./index.mjs","types":"./index.d.ts","files":["./*"],"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./dist/nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./nextjs":{"import":"./nextjs.mjs","require":"./nextjs.js"},"./h3":{"import":"./h3.mjs","require":"./h3.js"},"./svelte":{"import":"./svelte.mjs","require":"./svelte.js"},"./solidjs":{"import":"./solidjs.mjs","require":"./solidjs.js"},"./workflow":{"import":"./workflow.mjs","require":"./workflow.js"},"./hono":{"import":"./hono.mjs","require":"./hono.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./astro":{"import":"./astro.mjs","require":"./astro.js"},"./express":{"import":"./express.mjs","require":"./express.js"},"./tanstack":{"import":"./tanstack.mjs","require":"./tanstack.js"}},"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,platforms}/**/*.{js,ts,tsx}\" --quiet --fix","check-exports":"bun run build && cd dist && attw -P"},"repository":{"type":"git","url":"git+https://github.com/upstash/workflow-ts.git"},"keywords":["upstash","qstash","workflow","serverless"],"author":"Cahid Arda Oz","license":"MIT","bugs":{"url":"https://github.com/upstash/workflow-ts/issues"},"homepage":"https://github.com/upstash/workflow-ts#readme","devDependencies":{"@commitlint/cli":"^19.5.0","@commitlint/config-conventional":"^19.5.0","@eslint/js":"^9.11.1","@solidjs/start":"^1.0.8","@sveltejs/kit":"^2.6.1","@types/bun":"^1.1.10","@types/express":"^5.0.3","astro":"^4.16.7","eslint":"^9.11.1","eslint-plugin-unicorn":"^55.0.0","express":"^5.1.0","globals":"^15.10.0","h3":"^1.12.0","hono":"^4.6.20","husky":"^9.1.6","next":"^14.2.14","prettier":"3.3.3","tsup":"^8.3.0","typescript":"^5.7.2","typescript-eslint":"^8.18.0"},"dependencies":{"@upstash/qstash":"^2.8.4"},"directories":{"example":"examples"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as WorkflowServeOptions, a as RouteFunction, x as InvokableWorkflow } from './types-ByzQdZjb.js';
|
|
2
2
|
|
|
3
3
|
type OmitOptionsInServeMany<TOptions> = Omit<TOptions, "env" | "url" | "schema" | "initialPayloadParser">;
|
|
4
|
-
declare const serveManyBase: <THandler extends (...params: any[]) => any, TOptions extends OmitOptionsInServeMany<
|
|
4
|
+
declare const serveManyBase: <THandler extends (...params: any[]) => any, TOptions extends OmitOptionsInServeMany<WorkflowServeOptions> = OmitOptionsInServeMany<WorkflowServeOptions>, TServeParams extends [routeFunction: RouteFunction<any, any>, options: TOptions] = [routeFunction: RouteFunction<any, any>, options: TOptions]>({ workflows, getUrl, serveMethod, options, }: {
|
|
5
5
|
workflows: Record<string, InvokableWorkflow<any, any>>;
|
|
6
6
|
getUrl: (...params: Parameters<THandler>) => string;
|
|
7
7
|
serveMethod: (...params: TServeParams) => THandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as WorkflowServeOptions, a as RouteFunction, x as InvokableWorkflow } from './types-ByzQdZjb.mjs';
|
|
2
2
|
|
|
3
3
|
type OmitOptionsInServeMany<TOptions> = Omit<TOptions, "env" | "url" | "schema" | "initialPayloadParser">;
|
|
4
|
-
declare const serveManyBase: <THandler extends (...params: any[]) => any, TOptions extends OmitOptionsInServeMany<
|
|
4
|
+
declare const serveManyBase: <THandler extends (...params: any[]) => any, TOptions extends OmitOptionsInServeMany<WorkflowServeOptions> = OmitOptionsInServeMany<WorkflowServeOptions>, TServeParams extends [routeFunction: RouteFunction<any, any>, options: TOptions] = [routeFunction: RouteFunction<any, any>, options: TOptions]>({ workflows, getUrl, serveMethod, options, }: {
|
|
5
5
|
workflows: Record<string, InvokableWorkflow<any, any>>;
|
|
6
6
|
getUrl: (...params: Parameters<THandler>) => string;
|
|
7
7
|
serveMethod: (...params: TServeParams) => THandler;
|
package/solidjs.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIEvent } from '@solidjs/start/server';
|
|
2
|
-
import {
|
|
2
|
+
import { a as RouteFunction, b as WorkflowServeOptions } from './types-ByzQdZjb.mjs';
|
|
3
3
|
import '@upstash/qstash';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ import 'zod';
|
|
|
12
12
|
* @param options workflow options
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?:
|
|
15
|
+
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: WorkflowServeOptions<TInitialPayload, TResult>) => {
|
|
16
16
|
POST: (event: APIEvent) => Promise<Response>;
|
|
17
17
|
};
|
|
18
18
|
|
package/solidjs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIEvent } from '@solidjs/start/server';
|
|
2
|
-
import {
|
|
2
|
+
import { a as RouteFunction, b as WorkflowServeOptions } from './types-ByzQdZjb.js';
|
|
3
3
|
import '@upstash/qstash';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ import 'zod';
|
|
|
12
12
|
* @param options workflow options
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?:
|
|
15
|
+
declare const serve: <TInitialPayload = unknown, TResult = unknown>(routeFunction: RouteFunction<TInitialPayload, TResult>, options?: WorkflowServeOptions<TInitialPayload, TResult>) => {
|
|
16
16
|
POST: (event: APIEvent) => Promise<Response>;
|
|
17
17
|
};
|
|
18
18
|
|