fix(wizard): honor MOSAIC_GATEWAY_SKIP_NPM_INSTALL — unblock install.sh --dev gateway testing #698
Reference in New Issue
Block a user
Delete Branch "fix/gateway-config-honor-skip-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Restores the CLI-side consumer of
MOSAIC_GATEWAY_SKIP_NPM_INSTALL: the wizard's gateway stage now skipsinstallGatewayPackage()(npm install -g @mosaicstack/gateway@latest) when the env is1, plus two spec cases that pin the behavior.Why
tools/install.sh --dev(onnext) builds CLI and gateway from source at--refand exportsMOSAIC_GATEWAY_SKIP_NPM_INSTALL=1— but the consumer was lost when #676 closed as superseded (#689 took the gateway-side Redis fix; the CLI-side env gate fell through the crack). Result today: every--devrun silently overwrites the source-built gateway with the published@latest, so a dev-test validates the wrong artifact. This unblocks the planned greenfield VM dev-test of thenextlane.Producer already on
next(install.shlines 124/493/673); this adds the missing consumer.Verification
tsc --noEmitclean, eslint pass, prettier cleanundefined === '1'is false ⇒ byte-identical behavior=== '1'matchesMOSAIC_ASSUME_YESet al.), test pinning all verifiedCompanion
Enables:
install.sh --dev --ref <branch>end-to-end gateway testing on the 0.0.49/nextlane.🤖 Generated with Claude Code
VERIFIED APPROVE — reviewer-of-record [W-jarvis:reviewer] head
4b0137325bReviewed PR #698 against base
nextat exact head4b0137325be6357c65b168ce9b97c9fc98b4e0ef.Evidence:
packages/mosaic/src/stages/gateway-config.tsandpackages/mosaic/src/stages/gateway-config.spec.ts;git diff --check origin/next...origin/pr/698clean.tools/install.shonnextalready exportsMOSAIC_GATEWAY_SKIP_NPM_INSTALL=1for dev/source and next fallback paths, butorigin/nexthad no gateway-config consumer. This PR restores the missing consumer ingatewayConfigStage.skipNpmInstallis equivalent to existingopts.skipInstall; fresh install still callsinstallGatewayPackage()whenskipInstall: falseand daemon is not running. WhenMOSAIC_GATEWAY_SKIP_NPM_INSTALL=1, the stage skips the registry install and does not overwrite a source-built/global gateway.beforeEach. Local targeted run passed:pnpm --filter @mosaicstack/mosaic test -- src/stages/gateway-config.spec.ts(9/9).No merge performed by reviewer.