workflow 4.2.0-beta.74 → 4.2.0-beta.76
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 +2 -2
- package/docs/api-reference/workflow/create-webhook.mdx +4 -0
- package/docs/api-reference/workflow-api/get-world.mdx +23 -153
- package/docs/api-reference/workflow-api/index.mdx +3 -0
- package/docs/api-reference/workflow-api/world/index.mdx +58 -0
- package/docs/api-reference/workflow-api/world/meta.json +4 -0
- package/docs/api-reference/workflow-api/world/observability.mdx +164 -0
- package/docs/api-reference/workflow-api/world/queue.mdx +86 -0
- package/docs/api-reference/workflow-api/world/storage.mdx +408 -0
- package/docs/api-reference/workflow-api/world/streams.mdx +214 -0
- package/docs/foundations/hooks.mdx +4 -0
- package/docs/foundations/serialization.mdx +3 -3
- package/docs/foundations/streaming.mdx +1 -0
- package/docs/getting-started/astro.mdx +1 -1
- package/docs/getting-started/express.mdx +1 -1
- package/docs/getting-started/fastify.mdx +1 -1
- package/docs/getting-started/hono.mdx +1 -1
- package/docs/getting-started/nestjs.mdx +1 -1
- package/docs/getting-started/next.mdx +1 -1
- package/docs/getting-started/nitro.mdx +1 -1
- package/docs/getting-started/nuxt.mdx +1 -1
- package/docs/getting-started/sveltekit.mdx +1 -1
- package/docs/getting-started/vite.mdx +1 -1
- package/docs/how-it-works/understanding-directives.mdx +3 -3
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Hono
|
|
3
|
-
description: This guide will walk through setting up your first workflow in a Hono app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
3
|
+
description: This guide will walk through setting up your first workflow in a Hono app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Set up Workflow SDK in a Hono app.
|
|
6
6
|
prerequisites:
|
|
@@ -9,7 +9,7 @@ related:
|
|
|
9
9
|
- /docs/foundations/workflows-and-steps
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
This guide will walk through setting up your first workflow in a NestJS app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
12
|
+
This guide will walk through setting up your first workflow in a NestJS app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
13
13
|
|
|
14
14
|
<Callout>
|
|
15
15
|
NestJS integration is experimental and not yet supported for deployment to Vercel.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Next.js
|
|
3
|
-
description: This guide will walk through setting up your first workflow in a Next.js app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
3
|
+
description: This guide will walk through setting up your first workflow in a Next.js app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Set up Workflow SDK in a Next.js app.
|
|
6
6
|
prerequisites:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Nitro
|
|
3
|
-
description: This guide will walk through setting up your first workflow in a Nitro v3 project. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
3
|
+
description: This guide will walk through setting up your first workflow in a Nitro v3 project. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Set up Workflow SDK in a Nitro app.
|
|
6
6
|
prerequisites:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Nuxt
|
|
3
|
-
description: This guide will walk through setting up your first workflow in a Nuxt app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
3
|
+
description: This guide will walk through setting up your first workflow in a Nuxt app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Set up Workflow SDK in a Nuxt app.
|
|
6
6
|
prerequisites:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: SvelteKit
|
|
3
|
-
description: This guide will walk through setting up your first workflow in a SvelteKit app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
3
|
+
description: This guide will walk through setting up your first workflow in a SvelteKit app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
4
4
|
type: guide
|
|
5
5
|
summary: Set up Workflow SDK in a SvelteKit app.
|
|
6
6
|
prerequisites:
|
|
@@ -9,7 +9,7 @@ related:
|
|
|
9
9
|
- /docs/foundations/workflows-and-steps
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
This guide will walk through setting up your first workflow in a Vite app. Along the way, you'll learn more about the concepts that are fundamental to using the
|
|
12
|
+
This guide will walk through setting up your first workflow in a Vite app. Along the way, you'll learn more about the concepts that are fundamental to using the Workflow SDK in your own projects.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -15,7 +15,7 @@ import { File, Folder, Files } from "fumadocs-ui/components/files";
|
|
|
15
15
|
This guide explores how JavaScript directives enable the Workflow SDK's execution model. For getting started with workflows, see the [getting started](/docs/getting-started) guides for your framework.
|
|
16
16
|
</Callout>
|
|
17
17
|
|
|
18
|
-
The Workflow
|
|
18
|
+
The Workflow SDK uses JavaScript directives (`"use workflow"` and `"use step"`) as the foundation for its durable execution model. Directives provide the compile-time semantic boundary necessary for workflows to suspend, resume, and maintain deterministic behavior across replays.
|
|
19
19
|
|
|
20
20
|
This page explores how directives enable this execution model and the design principles that led us here.
|
|
21
21
|
|
|
@@ -339,7 +339,7 @@ This approach requires:
|
|
|
339
339
|
- Storing/mutating class properties was not obvious (similar closure/mutation issues as the runtime-only approach)
|
|
340
340
|
- Class-based syntax that doesn't feel "JavaScript native" to developers used to functional patterns
|
|
341
341
|
|
|
342
|
-
As the JavaScript ecosystem has moved toward function-forward programming (exemplified by React's shift from class components to functions and hooks), requiring developers to use classes felt like a step backward and also didn't match our own personal taste as authors of the
|
|
342
|
+
As the JavaScript ecosystem has moved toward function-forward programming (exemplified by React's shift from class components to functions and hooks), requiring developers to use classes felt like a step backward and also didn't match our own personal taste as authors of the SDK.
|
|
343
343
|
|
|
344
344
|
**The core problem: Presents workflows as regular runtime code**
|
|
345
345
|
|
|
@@ -615,4 +615,4 @@ As TC39 members, we at Vercel are actively working with the standards body and b
|
|
|
615
615
|
|
|
616
616
|
Directives aren't about syntax preference, they're about expressing semantic boundaries. `"use workflow"` tells the compiler, developer, and runtime that this code is deterministic, resumable, and sandboxed.
|
|
617
617
|
|
|
618
|
-
This clarity enables the Workflow
|
|
618
|
+
This clarity enables the Workflow SDK to provide durable execution with familiar JavaScript patterns, while maintaining the compile-time guarantees necessary for reliable workflow orchestration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workflow",
|
|
3
|
-
"version": "4.2.0-beta.
|
|
3
|
+
"version": "4.2.0-beta.76",
|
|
4
4
|
"description": "Workflow SDK - Build durable, resilient, and observable workflows",
|
|
5
5
|
"main": "dist/typescript-plugin.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"ms": "2.1.3",
|
|
60
|
-
"@workflow/astro": "4.0.0-beta.
|
|
61
|
-
"@workflow/cli": "4.2.0-beta.
|
|
62
|
-
"@workflow/core": "4.2.0-beta.
|
|
63
|
-
"@workflow/errors": "4.1.0-beta.
|
|
60
|
+
"@workflow/astro": "4.0.0-beta.50",
|
|
61
|
+
"@workflow/cli": "4.2.0-beta.76",
|
|
62
|
+
"@workflow/core": "4.2.0-beta.76",
|
|
63
|
+
"@workflow/errors": "4.1.0-beta.20",
|
|
64
64
|
"@workflow/typescript-plugin": "4.0.1-beta.5",
|
|
65
65
|
"@workflow/utils": "4.1.0-beta.13",
|
|
66
|
-
"@workflow/next": "4.0.1-beta.
|
|
67
|
-
"@workflow/nest": "0.0.0-beta.
|
|
68
|
-
"@workflow/nitro": "4.0.1-beta.
|
|
69
|
-
"@workflow/nuxt": "4.0.1-beta.
|
|
70
|
-
"@workflow/sveltekit": "4.0.0-beta.
|
|
71
|
-
"@workflow/rollup": "4.0.0-beta.
|
|
66
|
+
"@workflow/next": "4.0.1-beta.72",
|
|
67
|
+
"@workflow/nest": "0.0.0-beta.25",
|
|
68
|
+
"@workflow/nitro": "4.0.1-beta.71",
|
|
69
|
+
"@workflow/nuxt": "4.0.1-beta.60",
|
|
70
|
+
"@workflow/sveltekit": "4.0.0-beta.65",
|
|
71
|
+
"@workflow/rollup": "4.0.0-beta.33"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/ms": "2.1.0",
|