@@ -10,13 +10,23 @@ import logger from 'utils/logger';
1010const MESSAGES = {
1111 appId : 'App id (will export the live version)' ,
1212 appVersionId : 'App version id' ,
13+ path : 'Path to export your app manifest files to' ,
1314} ;
1415
1516export default class ManifestExport extends AuthenticatedCommand {
1617 static description = 'export app manifest.' ;
1718 static withPrintCommand = false ;
18- static examples = [ '<%= config.bin %> <%= command.id %>' ] ;
19+ static examples = [
20+ '<%= config.bin %> <%= command.id %>' ,
21+ '<%= config.bin %> <%= command.id %> -p ./exports' ,
22+ '<%= config.bin %> <%= command.id %> --manifestPath ./my-manifests' ,
23+ ] ;
24+
1925 static flags = ManifestExport . serializeFlags ( {
26+ manifestPath : Flags . string ( {
27+ char : 'p' ,
28+ description : MESSAGES . path ,
29+ } ) ,
2030 appId : Flags . string ( {
2131 char : 'a' ,
2232 description : MESSAGES . appId ,
@@ -44,7 +54,7 @@ export default class ManifestExport extends AuthenticatedCommand {
4454 public async run ( ) : Promise < void > {
4555 try {
4656 const { flags } = await this . parse ( ManifestExport ) ;
47- const { appId : appIdAsString , appVersionId : appVersionIdAsString } = flags ;
57+ const { manifestPath , appId : appIdAsString , appVersionId : appVersionIdAsString } = flags ;
4858
4959 let appId = appIdAsString ? Number ( appIdAsString ) : undefined ;
5060 let appVersionId = appVersionIdAsString ? Number ( appVersionIdAsString ) : undefined ;
@@ -66,7 +76,7 @@ export default class ManifestExport extends AuthenticatedCommand {
6676 { title : 'Validate app before exporting manifest' , task : exportService . validateManifestTask } ,
6777 { title : 'Export app manifest' , task : exportService . downloadManifestTask } ,
6878 ] ,
69- { ctx : { appVersionId, appId : appId ! } } ,
79+ { ctx : { appVersionId, appId : appId ! , manifestPath } } ,
7080 ) ;
7181
7282 await tasks . run ( ) ;
0 commit comments