Commit Graph

168 Commits

Author SHA1 Message Date
Vercel Release Bot 70429e499c Version Packages (beta) (#275) @workflow/world-postgres@4.1.0-beta.9 @workflow/world-testing@4.0.1-beta.14 workflow@4.0.1-beta.13 @workflow/nitro@4.0.1-beta.13 @workflow/next@4.0.1-beta.13 @workflow/cli@4.0.1-beta.13 @workflow/ai@4.0.1-beta.13 @workflow/web-shared@4.0.1-beta.12 @workflow/core@4.0.1-beta.11 @workflow/web@4.0.1-beta.10 @workflow/builders@4.0.1-beta.9 @workflow/world-vercel@4.0.1-beta.7 @workflow/world-local@4.0.1-beta.7 @workflow/swc-plugin@4.0.1-beta.5 @workflow/nuxt@4.0.1-beta.2 @workflow/sveltekit@4.0.0-beta.7 2025-11-11 11:59:23 -08:00
Peter Wielander 2dca0d43b3 [world-vercel] Use custom user-agent for API requests (#297) 2025-11-11 09:33:16 -08:00
Nathan Rajlich 0668077cda Remove redundant "outputs" configuration from root turbo.json (#302)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-11 09:13:39 -08:00
Nathan Rajlich 94d46d423a Refactor @workflow/next to dynamically import @workflow/builders (#296)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-10 23:08:09 -08:00
Peter Wielander 68363b247f Fix pagination resumption in local world (#299) 2025-11-10 20:35:53 -08:00
Nathan Rajlich 2b880f90cb [world-local] Implement Hook "token" uniqueness validation (#295)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-10 15:16:05 -08:00
Peter Wielander 11469d8fd2 CLI/Web: Update fallback directory for embedded world (#291) 2025-11-10 11:54:00 -08:00
Nathan Rajlich 6373ab5a1f resumeHook() now throws errors (#286)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-09 13:26:38 -08:00
Copilot 8208b5320b Fix Sourcemap Tracking (#256)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-11-09 12:08:48 -08:00
Pranay Prakash 6ec95c37b3 Actually use webpack (#284)
After bumping to next 16, we forgot to set --webpack in next dev and 
build
2025-11-08 18:25:49 -08:00
Peter Wielander 00efdfb063 Web: Improve trace viewer load times and loading animation (#270) 2025-11-08 10:21:57 -08:00
Pranay Prakash aac1b6cd20 Make env readonly and frozen in vm (#274) 2025-11-08 09:44:12 -05:00
Nathan Rajlich de04cea3dc Finish renaming "embedded" world to "local" in docs (#269)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-07 23:30:47 -08:00
Copilot 4f9ae4e8de Remove step function transformation in client mode (#271) 2025-11-07 22:32:29 -08:00
Nathan Rajlich 120ae06115 Improvements to docs emphasizing the 'schema' property usage (#257)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-07 19:33:16 -08:00
Pranay Prakash 49aa624732 Fix: Make Nuxt package public and use Apache license (#273) 2025-11-07 18:15:08 -08:00
Vercel Release Bot 7bad9d454f Version Packages (beta) (#230) @workflow/world-postgres@4.1.0-beta.8 @workflow/world-testing@4.0.1-beta.13 workflow@4.0.1-beta.12 @workflow/nitro@4.0.1-beta.12 @workflow/next@4.0.1-beta.12 @workflow/cli@4.0.1-beta.12 @workflow/ai@4.0.1-beta.12 @workflow/web-shared@4.0.1-beta.11 @workflow/core@4.0.1-beta.10 @workflow/web@4.0.1-beta.9 @workflow/builders@4.0.1-beta.8 @workflow/world-vercel@4.0.1-beta.6 @workflow/world-local@4.0.1-beta.6 @workflow/swc-plugin@4.0.1-beta.4 @workflow/utils@4.0.1-beta.2 @workflow/sveltekit@4.0.0-beta.6 2025-11-07 16:39:45 -08:00
Sébastien Chopin fb8153bec4 feat: add Nuxt module and documentation (#187)
* feat: add Nuxt module and documentation

* fix: add the prepare in the build command

* Apply suggestion from @vercel[bot]

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* chore: simplify usage without /nuxt

* wip

* Update nuxt.mdx

Co-Authored-By: Daniel Roe <daniel@roe.dev>

* add clean command and ignore prepare

* use @workflow/nitro

* Changeset

Added a Nuxt module and updated documentation accordingly.

* feat: enable typescript plugin in tsconfig

* chore: revert accordion value

* chore: use symlink

* fix: json parsing in trigger route for nitro-v2

* ci: add e2e tests for nuxt

* ci: add nuxt to test matrix

* chore: make sure to add /nuxt to avoid conflicts when importing entry-points

* chore: move typescriptPlugin option to Nitro

* chore: body is already parsed

* fix: use readRawBody

* fix: use rawBody in hook.post too

* chore: add missing import (but not required)

* chore: update pm

* Create resolve-symlinks.sh

* chore: add also node-rs/xxhash

* Update create-test-matrix.mjs

* update matrix

* Update create-test-matrix.mjs

* remove symlink to nitro-v2

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Adrian Lam <me@adriandlam.com>
2025-11-08 01:10:59 +01:00
Adrian adf0cfeb91 feat: add getPort for detecting pid port (#233)
* feat: add getPort method for detecting pid port

* lockfile

* update tests and fix getPort usage

* changeset

* docs: update sveltekit getting started

* fix: use pid-port

* fix: not using config port env

* fix: remove unused getPort from world core

* remove unused stuff

* fix: world local config returning port 3000 as fallback

* changeset

* fix: rebase conflicts

* fix: util test missing http import

* changeset

* fix: wrong import for getPort in core runtime

* fix: getPort in @workflow/utils being imported into workflow runtime

* test: simplify sveltekit test

* fix missing import in test

* fix: async await stuff with getPort

* refactor: move getPort to @workflow/utils/get-port

* test: simplfiy getPort tests

* test: fix sveltekit ports
2025-11-07 14:36:36 -08:00
Adrian 03d076b344 chore: remove unused dep in sveltekit (#268)
* chore: remove unused dep in sveltekit

* changeset
2025-11-07 14:14:48 -08:00
Peter Wielander 0b3e89e5fe Fix event hydration in observability (#267) 2025-11-07 13:26:02 -08:00
Adrian 98c36f1eb0 feat: add hmr and fix dev tests (#199)
* add hmr and dev tests for nitro and sveltekit

* changeset

* revert: e2e testing code

* add streams.ts to workbench apps

* fix: test confnigs

* fix: hmr failing on new files for sveltekit plugin

* lockfile

* switch testing to use 3_stream.ts

* fix: sveltekit hmr test file import

* fix: nextjs testing file

* remove stuff

* changeset

* refactor(tests): expose config through matrix config

* fix: add symlink for nextjs turbopack

* add resolve symlinks script

* fix: nextjs-webpack resolve symlinks script
2025-11-07 12:30:39 -08:00
Nathan Rajlich 51e6d12d76 Simplify webhook 'Static Response' code example
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-07 00:16:57 -08:00
Copilot 7a47eb884a Deprecate StartOptions.deploymentId to prevent user misconfiguration (#247) 2025-11-06 23:48:45 -08:00
Nathan Rajlich a838085b6e Add ts-expect-error in test case with invalid argument
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-06 23:06:44 -08:00
Hayden Bleasel 353999c889 Restore code block animation on mobile (#246) 2025-11-06 17:08:11 -08:00
Adrian e0c6618bd6 fix(swc-plugin): specify import path of start function on error (#244) 2025-11-06 14:11:31 -08:00
Nathan Rajlich 7013f29f46 Change RetryableError "retryAfter" option number value to represent milliseconds instead of seconds (#240)
Changed `RetryableError` to use milliseconds instead of seconds for numeric `retryAfter` values.

### What changed?

- Modified the `RetryableError` class to interpret numeric `retryAfter` values as milliseconds instead of seconds
- Updated documentation and examples to reflect this change
- Added dependency on `@workflow/utils` package to use the `parseDurationToDate` function
- Updated examples in documentation to show proper usage with:
  - Duration strings (e.g., "5m", "30s")
  - Millisecond values (e.g., 5000 for 5 seconds)
  - Date objects

### How to test?

1. Create a workflow that uses `RetryableError` with different `retryAfter` formats:
   ```typescript
   // With milliseconds
   throw new RetryableError("Test retry", { retryAfter: 5000 });
   
   // With duration string
   throw new RetryableError("Test retry", { retryAfter: "5m" });
   
   // With Date object
   throw new RetryableError("Test retry", { retryAfter: new Date(Date.now() + 10000) });
   ```
2. Verify that the retry behavior correctly respects the specified durations

### Why make this change?

Using milliseconds as the unit for numeric time values is more consistent with JavaScript conventions (like `setTimeout` and other timing functions). This change makes the API more intuitive for JavaScript developers and aligns with standard practices in the ecosystem.

Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-06 13:42:59 -08:00
Nathan Rajlich bf170adee1 Add initial @workflow/utils package (#239)
Add a new `@workflow/utils` package to extract common utility functions.

- Created a new `@workflow/utils` package with common utility functions:
  - `parseDurationToDate()` - Parses duration strings, numbers, or Date objects
  - `withResolvers()` - Polyfill for `Promise.withResolvers()`
  - `once()` - Creates a lazily-evaluated, memoized function
  - `PromiseWithResolvers` - Type interface for promise resolvers
- Moved these utility functions from the core package to the new utils package
- Updated imports in the core package to use the new utils package
- Added tests for the utility functions in the new package

Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-06 13:37:58 -08:00
Adrian 86eb60dc98 chore: license field in sveltekit package (#243) 2025-11-06 09:46:27 -08:00
Nathan Rajlich 24243158b0 Remove sleep() overloads e2e tests (#235)
The overloads parsing logic is now covered in unit tests, so we only
need one e2e test for the specific sleep functionality.

Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-05 19:11:41 -08:00
David Khourshid 809e0feeca Allow specifying milliseconds to sleep() (#165)
Signed-off-by: David Khourshid <davidkpiano@gmail.com>
2025-11-05 13:56:44 -08:00
Nathan Rajlich a28bc37e35 Make @standard-schema/spec be a regular dependency (#231)
* Make `@standard-schema/spec` be a regular dependency

The Standard Schema docs explicitly say that it should be a regular dep,
not a dev dep: https://standardschema.dev/#can-i-add-it-as-a-dev-dependency

* Support input/output types
2025-11-05 12:59:12 -08:00
Roman Popov 5c0268b8a4 feat: Add Standard Schema support and runtime validation to defineHook() (#144)
Signed-off-by: Roman Popov <atfpom4h@gmail.com>
2025-11-05 12:07:11 -08:00
Vercel Release Bot 7650c393bf Version Packages (beta) (#226) @workflow/world-testing@4.0.1-beta.12 workflow@4.0.1-beta.11 @workflow/nitro@4.0.1-beta.11 @workflow/next@4.0.1-beta.11 @workflow/cli@4.0.1-beta.11 @workflow/ai@4.0.1-beta.11 @workflow/web-shared@4.0.1-beta.10 @workflow/core@4.0.1-beta.9 @workflow/builders@4.0.1-beta.7 @workflow/sveltekit@4.0.0-beta.5 2025-11-05 10:24:46 -08:00
Adrian 355cede4d5 fix(sveltekit): ignore undefined rejections instead of setting global context (#217)
* fix: ignore undefined rejections instead of setting global req context

* changeset

* chore: add comment for info
2025-11-05 10:13:24 -08:00
Peter Wielander 9755566f1c Increase compatibility for node16 moduleResolution when used for direct imports (#225) 2025-11-05 09:55:28 -08:00
Pranay Prakash 9f56434631 Make getWritable work inside steps (#222) 2025-11-05 09:54:13 -08:00
Nathan Rajlich 77cf0f7914 Remove Math.random() error to avoid non-determinism in unit tests (#223)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-05 09:44:23 -08:00
Vercel Release Bot f368cd34a5 Version Packages (beta) (#206) @workflow/world-postgres@4.1.0-beta.7 @workflow/world-testing@4.0.1-beta.11 workflow@4.0.1-beta.10 @workflow/nitro@4.0.1-beta.10 @workflow/next@4.0.1-beta.10 @workflow/ai@4.0.1-beta.10 @workflow/web-shared@4.0.1-beta.9 @workflow/builders@4.0.1-beta.6 @workflow/sveltekit@4.0.0-beta.4 2025-11-05 09:40:03 -08:00
Nathan Rajlich 5b9a24a6bf [docs] Remove framework support callout (#220) 2025-11-04 23:07:31 -08:00
Peter Wielander 0ce3197d02 Disable postgres world tests running in win32, fix container setup for ubuntu (#215) 2025-11-04 18:27:08 -08:00
Peter Wielander d71da4acb5 Web-shared: update packaging to support projects with node16 style module resolution (#214) 2025-11-04 18:16:11 -08:00
Adrian c2fa9df87d fix: node module plugin in workflow and add tests (#210)
* fix: node module plugin in workflow and add tests

* fix: node modules regex

* changeset
2025-11-04 16:39:56 -08:00
Copilot d792ff5063 Fix CLI flag documentation: --auth-token → --authToken (#213) 2025-11-04 16:09:55 -08:00
Sree Narayanan 8a82ec5334 fix: postgres world storage edgecases (re-open of PR #135) (#208)
* fixes query failing on undefined runid

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>

* fixes startedAt being undefined on resume

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>

* tests for storage contract

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>

* added changeset

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>

---------

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
2025-11-04 14:12:36 -08:00
Nathan Rajlich 03faac19db Fix CLI --web flag on Windows (#207)
---------

Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-04 13:09:40 -08:00
Vercel Release Bot cf84adefda Version Packages (beta) (#205) @workflow/world-testing@4.0.1-beta.10 workflow@4.0.1-beta.9 @workflow/nitro@4.0.1-beta.9 @workflow/next@4.0.1-beta.9 @workflow/cli@4.0.1-beta.9 @workflow/ai@4.0.1-beta.9 @workflow/web-shared@4.0.1-beta.8 @workflow/core@4.0.1-beta.8 @workflow/builders@4.0.1-beta.5 @workflow/swc-plugin@4.0.1-beta.3 @workflow/sveltekit@4.0.0-beta.3 2025-11-04 12:22:37 -08:00
Paul Nodet f809294049 docs: invalid example for inspect example (#188)
Signed-off-by: Paul Nodet <5941125+pnodet@users.noreply.github.com>
2025-11-04 12:22:01 -08:00
Copilot 4a821fce7c Fix Windows support by normalizing path separators in workflow IDs (#150)
---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Nathan Rajlich <n@n8.io>
2025-11-04 12:13:45 -08:00