Commit Graph

82 Commits

Author SHA1 Message Date
Peter Wielander 05ecfbcc11 [cli] Ensure npm pre-release versioning works for post-GA release pre-releases (#722)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-01-07 13:13:09 +01:00
Peter Wielander 1a305bf918 [cli] Print notice on CLI startup when detecting an outdated version (#701) 2026-01-02 17:45:20 +01:00
Peter Wielander 80955e7212 [cli] [web] Allow opening web UI without config validation, show better UI when runs can't be found (#684) 2025-12-28 17:55:24 +01:00
Karthik Kalyanaraman e3f0390469 Workflows graph extractor (#455)
---------

Signed-off-by: Karthik Kalyanaraman <karthik@scale3labs.com>
2025-12-27 16:52:19 +01:00
Peter Wielander 0cf0ac3211 [util] Extract helper function to find local world dataDir across CLI/UI (#682) 2025-12-23 20:42:42 +01:00
Peter Wielander c059cf6fcd [cli] Only do interactive pagination when using the -i flag (#669) 2025-12-23 14:05:06 +01:00
Peter Wielander 4bdd3e5086 Move auth error messages into @workflow/errors package (#638) 2025-12-17 16:54:29 +01:00
Peter Wielander deaf0193e9 [world-vercel] Allow skipping vercel backend proxy for e2e tests where CLI runs in runtime env (#627) 2025-12-16 20:44:05 +01:00
Peter Wielander 161c54ca13 [web] [cli] Add Web and CLI UI for listing and viewing streams (#575) 2025-12-08 18:10:02 -08:00
Peter Wielander c82b46720c [world] Add Streamer.listByRunId method to list all streams for a run (#574) 2025-12-08 16:05:44 -08:00
Peter Wielander 57a2c328ca [world] Add expiredAt attribute to Run (#515) 2025-12-04 12:05:58 -08:00
Peter Wielander 8d4562e856 [world-local] Finish renaming embedded world to local world (#441) 2025-12-02 09:12:40 -08:00
Peter Wielander 11469d8fd2 CLI/Web: Update fallback directory for embedded world (#291) 2025-11-10 11:54:00 -08:00
Peter Wielander 00efdfb063 Web: Improve trace viewer load times and loading animation (#270) 2025-11-08 10:21:57 -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
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
Pranay Prakash a09a3ea091 remove old builder code (#202)
* remove old builder code

* changeset
2025-11-04 10:43:25 -08:00
Pranay Prakash 10bfd4aea8 refactor: extract path resolution and directory creation helpers (#81)
* feat: add type safety for builder configurations with discriminated unions

Improves type safety by creating discriminated union types for builder-specific
configurations, making it clear which configuration options are required for
each builder type.

Changes:
- Created BaseWorkflowConfig interface with common options
- Created StandaloneConfig, VercelBuildOutputConfig, and NextConfig types
- Made WorkflowConfig a discriminated union based on buildTarget
- Added documentation for each configuration type
- Exported new types from @workflow/builders

This enables better IntelliSense and type checking when constructing builder
configurations, preventing invalid configuration combinations at compile time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: extract path resolution and directory creation helpers

Adds reusable helper methods to BaseBuilder for common path operations,
reducing code duplication and improving readability in builder subclasses.

Changes:
- Added resolvePath() helper in BaseBuilder
- Added ensureDirectory() helper in BaseBuilder
- Updated StandaloneBuilder (both in @workflow/builders and @workflow/cli)
  to use the new helpers
- Removed unnecessary imports from StandaloneBuilder

This simplifies path handling code from:
  const path = resolve(this.config.workingDir, this.config.somePath);
  await mkdir(dirname(path), { recursive: true });

To:
  const path = this.resolvePath(this.config.somePath);
  await this.ensureDirectory(path);

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 23:30:05 -08:00
Pranay Prakash bf54a7b061 refactor: standardize method naming and clarify log messages (#79)
Improves code consistency by standardizing method naming conventions and
clarifying log messages across builders.

Changes:
- Renamed buildClientLibrary() to createClientLibrary() in BaseBuilder to match
  the convention where "create" is used for protected/shared methods
- Updated all callers in StandaloneBuilder and VercelBuildOutputAPIBuilder
- Clarified log messages in StandaloneBuilder by removing "Vercel API" prefix
  since this builder is framework-agnostic

This establishes a clear pattern:
- Public/template methods in subclasses: build* (buildStepsFunction, etc.)
- Protected/shared methods in BaseBuilder: create* (createStepsBundle, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 23:03:56 -08:00
Pranay Prakash 4585222c75 refactor: deduplicate package.json and .vc-config.json generation (#77)
Extracts repeated package.json and .vc-config.json generation logic into
reusable helper methods in BaseBuilder, eliminating code duplication across
VercelBuildOutputAPIBuilder.

Changes:
- Added createPackageJson() helper method to BaseBuilder
- Added createVcConfig() helper method with sensible defaults
- Updated VercelBuildOutputAPIBuilder (both in @workflow/builders and @workflow/cli)
  to use the new helper methods
- Reduced configuration code from ~20 lines per function to ~3 lines

This makes the build code more maintainable and ensures consistent configuration
across all Vercel Build Output API functions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 22:55:01 -08:00
Pranay Prakash 5dfa4eb9f1 refactor: extract queue trigger configuration constants (#76)
Consolidates duplicated queue trigger configurations into shared constants
in @workflow/builders package, eliminating repetition across multiple builders.

Changes:
- Created STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants
- Updated VercelBuildOutputAPIBuilder to use shared constants
- Updated NextBuilder (both in @workflow/next and @workflow/cli) to use constants
- Exported constants from @workflow/builders index

This ensures consistent queue configuration across all builders and makes
future updates to these settings easier to manage from a single location.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 22:35:01 -08:00
Adrian 05714f7924 feat: add sveltekit support (#131)
* add workbench sveltekit

* add sveltekit package

* fix: use js for generated server routes in svelte

* add test routes for sveltekit workbench

* updates from debugging

* feat: add sveltekit build target

* update user sign up workflow workbench sveltekit

* fix: base builder missing GET route handler for sveltekit

* feat: add vercel builder and check for vercel env

* refactor: workflowPlugin for sveltekit

* ci: add tests to workbench sveltekit

* fix: no start command and vercel builder outputs

* fix: base builder conditions

* .

* add auto adapter sveltekit

* fix: disable checking origin for cross site ci stuff

* allow all trusted origins in svelte config

* fix: add catch for error thrown when waiting for ops

* fix: sveltekit workbench adapter

* test

* test

* refactor: move vercel builder on config resolved

* update package json

* add demo workflow trigger

* test letting sveltekit handle route generation

* fix: exclude git ignore for local builder outputs

* update config

* add debug logs

* update debug

* update turbo.json

* fix env check

* another output

* use top-level await

* ensure vercel functions are patched

* change hook

* update

* fix spread

* debug

* update

* chore: remove vercel builder

* chore: update comments in sveltekit workflow package

* chore: remove console comment

* refactor: workflow svelte plugin

* refactor: simplify local builder config

* chore: remove unused deps

* chore: add comment for workbench svelte app

* chore: add sveltekit export to workflow

* export sveltekit from workflow

* lockfile

* chore: remove unused deps svelte workbench

* update styling

* add sveltekit getting started docs

* update sveltekit docs getting started

* changeset

* Apply suggestion from @vercel[bot]

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

* use proper env var

* Update packages/sveltekit/src/index.ts

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

* Update docs/content/docs/getting-started/sveltekit.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Document CSRF protection bypass in SvelteKit workbench config (#157)

* Initial plan

* docs: add CSRF security warning to svelte.config.js

Co-authored-by: adriandlam <93681064+adriandlam@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: adriandlam <93681064+adriandlam@users.noreply.github.com>

* refactor: deduplicate SvelteKit request conversion logic (#156)

* Initial plan

* refactor: extract duplicated SvelteKit request conversion to helper

Co-authored-by: adriandlam <93681064+adriandlam@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: adriandlam <93681064+adriandlam@users.noreply.github.com>

* docs: fix getting staretd sveltekit missing folder

* chore: cleanup sveltekit builder after rebase

* lockfile

* fix: sveltekit building logic in base builder

* refactor: move sveltekit builder logic to its own package

* fix: console log base builder

* changeset

* test

* feat: create hmr plugin

* fix: add initial build on load

* fix: check all files for workflows and steps

* add comments for plugin todo

* remove catching error

* fix: missing context for nodejs envs causing waitUntil to fail

* fix: setting global request conext in vercel environments

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-03 21:15:33 -08:00
Pranay Prakash 2363e472ca feat: move NextBuilder to @workflow/next package (#74)
Moves NextBuilder from @workflow/cli to @workflow/next package, establishing
proper package boundaries where framework-specific builders live in their
respective framework integration packages.

Changes:
- Moved NextBuilder from @workflow/cli to @workflow/next
- Added @workflow/builders and watchpack dependencies to @workflow/next
- Updated runtime re-export to use @workflow/core/dist/runtime directly
- Removed direct dependency on @workflow/cli from @workflow/next

This aligns the Next.js builder with the Nitro builder pattern (which already
lives in @workflow/nitro), creating consistent package organization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 14:25:14 -08:00
Pranay Prakash 652485aa30 feat: create @workflow/builders package with shared builder infrastructure (#73)
This commit extracts builder infrastructure from @workflow/cli into a new
shared @workflow/builders package. This improves code organization by:

- Creating a dedicated package for builder functionality
- Allowing @workflow/next and @workflow/nitro to depend on builders directly
- Reducing coupling between framework integrations and the CLI
- Preparing for moving NextBuilder to @workflow/next in the next PR

Changes:
- Created new @workflow/builders package
- Moved BaseBuilder, BasicBuilder, and VercelBuildOutputAPIBuilder
- Moved esbuild plugins (swc, discover-entries, node-module)
- Moved WorkflowConfig and BuildTarget types
- Updated @workflow/cli to import from @workflow/builders
- Updated @workflow/nitro to import from @workflow/builders
- Re-exported types from CLI for backwards compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 13:37:39 -08:00
Peter Wielander a3326a257c Add workflow inspect sleep command to list active sleep/wait events (#170) 2025-10-31 15:24:49 -07:00
Peter Wielander e367046105 World-vercel: allow proxying queue endpoint (#130) 2025-10-29 17:24:13 -07:00
Peter Wielander 0f845afb2a Alias workflow web to workflow inspect runs --web, update o11y doc image, hide trace viewer search for small runs (#124) 2025-10-28 17:19:39 -07:00
Peter Wielander eadf588573 Web: Add button to re-run workflows (#94) 2025-10-27 13:10:34 -07:00
Peter Wielander dbf2207b7c Web: refactor active/hover styles from trace viewer to avoid color conflicts (#45) 2025-10-26 13:45:14 -07:00
Pranay Prakash 66332f2897 Rename "vercel-static" build mode to "standalone" (#71) 2025-10-26 00:37:35 -07:00
Pranay Prakash dfdb280f59 Generate the webhook route in the static builder (#67) 2025-10-25 16:20:13 -07:00
Gal Schlezinger 4ca9a3edbd Introducing Workflow DevKit
build durable, resilient, and observable workflows.

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
Co-authored-by: Manuel Muñoz Solera <mamuso@mamuso.net>
Co-authored-by: Garrett <garrett.tolbert@vercel.com>
Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
Co-authored-by: Tom Dale <tom@tomdale.net>
Co-authored-by: Vishal Yathish <135551666+visyat@users.noreply.github.com>
Co-authored-by: josh <144584931+dancer@users.noreply.github.com>
2025-10-23 12:07:52 +03:00