feat(deploy): add --env support (wrangler env.*)#44
Closed
liuxiaopai-ai wants to merge 1 commit intocloudflare:mainfrom
Closed
feat(deploy): add --env support (wrangler env.*)#44liuxiaopai-ai wants to merge 1 commit intocloudflare:mainfrom
liuxiaopai-ai wants to merge 1 commit intocloudflare:mainfrom
Conversation
Adds vinext deploy --env <name> and threads it through to wrangler deploy --env <name>. Keeps --preview working as shorthand for preview environment, adds unit tests for wrangler arg construction, and updates README/help examples. Refs cloudflare#33.
southpolesteve
added a commit
that referenced
this pull request
Feb 25, 2026
Build on #44 by liuxiaopai-ai — adds --env flag for wrangler deploy. Security: switch from execSync(shell string) to execFileSync(binary, args) to eliminate command injection via unsanitized --env/--name values. Replace hand-rolled flag parsing (parseStringFlag, parseNumericFlag, rawArgs.includes) with Node.js built-in util.parseArgs. This gives us strict mode (throws on unknown flags), automatic --flag=value handling, and proper error messages for missing values. Also: buildWranglerDeployArgs now returns { args, env } directly instead of re-parsing the args array for the log message.
southpolesteve
added a commit
that referenced
this pull request
Feb 25, 2026
#49) * feat(deploy): add --env support for wrangler deploy Adds vinext deploy --env <name> and threads it through to wrangler deploy --env <name>. Keeps --preview working as shorthand for preview environment, adds unit tests for wrangler arg construction, and updates README/help examples. Refs #33. * fix(deploy): use execFileSync and util.parseArgs for --env support Build on #44 by liuxiaopai-ai — adds --env flag for wrangler deploy. Security: switch from execSync(shell string) to execFileSync(binary, args) to eliminate command injection via unsanitized --env/--name values. Replace hand-rolled flag parsing (parseStringFlag, parseNumericFlag, rawArgs.includes) with Node.js built-in util.parseArgs. This gives us strict mode (throws on unknown flags), automatic --flag=value handling, and proper error messages for missing values. Also: buildWranglerDeployArgs now returns { args, env } directly instead of re-parsing the args array for the log message. --------- Co-authored-by: root <root@localhost.localdomain>
Collaborator
|
#49 closes this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #33.