Skip to content

feat(cli): use local scripts when previewing flows#8365

Draft
centdix wants to merge 3 commits intomainfrom
farhad/win-1877-in-cli-and-vscode-extension-previewing-a-flow-should-use
Draft

feat(cli): use local scripts when previewing flows#8365
centdix wants to merge 3 commits intomainfrom
farhad/win-1877-in-cli-and-vscode-extension-previewing-a-flow-should-use

Conversation

@centdix
Copy link
Collaborator

@centdix centdix commented Mar 13, 2026

Summary

  • When previewing a flow (wmill flow preview) or using dev mode, PathScript modules (flow steps referencing scripts by path) now resolve to local file content instead of fetching remote versions from the server
  • Added replacePathScriptsWithLocal() in the shared replacer module that converts PathScriptRawScript when a local file exists
  • Applied to both CLI preview and VSCode extension dev mode

Test plan

  • Existing inline script tests pass (18/18)
  • TypeScript compilation passes with no new errors
  • Manual test: create a flow with a PathScript step, modify the local script, run wmill flow preview and verify the local version is used

🤖 Generated with Claude Code

centdix and others added 2 commits March 13, 2026 12:10
When previewing a flow, PathScript modules (type: "script") now resolve
to local file content instead of remote versions. This ensures flow
preview and dev mode test the actual local changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 13, 2026

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: acc910a
Status: ✅  Deploy successful!
Preview URL: https://05f39903.windmill.pages.dev
Branch Preview URL: https://farhad-win-1877-in-cli-and-v.windmill.pages.dev

View logs

Unit tests for replacePathScriptsWithLocal covering:
- basic PathScript→RawScript conversion
- tag_override preservation
- missing local file fallback
- mixed module types
- nested structures (loops, branches)

Integration test verifying flow preview with a PathScript step
uses the local script file content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant