[cli] Preserve --environment in web UI fallback URLs#15493
Conversation
When `integration add` falls back to the browser (unsupported product, non-subscription plan, or auto-provision 422), the user's --environment selection was being dropped. Thread it through as an `environment` query param so the checkout page can pre-select the correct environments.
🦋 Changeset detectedLatest commit: 6a3c1ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-r0sx7iekg.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-r0sx7iekg.vercel.sh/tarballs/vercel.tgz"
}
}
}Python Runtime WheelA Python Workers WheelA |
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 1 (3%)
Unaffected packages - 39 (98%)
Results
This comment is automatically generated based on the affected testing strategy |
|
Low Risk — CLI URL param passthrough + tests — no auth, billing logic, or schema changes.
Assessed at 6a3c1ed. |
…l/vercel into cli/environment-web-ui-passthrough
Summary
https://linear.app/vercel/issue/MKT-2932/pre-fill-web-fallback-ui-with-environment-and-prefix-is-these-flags
When
integration addfalls back to the browser (unsupported product, non-subscription billing plan, or auto-provision 422), the--environmentflag was being dropped. This threads it through as anenvironmentquery param so the checkout page can pre-select the correct environments.add.ts: passenvironmentstoprovisionResourceViaWebUIand append to URLadd-auto-provision.ts: appendenvironmentparam to fallback URLRelated PRs
Follows the same pattern established by:
--plan→planIdin fallback URLs)integration addpath #14868 (source=cli+defaultResourceNamein fallback URLs)Test plan
environmentparamenvironmentparamenvironmentparam