@workflow/next 5.0.0-beta.30 → 5.0.0-beta.32

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.
Files changed (2) hide show
  1. package/docs/next.mdx +4 -0
  2. package/package.json +3 -3
package/docs/next.mdx CHANGED
@@ -10,6 +10,10 @@ related:
10
10
  - /docs/deploying/world/vercel-world
11
11
  ---
12
12
 
13
+ <CopyPrompt
14
+ text="In this Next.js app, run `npm i workflow`. Wrap `next.config.ts` with `withWorkflow` from `workflow/next`. If the app has `proxy.ts` or middleware, exclude `.well-known/workflow/` from its matcher. Add `workflows/user-signup.ts` exporting `handleUserSignup(email)` with `&quot;use workflow&quot;`, `sleep` from `workflow`, and `&quot;use step&quot;` helper functions that create a user, send a welcome email, and send an onboarding email. Add `app/api/signup/route.ts` with a POST handler that reads `{ email }`, calls `start(handleUserSignup, [email])` from `workflow/api`, and returns JSON. Run `npm run dev`, trigger `curl -X POST --json '{&quot;email&quot;:&quot;hello@example.com&quot;}' http://localhost:3000/api/signup`, and inspect with `npx workflow web` or `npx workflow inspect runs`."
15
+ />
16
+
13
17
  <Steps>
14
18
 
15
19
  <Step>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/next",
3
- "version": "5.0.0-beta.30",
3
+ "version": "5.0.0-beta.32",
4
4
  "description": "Next.js integration for Workflow SDK",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "@swc/core": "1.15.3",
30
30
  "chokidar": "4.0.3",
31
31
  "semver": "7.7.4",
32
- "@workflow/builders": "5.0.0-beta.30",
33
- "@workflow/core": "5.0.0-beta.30",
32
+ "@workflow/builders": "5.0.0-beta.32",
33
+ "@workflow/core": "5.0.0-beta.32",
34
34
  "@workflow/swc-plugin": "5.0.0-beta.5"
35
35
  },
36
36
  "devDependencies": {