@@ -32,6 +32,7 @@ export const UPDATE_CONFIGS_NAME = 'updateConfigs'
32
32
export const REFRESH_CONFIGS_NAME = 'refreshConfigs'
33
33
export const KEYS_CONFIGS_NAME = 'keyConfigs'
34
34
export const SETUP_CONFIGS_NAME = 'setupConfigs'
35
+ export const START_CONFIGS_NAME = 'startConfigs'
35
36
36
37
37
38
const initializeSetup = async ( config , k8 ) => {
@@ -479,24 +480,40 @@ export const stopConfigBuilder = async function (argv, ctx, task) {
479
480
}
480
481
481
482
export const startConfigBuilder = async function ( argv , ctx , task ) {
482
- ctx . config = {
483
- app : this . configManager . getFlag ( flags . app ) ,
484
- cacheDir : this . configManager . getFlag ( flags . cacheDir ) ,
485
- debugNodeAlias : this . configManager . getFlag ( flags . debugNodeAlias ) ,
486
- namespace : this . configManager . getFlag ( flags . namespace ) ,
487
- nodeAliases : helpers . parseNodeAliases ( this . configManager . getFlag ( flags . nodeAliasesUnparsed ) )
488
- }
483
+ /**
484
+ * @typedef {Object } NodeStartConfigClass
485
+ * -- flags --
486
+ * @property {string } app
487
+ * @property {string } appConfig
488
+ * @property {string } cacheDir
489
+ * @property {boolean } devMode
490
+ * @property {string } namespace
491
+ * @property {string } nodeAliasesUnparsed
492
+ * @property {string } debugNodeAlias
493
+ * -- extra args --
494
+ * @property {string } debugNodeAlias
495
+ * -- methods --
496
+ * @property {NodeAliases } nodeAliases
497
+ */
498
+ /**
499
+ * @callback getUnusedConfigs
500
+ * @returns {string[] }
501
+ */
489
502
490
- ctx . config . stagingDir = Templates . renderStagingDir (
491
- this . configManager . getFlag ( flags . cacheDir ) ,
492
- this . configManager . getFlag ( flags . releaseTag )
493
- )
503
+ // create a config object for subsequent steps
504
+ const config = /** @type {NodeStartConfigClass } **/ this . getConfig ( START_CONFIGS_NAME , argv . flags ,
505
+ [
506
+ 'nodeAliases'
507
+ ] )
494
508
495
- if ( ! await this . k8 . hasNamespace ( ctx . config . namespace ) ) {
496
- throw new SoloError ( `namespace ${ ctx . config . namespace } does not exist` )
509
+
510
+ if ( ! await this . k8 . hasNamespace ( config . namespace ) ) {
511
+ throw new SoloError ( `namespace ${ config . namespace } does not exist` )
497
512
}
498
-
499
- return ctx . config
513
+
514
+ config . nodeAliases = helpers . parseNodeAliases ( config . nodeAliasesUnparsed )
515
+
516
+ return config
500
517
}
501
518
502
519
export const setupConfigBuilder = async function ( argv , ctx , task ) {
0 commit comments