@@ -156,6 +156,14 @@ export const BUILD_ALL_PROFILES = {
156156 ] ,
157157} ;
158158
159+ export const BUILD_ALL_PROFILE_STEP_ENV = {
160+ ciArtifacts : {
161+ tsdown : {
162+ OPENCLAW_RUN_NODE_SKIP_DTS_BUILD : "1" ,
163+ } ,
164+ } ,
165+ } ;
166+
159167export function resolveBuildAllSteps ( profile = "full" ) {
160168 const labels = BUILD_ALL_PROFILES [ profile ] ;
161169 if ( ! labels ) {
@@ -166,19 +174,24 @@ export function resolveBuildAllSteps(profile = "full") {
166174 const missing = labels . filter ( ( label ) => ! BUILD_ALL_STEPS . some ( ( step ) => step . label === label ) ) ;
167175 throw new Error ( `Build profile ${ profile } references unknown steps: ${ missing . join ( ", " ) } ` ) ;
168176 }
169- return selected ;
177+ const envOverrides = BUILD_ALL_PROFILE_STEP_ENV [ profile ] ?? { } ;
178+ return selected . map ( ( step ) => {
179+ const env = envOverrides [ step . label ] ;
180+ return env ? { ...step , env : { ...( step . env ?? { } ) , ...env } } : step ;
181+ } ) ;
170182}
171183
172184function resolveStepEnv ( step , env , platform ) {
185+ const stepEnv = step . env ? { ...env , ...step . env } : env ;
173186 if ( platform !== "win32" || ! step . windowsNodeOptions ) {
174- return env ;
187+ return stepEnv ;
175188 }
176- const currentNodeOptions = env . NODE_OPTIONS ?. trim ( ) ?? "" ;
189+ const currentNodeOptions = stepEnv . NODE_OPTIONS ?. trim ( ) ?? "" ;
177190 if ( currentNodeOptions . includes ( step . windowsNodeOptions ) ) {
178- return env ;
191+ return stepEnv ;
179192 }
180193 return {
181- ...env ,
194+ ...stepEnv ,
182195 NODE_OPTIONS : currentNodeOptions
183196 ? `${ currentNodeOptions } ${ step . windowsNodeOptions } `
184197 : step . windowsNodeOptions ,
0 commit comments