@@ -21,6 +21,7 @@ import {
2121 TMP_STORAGE_CLASS ,
2222 TMP_WORKLOAD ,
2323 TMP_WORKLOAD_PATH ,
24+ TMP_HEADER ,
2425} from "../constants" ;
2526import host , { Host } from "../host" ;
2627import * as path from "path" ;
@@ -56,6 +57,7 @@ export interface ControllerNodeApi {
5657type StartDevModeInfoType = {
5758 image ?: string ;
5859 mode ?: "replace" | "copy" ;
60+ header ?: string ;
5961 command ?: string ;
6062} ;
6163export default class StartDevModeCommand implements ICommand {
@@ -78,6 +80,7 @@ export default class StartDevModeCommand implements ICommand {
7880
7981 let image = info ?. image ;
8082 const mode = info ?. mode || "replace" ;
83+ const header = info ?. header ;
8184 this . node = node ;
8285 this . info = info ;
8386
@@ -168,15 +171,24 @@ export default class StartDevModeCommand implements ICommand {
168171 destDir === true ||
169172 ( destDir && destDir === host . getCurrentRootPath ( ) )
170173 ) {
171- await this . startDevMode ( host , appName , node , containerName , mode , image ) ;
174+ await this . startDevMode (
175+ host ,
176+ appName ,
177+ node ,
178+ containerName ,
179+ mode ,
180+ image ,
181+ header
182+ ) ;
172183 } else if ( destDir ) {
173184 this . saveAndOpenFolder (
174185 appName ,
175186 node ,
176187 destDir ,
177188 containerName ,
178189 mode ,
179- image
190+ image ,
191+ header
180192 ) ;
181193 messageBus . emit ( "devStart" , {
182194 name : appName ,
@@ -237,7 +249,8 @@ export default class StartDevModeCommand implements ICommand {
237249 destDir : string ,
238250 containerName : string ,
239251 mode : string ,
240- image : string
252+ image : string ,
253+ header : string
241254 ) {
242255 const currentUri = host . getCurrentRootPath ( ) ;
243256
@@ -250,7 +263,8 @@ export default class StartDevModeCommand implements ICommand {
250263 node as ControllerResourceNode ,
251264 containerName ,
252265 mode ,
253- image
266+ image ,
267+ header
254268 ) ;
255269 }
256270 }
@@ -469,7 +483,8 @@ export default class StartDevModeCommand implements ICommand {
469483 node : ControllerNodeApi ,
470484 containerName : string ,
471485 mode : "replace" | "copy" ,
472- image : string
486+ image : string ,
487+ header ?: string
473488 ) {
474489 const currentUri = host . getCurrentRootPath ( ) || os . homedir ( ) ;
475490
@@ -499,7 +514,8 @@ export default class StartDevModeCommand implements ICommand {
499514 containerName ,
500515 node . getStorageClass ( ) ,
501516 node . getDevStartAppendCommand ( ) ,
502- image
517+ image ,
518+ header
503519 ) ;
504520 host . log ( "dev start end" , true ) ;
505521 host . log ( "" , true ) ;
@@ -568,7 +584,8 @@ export default class StartDevModeCommand implements ICommand {
568584 node : ControllerResourceNode ,
569585 containerName : string ,
570586 mode : string ,
571- image : string
587+ image : string ,
588+ header : string
572589 ) {
573590 const appNode = node . getAppNode ( ) ;
574591 host . setGlobalState ( TMP_ID , node . getNodeStateId ( ) ) ;
@@ -587,6 +604,7 @@ export default class StartDevModeCommand implements ICommand {
587604 }
588605
589606 host . setGlobalState ( TMP_MODE , mode ) ;
607+ host . setGlobalState ( TMP_HEADER , header ) ;
590608 host . setGlobalState ( TMP_DEV_START_IMAGE , image ) ;
591609 const storageClass = node . getStorageClass ( ) ;
592610 if ( storageClass ) {
0 commit comments