@hcl-software/dxclient 229.0.0 → 231.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/configuration/config.json +1 -0
- package/dist/package.json +9 -9
- package/dist/packages/admintasks/package-lock.json +11 -9
- package/dist/packages/admintasks/package.json +1 -1
- package/dist/packages/admintasks/src/commands/createCredentialVault.js +3 -2
- package/dist/packages/admintasks/src/commands/createCredentialVault.js.map +1 -1
- package/dist/packages/admintasks/src/commands/importVirtualPortal.js +8 -4
- package/dist/packages/admintasks/src/commands/importVirtualPortal.js.map +1 -1
- package/dist/packages/admintasks/src/errors/CommandLineMessages_en.json +3 -1
- package/dist/packages/dam/package-lock.json +343 -208
- package/dist/packages/dam/package.json +2 -2
- package/dist/packages/dam/src/errors/CommandLineMessages_en.json +1 -1
- package/dist/packages/dam/src/services/stagingService.js +18 -0
- package/dist/packages/dam/src/services/stagingService.js.map +1 -1
- package/dist/packages/deployportlet/package-lock.json +11 -9
- package/dist/packages/deployportlet/package.json +1 -1
- package/dist/packages/deployportlet/src/commands/xmlaccess.js +5 -1
- package/dist/packages/deployportlet/src/commands/xmlaccess.js.map +1 -1
- package/dist/packages/deployportlet/src/messages/messages_en.json +1 -1
- package/dist/packages/deployportlet/src/services/undeployPortletServices.d.ts +1 -1
- package/dist/packages/deployportlet/src/services/undeployPortletServices.js +4 -4
- package/dist/packages/deployportlet/src/services/undeployPortletServices.js.map +1 -1
- package/dist/packages/deployscriptapplication/package-lock.json +18 -16
- package/dist/packages/deployscriptapplication/package.json +2 -2
- package/dist/packages/deployscriptapplication/src/commands/push.js +23 -4
- package/dist/packages/deployscriptapplication/src/commands/push.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/errors/CommandLineMessages_en.json +5 -2
- package/dist/packages/deploytheme/package-lock.json +683 -140
- package/dist/packages/deploytheme/package.json +2 -2
- package/dist/packages/deploytheme/src/services/themeServices.js +13 -0
- package/dist/packages/deploytheme/src/services/themeServices.js.map +1 -1
- package/dist/packages/livesync/package-lock.json +14 -11
- package/dist/packages/livesync/package.json +2 -2
- package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js +4 -1
- package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js.map +1 -1
- package/dist/packages/livesync/src/commands/pushTheme.d.ts +2 -2
- package/dist/packages/livesync/src/commands/pushTheme.js.map +1 -1
- package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.d.ts +2 -2
- package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js +8 -0
- package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js.map +1 -1
- package/dist/packages/livesync/src/errors/CommandLineMessages_en.json +6 -2
- package/dist/packages/livesync/src/services/metadataServices.d.ts +2 -1
- package/dist/packages/livesync/src/services/metadataServices.js +20 -1
- package/dist/packages/livesync/src/services/metadataServices.js.map +1 -1
- package/dist/packages/livesync/src/types/index.d.ts +9 -0
- package/dist/packages/livesync/src/types/index.js.map +1 -1
- package/dist/packages/mls_exim/package-lock.json +11 -9
- package/dist/packages/mls_exim/package.json +1 -1
- package/dist/packages/mls_exim/src/export/mlsExport.js +83 -64
- package/dist/packages/mls_exim/src/export/mlsExport.js.map +1 -1
- package/dist/packages/mls_exim/src/export/mlsExport.ts +100 -68
- package/dist/packages/sharedlibrary/package-lock.json +11 -9
- package/dist/packages/sharedlibrary/package.json +1 -1
- package/dist/packages/syndication/package-lock.json +13 -11
- package/dist/packages/syndication/package.json +1 -1
- package/dist/packages/syndication/src/commands/subscriber.js +12 -1
- package/dist/packages/syndication/src/commands/subscriber.js.map +1 -1
- package/dist/packages/syndication/src/commands/syndicatorFailedItem.js +14 -0
- package/dist/packages/syndication/src/commands/syndicatorFailedItem.js.map +1 -1
- package/dist/packages/syndication/src/errors/CommandLineMessages_en.json +3 -1
- package/dist/packages/syndication/src/services/syndicationService.js +29 -1
- package/dist/packages/syndication/src/services/syndicationService.js.map +1 -1
- package/dist/src/errors/CommandLineMessages_en.json +3 -0
- package/dist/src/index.js +209 -32
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/filesServices.d.ts +1 -0
- package/dist/src/services/filesServices.js +14 -0
- package/dist/src/services/filesServices.js.map +1 -1
- package/dist/src/utils/helpFormatter.d.ts +6 -0
- package/dist/src/utils/helpFormatter.js +34 -0
- package/dist/src/utils/helpFormatter.js.map +1 -0
- package/dist/src/utils/utils.js +15 -9
- package/dist/src/utils/utils.js.map +1 -1
- package/dist/src/utils/validateOptions.js +24 -0
- package/dist/src/utils/validateOptions.js.map +1 -1
- package/package.json +9 -9
package/dist/src/index.js
CHANGED
|
@@ -67,6 +67,7 @@ const stagingResync_1 = require("../packages/dam/src/commands/stagingResync");
|
|
|
67
67
|
const deleteDAMStagingMismatch_1 = require("../packages/dam/src/commands/deleteDAMStagingMismatch");
|
|
68
68
|
const wcmRestV2Services_1 = require("../packages/livesync/src/services/wcmRestV2Services");
|
|
69
69
|
const metadataServices_1 = require("../packages/livesync/src/services/metadataServices");
|
|
70
|
+
const helpFormatter_1 = require("./utils/helpFormatter");
|
|
70
71
|
const MaskData = require('maskdata');
|
|
71
72
|
const config = (0, utils_1.getConfigJSON)();
|
|
72
73
|
const program = new commander_1.default.Command();
|
|
@@ -84,6 +85,7 @@ program.on('--help', () => {
|
|
|
84
85
|
logger_1.logger.help(' $ dxclient deploy-theme');
|
|
85
86
|
logger_1.logger.help(' $ dxclient undeploy-theme');
|
|
86
87
|
logger_1.logger.help(' $ dxclient deploy-application');
|
|
88
|
+
logger_1.logger.help(' $ dxclient undeploy-application');
|
|
87
89
|
logger_1.logger.help(' $ dxclient mls-export');
|
|
88
90
|
logger_1.logger.help(' $ dxclient mls-import');
|
|
89
91
|
logger_1.logger.help(' $ dxclient manage-syndicator');
|
|
@@ -132,6 +134,7 @@ program.command(constants_1.COMMANDS.VERSION_COMPAT)
|
|
|
132
134
|
.requiredOption('--dxConnectUsername [value]', 'Username for the cw_profile', config.dxConnectUsername)
|
|
133
135
|
.requiredOption('--dxConnectPassword [value]', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
134
136
|
.description('- Show version compatibility details between DX Core and DXClient.')
|
|
137
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient version-compat --hostname localhost --dxConnectProtocol https --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'))
|
|
135
138
|
.action(async (cmdOptions) => {
|
|
136
139
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.VERSION_COMPAT);
|
|
137
140
|
try {
|
|
@@ -163,6 +166,8 @@ program
|
|
|
163
166
|
.requiredOption('--xmlFile <value>', 'Input xml file name with full path')
|
|
164
167
|
.requiredOption('--warFile <value>', 'War file name with full path ')
|
|
165
168
|
.description('- Deploys the portlet to the DX Core server')
|
|
169
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient deploy-portlet --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsername wpsadmin --dxPassword wpsadmin --dxConnectUsername wpsadmin'
|
|
170
|
+
+ ' --dxConnectPassword wpsadmin --dxConnectPort 10202 --xmlFile /user/deploy-portlet/test.xml --warFile /user/deploy-portlet/test.war'))
|
|
166
171
|
.action(async (cmdOptions) => {
|
|
167
172
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_PORTLET);
|
|
168
173
|
logger_1.logger.debug('Deploy portlet execution started');
|
|
@@ -203,6 +208,9 @@ program
|
|
|
203
208
|
.option('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
204
209
|
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
205
210
|
.description('- Undeploys the portlet from the DX Core server.')
|
|
211
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient undeploy-portlet --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsername wpsadmin'
|
|
212
|
+
+ ' --dxPassword wpsadmin --xmlFile /user/undeploy-portlet/test.xml --enableBackup false --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
213
|
+
+ ' --dxConnectPort 10202 --dxSoapPort 10033 --dxProfileName wp_profile --dxProfilePath /opt/HCL/wp_profile'))
|
|
206
214
|
.action(async (cmdOptions) => {
|
|
207
215
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_PORTLET);
|
|
208
216
|
logger_1.logger.debug('undeploy portlet execution started');
|
|
@@ -235,7 +243,10 @@ program
|
|
|
235
243
|
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
236
244
|
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
237
245
|
.requiredOption('--xmlFile <value>', 'XML file name with full path ')
|
|
246
|
+
.option('--xmlAccessOutputFileName <value>', 'File name for the XML access output', config.xmlAccessOutputFileName)
|
|
238
247
|
.description('- Executes xml access tasks on the DX Core server.')
|
|
248
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient xmlaccess --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsername wpsadmin'
|
|
249
|
+
+ ' --dxPassword wpsadmin --xmlFile /user/xmlaccess/fullPageExport.xml --xmlAccessOutputFileName test.xml'))
|
|
239
250
|
.action(async (cmdOptions) => {
|
|
240
251
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.XMLACCESS);
|
|
241
252
|
logger_1.logger.debug('Xmlaccess execution started');
|
|
@@ -282,8 +293,20 @@ program
|
|
|
282
293
|
.action(async (subCmd, cmd) => {
|
|
283
294
|
if ((subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL || subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
284
295
|
logger_1.logger.help('\n This command allows user to create or update (push) or fetch (pull) the content in a Script Application in DX Core');
|
|
285
|
-
logger_1.logger.help('\n Usage: dxclient deploy-scriptapplication [options] [subCmd]');
|
|
286
|
-
logger_1.logger.help(
|
|
296
|
+
logger_1.logger.help('\n Usage: dxclient deploy-scriptapplication [options] [subCmd] \n');
|
|
297
|
+
logger_1.logger.help(`- Create or update the content of a Script Application instance for ${subCmd} \n`);
|
|
298
|
+
if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL) {
|
|
299
|
+
logger_1.logger.help(' \nExample : dxclient deploy-scriptapplication pull --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
300
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --wcmContentId 987654356789\n');
|
|
301
|
+
}
|
|
302
|
+
if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) {
|
|
303
|
+
logger_1.logger.help(' \nExample : dxclient deploy-scriptapplication push --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
304
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --prebuiltZip /temp/DemoScriptApplication.zip --wcmSiteArea "Script Application Library/Script Applications/" '
|
|
305
|
+
+ ' --wcmContentName DemoScriptApplication --mainHtmlFile /temp/DemoScriptApplication/index.html \n');
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if ((subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL || subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
309
|
+
logger_1.logger.help('Options:\n');
|
|
287
310
|
logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
288
311
|
logger_1.logger.help(` -hostname, --hostname <value> Hostname of the DX Core server (default: "${config.hostname}")`);
|
|
289
312
|
logger_1.logger.help(` -dxPort, --dxPort <value> Port number for DX Core server, for any Kubernetes Environment default port is 443 \
|
|
@@ -305,7 +328,7 @@ Script Application content (default: "${config.projectContext}")`);
|
|
|
305
328
|
logger_1.logger.help(` -wcmSiteArea, --wcmSiteArea <value> Web Content Manager site area in which Script Application instances are created (default: "${config.wcmSiteArea}")`);
|
|
306
329
|
logger_1.logger.help(` -contenthandlerPath, --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
|
|
307
330
|
(default: "${config.contenthandlerPath}")`);
|
|
308
|
-
logger_1.logger.help(' -mainHtmlFile, --mainHtmlFile <value> Path to the main .html file
|
|
331
|
+
logger_1.logger.help(' -mainHtmlFile, --mainHtmlFile <value> Path or relative path to the main .html file within the Script Application.');
|
|
309
332
|
logger_1.logger.help(` -wcmContentId, --wcmContentId <value> Web Content Manager content ID of an existing Script Application instance on a portal\
|
|
310
333
|
page (default: "${config.wcmContentId}")`);
|
|
311
334
|
logger_1.logger.help(' -wcmContentTitle, --wcmContentTitle <value> Sets or updates the title of the Script Application instance (default: "")');
|
|
@@ -385,6 +408,8 @@ program
|
|
|
385
408
|
.option('-f, --force', 'Delete the Script Application forcefully')
|
|
386
409
|
.option('--enableBackup <value>', 'Set the flag to true to take backup of the script application to be undeployed', config.enableBackup)
|
|
387
410
|
.description('- Undeploys the script application from the DX Core server')
|
|
411
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient undeploy-scriptapplication --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
412
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --wcmContentId 89023456738239 --enableBackup false -f'))
|
|
388
413
|
.action(async (cmd) => {
|
|
389
414
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION);
|
|
390
415
|
try {
|
|
@@ -422,6 +447,8 @@ program
|
|
|
422
447
|
.option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
|
|
423
448
|
.option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
|
|
424
449
|
.description('- Restores script application to version specified or if not, its previous by default')
|
|
450
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient restore-scriptapplication --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
451
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --wcmContentID 89023456738239 --versionName 3 --restoreAsPublished false'))
|
|
425
452
|
.action(async (cmd) => {
|
|
426
453
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION);
|
|
427
454
|
try {
|
|
@@ -467,6 +494,10 @@ program
|
|
|
467
494
|
.option('--themePath <value>', 'Theme Path with zip or folder name')
|
|
468
495
|
.option('--requestId <value>', 'Unique Id of a previously triggered deploy theme request.')
|
|
469
496
|
.description('- Deploys the theme(EAR or WebDav packages) to the DX Core server')
|
|
497
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient deploy-theme --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
498
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --dxSoapPort 10033 --dxProfileName wp_profile --dxProfilePath /opt/HCL/wp_profile --dxConnectUsername wpsadmin'
|
|
499
|
+
+ ' --dxConnectPassword wpsadmin --dxConnectPort 10202 --xmlFile /user/deploy-theme/test.xml --applicationFile /user/deploy-theme/application.xml'
|
|
500
|
+
+ ' --applicationName testApplication --themeName testTheme --themePath /user/deploy-theme/test.xml'))
|
|
470
501
|
.action(async (cmdOptions) => {
|
|
471
502
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_THEME);
|
|
472
503
|
logger_1.logger.debug('Deploy theme execution started');
|
|
@@ -510,6 +541,9 @@ program
|
|
|
510
541
|
.option('--themeName <value>', 'Theme Collection name')
|
|
511
542
|
.option('--enableBackup <value>', 'Set the flag to true to take backup of the theme to be undeployed', config.enableBackup)
|
|
512
543
|
.description('- Undeploys the theme(EAR or WebDav packages) from the DX Core server')
|
|
544
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient undeploy-theme --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsername wpsadmin'
|
|
545
|
+
+ ' --dxPassword wpsadmin --contenthandlerPath /wps/mycontenthandler --dxSoapPort 10033 --dxProfileName wp_profile --dxProfilePath /opt/HCL/wp_profile --dxConnectUsername wpsadmin'
|
|
546
|
+
+ ' --dxConnectPassword wpsadmin --dxConnectPort 10202 --xmlFile /user/undeploy-theme/test.xml --applicationName test --themeName testTheme --enableBackup true'))
|
|
513
547
|
.action(async (cmdOptions) => {
|
|
514
548
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_THEME);
|
|
515
549
|
logger_1.logger.debug('Undeploy theme execution started');
|
|
@@ -551,6 +585,9 @@ program
|
|
|
551
585
|
.requiredOption('--applicationName <value>', 'Application name')
|
|
552
586
|
.option('--requestId <value>', 'Unique Id of a previously triggered deploy application request.')
|
|
553
587
|
.description('- Deploys the application to the DX Core server')
|
|
588
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient deploy-application --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin --dxSoapPort 10033 --dxProfileName wp_profile'
|
|
589
|
+
+ ' --dxProfilePath /opt/HCL/wp_profile --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202 --dxConnectProtocol https'
|
|
590
|
+
+ ' --applicationFile /user/deploy-application/test.xml --applicationName test'))
|
|
554
591
|
.action(async (cmdOptions) => {
|
|
555
592
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_APPLICATION);
|
|
556
593
|
logger_1.logger.debug('Deploy Application execution started');
|
|
@@ -590,6 +627,9 @@ program
|
|
|
590
627
|
.requiredOption('--applicationName <value>', 'Application name')
|
|
591
628
|
.option('--enableBackup <value>', 'Set the flag to true to take backup of the application to be undeployed', config.enableBackup)
|
|
592
629
|
.description('- Undeploys the application from the DX Core server')
|
|
630
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient undeploy-application --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
631
|
+
+ ' --dxSoapPort 10033 --dxProfileName wp_profile --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202 --dxConnectProtocol https'
|
|
632
|
+
+ ' --applicationName /user/undeploy-application/test.xml --enableBackup false'))
|
|
593
633
|
.action(async (cmdOptions) => {
|
|
594
634
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_APPLICATION);
|
|
595
635
|
logger_1.logger.debug('Undeploy Application execution started');
|
|
@@ -628,6 +668,8 @@ program
|
|
|
628
668
|
.option('--exportPath <value>', 'Location of the file path to export')
|
|
629
669
|
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
|
|
630
670
|
.description('- Exports the source contents from a library into a .csv file at the location specified')
|
|
671
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient mls-export --dxProtocol https --hostname localhost --dxPort 10041 --contenthandlerPath /wps/mycontenthandler --dxUsername wpsadmin'
|
|
672
|
+
+ ' --dxPassword wpsadmin --wcmLibraryId 97765345736538 --wcmLibraryName tetslib --exportPath /user/store/mls-export/'))
|
|
631
673
|
.action(async (cmdOptions) => {
|
|
632
674
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_EXPORT);
|
|
633
675
|
logger_1.logger.debug('Exports the source contents execution started');
|
|
@@ -664,6 +706,8 @@ program
|
|
|
664
706
|
.option('--forceImport <value>', 'Flag to forcefully import the content')
|
|
665
707
|
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
|
|
666
708
|
.description('- Imports the source contents from a CSV file into DX at the location specified')
|
|
709
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient mls-import --dxProtocol https --hostname localhost --dxPort 443 --contenthandlerPath /wps/mycontenthandler --dxUsername wpsadmin'
|
|
710
|
+
+ ' --dxPassword wpsadmin --importPath /user/store/mls-export/test.xml'))
|
|
667
711
|
.action(async (cmdOptions) => {
|
|
668
712
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_IMPORT);
|
|
669
713
|
logger_1.logger.debug('Imports the source contents execution started');
|
|
@@ -703,6 +747,8 @@ program
|
|
|
703
747
|
if (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP)) {
|
|
704
748
|
logger_1.logger.help('Usage: dxclient manage-syndicator [options] [subCmd](get-syndication-report)\n');
|
|
705
749
|
logger_1.logger.help(' - Manages the syndicator in DX Server (Enable/Disable or helps to get syndicator report)\n');
|
|
750
|
+
logger_1.logger.help(' \nExample : dxclient manage-syndicator get-syndication-report --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
751
|
+
+ ' --dxPassword wpsadmin --contenthandlerPath /wps/mycontenthandler --UUID 958476536576 \n');
|
|
706
752
|
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
707
753
|
logger_1.logger.help(` --hostname <value> Hostname of the DX Core server (default: "${config.hostname}")`);
|
|
708
754
|
logger_1.logger.help(` --dxPort <value> Port number for DX Core server, for any Kubernetes Environment default port is 443 \
|
|
@@ -767,6 +813,8 @@ program
|
|
|
767
813
|
.requiredOption('--UUID <value>', 'UUID of the subscriber instance', '')
|
|
768
814
|
.option('--enable <value>', 'Use true or false to enable or disable the subscriber')
|
|
769
815
|
.description('- Manages the subscriber in DX Server(Enable/Disable)')
|
|
816
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient manage-subscriber --dxProtocol https --hostname localhost --dxPort 443 --dxUsername wpsadmin'
|
|
817
|
+
+ ' --dxPassword wpsadmin --contenthandlerPath /wps/mycontenthandler --UUID 958476536576 -enable true '))
|
|
770
818
|
.action(async (cmdOptions) => {
|
|
771
819
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.MANAGE_SUBSCRIBER);
|
|
772
820
|
logger_1.logger.debug('Manage subscriber execution started');
|
|
@@ -798,6 +846,7 @@ program
|
|
|
798
846
|
.requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', '')
|
|
799
847
|
.description(`- Restarts the DX Core Pods in Kubernetes Deployment.
|
|
800
848
|
Note: Only the user set as wasAdmin in the Helm values is authorised to trigger this command.`)
|
|
849
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient restart-core-pods --dxProtocol https --hostname localhost --dxWASUsername wpsadmin --dxWASPassword wpsadmin'))
|
|
801
850
|
.action(async (cmdOptions) => {
|
|
802
851
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_CORE_PODS);
|
|
803
852
|
logger_1.logger.debug('Sending DX Core Pods restart request.');
|
|
@@ -832,6 +881,8 @@ program
|
|
|
832
881
|
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
833
882
|
.option('--requestId <value>', 'Unique Id of a previously triggered restart request.')
|
|
834
883
|
.description('- Restarts the DX Core server. This command works for single DX Server instances.')
|
|
884
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient restart-dx-core --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
885
|
+
+ ' --dxProfileName wp_profile --dxProfilePath /opt/HCL/wp_profile --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202'))
|
|
835
886
|
.action(async (cmdOptions) => {
|
|
836
887
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_DXCORE);
|
|
837
888
|
logger_1.logger.debug('Restart DX Core execution started');
|
|
@@ -869,9 +920,20 @@ program
|
|
|
869
920
|
.option('-h, --help')
|
|
870
921
|
.description('- manages the shared library files in the remote server')
|
|
871
922
|
.action(async (subCmd, cmd) => {
|
|
872
|
-
if (
|
|
923
|
+
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
|
|
924
|
+
logger_1.logger.help(' Usage: dxclient shared-library [options] [subCmd](upload/delete)\n');
|
|
925
|
+
logger_1.logger.help(' - Uploads/Deletes files in default Shared Library location in DX Core (<dx-profile>/PortalServer/sharedLibrary/DXCLib)\n');
|
|
926
|
+
logger_1.logger.help(' \nExample : dxclient shared-library upload --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxProfileName wp_profile'
|
|
927
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202 --libFilePath /user/store/output/test.jar \n');
|
|
928
|
+
}
|
|
929
|
+
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
|
|
873
930
|
logger_1.logger.help(' Usage: dxclient shared-library [options] [subCmd](upload/delete)\n');
|
|
874
931
|
logger_1.logger.help(' - Uploads/Deletes files in default Shared Library location in DX Core (<dx-profile>/PortalServer/sharedLibrary/DXCLib)\n');
|
|
932
|
+
logger_1.logger.help(' \nExample : dxclient shared-library delete --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxProfileName wp_profile'
|
|
933
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202 --libFileNames test.jar \n');
|
|
934
|
+
}
|
|
935
|
+
if ((subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD || subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
936
|
+
logger_1.logger.help('Options:\n');
|
|
875
937
|
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
876
938
|
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
|
|
877
939
|
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
@@ -881,11 +943,12 @@ program
|
|
|
881
943
|
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
882
944
|
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
|
|
883
945
|
logger_1.logger.help(' --libFilePath <value> File/Folder path of the shared library files to be uploaded');
|
|
946
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
884
947
|
}
|
|
885
948
|
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
|
|
886
949
|
logger_1.logger.help(' --libFileNames <value> File names of shared library files to be deleted');
|
|
950
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
887
951
|
}
|
|
888
|
-
logger_1.logger.help(' -h, --help display help for command');
|
|
889
952
|
process.exit(1);
|
|
890
953
|
}
|
|
891
954
|
try {
|
|
@@ -946,6 +1009,8 @@ program
|
|
|
946
1009
|
+ 'The target path must exist before publishing (default targetPath is "/")')
|
|
947
1010
|
.option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
|
|
948
1011
|
.description('- Exports the personalization rules from the DX Core server')
|
|
1012
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient pzn-export --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
1013
|
+
+ ' --dxPassword wpsadmin --dxContextRoot /wps'))
|
|
949
1014
|
.action(async (cmdOptions) => {
|
|
950
1015
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_EXPORT);
|
|
951
1016
|
logger_1.logger.debug('Export of the PZN rule execution started');
|
|
@@ -985,6 +1050,8 @@ program
|
|
|
985
1050
|
+ 'The target path must exist before publishing (default targetPath is "/")')
|
|
986
1051
|
.option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
|
|
987
1052
|
.description('- Imports the personalization rules to the DX Core server')
|
|
1053
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient pzn-import --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1054
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxConnectPort 10202 --rulesFilePath /user/store/pznrule/test.nodes --dxContextRoot /wps'))
|
|
988
1055
|
.action(async (cmdOptions) => {
|
|
989
1056
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_IMPORT);
|
|
990
1057
|
logger_1.logger.debug('Import of the PZN rule execution started');
|
|
@@ -1020,6 +1087,8 @@ program
|
|
|
1020
1087
|
.requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
|
|
1021
1088
|
.option('--schemaVersion <value>', 'DAM Schema Version')
|
|
1022
1089
|
.description('- Deletes inactive DAM schema from persistence in DX')
|
|
1090
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient delete-dam-schema --dxProtocol https --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1091
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --schemaVersion 3'))
|
|
1023
1092
|
.action(async (cmdOptions) => {
|
|
1024
1093
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.DELETE_DAM_SCHEMA);
|
|
1025
1094
|
logger_1.logger.debug('Delete DAM Schema started');
|
|
@@ -1054,6 +1123,8 @@ program
|
|
|
1054
1123
|
.requiredOption('--damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
|
|
1055
1124
|
.requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
|
|
1056
1125
|
.description('- Lists all DAM schemas in DX.')
|
|
1126
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient list-dam-schemas --dxProtocol https --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1127
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1'))
|
|
1057
1128
|
.action(async (cmdOptions) => {
|
|
1058
1129
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.LIST_DAM_SCHEMA);
|
|
1059
1130
|
logger_1.logger.debug('List DAM Schema started');
|
|
@@ -1105,6 +1176,27 @@ program
|
|
|
1105
1176
|
|| subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1106
1177
|
logger_1.logger.help('Usage: dxclient manage-virtual-portal [options] [subCmd](list/create/import/export)\n');
|
|
1107
1178
|
logger_1.logger.help('Lists,create,import or export a virtual portal in the DX Core server\n');
|
|
1179
|
+
}
|
|
1180
|
+
if (subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS) {
|
|
1181
|
+
logger_1.logger.help(' \nExample : dxclient manage-virtual-portal list --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxConnectPort 10202 --dxProfileName wp_profile'
|
|
1182
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxWASUsername wpsadmin --dxWASPassword wpsadmin \n');
|
|
1183
|
+
}
|
|
1184
|
+
if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
|
|
1185
|
+
logger_1.logger.help(' \nExample : dxclient manage-virtual-portal create --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxConnectPort 10202 --dxProfileName wp_profile'
|
|
1186
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxWASUsername wpsadmin --dxWASPassword wpsadmin --vpTitle test_vp -vpRealm defaultWIMFileBasedRealm'
|
|
1187
|
+
+ ' -vpAdminGroup wpsadmins -vpContext test_Context \n');
|
|
1188
|
+
}
|
|
1189
|
+
if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
|
|
1190
|
+
logger_1.logger.help(' \nExample : dxclient manage-virtual-portal import --dxProtocol https --hostname localhost --dxPort 10041 --xmlConfigPath /wps/config --dxUsernam wpsadmin --dxPassword wpsadmin'
|
|
1191
|
+
+ ' --xmlFile /user/store/output/test.xml --vpContext test_Context \n');
|
|
1192
|
+
}
|
|
1193
|
+
if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
|
|
1194
|
+
logger_1.logger.help(' \nExample : dxclient manage-virtual-portal export --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxProtocol https --dxPort 10041'
|
|
1195
|
+
+ ' --xmlConfigPath /wps/config --vpTitle test --vpContext test_Context --xmlFile /user/store/output/test.xml \n');
|
|
1196
|
+
}
|
|
1197
|
+
if ((subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS || subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL || subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL
|
|
1198
|
+
|| subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1199
|
+
logger_1.logger.help('Options:\n');
|
|
1108
1200
|
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1109
1201
|
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
|
|
1110
1202
|
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
@@ -1115,6 +1207,7 @@ program
|
|
|
1115
1207
|
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
1116
1208
|
logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
|
|
1117
1209
|
logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
|
|
1210
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
1118
1211
|
}
|
|
1119
1212
|
if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
|
|
1120
1213
|
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
@@ -1129,6 +1222,7 @@ program
|
|
|
1129
1222
|
logger_1.logger.help(' --vpHostname <value> Virtual portal Hostname');
|
|
1130
1223
|
logger_1.logger.help(' --vpContext <value> Virtual portal Context');
|
|
1131
1224
|
logger_1.logger.help(' --requestId <value> Unique Id of a previously triggered create virtual portal request');
|
|
1225
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
1132
1226
|
}
|
|
1133
1227
|
if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
|
|
1134
1228
|
logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
@@ -1137,6 +1231,7 @@ program
|
|
|
1137
1231
|
logger_1.logger.help(` --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
|
|
1138
1232
|
logger_1.logger.help(' --vpContext <value> Virtual portal Context');
|
|
1139
1233
|
logger_1.logger.help(' --xmlFile <value> XML file name with full path');
|
|
1234
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
1140
1235
|
}
|
|
1141
1236
|
if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
|
|
1142
1237
|
logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
@@ -1146,8 +1241,8 @@ program
|
|
|
1146
1241
|
logger_1.logger.help(' --vpContext <value> Path to virtual portal context');
|
|
1147
1242
|
logger_1.logger.help(' --vpTitle <value> Virtual portal name');
|
|
1148
1243
|
logger_1.logger.help(' --xmlFile <value> XML file name with full path');
|
|
1244
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
1149
1245
|
}
|
|
1150
|
-
logger_1.logger.help(' -h, --help display help for command');
|
|
1151
1246
|
process.exit(1);
|
|
1152
1247
|
}
|
|
1153
1248
|
if (!subCmd || (subCmd !== constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS && subCmd !== constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL
|
|
@@ -1249,6 +1344,34 @@ program
|
|
|
1249
1344
|
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1250
1345
|
logger_1.logger.help('Usage: dxclient resource-env-provider [options] [subCmd](create-property/update-property/delete-property/export-properties/import-properties/retrieve-property)\n');
|
|
1251
1346
|
logger_1.logger.help('- Creates, Retrieves, Updates, Deletes, Import or Exports custom properties.\n');
|
|
1347
|
+
}
|
|
1348
|
+
if (subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY) {
|
|
1349
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider create-property --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1350
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --providerName testprovider --propertyName test --propertyValue test \n');
|
|
1351
|
+
}
|
|
1352
|
+
if (subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY) {
|
|
1353
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider update-property --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1354
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --providerName testprovider --propertyName test --propertyValue test \n');
|
|
1355
|
+
}
|
|
1356
|
+
if (subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY) {
|
|
1357
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider delete-property --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1358
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --providerName testprovider --propertyName test \n');
|
|
1359
|
+
}
|
|
1360
|
+
if (subCommand === constants_1.SUB_COMMANDS.EXPORT_PROPERTIES) {
|
|
1361
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider export-properties --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1362
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile \n');
|
|
1363
|
+
}
|
|
1364
|
+
if (subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES) {
|
|
1365
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider import-properties --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1366
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --filePath /user/store/output/resourceenv/test.xml \n');
|
|
1367
|
+
}
|
|
1368
|
+
if (subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY) {
|
|
1369
|
+
logger_1.logger.help(' \nExample : dxclient resource-env-provider retrieve-property --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1370
|
+
+ ' --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --providerName testprovider --propertyName test \n');
|
|
1371
|
+
}
|
|
1372
|
+
if ((subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY
|
|
1373
|
+
|| subCommand === constants_1.SUB_COMMANDS.EXPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY)
|
|
1374
|
+
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1252
1375
|
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1253
1376
|
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1254
1377
|
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
@@ -1273,7 +1396,7 @@ program
|
|
|
1273
1396
|
logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
|
|
1274
1397
|
logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
|
|
1275
1398
|
}
|
|
1276
|
-
logger_1.logger.help(' -h, --help
|
|
1399
|
+
logger_1.logger.help(' -h, --help display help for command');
|
|
1277
1400
|
process.exit(1);
|
|
1278
1401
|
}
|
|
1279
1402
|
if (!subCommand || (subCommand !== constants_1.SUB_COMMANDS.CREATE_PROPERTY && subCommand !== constants_1.SUB_COMMANDS.UPDATE_PROPERTY && subCommand !== constants_1.SUB_COMMANDS.DELETE_PROPERTY
|
|
@@ -1330,6 +1453,9 @@ program
|
|
|
1330
1453
|
.option('--syndicatorVaultSlotName <value>', 'Credential Vault Name: syndicatorVaultSlotName')
|
|
1331
1454
|
.option('--virtualPortalContext <value>', 'Virtual portal Context', config.virtualPortalContext)
|
|
1332
1455
|
.description('- Creates a syndication relation between syndicator and subscriber in the DX server.')
|
|
1456
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient create-syndication-relation --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1457
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --syndicatorUrl http(s)://localhost:10041/wps/wcm --syndicatorName testsyn --subscriberName testsub --vaultSlotName test_solt --dxContextRoot /wps'
|
|
1458
|
+
+ ' --syndicationType all-items --webContentLibraries "Portal Sit" '))
|
|
1333
1459
|
.action(async (cmdOptions) => {
|
|
1334
1460
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION);
|
|
1335
1461
|
logger_1.logger.debug('Create syndication relation execution started');
|
|
@@ -1394,30 +1520,49 @@ program
|
|
|
1394
1520
|
logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]\n');
|
|
1395
1521
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
|
|
1396
1522
|
logger_1.logger.help(' Registration of the subscriber\n');
|
|
1523
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging register-dam-subscriber --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
1524
|
+
+ ' --dxPassword wpsadmin --targetServerUsername wpsadmin --targetServerPassword wpsadmin --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1'
|
|
1525
|
+
+ ' --targetHostname localhost --interval 2 \n');
|
|
1397
1526
|
}
|
|
1398
1527
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER) {
|
|
1399
1528
|
logger_1.logger.help(' Deregistration of the subscriber\n');
|
|
1529
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging deregister-dam-subscriber --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
1530
|
+
+ ' --dxPassword wpsadmin --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --subscriberId 9845465764 \n');
|
|
1400
1531
|
}
|
|
1401
1532
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING) {
|
|
1402
1533
|
logger_1.logger.help(' Trigger the dam staging\n');
|
|
1534
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging trigger-staging --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1535
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --targetHostname localhost \n');
|
|
1403
1536
|
}
|
|
1404
1537
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_ALL_SUBSCRIBERS) {
|
|
1405
1538
|
logger_1.logger.help(' Get all the subscriber details\n');
|
|
1539
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging get-all-subscribers --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1540
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 \n');
|
|
1406
1541
|
}
|
|
1407
1542
|
if (subCommand === constants_1.SUB_COMMANDS.UPDATE_SECRETS) {
|
|
1408
1543
|
logger_1.logger.help(' Update secrets of the publisher & subscriber\n');
|
|
1544
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging update-secrets --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1545
|
+
+ ' --targetServerUsername wpsadmin --targetServerPassword wpsadmin --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --targetHostname localhost \n');
|
|
1409
1546
|
}
|
|
1410
1547
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT) {
|
|
1411
1548
|
logger_1.logger.help(' Get staging mismatch records from publisher\n');
|
|
1549
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging get-staging-mismatch-report --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1550
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 \n');
|
|
1412
1551
|
}
|
|
1413
1552
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH) {
|
|
1414
1553
|
logger_1.logger.help(' Find dam staging mismatch\n');
|
|
1554
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging find-staging-mismatch --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1555
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --subscriberId 87654678658 \n');
|
|
1415
1556
|
}
|
|
1416
1557
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC) {
|
|
1417
1558
|
logger_1.logger.help(' Start dam staging resync\n');
|
|
1559
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging start-staging-resync --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1560
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --subscriberId 9876543256789 \n');
|
|
1418
1561
|
}
|
|
1419
1562
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) {
|
|
1420
1563
|
logger_1.logger.help(' Delete dam staging mismatch logs\n');
|
|
1564
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-staging delete-staging-mismatch --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1565
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1 --subscriberId 9876543256789 \n');
|
|
1421
1566
|
}
|
|
1422
1567
|
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server of the publisher (default: "${config.dxProtocol}")`);
|
|
1423
1568
|
logger_1.logger.help(` --hostname <value> Host name of the DX Core server of the publisher (default: "${config.hostname}")`);
|
|
@@ -1461,6 +1606,7 @@ for any Kubernetes Environment default port is 443 (default: "${config.dxPort ?
|
|
|
1461
1606
|
logger_1.logger.help(' -subscriberId, --subscriberId <value> Subscriber id of the target environment of the subscriber');
|
|
1462
1607
|
}
|
|
1463
1608
|
if ([constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER, constants_1.SUB_COMMANDS.UPDATE_SECRETS].includes(subCommand)) {
|
|
1609
|
+
logger_1.logger.help(` --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
|
|
1464
1610
|
logger_1.logger.help(' -targetServerUsername, --targetServerUsername <value> Username of the DX Core server of the subscriber (default: "")');
|
|
1465
1611
|
logger_1.logger.help(' -targetServerPassword, --targetServerPassword <value> Password of the DX Core server of the subscriber (default: "")');
|
|
1466
1612
|
}
|
|
@@ -1634,6 +1780,8 @@ program
|
|
|
1634
1780
|
.option('--vaultSegmentName <value>', 'The name of a new vault segment ')
|
|
1635
1781
|
.option('--vaultDescription <value>', 'Description for the credential segment ')
|
|
1636
1782
|
.description('- Creates credential vault in DX Core server before registering a subscriber')
|
|
1783
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient create-credential-vault --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1784
|
+
+ ' --xmlConfigPath /wps/config --vaultUsername wpsadmin --vaultPassword wpsadmin --credentialSlotName test_solt'))
|
|
1637
1785
|
.action(async (cmdOptions) => {
|
|
1638
1786
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT);
|
|
1639
1787
|
logger_1.logger.debug('Creates credential vault slot in the DX Core server before registering a subscriber');
|
|
@@ -1676,6 +1824,8 @@ program
|
|
|
1676
1824
|
if ((subCmd === constants_1.SUB_COMMANDS.SUMMARY_REPORT || constants_1.SUB_COMMANDS.RESOURCE_REPORT) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1677
1825
|
logger_1.logger.help(' Usage: dxclient dx-core-configuration-reports [options] [subCmd]\n');
|
|
1678
1826
|
logger_1.logger.help(' - The dx-core-configuration-reports command shows the summary of the configurations of a single DX server or both source and target DX servers, which users can use to compare.\n');
|
|
1827
|
+
logger_1.logger.help('\nExample : dxclient dx-core-configuration-reports summary-report --hostname localhost --dxConnectPort 10202 --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin'
|
|
1828
|
+
+ ' --dxProfileName wp_profile --targetHostname localhost --targetDxConnectPort 10202 --targetDxConnectUsername wpsadmin --targetDxConnectPassword wpsadmin --targetDxProfileName wp_profile \n');
|
|
1679
1829
|
logger_1.logger.help(` --hostname <value> Host name of the DX core server(default: "${config.hostname}")`);
|
|
1680
1830
|
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1681
1831
|
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
@@ -1731,6 +1881,8 @@ program
|
|
|
1731
1881
|
.option('--exportAllLibraries <value>', 'Enable this parameter if you export all wcm library')
|
|
1732
1882
|
.option('--virtualPortalContext <value>', 'Context of the virtual portal from which need to export the WCM Library', config.virtualPortalContext)
|
|
1733
1883
|
.description('- Exports single, multiple or all WCM libraries from the DX Core server')
|
|
1884
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient wcm-library-export --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin --dxConnectUsername wpsadmin'
|
|
1885
|
+
+ ' --dxConnectPassword wpsadmin --dxConnectPort 10202 --dxWASUsername wpsadmin --dxWASPassword wpsadmin --dxProfileName wp_profile --exportAllLibraries true'))
|
|
1734
1886
|
.action(async (cmdOptions) => {
|
|
1735
1887
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_EXPORT);
|
|
1736
1888
|
logger_1.logger.debug('export of the wcm libraries execution started');
|
|
@@ -1768,6 +1920,8 @@ program
|
|
|
1768
1920
|
.option('--libFilePath <value>', 'Path to the file containing the wcm libraries to be imported')
|
|
1769
1921
|
.option('--virtualPortalContext <value>', 'Context of the virtual portal to which need to import the WCM Library', config.virtualPortalContext)
|
|
1770
1922
|
.description('- Imports single or multiple WCM libraries into the DX Core server')
|
|
1923
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient wcm-library-import --dxProtocol https --hostname localhost --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
1924
|
+
+ ' --dxConnectUsername wpsadmin --dxConnectPassword wpsadmin --dxWASUsername wpsadmin --dxProfileName wp_profile --libFilePath /user/output/store/wcmlib/test.xml'))
|
|
1771
1925
|
.action(async (cmdOptions) => {
|
|
1772
1926
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_IMPORT);
|
|
1773
1927
|
logger_1.logger.debug('import of the wcm libraries execution started');
|
|
@@ -1812,9 +1966,13 @@ program
|
|
|
1812
1966
|
logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]');
|
|
1813
1967
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
|
|
1814
1968
|
logger_1.logger.help(' -Export the DAM assets from DX.\n');
|
|
1969
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-assets export-assets --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
1970
|
+
+ ' --dxPassword wpsadmin --damAPIPort 3001 --ringAPIPort 4000 --exportPath store/outputFiles/dam-export-assets/ --exportBinary true \n');
|
|
1815
1971
|
}
|
|
1816
1972
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
|
|
1817
1973
|
logger_1.logger.help(' -Import the DAM assets from DX.\n');
|
|
1974
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-assets import-assets --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin'
|
|
1975
|
+
+ ' --dxPassword wpsadmin --damAPIPort 3001 --ringAPIPort 4000 --exportPath store/outputFiles/dam-export-assets/ --importBinary true \n');
|
|
1818
1976
|
}
|
|
1819
1977
|
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1820
1978
|
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
@@ -1840,6 +1998,7 @@ program
|
|
|
1840
1998
|
}
|
|
1841
1999
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1842
2000
|
logger_1.logger.help(' -Validate the exported DAM assets in your local.');
|
|
2001
|
+
logger_1.logger.help(' \nExample : dxclient manage-dam-assets validate-assets --exportPath store/outputFiles/dam-export-assets/ --importBinary true \n');
|
|
1843
2002
|
logger_1.logger.help(' --exportPath <value> Location of the exported file path(default is store/outputFiles/dam-export-assets/)');
|
|
1844
2003
|
logger_1.logger.help(' --importBinary <value> Use true or false to validate binary as part of validation(default is true)');
|
|
1845
2004
|
logger_1.logger.help(' -h, --help display help for command');
|
|
@@ -1925,7 +2084,7 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
1925
2084
|
.option('--wcmLibraryId <value>', 'UUID of the WCM Design Library', config.wcmLibraryId)
|
|
1926
2085
|
.option('--wcmLibraryPath <value>', 'Local path to the Library folder', config.wcmLibraryPath)
|
|
1927
2086
|
.option('--wcmProjectName <value>', 'Name of the WCM Project', config.wcmProjectName)
|
|
1928
|
-
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server')
|
|
2087
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
|
|
1929
2088
|
.option('--disablePrompt <value>', 'Disables the confirmation prompt for overwriting local and server files.', config.disablePrompt)
|
|
1930
2089
|
.option('-h, --help')
|
|
1931
2090
|
.description('- Syncs theme files in WebDAV Server and Local')
|
|
@@ -1936,10 +2095,14 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
1936
2095
|
if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME) {
|
|
1937
2096
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME} [options]\n`);
|
|
1938
2097
|
logger_1.logger.help('- Pulls theme files from WebDAV Server into local themePath.\n');
|
|
2098
|
+
logger_1.logger.help(' \nExample : dxclient livesync pull-theme --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
2099
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --themePath "/Users/path/to/theme" --themeName "Portal8.5SyncTest" --disablePrompt true \n');
|
|
1939
2100
|
}
|
|
1940
2101
|
else if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME) {
|
|
1941
2102
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME} [options]\n`);
|
|
1942
2103
|
logger_1.logger.help('- Pushes theme files to WebDAV Server, then continuously watches and syncs succeeding local changes into WebDav Server. "Press (Ctrl + C) to stop watching."\n');
|
|
2104
|
+
logger_1.logger.help(' \nExample : dxclient livesync push-theme --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
2105
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --themePath "/Users/path/to/theme" --themeName "Portal8.5SyncTest" --disablePrompt true \n');
|
|
1943
2106
|
}
|
|
1944
2107
|
logger_1.logger.help('Options:\n');
|
|
1945
2108
|
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
@@ -1967,10 +2130,14 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
1967
2130
|
if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY) {
|
|
1968
2131
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY} [options]\n`);
|
|
1969
2132
|
logger_1.logger.help('- Pulls wcm design library files from dx Server into local target libraryPath directory.\n');
|
|
2133
|
+
logger_1.logger.help(' \nExample : dxclient livesync pull-wcm-design-library --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
2134
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --wcmLibraryName "portal site" --wcmLibraryPath "/Users/path/to/library" --disablePrompt true \n');
|
|
1970
2135
|
}
|
|
1971
2136
|
else if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY) {
|
|
1972
2137
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY} [options]\n`);
|
|
1973
2138
|
logger_1.logger.help('- Pushes updated wcm design library files to dx Server, then continuously watches and syncs succeeding local changes into dx Server. "Press (Ctrl + C) to stop watching."\n');
|
|
2139
|
+
logger_1.logger.help(' \nExample : dxclient livesync push-wcm-design-library --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
2140
|
+
+ ' --contenthandlerPath /wps/mycontenthandler --wcmLibraryName "portal site" --wcmLibraryPath "/Users/path/to/library" --disablePrompt true \n');
|
|
1974
2141
|
}
|
|
1975
2142
|
logger_1.logger.help('Options:\n');
|
|
1976
2143
|
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
@@ -2052,6 +2219,7 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2052
2219
|
cmdOptions.wcmLibraryId = savedMetadata.id;
|
|
2053
2220
|
cmdOptions.wcmLibraryName = savedMetadata.displayTitle;
|
|
2054
2221
|
cmdOptions.wcmLibrarytitle = savedMetadata.title;
|
|
2222
|
+
cmdOptions.libraryMetadata = savedMetadata;
|
|
2055
2223
|
logger_1.logger.info(`Loading saved WCM Design Library "${cmdOptions.wcmLibraryName || cmdOptions.wcmLibraryId}".`);
|
|
2056
2224
|
}
|
|
2057
2225
|
else {
|
|
@@ -2069,32 +2237,39 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2069
2237
|
};
|
|
2070
2238
|
const wcmlibraryResp = await (0, wcmRestV2Services_1.libraries)(apiOptions);
|
|
2071
2239
|
const wcmlibraryOptions = wcmlibraryResp.data['library-entries'];
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
let { displayTitle } = value;
|
|
2076
|
-
if (!displayTitle && typeof value.title === 'string') {
|
|
2077
|
-
displayTitle = value.title;
|
|
2078
|
-
}
|
|
2079
|
-
else if (typeof value.title === 'object') {
|
|
2080
|
-
displayTitle = value.title.value;
|
|
2081
|
-
}
|
|
2082
|
-
else {
|
|
2083
|
-
displayTitle = value.name;
|
|
2084
|
-
}
|
|
2085
|
-
return `[Library Name: ${value.name}, Display Title: ${displayTitle}, ID: ${value.id}]`;
|
|
2086
|
-
},
|
|
2087
|
-
}).then((response) => {
|
|
2088
|
-
logger_1.logger.info('Library "%s" has been selected.', response.value.name || response.value.id);
|
|
2089
|
-
cmdOptions.wcmLibraryId = response.value.id;
|
|
2090
|
-
cmdOptions.libraryMetadata = response.value;
|
|
2091
|
-
}).catch(() => {
|
|
2092
|
-
logger_1.logger.info('Library selection has been cancelled.');
|
|
2093
|
-
});
|
|
2094
|
-
if (!cmdOptions.wcmLibraryId) {
|
|
2095
|
-
logger_1.logger.info('Unable to find a valid WCM Design Library, exiting DXCLient.');
|
|
2240
|
+
const firstHref = wcmlibraryResp.data['library-entries'][0].links[0].href;
|
|
2241
|
+
if (!firstHref.includes(cmdOptions.virtualPortalContext) && cmdOptions.virtualPortalContext) {
|
|
2242
|
+
logger_1.logger.info(`The virtualPortalContext' '${cmdOptions.virtualPortalContext}' does not exits, please enter valide virtualPortalContext.`);
|
|
2096
2243
|
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2097
2244
|
}
|
|
2245
|
+
else {
|
|
2246
|
+
await (0, cli_select_1.default)({
|
|
2247
|
+
values: wcmlibraryOptions,
|
|
2248
|
+
valueRenderer: (value, selected) => {
|
|
2249
|
+
let { displayTitle } = value;
|
|
2250
|
+
if (!displayTitle && typeof value.title === 'string') {
|
|
2251
|
+
displayTitle = value.title;
|
|
2252
|
+
}
|
|
2253
|
+
else if (typeof value.title === 'object') {
|
|
2254
|
+
displayTitle = value.title.value;
|
|
2255
|
+
}
|
|
2256
|
+
else {
|
|
2257
|
+
displayTitle = value.name;
|
|
2258
|
+
}
|
|
2259
|
+
return `[Library Name: ${value.name}, Display Title: ${displayTitle}, ID: ${value.id}]`;
|
|
2260
|
+
},
|
|
2261
|
+
}).then((response) => {
|
|
2262
|
+
logger_1.logger.info('Library "%s" has been selected.', response.value.name || response.value.id);
|
|
2263
|
+
cmdOptions.wcmLibraryId = response.value.id;
|
|
2264
|
+
cmdOptions.libraryMetadata = response.value;
|
|
2265
|
+
}).catch(() => {
|
|
2266
|
+
logger_1.logger.info('Library selection has been cancelled.');
|
|
2267
|
+
});
|
|
2268
|
+
if (!cmdOptions.wcmLibraryId) {
|
|
2269
|
+
logger_1.logger.info('Unable to find a valid WCM Design Library, exiting DXCLient.');
|
|
2270
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2098
2273
|
}
|
|
2099
2274
|
}
|
|
2100
2275
|
catch (error) {
|
|
@@ -2161,6 +2336,8 @@ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_REINDEXING)) {
|
|
|
2161
2336
|
.option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
|
|
2162
2337
|
.option('--reportPath <value>', 'Location of the file path to download report')
|
|
2163
2338
|
.option('-h, --help')
|
|
2339
|
+
.configureHelp(helpFormatter_1.HelpFormatter.withExample('dxclient --dxProtocol https --hostname localhost --dxPort 10041 --dxUsername wpsadmin --dxPassword wpsadmin'
|
|
2340
|
+
+ ' --damAPIPort 3001 --ringAPIPort 4000 --damAPIVersion v1 --ringAPIVersion v1'))
|
|
2164
2341
|
.action(async (cmdOptions) => {
|
|
2165
2342
|
(0, commands_1.configureCommand)(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING);
|
|
2166
2343
|
try {
|