@@ -25,7 +25,7 @@ import {
2525 RpcError ,
2626 SchemaGuardError ,
2727} from "../errors" ;
28- import { describeBundle } from "../resolve/target" ;
28+ import { describeBundle , REPO_KEYS } from "../resolve/target" ;
2929import {
3030 ADDRESS_DIR ,
3131 COMPOSE_OUT_DIR ,
@@ -72,7 +72,7 @@ import type {
7272 VersionBundle ,
7373 VersionTarget ,
7474} from "../types" ;
75- import { STEP_NAMES } from "../types" ;
75+ import { OVERRIDE_GROUPS , STEP_NAMES } from "../types" ;
7676import {
7777 exists ,
7878 hostReachableMaterialUrl ,
@@ -255,7 +255,26 @@ const overrideWarnings = (overrides: LocalOverride[], target?: string) => {
255255} ;
256256
257257/** Prints the resolved version bundle in compact or detailed form. */
258- const printBundle = ( bundle : VersionBundle , options ?: { detailed ?: boolean } ) => {
258+ const fullBuildActive = ( overrides : LocalOverride [ ] ) =>
259+ OVERRIDE_GROUPS . every ( ( group ) => overrides . some ( ( item ) => item . group === group ) ) ;
260+
261+ /** Rewrites displayed repo-owned versions to match the effective runtime source under `--build`. */
262+ export const displayedBundle = (
263+ bundle : VersionBundle ,
264+ overrides : LocalOverride [ ] ,
265+ ) =>
266+ ! fullBuildActive ( overrides )
267+ ? bundle
268+ : {
269+ ...bundle ,
270+ env : Object . fromEntries (
271+ Object . entries ( bundle . env ) . map ( ( [ key , value ] ) => [ key , REPO_KEYS . has ( key ) ? "LOCAL BUILD" : value ] ) ,
272+ ) ,
273+ } ;
274+
275+ /** Prints the resolved version bundle in compact or detailed form. */
276+ const printBundle = ( state : Pick < State , "versions" | "overrides" > , options ?: { detailed ?: boolean } ) => {
277+ const bundle = displayedBundle ( state . versions , state . overrides ) ;
259278 console . log ( `[resolve] ${ bundle . lockName } ` ) ;
260279 if ( options ?. detailed ) {
261280 console . log ( describeBundle ( bundle ) ) ;
@@ -461,7 +480,7 @@ export const runStep = async (state: State, step: StepName) => {
461480 await preflight ( state , true , state . requiresGitHub ?? true ) ;
462481 break ;
463482 case "resolve" :
464- printBundle ( state . versions , { detailed : true } ) ;
483+ printBundle ( state , { detailed : true } ) ;
465484 break ;
466485 case "generate" :
467486 await generateRuntime ( state , stackSpecForState ( state ) ) ;
@@ -903,7 +922,7 @@ export const upDryRun = async (options: Omit<UpOptions, "dryRun">) => {
903922 state . scenarioSourcePath ??= state . scenario ?. sourcePath ;
904923 ensureResumeOptions ( state , options ) ;
905924 await preflight ( state , false , state . requiresGitHub ) ;
906- printBundle ( state . versions , { detailed : true } ) ;
925+ printBundle ( state , { detailed : true } ) ;
907926 printPlan ( state , options . fromStep ?? startStep ( state , options ) ) ;
908927 console . log ( "[dry-run] resume preview uses persisted state only; no runtime state or containers were changed" ) ;
909928 return ;
@@ -915,7 +934,7 @@ export const upDryRun = async (options: Omit<UpOptions, "dryRun">) => {
915934 await assertSchemaCompatibility ( bundle , options . overrides , scenario , options . allowSchemaMismatch ) ;
916935 const state = previewStateFromBundle ( options , bundle , scenario ) ;
917936 await preflight ( state , false , state . requiresGitHub ) ;
918- printBundle ( state . versions , { detailed : true } ) ;
937+ printBundle ( state , { detailed : true } ) ;
919938 printPlan ( state , options . fromStep ) ;
920939 console . log ( "[dry-run] preflight passed; no runtime state or containers were changed" ) ;
921940} ;
0 commit comments