Repository navigation
[NO-TICKET] Improve deployment environment detection and local CLI setup - #343
Merged
Merged
Conversation
Contributor
Author
|
/review |
|
Comprehensive environment detection enhancements with robust testing and clear docs. 🎯 Quality: 100% Elite · 📦 Size: Medium 📈 This month: Your 168th PR — above team average · Averaging Excellent |
daniloradovic
approved these changes
Oct 1, 2026
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.
What changed
Connect now reads Vercel's target environment and distinguishes Netlify production builds, hosted previews, and local development. The setup docs also cover local coding CLIs and explicit DigitalOcean build settings.
Why labels could be wrong
Vercel's target tier and Netlify's preview-server and development-server flags were not read. A known host with a missing tier could fall through to a CI branch or hosted-builder assumption. An incorrect label also changes whether built HTML receives the production marker.
The onboarding entry point presented a hosted-workspace sandbox command to local CLI users without a separate local workflow.
Fix
VERCEL_TARGET_ENVoverVERCEL_ENV, accepting either without a separate Vercel marker.Verified
npm run buildnpm run typechecknpm test— 4,137 passed, 7 skippednpm run capabilities:checknode field-test/setup-demo.mjs --template express-npmThe integration test moves one project between local, production, and sandbox environments and checks the uploaded scan/build labels, production-marker insertion/removal, and absence of a persisted inferred tier. Configuration tests retain explicit override precedence. The local Express setup demo verifies one reused site, one widget, one copy of each hook, and guard source wiring.
The first full test run had two declaration-resolution failures. Both passed individually, and the complete suite passed when rerun after the setup demo finished.
Out of scope, worth a follow-up
Live end-to-end installs through each coding assistant remain untested. DigitalOcean deployments still require an explicit build-time tier; a hostname or
NODE_ENV=productioncannot establish it.