Commit Graph

9 Commits

Author SHA1 Message Date
Nathan Colosimo aae47b9fdd Fix SvelteKit config loading (#2802) 2026-07-08 01:04:31 +00:00
Karthik Kalyan 56ba32feb8 Bump vite (#1827) 2026-04-22 14:05:38 -07:00
Pranay Prakash 362978be55 chore: bump sveltekit ecosystem (#1498)
Bump SvelteKit-related dependencies in the sveltekit workbench:
- @sveltejs/kit: ^2.43.2 -> ^2.55.0
- svelte: ^5.39.5 -> ^5.54.0
- @sveltejs/adapter-node: ^5.4.0 -> ^5.5.4
- @sveltejs/adapter-vercel: ^6.1.1 -> ^6.3.3

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:08:35 -07:00
Adrian fc774e57d0 fix: error messages in esbuild node module plugin (#264)
* feat: add file dependency tracing for node module plugin

* feat: add violation identifier and read file to show contents

* Update packages/builders/src/node-module-esbuild-plugin.ts

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

* changeset

* fix: node module plugin silently failing when enhanced resolve fails

* chore: fix comment jsdoc

* fix: infinite loop in traversing dep grpah

* Update packages/builders/src/node-module-esbuild-plugin.test.ts

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

* fix

* cleanup

* test: add comprehensive build errors test

* add more tests

* fix generate workflows

* update test

* fix: use readFile over readFileSync

* fix test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-12-04 16:53:41 -08:00
Adrian 6dd17500da refactor: move rollup plugin to own package (#382)
* refactor: move rollup plugin to own package

* refactor(sveltekit): update sveltekit to use rollup package

* Update packages/rollup/src/index.ts

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

* chore(deps): missing nitro dep

* chore(deps): remove unused deps from @workflow/rollup

* changeset

* chore: project LICENSE symlinks

* refactor: move @swc/core version to pnpm workspace

* chore: cleanup and add readme

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-26 16:02:13 -08:00
Gal Schlezinger 10ce313d56 postgres: fix tests (#394)
* postgres: use non-deprecated drizzle signatures

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* postgres: store metadata in the hook

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* core: do not rely on module cache for world config. instead, use a global and a symbol.

this makes sure that streamers can use in-memory event emitters and that it won't be compiled away into the different flow.js and step.js files.

this was figured out when i was adding a hooks tests to world-testing.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* add postgres world to all workbench packages

we try to run them with the postgres world but it's not installed

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* Replace jsonb with cbor because zero byte does not work in jsonb :(

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* fix error handling: attempts start at 0 now, and not 1 like when we released. so initial attempt in postgres should reflect that.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* drain stuff

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* fallback metadata to metadataJson

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* Make code more readable

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* apply Vade fix

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

---------

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
2025-11-23 11:05:20 -08:00
Pranay Prakash 945a946812 Normalize Workbenches (#283)
* Normalize Workbenches

Normalize trigger scripts across workbenches
fix: include hono in local build test

test: include src dir for test

test: add workflow dir config in test to fix sveltekit dev tests

add temp 7_full in example wokrflow

format

fix(sveltekit): detecting workflow folders and customizable dir

Remove 7_full and 1_simple error
replace API symlink in webpack workbench
Fix sveltekit and vite tests
Fix sveltekit symlinks
Test fixes
Fix sveltekit workflows path
Dont symlink routes in vite
Include e2e tests for hono and vite

fix error tests post normalization

wip - attempted fixes

* Add claude demo command

* fix: normalize workbench tests (#292)

* Proper stacktrace propogation in world

Proper stacktrace propogation in world

* Standardize the error type in the world spec

* Normalize Workbenches

Normalize trigger scripts across workbenches
fix: include hono in local build test

test: include src dir for test

test: add workflow dir config in test to fix sveltekit dev tests

add temp 7_full in example wokrflow

format

fix(sveltekit): detecting workflow folders and customizable dir

Remove 7_full and 1_simple error
replace API symlink in webpack workbench
Fix sveltekit and vite tests
Fix sveltekit symlinks
Test fixes
Fix sveltekit workflows path
Dont symlink routes in vite
Include e2e tests for hono and vite

* fix error tests post normalization

* fix(sveltekit): reading file on hmr delete

* changeset

* fix(vite): add resolve symlink script

* fix(vite): missing building on hmr

* test local builder in vite

* test: increase timeout on hookWorkflow

* test: ignore vite based apps in crossFileWorkflow

* test: fix nitro based apps status codes

* fix: intercept default vite spa handler on 404 workflow routes

* fix: vite hook route returning 422

* test: use 422 for hookWorkflow expected

* test: fix hono returning 404

* chore: add comment to middleware to clarify

* make api route for duplicate case

* revert

* revert: nitro builder

* add back nitro unhandled rejection logic

* test: add hono

* changeset

* fix: unused method

* fix: remove duplicate import

* remove

* chore: add comments to clarify

* test remove vite symlink script

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>

* refactor: add top level resolve symlinks script

* fix: cleanup builder directories (#319)

* fix: add sveltekit server routes to builder

* fix: remove root workflow dir check

* fix missing root level workflow route

* Fix: The constructor now hardcodes `dirs: ['src/routes', 'src/lib']` which silently ignores any user\-provided `dirs` option passed to the plugin\, breaking the documented API and removing support for custom workflow directories\.

* Fix: The test expectations don\'t match the new implementation of `getWorkflowDirs()`\. The mock provides `scanDirs` which the new code no longer uses\, and the new implementation adds scanning of `routesDir` and `apiDir` instead\.

* fix(nitro): use src dir

---------

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

* refactor(nitro): use suppressUndefinedRejections

* revert: sveltekit builder

---------

Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-14 10:13:06 -08: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 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