[PR #104] feat(deploy): forward unknown CLI flags to wrangler deploy #312

Open
opened 2026-05-06 12:39:08 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/104
Author: @dragonkhoi
Created: 2/26/2026
Status: 🔄 Open

Base: mainHead: feat/deploy-passthrough-args


📝 Commits (2)

  • 4fd2c82 feat(deploy): forward unknown CLI flags to wrangler deploy
  • 5186edb fix: narrow parseArgs value types for strict:false compatibility

📊 Changes

3 files changed (+88 additions, -15 deletions)

View changed files

📝 packages/vinext/src/cli.ts (+1 -0)
📝 packages/vinext/src/deploy.ts (+48 -13)
📝 tests/deploy.test.ts (+39 -2)

📄 Description

Summary

  • Allow users to pass wrangler-specific flags (e.g. --keep-vars, --config) through vinext deploy without vinext needing to explicitly define each one
  • Switch parseDeployArgs from strict: true to strict: false with token-based collection of unknown flags and positionals
  • Unknown args are appended to the wrangler deploy command after vinext's own --env flag

Design note

Positional arguments are intentionally forwarded to wrangler alongside unknown flags. This gives users full passthrough capability (e.g. vinext deploy -- --keep-vars --config=custom.toml). Since wrangler deploy does not accept meaningful positionals, stray positionals will surface as wrangler errors rather than being silently swallowed.

Test plan

  • Unknown flags (--keep-vars) collected as passthrough
  • Unknown flags with separate values (--config my-wrangler.toml) collected correctly
  • Inline values (--config=my-wrangler.toml) reconstructed correctly
  • Known and unknown flags separated properly
  • Empty passthrough when no unknown flags
  • Passthrough args appended after --env in wrangler command

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/104 **Author:** [@dragonkhoi](https://github.com/dragonkhoi) **Created:** 2/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/deploy-passthrough-args` --- ### 📝 Commits (2) - [`4fd2c82`](https://github.com/cloudflare/vinext/commit/4fd2c823dd1b324f1d258d0fce78c2e2cd205d0b) feat(deploy): forward unknown CLI flags to wrangler deploy - [`5186edb`](https://github.com/cloudflare/vinext/commit/5186edb3775a97014383a2d39e592b6543f69f58) fix: narrow parseArgs value types for strict:false compatibility ### 📊 Changes **3 files changed** (+88 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/cli.ts` (+1 -0) 📝 `packages/vinext/src/deploy.ts` (+48 -13) 📝 `tests/deploy.test.ts` (+39 -2) </details> ### 📄 Description ## Summary - Allow users to pass wrangler-specific flags (e.g. `--keep-vars`, `--config`) through `vinext deploy` without vinext needing to explicitly define each one - Switch `parseDeployArgs` from `strict: true` to `strict: false` with token-based collection of unknown flags and positionals - Unknown args are appended to the `wrangler deploy` command after vinext's own `--env` flag ## Design note Positional arguments are intentionally forwarded to wrangler alongside unknown flags. This gives users full passthrough capability (e.g. `vinext deploy -- --keep-vars --config=custom.toml`). Since `wrangler deploy` does not accept meaningful positionals, stray positionals will surface as wrangler errors rather than being silently swallowed. ## Test plan - [x] Unknown flags (`--keep-vars`) collected as passthrough - [x] Unknown flags with separate values (`--config my-wrangler.toml`) collected correctly - [x] Inline values (`--config=my-wrangler.toml`) reconstructed correctly - [x] Known and unknown flags separated properly - [x] Empty passthrough when no unknown flags - [x] Passthrough args appended after `--env` in wrangler command 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#312
No description provided.