@hcl-software/dxclient 228.0.0 → 229.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/dist/package.json +11 -11
- package/dist/packages/admintasks/package-lock.json +8622 -15410
- package/dist/packages/admintasks/package.json +10 -6
- package/dist/packages/admintasks/src/commands/createCredentialVault.d.ts +2 -2
- package/dist/packages/admintasks/src/commands/createCredentialVault.js +61 -74
- package/dist/packages/admintasks/src/commands/createCredentialVault.js.map +1 -1
- package/dist/packages/admintasks/src/commands/createSyndicationRelation.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/createSyndicationRelation.js +38 -49
- package/dist/packages/admintasks/src/commands/createSyndicationRelation.js.map +1 -1
- package/dist/packages/admintasks/src/commands/createVirtualPortal.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/createVirtualPortal.js +33 -44
- package/dist/packages/admintasks/src/commands/createVirtualPortal.js.map +1 -1
- package/dist/packages/admintasks/src/commands/differentialReport.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/differentialReport.js +107 -106
- package/dist/packages/admintasks/src/commands/differentialReport.js.map +1 -1
- package/dist/packages/admintasks/src/commands/exportVirtualPortal.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/exportVirtualPortal.js +35 -46
- package/dist/packages/admintasks/src/commands/exportVirtualPortal.js.map +1 -1
- package/dist/packages/admintasks/src/commands/exportWCMLibrary.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/exportWCMLibrary.js +104 -101
- package/dist/packages/admintasks/src/commands/exportWCMLibrary.js.map +1 -1
- package/dist/packages/admintasks/src/commands/importVirtualPortal.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/importVirtualPortal.js +36 -47
- package/dist/packages/admintasks/src/commands/importVirtualPortal.js.map +1 -1
- package/dist/packages/admintasks/src/commands/importWCMLibrary.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/importWCMLibrary.js +85 -82
- package/dist/packages/admintasks/src/commands/importWCMLibrary.js.map +1 -1
- package/dist/packages/admintasks/src/commands/listVirtualPortals.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/listVirtualPortals.js +26 -37
- package/dist/packages/admintasks/src/commands/listVirtualPortals.js.map +1 -1
- package/dist/packages/admintasks/src/commands/pznRulesExport.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/pznRulesExport.js +52 -63
- package/dist/packages/admintasks/src/commands/pznRulesExport.js.map +1 -1
- package/dist/packages/admintasks/src/commands/pznRulesImport.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/pznRulesImport.js +103 -100
- package/dist/packages/admintasks/src/commands/pznRulesImport.js.map +1 -1
- package/dist/packages/admintasks/src/commands/resEnvProviderActions.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/resEnvProviderActions.js +133 -130
- package/dist/packages/admintasks/src/commands/resEnvProviderActions.js.map +1 -1
- package/dist/packages/admintasks/src/commands/restartCorePods.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/restartCorePods.js +19 -30
- package/dist/packages/admintasks/src/commands/restartCorePods.js.map +1 -1
- package/dist/packages/admintasks/src/commands/restartDXCore.d.ts +1 -1
- package/dist/packages/admintasks/src/commands/restartDXCore.js +52 -50
- package/dist/packages/admintasks/src/commands/restartDXCore.js.map +1 -1
- package/dist/packages/admintasks/src/errors/CommandLineMessages_en.json +1 -1
- package/dist/packages/admintasks/src/services/createSyndicationRelationServices.js +6 -15
- package/dist/packages/admintasks/src/services/createSyndicationRelationServices.js.map +1 -1
- package/dist/packages/admintasks/src/services/differentialReportService.js +8 -17
- package/dist/packages/admintasks/src/services/differentialReportService.js.map +1 -1
- package/dist/packages/admintasks/src/services/resEnvProviderService.js +54 -64
- package/dist/packages/admintasks/src/services/resEnvProviderService.js.map +1 -1
- package/dist/packages/admintasks/src/services/restartCorePodsService.js +7 -16
- package/dist/packages/admintasks/src/services/restartCorePodsService.js.map +1 -1
- package/dist/packages/admintasks/src/services/restartDXCoreService.js +15 -24
- package/dist/packages/admintasks/src/services/restartDXCoreService.js.map +1 -1
- package/dist/packages/admintasks/src/services/virtualPortalServices.js +40 -49
- package/dist/packages/admintasks/src/services/virtualPortalServices.js.map +1 -1
- package/dist/packages/admintasks/src/utils/differential-report-utils.js +1042 -1055
- package/dist/packages/admintasks/src/utils/differential-report-utils.js.map +1 -1
- package/dist/packages/dam/package-lock.json +3013 -6449
- package/dist/packages/dam/package.json +11 -7
- package/dist/packages/dam/src/commands/createSecrets.d.ts +1 -1
- package/dist/packages/dam/src/commands/createSecrets.js +38 -45
- package/dist/packages/dam/src/commands/createSecrets.js.map +1 -1
- package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.d.ts +1 -1
- package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.js +22 -33
- package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.js.map +1 -1
- package/dist/packages/dam/src/commands/deleteSchema.d.ts +1 -1
- package/dist/packages/dam/src/commands/deleteSchema.js +48 -59
- package/dist/packages/dam/src/commands/deleteSchema.js.map +1 -1
- package/dist/packages/dam/src/commands/exportAssets.d.ts +1 -1
- package/dist/packages/dam/src/commands/exportAssets.js +58 -69
- package/dist/packages/dam/src/commands/exportAssets.js.map +1 -1
- package/dist/packages/dam/src/commands/findDAMStagingMismatch.d.ts +1 -1
- package/dist/packages/dam/src/commands/findDAMStagingMismatch.js +25 -36
- package/dist/packages/dam/src/commands/findDAMStagingMismatch.js.map +1 -1
- package/dist/packages/dam/src/commands/importAssets.d.ts +1 -1
- package/dist/packages/dam/src/commands/importAssets.js +38 -49
- package/dist/packages/dam/src/commands/importAssets.js.map +1 -1
- package/dist/packages/dam/src/commands/listSchema.d.ts +1 -1
- package/dist/packages/dam/src/commands/listSchema.js +19 -30
- package/dist/packages/dam/src/commands/listSchema.js.map +1 -1
- package/dist/packages/dam/src/commands/stagingMismatchReport.d.ts +1 -1
- package/dist/packages/dam/src/commands/stagingMismatchReport.js +79 -76
- package/dist/packages/dam/src/commands/stagingMismatchReport.js.map +1 -1
- package/dist/packages/dam/src/commands/stagingResync.d.ts +1 -1
- package/dist/packages/dam/src/commands/stagingResync.js +25 -36
- package/dist/packages/dam/src/commands/stagingResync.js.map +1 -1
- package/dist/packages/dam/src/commands/subscriberDeRegistration.d.ts +1 -1
- package/dist/packages/dam/src/commands/subscriberDeRegistration.js +19 -30
- package/dist/packages/dam/src/commands/subscriberDeRegistration.js.map +1 -1
- package/dist/packages/dam/src/commands/subscriberDetails.d.ts +1 -1
- package/dist/packages/dam/src/commands/subscriberDetails.js +24 -35
- package/dist/packages/dam/src/commands/subscriberDetails.js.map +1 -1
- package/dist/packages/dam/src/commands/subscriberRegistration.d.ts +1 -1
- package/dist/packages/dam/src/commands/subscriberRegistration.js +34 -45
- package/dist/packages/dam/src/commands/subscriberRegistration.js.map +1 -1
- package/dist/packages/dam/src/commands/triggerDAMStaging.d.ts +1 -1
- package/dist/packages/dam/src/commands/triggerDAMStaging.js +19 -30
- package/dist/packages/dam/src/commands/triggerDAMStaging.js.map +1 -1
- package/dist/packages/dam/src/commands/triggerDamReindexing.d.ts +1 -1
- package/dist/packages/dam/src/commands/triggerDamReindexing.js +26 -38
- package/dist/packages/dam/src/commands/triggerDamReindexing.js.map +1 -1
- package/dist/packages/dam/src/commands/updateSecrets.d.ts +1 -1
- package/dist/packages/dam/src/commands/updateSecrets.js +36 -47
- package/dist/packages/dam/src/commands/updateSecrets.js.map +1 -1
- package/dist/packages/dam/src/commands/validateAssets.d.ts +1 -1
- package/dist/packages/dam/src/commands/validateAssets.js +29 -40
- package/dist/packages/dam/src/commands/validateAssets.js.map +1 -1
- package/dist/packages/dam/src/export/collection.d.ts +8 -8
- package/dist/packages/dam/src/export/collection.js +71 -80
- package/dist/packages/dam/src/export/collection.js.map +1 -1
- package/dist/packages/dam/src/export/favorite.d.ts +1 -1
- package/dist/packages/dam/src/export/favorite.js +10 -19
- package/dist/packages/dam/src/export/favorite.js.map +1 -1
- package/dist/packages/dam/src/export/media-item.d.ts +4 -4
- package/dist/packages/dam/src/export/media-item.js +61 -56
- package/dist/packages/dam/src/export/media-item.js.map +1 -1
- package/dist/packages/dam/src/export/media-type-group.d.ts +1 -1
- package/dist/packages/dam/src/export/media-type-group.js +7 -16
- package/dist/packages/dam/src/export/media-type-group.js.map +1 -1
- package/dist/packages/dam/src/export/media-type.d.ts +1 -1
- package/dist/packages/dam/src/export/media-type.js +7 -16
- package/dist/packages/dam/src/export/media-type.js.map +1 -1
- package/dist/packages/dam/src/export/renditions.d.ts +6 -6
- package/dist/packages/dam/src/export/renditions.js +78 -73
- package/dist/packages/dam/src/export/renditions.js.map +1 -1
- package/dist/packages/dam/src/import/collection.d.ts +3 -3
- package/dist/packages/dam/src/import/collection.js +26 -35
- package/dist/packages/dam/src/import/collection.js.map +1 -1
- package/dist/packages/dam/src/import/favorite.d.ts +1 -1
- package/dist/packages/dam/src/import/favorite.js +8 -17
- package/dist/packages/dam/src/import/favorite.js.map +1 -1
- package/dist/packages/dam/src/import/media-items.d.ts +3 -3
- package/dist/packages/dam/src/import/media-items.js +46 -41
- package/dist/packages/dam/src/import/media-items.js.map +1 -1
- package/dist/packages/dam/src/import/media-type-group.d.ts +1 -1
- package/dist/packages/dam/src/import/media-type-group.js +13 -22
- package/dist/packages/dam/src/import/media-type-group.js.map +1 -1
- package/dist/packages/dam/src/import/media-type.d.ts +1 -1
- package/dist/packages/dam/src/import/media-type.js +12 -21
- package/dist/packages/dam/src/import/media-type.js.map +1 -1
- package/dist/packages/dam/src/import/permission.d.ts +3 -3
- package/dist/packages/dam/src/import/permission.js +21 -30
- package/dist/packages/dam/src/import/permission.js.map +1 -1
- package/dist/packages/dam/src/import/renditions.d.ts +6 -6
- package/dist/packages/dam/src/import/renditions.js +69 -64
- package/dist/packages/dam/src/import/renditions.js.map +1 -1
- package/dist/packages/dam/src/services/authService.d.ts +1 -1
- package/dist/packages/dam/src/services/authService.js +9 -18
- package/dist/packages/dam/src/services/authService.js.map +1 -1
- package/dist/packages/dam/src/services/stagingService.js +76 -85
- package/dist/packages/dam/src/services/stagingService.js.map +1 -1
- package/dist/packages/dam/src/services/tokenCache.d.ts +1 -1
- package/dist/packages/dam/src/services/tokenCache.js +30 -41
- package/dist/packages/dam/src/services/tokenCache.js.map +1 -1
- package/dist/packages/dam/src/utils/constants.js +3 -3
- package/dist/packages/dam/src/utils/constants.js.map +1 -1
- package/dist/packages/dam/src/utils/service.js +59 -70
- package/dist/packages/dam/src/utils/service.js.map +1 -1
- package/dist/packages/dam/src/validation/collection-list-validate.js +26 -35
- package/dist/packages/dam/src/validation/collection-list-validate.js.map +1 -1
- package/dist/packages/dam/src/validation/media-list-validate.js +44 -39
- package/dist/packages/dam/src/validation/media-list-validate.js.map +1 -1
- package/dist/packages/dam/src/validation/media-type-group-validate.js +5 -14
- package/dist/packages/dam/src/validation/media-type-group-validate.js.map +1 -1
- package/dist/packages/dam/src/validation/media-type-validate.js +5 -14
- package/dist/packages/dam/src/validation/media-type-validate.js.map +1 -1
- package/dist/packages/dam/src/validation/root-validate.js +10 -19
- package/dist/packages/dam/src/validation/root-validate.js.map +1 -1
- package/dist/packages/dam/src/validation/validate.rendition.js +17 -26
- package/dist/packages/dam/src/validation/validate.rendition.js.map +1 -1
- package/dist/packages/dam/src/validation/validate.versions.js +16 -25
- package/dist/packages/dam/src/validation/validate.versions.js.map +1 -1
- package/dist/packages/deployportlet/package-lock.json +9970 -12728
- package/dist/packages/deployportlet/package.json +20 -6
- package/dist/packages/deployportlet/src/commands/deployPortlet.d.ts +1 -1
- package/dist/packages/deployportlet/src/commands/deployPortlet.js +65 -62
- package/dist/packages/deployportlet/src/commands/deployPortlet.js.map +1 -1
- package/dist/packages/deployportlet/src/commands/undeployPortlet.d.ts +1 -1
- package/dist/packages/deployportlet/src/commands/undeployPortlet.js +80 -77
- package/dist/packages/deployportlet/src/commands/undeployPortlet.js.map +1 -1
- package/dist/packages/deployportlet/src/commands/xmlaccess.d.ts +1 -1
- package/dist/packages/deployportlet/src/commands/xmlaccess.js +14 -25
- package/dist/packages/deployportlet/src/commands/xmlaccess.js.map +1 -1
- package/dist/packages/deployportlet/src/services/undeployPortletServices.js +34 -43
- package/dist/packages/deployportlet/src/services/undeployPortletServices.js.map +1 -1
- package/dist/packages/deployscriptapplication/package-lock.json +6395 -12760
- package/dist/packages/deployscriptapplication/package.json +11 -4
- package/dist/packages/deployscriptapplication/src/commands/pull.d.ts +1 -2
- package/dist/packages/deployscriptapplication/src/commands/pull.js +146 -159
- package/dist/packages/deployscriptapplication/src/commands/pull.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/commands/push.d.ts +3 -3
- package/dist/packages/deployscriptapplication/src/commands/push.js +149 -157
- package/dist/packages/deployscriptapplication/src/commands/push.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.d.ts +2 -2
- package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.js +88 -101
- package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.d.ts +2 -2
- package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.js +118 -131
- package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/util/constants.js.map +1 -1
- package/dist/packages/deployscriptapplication/src/util/generic.js.map +1 -1
- package/dist/packages/deploytheme/package-lock.json +7190 -13434
- package/dist/packages/deploytheme/package.json +9 -6
- package/dist/packages/deploytheme/src/commands/deployApplication.d.ts +1 -1
- package/dist/packages/deploytheme/src/commands/deployApplication.js +87 -84
- package/dist/packages/deploytheme/src/commands/deployApplication.js.map +1 -1
- package/dist/packages/deploytheme/src/commands/deployTheme.d.ts +4 -4
- package/dist/packages/deploytheme/src/commands/deployTheme.js +223 -226
- package/dist/packages/deploytheme/src/commands/deployTheme.js.map +1 -1
- package/dist/packages/deploytheme/src/commands/undeployApplication.d.ts +1 -1
- package/dist/packages/deploytheme/src/commands/undeployApplication.js +21 -32
- package/dist/packages/deploytheme/src/commands/undeployApplication.js.map +1 -1
- package/dist/packages/deploytheme/src/commands/undeployTheme.d.ts +4 -4
- package/dist/packages/deploytheme/src/commands/undeployTheme.js +214 -223
- package/dist/packages/deploytheme/src/commands/undeployTheme.js.map +1 -1
- package/dist/packages/deploytheme/src/services/themeServices.js +84 -90
- package/dist/packages/deploytheme/src/services/themeServices.js.map +1 -1
- package/dist/packages/livesync/package-lock.json +2202 -3754
- package/dist/packages/livesync/package.json +9 -5
- package/dist/packages/livesync/src/commands/pullTheme.d.ts +2 -2
- package/dist/packages/livesync/src/commands/pullTheme.js +62 -75
- package/dist/packages/livesync/src/commands/pullTheme.js.map +1 -1
- package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.d.ts +2 -1
- package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js +255 -288
- package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js.map +1 -1
- package/dist/packages/livesync/src/commands/pushTheme.d.ts +4 -4
- package/dist/packages/livesync/src/commands/pushTheme.js +125 -140
- 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 +545 -553
- package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js.map +1 -1
- package/dist/packages/livesync/src/errors/CommandLineMessages_en.json +5 -2
- package/dist/packages/livesync/src/messages/messages_en.json +1 -0
- package/dist/packages/livesync/src/services/EventsQueue.js +11 -24
- package/dist/packages/livesync/src/services/EventsQueue.js.map +1 -1
- package/dist/packages/livesync/src/services/foldersWcmServices.js +21 -30
- package/dist/packages/livesync/src/services/foldersWcmServices.js.map +1 -1
- package/dist/packages/livesync/src/services/htmlComponentWcmServices.js +19 -28
- package/dist/packages/livesync/src/services/htmlComponentWcmServices.js.map +1 -1
- package/dist/packages/livesync/src/services/initialSyncServices.js +65 -81
- package/dist/packages/livesync/src/services/initialSyncServices.js.map +1 -1
- package/dist/packages/livesync/src/services/livesyncUtils.js +54 -49
- package/dist/packages/livesync/src/services/livesyncUtils.js.map +1 -1
- package/dist/packages/livesync/src/services/metadataServices.js +113 -77
- package/dist/packages/livesync/src/services/metadataServices.js.map +1 -1
- package/dist/packages/livesync/src/services/ongoingSyncServices.js +188 -182
- package/dist/packages/livesync/src/services/ongoingSyncServices.js.map +1 -1
- package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js +19 -28
- package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js.map +1 -1
- package/dist/packages/livesync/src/services/styleSheetComponentWcmServices.js +18 -27
- package/dist/packages/livesync/src/services/styleSheetComponentWcmServices.js.map +1 -1
- package/dist/packages/livesync/src/services/wcmContext/initialSync.js +29 -23
- package/dist/packages/livesync/src/services/wcmContext/initialSync.js.map +1 -1
- package/dist/packages/livesync/src/services/wcmContext/stylesheetComponent.js +221 -225
- package/dist/packages/livesync/src/services/wcmContext/stylesheetComponent.js.map +1 -1
- package/dist/packages/livesync/src/services/wcmContext/wcmLibraryContext.js +4 -4
- package/dist/packages/livesync/src/services/wcmContext/wcmLibraryContext.js.map +1 -1
- package/dist/packages/livesync/src/services/wcmRestV2Services.js +20 -26
- package/dist/packages/livesync/src/services/wcmRestV2Services.js.map +1 -1
- package/dist/packages/livesync/src/types/EventHandler.type.d.ts +1 -1
- package/dist/packages/livesync/src/types/EventQueueItem.type.d.ts +2 -2
- package/dist/packages/livesync/src/types/OngoingSyncHooks.type.d.ts +1 -1
- package/dist/packages/livesync/src/types/WCMDesignLibraryCache.type.d.ts +1 -1
- package/dist/packages/livesync/src/types/WcmRestApiV2.type.d.ts +8 -8
- package/dist/packages/livesync/src/types/index.d.ts +6 -0
- package/dist/packages/livesync/src/types/index.js +5 -1
- package/dist/packages/livesync/src/types/index.js.map +1 -1
- package/dist/packages/mls_exim/package-lock.json +2908 -5990
- package/dist/packages/mls_exim/package.json +10 -6
- package/dist/packages/mls_exim/src/export/mlsExport.d.ts +2 -2
- package/dist/packages/mls_exim/src/export/mlsExport.js +81 -78
- package/dist/packages/mls_exim/src/export/mlsExport.js.map +1 -1
- package/dist/packages/mls_exim/src/export/mlsExport.ts +9 -9
- package/dist/packages/mls_exim/src/import/mlsImport.d.ts +1 -1
- package/dist/packages/mls_exim/src/import/mlsImport.js +36 -47
- package/dist/packages/mls_exim/src/import/mlsImport.js.map +1 -1
- package/dist/packages/mls_exim/src/import/mlsImport.ts +3 -3
- package/dist/packages/sharedlibrary/package-lock.json +6221 -12629
- package/dist/packages/sharedlibrary/package.json +9 -6
- package/dist/packages/sharedlibrary/src/commands/delete.d.ts +1 -1
- package/dist/packages/sharedlibrary/src/commands/delete.js +40 -37
- package/dist/packages/sharedlibrary/src/commands/delete.js.map +1 -1
- package/dist/packages/sharedlibrary/src/commands/upload.d.ts +1 -1
- package/dist/packages/sharedlibrary/src/commands/upload.js +73 -70
- package/dist/packages/sharedlibrary/src/commands/upload.js.map +1 -1
- package/dist/packages/sharedlibrary/src/errors/CommandLineMessages_en.json +1 -0
- package/dist/packages/sharedlibrary/src/services/sharedLibraryServices.js +29 -30
- package/dist/packages/sharedlibrary/src/services/sharedLibraryServices.js.map +1 -1
- package/dist/packages/syndication/package-lock.json +9970 -12728
- package/dist/packages/syndication/package.json +21 -7
- package/dist/packages/syndication/src/commands/subscriber.d.ts +1 -1
- package/dist/packages/syndication/src/commands/subscriber.js +33 -44
- package/dist/packages/syndication/src/commands/subscriber.js.map +1 -1
- package/dist/packages/syndication/src/commands/syndicator.d.ts +1 -1
- package/dist/packages/syndication/src/commands/syndicator.js +33 -44
- package/dist/packages/syndication/src/commands/syndicator.js.map +1 -1
- package/dist/packages/syndication/src/commands/syndicatorFailedItem.d.ts +1 -1
- package/dist/packages/syndication/src/commands/syndicatorFailedItem.js +67 -78
- package/dist/packages/syndication/src/commands/syndicatorFailedItem.js.map +1 -1
- package/dist/packages/syndication/src/services/syndicationService.d.ts +8 -8
- package/dist/packages/syndication/src/services/syndicationService.js +39 -48
- package/dist/packages/syndication/src/services/syndicationService.js.map +1 -1
- package/dist/src/errors/CommandLineMessages_en.json +3 -1
- package/dist/src/index.js +908 -915
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/apiServices.js +184 -177
- package/dist/src/services/apiServices.js.map +1 -1
- package/dist/src/services/filesServices.d.ts +0 -1
- package/dist/src/services/filesServices.js +14 -23
- package/dist/src/services/filesServices.js.map +1 -1
- package/dist/src/services/requestService.js +16 -22
- package/dist/src/services/requestService.js.map +1 -1
- package/dist/src/utils/constants.d.ts +1 -1
- package/dist/src/utils/constants.js +59 -59
- package/dist/src/utils/constants.js.map +1 -1
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/logger.js +58 -61
- package/dist/src/utils/logger.js.map +1 -1
- package/dist/src/utils/utils.d.ts +7 -6
- package/dist/src/utils/utils.js +111 -104
- package/dist/src/utils/utils.js.map +1 -1
- package/dist/src/utils/validateOptions.d.ts +3 -3
- package/dist/src/utils/validateOptions.js +354 -333
- package/dist/src/utils/validateOptions.js.map +1 -1
- package/package.json +11 -11
package/dist/src/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -77,7 +68,7 @@ const deleteDAMStagingMismatch_1 = require("../packages/dam/src/commands/deleteD
|
|
|
77
68
|
const wcmRestV2Services_1 = require("../packages/livesync/src/services/wcmRestV2Services");
|
|
78
69
|
const metadataServices_1 = require("../packages/livesync/src/services/metadataServices");
|
|
79
70
|
const MaskData = require('maskdata');
|
|
80
|
-
const config = utils_1.getConfigJSON();
|
|
71
|
+
const config = (0, utils_1.getConfigJSON)();
|
|
81
72
|
const program = new commander_1.default.Command();
|
|
82
73
|
program.version(package_json_1.default.version || 'missing version info');
|
|
83
74
|
program.description(package_json_1.default.description || 'missing description');
|
|
@@ -115,10 +106,10 @@ program.on('--help', () => {
|
|
|
115
106
|
logger_1.logger.help(' $ dxclient wcm-library-import');
|
|
116
107
|
logger_1.logger.help(' $ dxclient dx-core-configuration-reports summary-report');
|
|
117
108
|
logger_1.logger.help(' $ dxclient manage-dam-assets export-assets | import-assets | validate-assets');
|
|
118
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
119
|
-
logger_1.logger.help(` $ dxclient livesync push-theme | pull-theme${utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM) ? ' | push-wcm-design-library | pull-wcm-design-library' : ''}`);
|
|
109
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
110
|
+
logger_1.logger.help(` $ dxclient livesync push-theme | pull-theme${(0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM) ? ' | push-wcm-design-library | pull-wcm-design-library' : ''}`);
|
|
120
111
|
}
|
|
121
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_REINDEXING)) {
|
|
112
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_REINDEXING)) {
|
|
122
113
|
logger_1.logger.help(' $ dxclient trigger-dam-reindexing');
|
|
123
114
|
}
|
|
124
115
|
logger_1.logger.help(' $ dxclient accept-license');
|
|
@@ -135,14 +126,14 @@ program.on('--help', () => {
|
|
|
135
126
|
}
|
|
136
127
|
});
|
|
137
128
|
program.command(constants_1.COMMANDS.VERSION_COMPAT)
|
|
138
|
-
.
|
|
139
|
-
.
|
|
140
|
-
.
|
|
141
|
-
.
|
|
142
|
-
.
|
|
129
|
+
.requiredOption('--hostname [value]', 'Host name of the DX Core server', config.hostname)
|
|
130
|
+
.requiredOption('--dxConnectPort [value]', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
131
|
+
.requiredOption('--dxConnectProtocol [value]', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
|
|
132
|
+
.requiredOption('--dxConnectUsername [value]', 'Username for the cw_profile', config.dxConnectUsername)
|
|
133
|
+
.requiredOption('--dxConnectPassword [value]', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
143
134
|
.description('- Show version compatibility details between DX Core and DXClient.')
|
|
144
|
-
.action((cmdOptions) =>
|
|
145
|
-
commands_1.configureCommand(constants_1.COMMANDS.VERSION_COMPAT);
|
|
135
|
+
.action(async (cmdOptions) => {
|
|
136
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.VERSION_COMPAT);
|
|
146
137
|
try {
|
|
147
138
|
if (process.env.DXCLIENT_TYPE && process.env.DXCLIENT_TYPE === 'container') {
|
|
148
139
|
logger_1.logger.help('\n Note: This installation is a container-based version of DXClient.\n');
|
|
@@ -150,146 +141,146 @@ program.command(constants_1.COMMANDS.VERSION_COMPAT)
|
|
|
150
141
|
else {
|
|
151
142
|
logger_1.logger.help('\n Note: This installation is a node-based version of DXClient.\n');
|
|
152
143
|
}
|
|
153
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
154
|
-
|
|
144
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
145
|
+
await (0, utils_1.validateVersionMapping)(cmdOptions);
|
|
155
146
|
}
|
|
156
147
|
catch (error) {
|
|
157
148
|
logger_1.logger.error(error.message);
|
|
158
|
-
|
|
149
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
159
150
|
}
|
|
160
|
-
})
|
|
151
|
+
});
|
|
161
152
|
program
|
|
162
153
|
.command(constants_1.COMMANDS.DEPLOY_PORTLET)
|
|
163
|
-
.requiredOption('
|
|
164
|
-
.requiredOption('
|
|
165
|
-
.requiredOption('
|
|
166
|
-
.requiredOption('
|
|
167
|
-
.requiredOption('
|
|
168
|
-
.requiredOption('
|
|
169
|
-
.requiredOption('
|
|
170
|
-
.requiredOption('
|
|
171
|
-
.requiredOption('
|
|
172
|
-
.requiredOption('
|
|
173
|
-
.requiredOption('
|
|
154
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
155
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
156
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
157
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
158
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
159
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
160
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
161
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
162
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
163
|
+
.requiredOption('--xmlFile <value>', 'Input xml file name with full path')
|
|
164
|
+
.requiredOption('--warFile <value>', 'War file name with full path ')
|
|
174
165
|
.description('- Deploys the portlet to the DX Core server')
|
|
175
|
-
.action((cmdOptions) =>
|
|
176
|
-
commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_PORTLET);
|
|
166
|
+
.action(async (cmdOptions) => {
|
|
167
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_PORTLET);
|
|
177
168
|
logger_1.logger.debug('Deploy portlet execution started');
|
|
178
169
|
try {
|
|
179
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
180
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
170
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
171
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
181
172
|
}
|
|
182
173
|
catch (error) {
|
|
183
174
|
logger_1.logger.error(error.message);
|
|
184
|
-
|
|
175
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
185
176
|
}
|
|
186
177
|
const deployPortletObj = new deployPortlet_1.DeployPortlet();
|
|
187
178
|
try {
|
|
188
|
-
const responseCode =
|
|
179
|
+
const responseCode = await deployPortletObj.invoke(cmdOptions);
|
|
189
180
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
190
181
|
logger_1.logger.debug('Deploy portlet execution completed');
|
|
191
|
-
|
|
182
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
192
183
|
}
|
|
193
184
|
catch (error) {
|
|
194
185
|
logger_1.logger.debug('Exception in execution of deploy portlet : %o', error);
|
|
195
|
-
|
|
186
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
196
187
|
}
|
|
197
|
-
})
|
|
188
|
+
});
|
|
198
189
|
program
|
|
199
190
|
.command(constants_1.COMMANDS.UNDEPLOY_PORTLET)
|
|
200
|
-
.requiredOption('
|
|
201
|
-
.requiredOption('
|
|
202
|
-
.requiredOption('
|
|
203
|
-
.requiredOption('
|
|
204
|
-
.requiredOption('
|
|
205
|
-
.requiredOption('
|
|
206
|
-
.requiredOption('
|
|
207
|
-
.option('
|
|
208
|
-
.option('
|
|
209
|
-
.option('
|
|
210
|
-
.option('
|
|
211
|
-
.option('
|
|
212
|
-
.option('
|
|
213
|
-
.option('
|
|
191
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
192
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
193
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
194
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
195
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
196
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
197
|
+
.requiredOption('--xmlFile <value>', 'XML file name with full path ')
|
|
198
|
+
.option('--enableBackup <value>', 'Set the flag to true to take backup of the Portlets that to be undeployed', config.enableBackup)
|
|
199
|
+
.option('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
200
|
+
.option('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
201
|
+
.option('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
202
|
+
.option('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
|
|
203
|
+
.option('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
204
|
+
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
214
205
|
.description('- Undeploys the portlet from the DX Core server.')
|
|
215
|
-
.action((cmdOptions) =>
|
|
216
|
-
commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_PORTLET);
|
|
206
|
+
.action(async (cmdOptions) => {
|
|
207
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_PORTLET);
|
|
217
208
|
logger_1.logger.debug('undeploy portlet execution started');
|
|
218
209
|
try {
|
|
219
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
220
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
210
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
211
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
221
212
|
}
|
|
222
213
|
catch (error) {
|
|
223
214
|
logger_1.logger.error(error.message);
|
|
224
|
-
|
|
215
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
225
216
|
}
|
|
226
217
|
const undeployPortletObj = new undeployPortlet_1.UndeployPortlet();
|
|
227
218
|
try {
|
|
228
|
-
const responseCode =
|
|
219
|
+
const responseCode = await undeployPortletObj.invoke(cmdOptions);
|
|
229
220
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
230
221
|
logger_1.logger.debug('undeploy portlet execution completed');
|
|
231
|
-
|
|
222
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
232
223
|
}
|
|
233
224
|
catch (error) {
|
|
234
225
|
logger_1.logger.debug('Exception in execution of xml access : %o', error);
|
|
235
|
-
|
|
226
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
236
227
|
}
|
|
237
|
-
})
|
|
228
|
+
});
|
|
238
229
|
program
|
|
239
230
|
.command(constants_1.COMMANDS.XMLACCESS)
|
|
240
|
-
.requiredOption('
|
|
241
|
-
.requiredOption('
|
|
242
|
-
.requiredOption('
|
|
243
|
-
.requiredOption('
|
|
244
|
-
.requiredOption('
|
|
245
|
-
.requiredOption('
|
|
246
|
-
.requiredOption('
|
|
231
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
232
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
233
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
234
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
235
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
236
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
237
|
+
.requiredOption('--xmlFile <value>', 'XML file name with full path ')
|
|
247
238
|
.description('- Executes xml access tasks on the DX Core server.')
|
|
248
|
-
.action((cmdOptions) =>
|
|
249
|
-
commands_1.configureCommand(constants_1.COMMANDS.XMLACCESS);
|
|
239
|
+
.action(async (cmdOptions) => {
|
|
240
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.XMLACCESS);
|
|
250
241
|
logger_1.logger.debug('Xmlaccess execution started');
|
|
251
242
|
try {
|
|
252
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
253
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
243
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
244
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
254
245
|
}
|
|
255
246
|
catch (error) {
|
|
256
247
|
logger_1.logger.error(error.message);
|
|
257
|
-
|
|
248
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
258
249
|
}
|
|
259
250
|
try {
|
|
260
251
|
const xmlAccess = new xmlaccess_1.XmlAccess();
|
|
261
|
-
const responseCode =
|
|
252
|
+
const responseCode = await xmlAccess.invoke(cmdOptions);
|
|
262
253
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
263
254
|
logger_1.logger.debug('Xmlaccess execution completed');
|
|
264
|
-
|
|
255
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
265
256
|
}
|
|
266
257
|
catch (error) {
|
|
267
258
|
logger_1.logger.debug('Exception in execution of xml access : %o', error);
|
|
268
|
-
|
|
259
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
269
260
|
}
|
|
270
|
-
})
|
|
261
|
+
});
|
|
271
262
|
program
|
|
272
263
|
.command('deploy-scriptapplication [subCmd]')
|
|
273
|
-
.requiredOption('
|
|
274
|
-
.requiredOption('
|
|
275
|
-
.requiredOption('
|
|
276
|
-
.requiredOption('
|
|
277
|
-
.requiredOption('
|
|
278
|
-
.requiredOption('
|
|
279
|
-
.requiredOption('
|
|
280
|
-
.requiredOption('
|
|
281
|
-
.requiredOption('
|
|
282
|
-
.requiredOption('
|
|
283
|
-
.option('
|
|
284
|
-
.option('
|
|
285
|
-
.option('
|
|
286
|
-
.option('
|
|
287
|
-
.option('
|
|
288
|
-
.option('
|
|
264
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
265
|
+
.requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
|
|
266
|
+
.requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
267
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
268
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
269
|
+
.requiredOption('--wcmSiteArea <value>', 'Web Content Manager site area in which Script Application instances are created', config.wcmSiteArea)
|
|
270
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
271
|
+
.requiredOption('--mainHtmlFile <value>', 'Path to the main .html file of the Script Application', '')
|
|
272
|
+
.requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
|
|
273
|
+
.requiredOption('--wcmContentTitle <value>', 'Sets or updates the title of the Script Application instance', '')
|
|
274
|
+
.option('--contentRoot <value>', 'Absolute or relative path to a directory on the workstation that contains the content to be pushed to the portal')
|
|
275
|
+
.option('--wcmContentPath <value>', 'Full Web Content Manager path, including library and site area', config.wcmContentPath)
|
|
276
|
+
.option('--wcmContentName <value>', 'Name of the Script Application instance to be created or updated', config.wcmContentName)
|
|
277
|
+
.option('--prebuiltZip <value>', 'Path to an existing compressed file that provides the content to be pushed to the portal')
|
|
278
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
|
|
279
|
+
.option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
|
|
289
280
|
.option('-h, --help')
|
|
290
281
|
.description('- creates or updates the content of a Script Application instance')
|
|
291
|
-
.action((subCmd, cmd) =>
|
|
292
|
-
if ((subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL || subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) && (
|
|
282
|
+
.action(async (subCmd, cmd) => {
|
|
283
|
+
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))) {
|
|
293
284
|
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');
|
|
294
285
|
logger_1.logger.help('\n Usage: dxclient deploy-scriptapplication [options] [subCmd]');
|
|
295
286
|
logger_1.logger.help(` - Create or update the content of a Script Application instance for ${subCmd} \n`);
|
|
@@ -336,563 +327,563 @@ Script Application content (default: "${config.projectContext}")`);
|
|
|
336
327
|
}
|
|
337
328
|
else {
|
|
338
329
|
const command = subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL ? constants_1.COMMANDS.SCRIPT_APPLICATION_PULL : constants_1.COMMANDS.SCRIPT_APPLICATION_PUSH;
|
|
339
|
-
commands_1.configureCommand(command);
|
|
340
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
341
|
-
validateOptions_1.validateOptions(cmd);
|
|
330
|
+
(0, commands_1.configureCommand)(command);
|
|
331
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
332
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
342
333
|
}
|
|
343
334
|
}
|
|
344
335
|
catch (error) {
|
|
345
336
|
logger_1.logger.error(error.message);
|
|
346
|
-
|
|
337
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
347
338
|
}
|
|
348
339
|
if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL) {
|
|
349
340
|
logger_1.logger.debug('Deploy script application execution started');
|
|
350
341
|
const pull = new pull_1.Pull();
|
|
351
342
|
try {
|
|
352
|
-
const responseCode =
|
|
343
|
+
const responseCode = await pull.pullScriptApplication(cmd);
|
|
353
344
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
354
345
|
logger_1.logger.debug('Deploy script application execution completed');
|
|
355
|
-
|
|
346
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
356
347
|
}
|
|
357
348
|
catch (error) {
|
|
358
349
|
logger_1.logger.debug('Exception in execution of script application : %o', error);
|
|
359
|
-
|
|
350
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
360
351
|
}
|
|
361
352
|
}
|
|
362
353
|
else if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) {
|
|
363
354
|
logger_1.logger.debug('Deploy script application execution started');
|
|
364
355
|
try {
|
|
365
356
|
const push = new push_1.PushSP();
|
|
366
|
-
const responseCode =
|
|
357
|
+
const responseCode = await push.pushScriptApplication(cmd);
|
|
367
358
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
368
359
|
logger_1.logger.debug('Deploy script application execution completed');
|
|
369
360
|
if (responseCode.results && responseCode.results.status === constants_1.ResponseStatus.SUCCESS) {
|
|
370
|
-
|
|
361
|
+
await (0, utils_1.flushLogAndExitProcess)(true);
|
|
371
362
|
}
|
|
372
363
|
else {
|
|
373
|
-
|
|
364
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
374
365
|
}
|
|
375
366
|
}
|
|
376
367
|
catch (error) {
|
|
377
368
|
logger_1.logger.debug('Exception in execution of script application : %o', error);
|
|
378
|
-
|
|
369
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
379
370
|
}
|
|
380
371
|
}
|
|
381
|
-
})
|
|
372
|
+
})
|
|
382
373
|
.helpOption(false);
|
|
383
374
|
program
|
|
384
375
|
.command(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION)
|
|
385
|
-
.requiredOption('
|
|
386
|
-
.requiredOption('
|
|
387
|
-
.requiredOption('
|
|
388
|
-
.requiredOption('
|
|
389
|
-
.requiredOption('
|
|
390
|
-
.requiredOption('
|
|
391
|
-
.requiredOption('
|
|
392
|
-
.option('
|
|
393
|
-
.option('
|
|
376
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
377
|
+
.requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
|
|
378
|
+
.requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
379
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
380
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
381
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
382
|
+
.requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
|
|
383
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
|
|
384
|
+
.option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
|
|
394
385
|
.option('-f, --force', 'Delete the Script Application forcefully')
|
|
395
|
-
.option('
|
|
386
|
+
.option('--enableBackup <value>', 'Set the flag to true to take backup of the script application to be undeployed', config.enableBackup)
|
|
396
387
|
.description('- Undeploys the script application from the DX Core server')
|
|
397
|
-
.action((cmd) =>
|
|
398
|
-
commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION);
|
|
388
|
+
.action(async (cmd) => {
|
|
389
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION);
|
|
399
390
|
try {
|
|
400
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
401
|
-
validateOptions_1.validateOptions(cmd);
|
|
391
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
392
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
402
393
|
}
|
|
403
394
|
catch (error) {
|
|
404
395
|
logger_1.logger.error(error.message);
|
|
405
|
-
|
|
396
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
406
397
|
}
|
|
407
398
|
try {
|
|
408
399
|
const undeployScriptApplication = new undeployScriptApplication_1.UndeployScriptApplication();
|
|
409
400
|
logger_1.logger.debug('Undeploy scriptapplication execution started');
|
|
410
|
-
const responseCode =
|
|
401
|
+
const responseCode = await undeployScriptApplication.invoke(cmd);
|
|
411
402
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
412
403
|
logger_1.logger.debug('Undeploy scriptapplication execution completed');
|
|
413
|
-
|
|
404
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
414
405
|
}
|
|
415
406
|
catch (error) {
|
|
416
407
|
logger_1.logger.debug('Exception in execution of undeploy scriptapplication : %o', error);
|
|
417
|
-
|
|
408
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
418
409
|
}
|
|
419
|
-
})
|
|
410
|
+
});
|
|
420
411
|
program
|
|
421
412
|
.command(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION)
|
|
422
|
-
.requiredOption('
|
|
423
|
-
.requiredOption('
|
|
424
|
-
.requiredOption('
|
|
425
|
-
.requiredOption('
|
|
426
|
-
.requiredOption('
|
|
427
|
-
.requiredOption('
|
|
428
|
-
.requiredOption('
|
|
429
|
-
.requiredOption('
|
|
430
|
-
.requiredOption('
|
|
431
|
-
.option('
|
|
432
|
-
.option('
|
|
413
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
414
|
+
.requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
|
|
415
|
+
.requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
416
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
417
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
418
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
419
|
+
.requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', '')
|
|
420
|
+
.requiredOption('--versionName <value>', 'Name of the version that should become the current version of Script Application', '')
|
|
421
|
+
.requiredOption('--restoreAsPublished <value>', 'Restore as a draft or replace the published version of Script Application', config.restoreAsPublished)
|
|
422
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
|
|
423
|
+
.option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
|
|
433
424
|
.description('- Restores script application to version specified or if not, its previous by default')
|
|
434
|
-
.action((cmd) =>
|
|
435
|
-
commands_1.configureCommand(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION);
|
|
425
|
+
.action(async (cmd) => {
|
|
426
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION);
|
|
436
427
|
try {
|
|
437
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
438
|
-
validateOptions_1.validateOptions(cmd);
|
|
428
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
429
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
439
430
|
}
|
|
440
431
|
catch (error) {
|
|
441
432
|
logger_1.logger.error(error.message);
|
|
442
|
-
|
|
433
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
443
434
|
}
|
|
444
435
|
const restoreScriptApplication = new restoreScriptApplication_1.RestoreScriptApplication();
|
|
445
436
|
logger_1.logger.debug('Restore scriptapplication execution started');
|
|
446
437
|
try {
|
|
447
|
-
const responseCode =
|
|
438
|
+
const responseCode = await restoreScriptApplication.invoke(cmd);
|
|
448
439
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
449
440
|
logger_1.logger.debug('Restore scriptapplication execution completed');
|
|
450
|
-
|
|
441
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
451
442
|
}
|
|
452
443
|
catch (error) {
|
|
453
444
|
logger_1.logger.debug('Exception in execution of Restore scriptapplication : %o', error);
|
|
454
|
-
|
|
445
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
455
446
|
}
|
|
456
|
-
})
|
|
447
|
+
});
|
|
457
448
|
program
|
|
458
449
|
.command(constants_1.COMMANDS.DEPLOY_THEME)
|
|
459
|
-
.requiredOption('
|
|
460
|
-
.requiredOption('
|
|
461
|
-
.requiredOption('
|
|
462
|
-
.requiredOption('
|
|
463
|
-
.requiredOption('
|
|
464
|
-
.requiredOption('
|
|
465
|
-
.requiredOption('
|
|
466
|
-
.requiredOption('
|
|
467
|
-
.requiredOption('
|
|
468
|
-
.option('
|
|
469
|
-
.requiredOption('
|
|
470
|
-
.requiredOption('
|
|
471
|
-
.requiredOption('
|
|
472
|
-
.option('
|
|
473
|
-
.option('
|
|
474
|
-
.option('
|
|
475
|
-
.option('
|
|
476
|
-
.option('
|
|
477
|
-
.option('
|
|
450
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
451
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
452
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
453
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
454
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
455
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
456
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
457
|
+
.requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
|
|
458
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
459
|
+
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
460
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
461
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
462
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
463
|
+
.option('--xmlFile <value>', 'Input xml file name with full path')
|
|
464
|
+
.option('--applicationFile <value>', 'Application file name with full path')
|
|
465
|
+
.option('--applicationName <value>', 'Application name')
|
|
466
|
+
.option('--themeName <value>', 'Theme Collection name')
|
|
467
|
+
.option('--themePath <value>', 'Theme Path with zip or folder name')
|
|
468
|
+
.option('--requestId <value>', 'Unique Id of a previously triggered deploy theme request.')
|
|
478
469
|
.description('- Deploys the theme(EAR or WebDav packages) to the DX Core server')
|
|
479
|
-
.action((cmdOptions) =>
|
|
480
|
-
commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_THEME);
|
|
470
|
+
.action(async (cmdOptions) => {
|
|
471
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_THEME);
|
|
481
472
|
logger_1.logger.debug('Deploy theme execution started');
|
|
482
473
|
try {
|
|
483
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
484
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
474
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
475
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
485
476
|
}
|
|
486
477
|
catch (error) {
|
|
487
478
|
logger_1.logger.error(error.message);
|
|
488
|
-
|
|
479
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
489
480
|
}
|
|
490
481
|
try {
|
|
491
482
|
const deployThemeObj = new deployTheme_1.DeployTheme();
|
|
492
|
-
const responseCode =
|
|
483
|
+
const responseCode = await deployThemeObj.invoke(cmdOptions);
|
|
493
484
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
494
485
|
logger_1.logger.debug('Deploy theme execution completed');
|
|
495
|
-
|
|
486
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
496
487
|
}
|
|
497
488
|
catch (error) {
|
|
498
489
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
499
|
-
|
|
490
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
500
491
|
}
|
|
501
|
-
})
|
|
492
|
+
});
|
|
502
493
|
program
|
|
503
494
|
.command(constants_1.COMMANDS.UNDEPLOY_THEME)
|
|
504
|
-
.requiredOption('
|
|
505
|
-
.requiredOption('
|
|
506
|
-
.requiredOption('
|
|
507
|
-
.requiredOption('
|
|
508
|
-
.requiredOption('
|
|
509
|
-
.requiredOption('
|
|
510
|
-
.requiredOption('
|
|
511
|
-
.requiredOption('
|
|
512
|
-
.requiredOption('
|
|
513
|
-
.option('
|
|
514
|
-
.requiredOption('
|
|
515
|
-
.requiredOption('
|
|
516
|
-
.requiredOption('
|
|
517
|
-
.option('
|
|
518
|
-
.option('
|
|
519
|
-
.option('
|
|
520
|
-
.option('
|
|
495
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
496
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
497
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
498
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
499
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
500
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
501
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
502
|
+
.requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
|
|
503
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
504
|
+
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
505
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
506
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
507
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
508
|
+
.option('--xmlFile <value>', 'Input xml file name with full path to unregister the theme')
|
|
509
|
+
.option('--applicationName <value>', 'Application name')
|
|
510
|
+
.option('--themeName <value>', 'Theme Collection name')
|
|
511
|
+
.option('--enableBackup <value>', 'Set the flag to true to take backup of the theme to be undeployed', config.enableBackup)
|
|
521
512
|
.description('- Undeploys the theme(EAR or WebDav packages) from the DX Core server')
|
|
522
|
-
.action((cmdOptions) =>
|
|
523
|
-
commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_THEME);
|
|
513
|
+
.action(async (cmdOptions) => {
|
|
514
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_THEME);
|
|
524
515
|
logger_1.logger.debug('Undeploy theme execution started');
|
|
525
516
|
try {
|
|
526
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
527
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
517
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
518
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
528
519
|
}
|
|
529
520
|
catch (error) {
|
|
530
521
|
logger_1.logger.error(error.message);
|
|
531
|
-
|
|
522
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
532
523
|
}
|
|
533
524
|
try {
|
|
534
525
|
const undeployThemeObj = new undeployTheme_1.UndeployTheme();
|
|
535
|
-
const responseCode =
|
|
526
|
+
const responseCode = await undeployThemeObj.invoke(cmdOptions);
|
|
536
527
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
537
528
|
logger_1.logger.debug('Undeploy theme execution completed');
|
|
538
|
-
|
|
529
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
539
530
|
}
|
|
540
531
|
catch (error) {
|
|
541
532
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
542
|
-
|
|
533
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
543
534
|
}
|
|
544
|
-
})
|
|
535
|
+
});
|
|
545
536
|
program
|
|
546
537
|
.command(constants_1.COMMANDS.DEPLOY_APPLICATION)
|
|
547
|
-
.requiredOption('
|
|
548
|
-
.requiredOption('
|
|
549
|
-
.requiredOption('
|
|
550
|
-
.requiredOption('
|
|
551
|
-
.requiredOption('
|
|
552
|
-
.requiredOption('
|
|
553
|
-
.requiredOption('
|
|
554
|
-
.option('
|
|
555
|
-
.requiredOption('
|
|
556
|
-
.requiredOption('
|
|
557
|
-
.requiredOption('
|
|
558
|
-
.requiredOption('
|
|
559
|
-
.requiredOption('
|
|
560
|
-
.requiredOption('
|
|
561
|
-
.option('
|
|
538
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
539
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
540
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
541
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
542
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
543
|
+
.requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
|
|
544
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
545
|
+
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
546
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
547
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
548
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
549
|
+
.requiredOption('--dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
|
|
550
|
+
.requiredOption('--applicationFile <value>', 'Application file name with full path')
|
|
551
|
+
.requiredOption('--applicationName <value>', 'Application name')
|
|
552
|
+
.option('--requestId <value>', 'Unique Id of a previously triggered deploy application request.')
|
|
562
553
|
.description('- Deploys the application to the DX Core server')
|
|
563
|
-
.action((cmdOptions) =>
|
|
564
|
-
commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_APPLICATION);
|
|
554
|
+
.action(async (cmdOptions) => {
|
|
555
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_APPLICATION);
|
|
565
556
|
logger_1.logger.debug('Deploy Application execution started');
|
|
566
557
|
try {
|
|
567
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
568
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
558
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
559
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
569
560
|
}
|
|
570
561
|
catch (error) {
|
|
571
562
|
logger_1.logger.error(error.message);
|
|
572
|
-
|
|
563
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
573
564
|
}
|
|
574
565
|
try {
|
|
575
566
|
const deployApplicationObj = new deployApplication_1.DeployApplication();
|
|
576
|
-
const responseCode =
|
|
567
|
+
const responseCode = await deployApplicationObj.invoke(cmdOptions);
|
|
577
568
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
578
569
|
logger_1.logger.debug('Deploy Application execution completed');
|
|
579
|
-
|
|
570
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
580
571
|
}
|
|
581
572
|
catch (error) {
|
|
582
573
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
583
|
-
|
|
574
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
584
575
|
}
|
|
585
|
-
})
|
|
576
|
+
});
|
|
586
577
|
program
|
|
587
578
|
.command(constants_1.COMMANDS.UNDEPLOY_APPLICATION)
|
|
588
|
-
.requiredOption('
|
|
589
|
-
.requiredOption('
|
|
590
|
-
.requiredOption('
|
|
591
|
-
.requiredOption('
|
|
592
|
-
.requiredOption('
|
|
593
|
-
.requiredOption('
|
|
594
|
-
.requiredOption('
|
|
595
|
-
.requiredOption('
|
|
596
|
-
.requiredOption('
|
|
597
|
-
.requiredOption('
|
|
598
|
-
.requiredOption('
|
|
599
|
-
.requiredOption('
|
|
600
|
-
.option('
|
|
579
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
580
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
581
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
582
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
583
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
584
|
+
.requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
|
|
585
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
586
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
587
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
588
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
589
|
+
.requiredOption('--dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
|
|
590
|
+
.requiredOption('--applicationName <value>', 'Application name')
|
|
591
|
+
.option('--enableBackup <value>', 'Set the flag to true to take backup of the application to be undeployed', config.enableBackup)
|
|
601
592
|
.description('- Undeploys the application from the DX Core server')
|
|
602
|
-
.action((cmdOptions) =>
|
|
603
|
-
commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_APPLICATION);
|
|
593
|
+
.action(async (cmdOptions) => {
|
|
594
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_APPLICATION);
|
|
604
595
|
logger_1.logger.debug('Undeploy Application execution started');
|
|
605
596
|
try {
|
|
606
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
607
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
597
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
598
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
608
599
|
}
|
|
609
600
|
catch (error) {
|
|
610
601
|
logger_1.logger.error(error.message);
|
|
611
|
-
|
|
602
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
612
603
|
}
|
|
613
604
|
try {
|
|
614
605
|
const undeployApplicationObj = new undeployApplication_1.UndeployApplication();
|
|
615
|
-
const responseCode =
|
|
606
|
+
const responseCode = await undeployApplicationObj.invoke(cmdOptions);
|
|
616
607
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
617
608
|
logger_1.logger.debug('Undeploy Application execution completed');
|
|
618
|
-
|
|
609
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
619
610
|
}
|
|
620
611
|
catch (error) {
|
|
621
612
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
622
|
-
|
|
613
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
623
614
|
}
|
|
624
|
-
})
|
|
615
|
+
});
|
|
625
616
|
program
|
|
626
617
|
.command(constants_1.COMMANDS.MLS_EXPORT)
|
|
627
|
-
.requiredOption('
|
|
628
|
-
.requiredOption('
|
|
629
|
-
.requiredOption('
|
|
630
|
-
.requiredOption('
|
|
631
|
-
.requiredOption('
|
|
632
|
-
.requiredOption('
|
|
633
|
-
.option('
|
|
634
|
-
.option('
|
|
635
|
-
.option('
|
|
636
|
-
.option('
|
|
637
|
-
.option('
|
|
638
|
-
.option('
|
|
618
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
619
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
620
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
621
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
|
|
622
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
623
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
624
|
+
.option('--wcmLibraryId <value>', 'WCM Library ID', config.wcmLibraryId)
|
|
625
|
+
.option('--wcmLibraryName <value>', 'WCM Library Name', config.wcmLibraryName)
|
|
626
|
+
.option('--lastModifiedAfter <value>', 'Last Modified After is in GMT Format', config.lastModifiedAfter)
|
|
627
|
+
.option('--wcmProjectName <value>', 'WCM project name to export the contents of the specified project', config.wcmProjectName)
|
|
628
|
+
.option('--exportPath <value>', 'Location of the file path to export')
|
|
629
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
|
|
639
630
|
.description('- Exports the source contents from a library into a .csv file at the location specified')
|
|
640
|
-
.action((cmdOptions) =>
|
|
641
|
-
commands_1.configureCommand(constants_1.COMMANDS.MLS_EXPORT);
|
|
631
|
+
.action(async (cmdOptions) => {
|
|
632
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_EXPORT);
|
|
642
633
|
logger_1.logger.debug('Exports the source contents execution started');
|
|
643
634
|
try {
|
|
644
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
645
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
635
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
636
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
646
637
|
}
|
|
647
638
|
catch (error) {
|
|
648
639
|
logger_1.logger.error(error.message);
|
|
649
|
-
|
|
640
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
650
641
|
}
|
|
651
642
|
const mlsExportObj = new mlsExport_1.MLSExport();
|
|
652
643
|
try {
|
|
653
|
-
const responseCode =
|
|
644
|
+
const responseCode = await mlsExportObj.invoke(cmdOptions);
|
|
654
645
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
655
646
|
logger_1.logger.debug('Exporting the source contents execution completed');
|
|
656
|
-
|
|
647
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
657
648
|
}
|
|
658
649
|
catch (error) {
|
|
659
650
|
logger_1.logger.debug('Exception in execution of exporting the source contents : %o', error);
|
|
660
|
-
|
|
651
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
661
652
|
}
|
|
662
|
-
})
|
|
653
|
+
});
|
|
663
654
|
program
|
|
664
655
|
.command(constants_1.COMMANDS.MLS_IMPORT)
|
|
665
|
-
.requiredOption('
|
|
666
|
-
.requiredOption('
|
|
667
|
-
.requiredOption('
|
|
668
|
-
.requiredOption('
|
|
669
|
-
.requiredOption('
|
|
670
|
-
.requiredOption('
|
|
671
|
-
.requiredOption('
|
|
672
|
-
.option('
|
|
673
|
-
.option('
|
|
674
|
-
.option('
|
|
656
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
657
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
658
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
659
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
660
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
661
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
662
|
+
.requiredOption('--importPath <value>', 'Location of the file path(s) (separated by comma) to import')
|
|
663
|
+
.option('--wcmProjectName <value>', 'Project for which the contents to be imported', config.wcmProjectName)
|
|
664
|
+
.option('--forceImport <value>', 'Flag to forcefully import the content')
|
|
665
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
|
|
675
666
|
.description('- Imports the source contents from a CSV file into DX at the location specified')
|
|
676
|
-
.action((cmdOptions) =>
|
|
677
|
-
commands_1.configureCommand(constants_1.COMMANDS.MLS_IMPORT);
|
|
667
|
+
.action(async (cmdOptions) => {
|
|
668
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_IMPORT);
|
|
678
669
|
logger_1.logger.debug('Imports the source contents execution started');
|
|
679
670
|
try {
|
|
680
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
681
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
671
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
672
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
682
673
|
}
|
|
683
674
|
catch (error) {
|
|
684
675
|
logger_1.logger.error(error.message);
|
|
685
|
-
|
|
676
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
686
677
|
}
|
|
687
678
|
const mlsImportObj = new mlsImport_1.MLSImport();
|
|
688
679
|
try {
|
|
689
|
-
const responseCode =
|
|
680
|
+
const responseCode = await mlsImportObj.invoke(cmdOptions);
|
|
690
681
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
691
682
|
logger_1.logger.debug('Importing the source contents into DX execution completed');
|
|
692
|
-
|
|
683
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
693
684
|
}
|
|
694
685
|
catch (error) {
|
|
695
686
|
logger_1.logger.debug('Exception in execution of importation the source contents : %o', error);
|
|
696
|
-
|
|
687
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
697
688
|
}
|
|
698
|
-
})
|
|
689
|
+
});
|
|
699
690
|
program
|
|
700
691
|
.command(`${constants_1.COMMANDS.MANAGE_SYNDICATOR} [subCmd]`)
|
|
701
|
-
.requiredOption('
|
|
702
|
-
.requiredOption('
|
|
703
|
-
.requiredOption('
|
|
704
|
-
.requiredOption('
|
|
705
|
-
.requiredOption('
|
|
706
|
-
.requiredOption('
|
|
707
|
-
.requiredOption('
|
|
708
|
-
.option('
|
|
692
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
693
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
694
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
695
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
696
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
697
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
698
|
+
.requiredOption('--UUID <value>', 'UUID of the syndicator instance', '')
|
|
699
|
+
.option('--enable <value>', 'Use true or false to enable or disable the syndicator')
|
|
709
700
|
.option('-h, --help')
|
|
710
701
|
.description('- Manages the syndicator in DX Server (Enable/Disable or helps to get syndicator report)')
|
|
711
|
-
.action((subCmd, cmd) =>
|
|
712
|
-
if (
|
|
702
|
+
.action(async (subCmd, cmd, options) => {
|
|
703
|
+
if (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP)) {
|
|
713
704
|
logger_1.logger.help('Usage: dxclient manage-syndicator [options] [subCmd](get-syndication-report)\n');
|
|
714
705
|
logger_1.logger.help(' - Manages the syndicator in DX Server (Enable/Disable or helps to get syndicator report)\n');
|
|
715
|
-
logger_1.logger.help(`
|
|
716
|
-
logger_1.logger.help(`
|
|
717
|
-
logger_1.logger.help(`
|
|
706
|
+
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
707
|
+
logger_1.logger.help(` --hostname <value> Hostname of the DX Core server (default: "${config.hostname}")`);
|
|
708
|
+
logger_1.logger.help(` --dxPort <value> Port number for DX Core server, for any Kubernetes Environment default port is 443 \
|
|
718
709
|
(default: "${config.dxPort.toString()}")`);
|
|
719
|
-
logger_1.logger.help(`
|
|
720
|
-
logger_1.logger.help(`
|
|
721
|
-
logger_1.logger.help(`
|
|
722
|
-
logger_1.logger.help('
|
|
723
|
-
if (
|
|
724
|
-
logger_1.logger.help('
|
|
725
|
-
}
|
|
726
|
-
logger_1.logger.help('
|
|
710
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
|
|
711
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
712
|
+
logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet (default: "${config.contenthandlerPath}")`);
|
|
713
|
+
logger_1.logger.help(' --UUID <value> UUID of the syndicator instance');
|
|
714
|
+
if (options.parent.args[0] === constants_1.COMMANDS.MANAGE_SYNDICATOR && !subCmd) {
|
|
715
|
+
logger_1.logger.help(' --enable <value> Use true or false to enable or disable the syndicator');
|
|
716
|
+
}
|
|
717
|
+
logger_1.logger.help(' -h, --help Display help for command');
|
|
727
718
|
process.exit(1);
|
|
728
719
|
}
|
|
729
720
|
try {
|
|
730
721
|
const command = subCmd ? constants_1.COMMANDS.GET_SYNDICATION_REPORT : constants_1.COMMANDS.MANAGE_SYNDICATOR;
|
|
731
|
-
commands_1.configureCommand(command);
|
|
722
|
+
(0, commands_1.configureCommand)(command);
|
|
732
723
|
logger_1.logger.debug('Manage syndicator execution started');
|
|
733
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
734
|
-
validateOptions_1.validateOptions(cmd);
|
|
724
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
725
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
735
726
|
}
|
|
736
727
|
catch (error) {
|
|
737
728
|
logger_1.logger.error(error.message);
|
|
738
|
-
|
|
729
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
739
730
|
}
|
|
740
731
|
if (subCmd === constants_1.COMMANDS.GET_SYNDICATION_REPORT) {
|
|
741
732
|
const syndicatorFailedItems = new syndicatorFailedItem_1.SyndicatorFailedItem();
|
|
742
733
|
try {
|
|
743
|
-
const responseCode =
|
|
734
|
+
const responseCode = await syndicatorFailedItems.invoke(cmd);
|
|
744
735
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
745
736
|
logger_1.logger.debug('Syndication failed item execution completed');
|
|
746
|
-
|
|
737
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
747
738
|
}
|
|
748
739
|
catch (error) {
|
|
749
740
|
logger_1.logger.debug('Exception in Syndication failed item: %o', error);
|
|
750
|
-
|
|
741
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
751
742
|
}
|
|
752
743
|
}
|
|
753
744
|
else if (!subCmd && cmd._name === constants_1.COMMANDS.MANAGE_SYNDICATOR) {
|
|
754
745
|
const syndicator = new syndicator_1.Syndicator();
|
|
755
746
|
try {
|
|
756
|
-
const responseCode =
|
|
747
|
+
const responseCode = await syndicator.invoke(cmd);
|
|
757
748
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
758
749
|
logger_1.logger.debug('Manage syndicator execution completed');
|
|
759
|
-
|
|
750
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
760
751
|
}
|
|
761
752
|
catch (error) {
|
|
762
753
|
logger_1.logger.debug('Exception in manage syndicator: %o', error);
|
|
763
|
-
|
|
754
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
764
755
|
}
|
|
765
756
|
}
|
|
766
|
-
})
|
|
757
|
+
})
|
|
767
758
|
.helpOption(false);
|
|
768
759
|
program
|
|
769
760
|
.command(constants_1.COMMANDS.MANAGE_SUBSCRIBER)
|
|
770
|
-
.requiredOption('
|
|
771
|
-
.requiredOption('
|
|
772
|
-
.requiredOption('
|
|
773
|
-
.requiredOption('
|
|
774
|
-
.requiredOption('
|
|
775
|
-
.requiredOption('
|
|
776
|
-
.requiredOption('
|
|
777
|
-
.option('
|
|
761
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
762
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
763
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
764
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
765
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
766
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
767
|
+
.requiredOption('--UUID <value>', 'UUID of the subscriber instance', '')
|
|
768
|
+
.option('--enable <value>', 'Use true or false to enable or disable the subscriber')
|
|
778
769
|
.description('- Manages the subscriber in DX Server(Enable/Disable)')
|
|
779
|
-
.action((cmdOptions) =>
|
|
780
|
-
commands_1.configureCommand(constants_1.COMMANDS.MANAGE_SUBSCRIBER);
|
|
770
|
+
.action(async (cmdOptions) => {
|
|
771
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.MANAGE_SUBSCRIBER);
|
|
781
772
|
logger_1.logger.debug('Manage subscriber execution started');
|
|
782
773
|
try {
|
|
783
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
784
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
774
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
775
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
785
776
|
}
|
|
786
777
|
catch (error) {
|
|
787
778
|
logger_1.logger.error(error.message);
|
|
788
|
-
|
|
779
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
789
780
|
}
|
|
790
781
|
const subscriber = new subscriber_1.Subscriber();
|
|
791
782
|
try {
|
|
792
|
-
const responseCode =
|
|
783
|
+
const responseCode = await subscriber.invoke(cmdOptions);
|
|
793
784
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
794
785
|
logger_1.logger.debug('Manage subscriber execution completed');
|
|
795
|
-
|
|
786
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
796
787
|
}
|
|
797
788
|
catch (error) {
|
|
798
789
|
logger_1.logger.debug('Exception in manage subscriber: %o', error);
|
|
799
|
-
|
|
790
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
800
791
|
}
|
|
801
|
-
})
|
|
792
|
+
});
|
|
802
793
|
program
|
|
803
794
|
.command(constants_1.COMMANDS.RESTART_CORE_PODS)
|
|
804
|
-
.requiredOption('
|
|
805
|
-
.requiredOption('
|
|
806
|
-
.requiredOption('
|
|
807
|
-
.requiredOption('
|
|
795
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
796
|
+
.requiredOption('--hostname <value>', 'Host name of the DX server', config.hostname)
|
|
797
|
+
.requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', '')
|
|
798
|
+
.requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', '')
|
|
808
799
|
.description(`- Restarts the DX Core Pods in Kubernetes Deployment.
|
|
809
800
|
Note: Only the user set as wasAdmin in the Helm values is authorised to trigger this command.`)
|
|
810
|
-
.action((cmdOptions) =>
|
|
811
|
-
commands_1.configureCommand(constants_1.COMMANDS.RESTART_CORE_PODS);
|
|
801
|
+
.action(async (cmdOptions) => {
|
|
802
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_CORE_PODS);
|
|
812
803
|
logger_1.logger.debug('Sending DX Core Pods restart request.');
|
|
813
804
|
try {
|
|
814
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
805
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
815
806
|
}
|
|
816
807
|
catch (error) {
|
|
817
808
|
logger_1.logger.error(error.message);
|
|
818
|
-
|
|
809
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
819
810
|
}
|
|
820
811
|
try {
|
|
821
812
|
const restartDXCoreObject = new restartCorePods_1.RestartCorePods();
|
|
822
|
-
const responseCode =
|
|
813
|
+
const responseCode = await restartDXCoreObject.invoke(cmdOptions);
|
|
823
814
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
824
815
|
logger_1.logger.debug('Restart DX Core pods execution completed');
|
|
825
|
-
|
|
816
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
826
817
|
}
|
|
827
818
|
catch (error) {
|
|
828
819
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
829
|
-
|
|
820
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
830
821
|
}
|
|
831
|
-
})
|
|
822
|
+
});
|
|
832
823
|
program
|
|
833
824
|
.command(constants_1.COMMANDS.RESTART_DXCORE)
|
|
834
|
-
.requiredOption('
|
|
835
|
-
.requiredOption('
|
|
836
|
-
.requiredOption('
|
|
837
|
-
.requiredOption('
|
|
838
|
-
.option('
|
|
839
|
-
.requiredOption('
|
|
840
|
-
.requiredOption('
|
|
841
|
-
.requiredOption('
|
|
842
|
-
.option('
|
|
825
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
826
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
827
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
828
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
829
|
+
.option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
|
|
830
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
831
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
832
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
833
|
+
.option('--requestId <value>', 'Unique Id of a previously triggered restart request.')
|
|
843
834
|
.description('- Restarts the DX Core server. This command works for single DX Server instances.')
|
|
844
|
-
.action((cmdOptions) =>
|
|
845
|
-
commands_1.configureCommand(constants_1.COMMANDS.RESTART_DXCORE);
|
|
835
|
+
.action(async (cmdOptions) => {
|
|
836
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_DXCORE);
|
|
846
837
|
logger_1.logger.debug('Restart DX Core execution started');
|
|
847
838
|
try {
|
|
848
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
849
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
839
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
840
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
850
841
|
}
|
|
851
842
|
catch (error) {
|
|
852
843
|
logger_1.logger.error(error.message);
|
|
853
|
-
|
|
844
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
854
845
|
}
|
|
855
846
|
try {
|
|
856
847
|
const restartDXCoreObject = new restartDXCore_1.RestartDXCore();
|
|
857
|
-
const responseCode =
|
|
848
|
+
const responseCode = await restartDXCoreObject.invoke(cmdOptions);
|
|
858
849
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
859
850
|
logger_1.logger.debug('Restart DX Core execution completed');
|
|
860
|
-
|
|
851
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
861
852
|
}
|
|
862
853
|
catch (error) {
|
|
863
854
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
864
|
-
|
|
855
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
865
856
|
}
|
|
866
|
-
})
|
|
857
|
+
});
|
|
867
858
|
program
|
|
868
859
|
.command(`${constants_1.COMMANDS.SHARED_LIBRARY} [subCmd]`)
|
|
869
|
-
.requiredOption('
|
|
870
|
-
.requiredOption('
|
|
871
|
-
.requiredOption('
|
|
872
|
-
.requiredOption('
|
|
873
|
-
.requiredOption('
|
|
874
|
-
.requiredOption('
|
|
875
|
-
.requiredOption('
|
|
876
|
-
.option('
|
|
877
|
-
.option('
|
|
860
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
861
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
862
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
863
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
864
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
865
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
866
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
867
|
+
.option('--libFilePath <value>', 'File/Folder path of the shared library jar files')
|
|
868
|
+
.option('--libFileNames <value>', 'File names of the shared library jar files')
|
|
878
869
|
.option('-h, --help')
|
|
879
870
|
.description('- manages the shared library files in the remote server')
|
|
880
|
-
.action((subCmd, cmd) =>
|
|
881
|
-
if ((subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD || subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) && (
|
|
871
|
+
.action(async (subCmd, cmd) => {
|
|
872
|
+
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))) {
|
|
882
873
|
logger_1.logger.help(' Usage: dxclient shared-library [options] [subCmd](upload/delete)\n');
|
|
883
874
|
logger_1.logger.help(' - Uploads/Deletes files in default Shared Library location in DX Core (<dx-profile>/PortalServer/sharedLibrary/DXCLib)\n');
|
|
884
|
-
logger_1.logger.help(`
|
|
885
|
-
logger_1.logger.help(`
|
|
886
|
-
logger_1.logger.help(`
|
|
875
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
876
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
|
|
877
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
887
878
|
logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
|
|
888
|
-
logger_1.logger.help(`
|
|
889
|
-
logger_1.logger.help(`
|
|
890
|
-
logger_1.logger.help(`
|
|
879
|
+
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
880
|
+
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
881
|
+
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
891
882
|
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
|
|
892
|
-
logger_1.logger.help('
|
|
883
|
+
logger_1.logger.help(' --libFilePath <value> File/Folder path of the shared library files to be uploaded');
|
|
893
884
|
}
|
|
894
885
|
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
|
|
895
|
-
logger_1.logger.help('
|
|
886
|
+
logger_1.logger.help(' --libFileNames <value> File names of shared library files to be deleted');
|
|
896
887
|
}
|
|
897
888
|
logger_1.logger.help(' -h, --help display help for command');
|
|
898
889
|
process.exit(1);
|
|
@@ -904,256 +895,257 @@ program
|
|
|
904
895
|
}
|
|
905
896
|
else {
|
|
906
897
|
const command = subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD ? constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD : constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE;
|
|
907
|
-
commands_1.configureCommand(command);
|
|
898
|
+
(0, commands_1.configureCommand)(command);
|
|
908
899
|
logger_1.logger.debug('Manage shared library execution started');
|
|
909
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
910
|
-
validateOptions_1.validateOptions(cmd);
|
|
900
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
901
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
911
902
|
}
|
|
912
903
|
}
|
|
913
904
|
catch (error) {
|
|
914
905
|
logger_1.logger.error(error.message);
|
|
915
|
-
|
|
906
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
916
907
|
}
|
|
917
908
|
if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
|
|
918
909
|
const sharedLibraryUpload = new upload_1.SharedLibraryUpload();
|
|
919
910
|
try {
|
|
920
|
-
const responseCode =
|
|
911
|
+
const responseCode = await sharedLibraryUpload.invoke(cmd);
|
|
921
912
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
922
913
|
logger_1.logger.debug('Shared Library files upload execution completed');
|
|
923
|
-
|
|
914
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
924
915
|
}
|
|
925
916
|
catch (error) {
|
|
926
917
|
logger_1.logger.debug('Exception in Shared Library files upload: %o', error);
|
|
927
|
-
|
|
918
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
928
919
|
}
|
|
929
920
|
}
|
|
930
921
|
else if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
|
|
931
922
|
const sharedLibraryDelete = new delete_1.SharedLibraryDelete();
|
|
932
923
|
try {
|
|
933
|
-
const responseCode =
|
|
924
|
+
const responseCode = await sharedLibraryDelete.invoke(cmd);
|
|
934
925
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
935
926
|
logger_1.logger.debug('Shared Library files delete execution completed');
|
|
936
|
-
|
|
927
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
937
928
|
}
|
|
938
929
|
catch (error) {
|
|
939
930
|
logger_1.logger.debug('Exception in Shared Library files delete: %o', error);
|
|
940
|
-
|
|
931
|
+
logger_1.logger.error(error.message);
|
|
932
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
941
933
|
}
|
|
942
934
|
}
|
|
943
|
-
})
|
|
935
|
+
})
|
|
944
936
|
.helpOption(false);
|
|
945
937
|
program
|
|
946
938
|
.command(constants_1.COMMANDS.PZN_EXPORT)
|
|
947
|
-
.requiredOption('
|
|
948
|
-
.requiredOption('
|
|
949
|
-
.requiredOption('
|
|
950
|
-
.requiredOption('
|
|
951
|
-
.requiredOption('
|
|
952
|
-
.option('
|
|
953
|
-
.option('
|
|
939
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
940
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
941
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
942
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
943
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
944
|
+
.option('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
|
|
945
|
+
.option('--targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
|
|
954
946
|
+ 'The target path must exist before publishing (default targetPath is "/")')
|
|
955
|
-
.option('
|
|
947
|
+
.option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
|
|
956
948
|
.description('- Exports the personalization rules from the DX Core server')
|
|
957
|
-
.action((cmdOptions) =>
|
|
958
|
-
commands_1.configureCommand(constants_1.COMMANDS.PZN_EXPORT);
|
|
949
|
+
.action(async (cmdOptions) => {
|
|
950
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_EXPORT);
|
|
959
951
|
logger_1.logger.debug('Export of the PZN rule execution started');
|
|
960
952
|
try {
|
|
961
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
962
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
953
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
954
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
963
955
|
}
|
|
964
956
|
catch (error) {
|
|
965
957
|
logger_1.logger.error(error.message);
|
|
966
|
-
|
|
958
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
967
959
|
}
|
|
968
960
|
const pznRulesExportObj = new pznRulesExport_1.PznRulesExport();
|
|
969
961
|
try {
|
|
970
|
-
const responseCode =
|
|
962
|
+
const responseCode = await pznRulesExportObj.invoke(cmdOptions);
|
|
971
963
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
972
964
|
logger_1.logger.debug('Export pzn rules execution completed');
|
|
973
|
-
|
|
965
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
974
966
|
}
|
|
975
967
|
catch (error) {
|
|
976
968
|
logger_1.logger.debug('Exception in execution of export pzn rules : %o', error);
|
|
977
|
-
|
|
969
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
978
970
|
}
|
|
979
|
-
})
|
|
971
|
+
});
|
|
980
972
|
program
|
|
981
973
|
.command(constants_1.COMMANDS.PZN_IMPORT)
|
|
982
|
-
.option('
|
|
983
|
-
.option('
|
|
984
|
-
.option('
|
|
985
|
-
.requiredOption('
|
|
986
|
-
.requiredOption('
|
|
987
|
-
.requiredOption('
|
|
988
|
-
.requiredOption('
|
|
989
|
-
.requiredOption('
|
|
990
|
-
.requiredOption('
|
|
991
|
-
.option('
|
|
992
|
-
.option('
|
|
974
|
+
.option('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
975
|
+
.option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
976
|
+
.option('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
977
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
978
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
979
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
980
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
981
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
982
|
+
.requiredOption('--rulesFilePath <value>', 'Path to the file containing the rules to be imported')
|
|
983
|
+
.option('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
|
|
984
|
+
.option('--targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
|
|
993
985
|
+ 'The target path must exist before publishing (default targetPath is "/")')
|
|
994
|
-
.option('
|
|
986
|
+
.option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
|
|
995
987
|
.description('- Imports the personalization rules to the DX Core server')
|
|
996
|
-
.action((cmdOptions) =>
|
|
997
|
-
commands_1.configureCommand(constants_1.COMMANDS.PZN_IMPORT);
|
|
988
|
+
.action(async (cmdOptions) => {
|
|
989
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_IMPORT);
|
|
998
990
|
logger_1.logger.debug('Import of the PZN rule execution started');
|
|
999
991
|
try {
|
|
1000
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1001
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
992
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
993
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1002
994
|
}
|
|
1003
995
|
catch (error) {
|
|
1004
996
|
logger_1.logger.error(error.message);
|
|
1005
|
-
|
|
997
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1006
998
|
}
|
|
1007
999
|
const pznRulesImportObj = new pznRulesImport_1.PznRulesImport();
|
|
1008
1000
|
try {
|
|
1009
|
-
const responseCode =
|
|
1001
|
+
const responseCode = await pznRulesImportObj.invoke(cmdOptions);
|
|
1010
1002
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1011
1003
|
logger_1.logger.debug('Import pzn rules execution completed');
|
|
1012
|
-
|
|
1004
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1013
1005
|
}
|
|
1014
1006
|
catch (error) {
|
|
1015
1007
|
logger_1.logger.debug('Exception in execution of Import pzn rules : %o', error);
|
|
1016
|
-
|
|
1008
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1017
1009
|
}
|
|
1018
|
-
})
|
|
1010
|
+
});
|
|
1019
1011
|
program
|
|
1020
1012
|
.command(constants_1.COMMANDS.DELETE_DAM_SCHEMA)
|
|
1021
|
-
.requiredOption('
|
|
1022
|
-
.requiredOption('
|
|
1023
|
-
.requiredOption('
|
|
1024
|
-
.requiredOption('
|
|
1025
|
-
.requiredOption('
|
|
1026
|
-
.requiredOption('
|
|
1027
|
-
.requiredOption('
|
|
1028
|
-
.requiredOption('
|
|
1029
|
-
.option('
|
|
1013
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1014
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1015
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1016
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
|
|
1017
|
+
.requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
|
|
1018
|
+
.requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
|
|
1019
|
+
.requiredOption('--damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
|
|
1020
|
+
.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
|
+
.option('--schemaVersion <value>', 'DAM Schema Version')
|
|
1030
1022
|
.description('- Deletes inactive DAM schema from persistence in DX')
|
|
1031
|
-
.action((cmdOptions) =>
|
|
1032
|
-
commands_1.configureCommand(constants_1.COMMANDS.DELETE_DAM_SCHEMA);
|
|
1023
|
+
.action(async (cmdOptions) => {
|
|
1024
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.DELETE_DAM_SCHEMA);
|
|
1033
1025
|
logger_1.logger.debug('Delete DAM Schema started');
|
|
1034
1026
|
try {
|
|
1035
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1036
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1027
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1028
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1037
1029
|
}
|
|
1038
1030
|
catch (error) {
|
|
1039
1031
|
logger_1.logger.error(error.message);
|
|
1040
|
-
|
|
1032
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1041
1033
|
}
|
|
1042
1034
|
try {
|
|
1043
1035
|
const deleteSchema = new deleteSchema_1.DeleteSchema();
|
|
1044
|
-
const responseCode =
|
|
1036
|
+
const responseCode = await deleteSchema.invoke(cmdOptions);
|
|
1045
1037
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1046
1038
|
logger_1.logger.debug('Delete DAM Schema execution completed');
|
|
1047
|
-
|
|
1039
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1048
1040
|
}
|
|
1049
1041
|
catch (error) {
|
|
1050
1042
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
1051
|
-
|
|
1043
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1052
1044
|
}
|
|
1053
|
-
})
|
|
1045
|
+
});
|
|
1054
1046
|
program
|
|
1055
1047
|
.command(constants_1.COMMANDS.LIST_DAM_SCHEMA)
|
|
1056
|
-
.requiredOption('
|
|
1057
|
-
.requiredOption('
|
|
1058
|
-
.requiredOption('
|
|
1059
|
-
.requiredOption('
|
|
1060
|
-
.requiredOption('
|
|
1061
|
-
.requiredOption('
|
|
1062
|
-
.requiredOption('
|
|
1063
|
-
.requiredOption('
|
|
1048
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1049
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1050
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1051
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
|
|
1052
|
+
.requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
|
|
1053
|
+
.requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
|
|
1054
|
+
.requiredOption('--damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
|
|
1055
|
+
.requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
|
|
1064
1056
|
.description('- Lists all DAM schemas in DX.')
|
|
1065
|
-
.action((cmdOptions) =>
|
|
1066
|
-
commands_1.configureCommand(constants_1.COMMANDS.LIST_DAM_SCHEMA);
|
|
1057
|
+
.action(async (cmdOptions) => {
|
|
1058
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.LIST_DAM_SCHEMA);
|
|
1067
1059
|
logger_1.logger.debug('List DAM Schema started');
|
|
1068
1060
|
try {
|
|
1069
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1070
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1061
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1062
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1071
1063
|
}
|
|
1072
1064
|
catch (error) {
|
|
1073
1065
|
logger_1.logger.error(error.message);
|
|
1074
|
-
|
|
1066
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1075
1067
|
}
|
|
1076
1068
|
try {
|
|
1077
1069
|
const listSchema = new listSchema_1.ListSchema();
|
|
1078
|
-
const responseCode =
|
|
1070
|
+
const responseCode = await listSchema.invoke(cmdOptions);
|
|
1079
1071
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1080
1072
|
logger_1.logger.debug('List DAM Schema execution completed');
|
|
1081
|
-
|
|
1073
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1082
1074
|
}
|
|
1083
1075
|
catch (error) {
|
|
1084
1076
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
1085
|
-
|
|
1077
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1086
1078
|
}
|
|
1087
|
-
})
|
|
1079
|
+
});
|
|
1088
1080
|
program
|
|
1089
1081
|
.command(`${constants_1.COMMANDS.MANAGE_VIRTUAL_PORTAL} [subCmd]`)
|
|
1090
|
-
.requiredOption('
|
|
1091
|
-
.requiredOption('
|
|
1092
|
-
.option('
|
|
1093
|
-
.option('
|
|
1094
|
-
.option('
|
|
1095
|
-
.option('
|
|
1096
|
-
.option('
|
|
1097
|
-
.option('
|
|
1098
|
-
.option('
|
|
1099
|
-
.option('
|
|
1100
|
-
.option('
|
|
1101
|
-
.option('
|
|
1102
|
-
.option('
|
|
1103
|
-
.option('
|
|
1104
|
-
.requiredOption('
|
|
1105
|
-
.option('
|
|
1106
|
-
.option('
|
|
1107
|
-
.option('
|
|
1108
|
-
.option('
|
|
1082
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1083
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1084
|
+
.option('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort.toString())
|
|
1085
|
+
.option('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
1086
|
+
.option('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
1087
|
+
.option('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
1088
|
+
.option('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
|
|
1089
|
+
.option('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
|
|
1090
|
+
.option('--vpTitle <value>', 'Virtual portal Title')
|
|
1091
|
+
.option('--vpRealm <value>', 'Virtual portal Realm')
|
|
1092
|
+
.option('--vpAdminGroup <value>', 'Virtual portal AdminGroup')
|
|
1093
|
+
.option('--vpHostname <value>', 'Virtual portal Hostname')
|
|
1094
|
+
.option('--vpContext <value>', 'Virtual portal Context')
|
|
1095
|
+
.option('--dxProtocol <value>', 'protocol of the DX Core server', config.dxProtocol)
|
|
1096
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1097
|
+
.option('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1098
|
+
.option('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
1099
|
+
.option('--xmlFile <value>', 'XML file name with full path')
|
|
1100
|
+
.option('--requestId <value>', 'Unique Id of a previously triggered create virtual portal request')
|
|
1109
1101
|
.option('-h, --help')
|
|
1110
1102
|
.description('- Manages list,create,import or export of virtual portal in the DX Core server')
|
|
1111
|
-
.action((subCmd, cmd) =>
|
|
1103
|
+
.action(async (subCmd, cmd) => {
|
|
1112
1104
|
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
|
|
1113
|
-
|| subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (
|
|
1105
|
+
|| subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1114
1106
|
logger_1.logger.help('Usage: dxclient manage-virtual-portal [options] [subCmd](list/create/import/export)\n');
|
|
1115
1107
|
logger_1.logger.help('Lists,create,import or export a virtual portal in the DX Core server\n');
|
|
1116
|
-
logger_1.logger.help(`
|
|
1117
|
-
logger_1.logger.help(`
|
|
1118
|
-
logger_1.logger.help(`
|
|
1108
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1109
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
|
|
1110
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
1119
1111
|
if (subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS) {
|
|
1120
|
-
logger_1.logger.help(`
|
|
1112
|
+
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1121
1113
|
logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
|
|
1122
|
-
logger_1.logger.help(`
|
|
1123
|
-
logger_1.logger.help(`
|
|
1124
|
-
logger_1.logger.help(`
|
|
1125
|
-
logger_1.logger.help(`
|
|
1114
|
+
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
1115
|
+
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
1116
|
+
logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
|
|
1117
|
+
logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
|
|
1126
1118
|
}
|
|
1127
1119
|
if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
|
|
1128
|
-
logger_1.logger.help(`
|
|
1120
|
+
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1129
1121
|
logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
|
|
1130
|
-
logger_1.logger.help(`
|
|
1131
|
-
logger_1.logger.help(`
|
|
1132
|
-
logger_1.logger.help(`
|
|
1133
|
-
logger_1.logger.help(`
|
|
1134
|
-
logger_1.logger.help('
|
|
1135
|
-
logger_1.logger.help('
|
|
1136
|
-
logger_1.logger.help('
|
|
1137
|
-
logger_1.logger.help('
|
|
1138
|
-
logger_1.logger.help('
|
|
1139
|
-
logger_1.logger.help('
|
|
1122
|
+
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
1123
|
+
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
1124
|
+
logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
|
|
1125
|
+
logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
|
|
1126
|
+
logger_1.logger.help(' --vpTitle <value> Virtual portal Title');
|
|
1127
|
+
logger_1.logger.help(' --vpRealm <value> Virtual portal Realm');
|
|
1128
|
+
logger_1.logger.help(' --vpAdminGroup <value> Virtual portal AdminGroup');
|
|
1129
|
+
logger_1.logger.help(' --vpHostname <value> Virtual portal Hostname');
|
|
1130
|
+
logger_1.logger.help(' --vpContext <value> Virtual portal Context');
|
|
1131
|
+
logger_1.logger.help(' --requestId <value> Unique Id of a previously triggered create virtual portal request');
|
|
1140
1132
|
}
|
|
1141
1133
|
if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
|
|
1142
|
-
logger_1.logger.help(`
|
|
1143
|
-
logger_1.logger.help(`
|
|
1134
|
+
logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1135
|
+
logger_1.logger.help(` --dxPort <value> Port number for DX Core server, for any Kubernetes Environment \
|
|
1144
1136
|
default port is 443 (default: "${config.dxPort.toString()}")`);
|
|
1145
|
-
logger_1.logger.help(`
|
|
1146
|
-
logger_1.logger.help('
|
|
1147
|
-
logger_1.logger.help('
|
|
1137
|
+
logger_1.logger.help(` --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
|
|
1138
|
+
logger_1.logger.help(' --vpContext <value> Virtual portal Context');
|
|
1139
|
+
logger_1.logger.help(' --xmlFile <value> XML file name with full path');
|
|
1148
1140
|
}
|
|
1149
1141
|
if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
|
|
1150
|
-
logger_1.logger.help(`
|
|
1151
|
-
logger_1.logger.help(`
|
|
1142
|
+
logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1143
|
+
logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default port is 443,
|
|
1152
1144
|
(default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
|
|
1153
|
-
logger_1.logger.help(`
|
|
1154
|
-
logger_1.logger.help('
|
|
1155
|
-
logger_1.logger.help('
|
|
1156
|
-
logger_1.logger.help('
|
|
1145
|
+
logger_1.logger.help(` --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
|
|
1146
|
+
logger_1.logger.help(' --vpContext <value> Path to virtual portal context');
|
|
1147
|
+
logger_1.logger.help(' --vpTitle <value> Virtual portal name');
|
|
1148
|
+
logger_1.logger.help(' --xmlFile <value> XML file name with full path');
|
|
1157
1149
|
}
|
|
1158
1150
|
logger_1.logger.help(' -h, --help display help for command');
|
|
1159
1151
|
process.exit(1);
|
|
@@ -1167,119 +1159,119 @@ program
|
|
|
1167
1159
|
process.exit(1);
|
|
1168
1160
|
}
|
|
1169
1161
|
try {
|
|
1170
|
-
commands_1.configureCommand(subCmd);
|
|
1162
|
+
(0, commands_1.configureCommand)(subCmd);
|
|
1171
1163
|
logger_1.logger.debug('Manage virtual portal execution started');
|
|
1172
|
-
cmd = utils_1.unmaskPasswords(cmd);
|
|
1173
|
-
validateOptions_1.validateOptions(cmd);
|
|
1164
|
+
cmd = (0, utils_1.unmaskPasswords)(cmd);
|
|
1165
|
+
(0, validateOptions_1.validateOptions)(cmd);
|
|
1174
1166
|
}
|
|
1175
1167
|
catch (error) {
|
|
1176
1168
|
logger_1.logger.error(error.message);
|
|
1177
|
-
|
|
1169
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1178
1170
|
}
|
|
1179
1171
|
if (subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS) {
|
|
1180
1172
|
const listVirtualPortals = new listVirtualPortals_1.ListVirtualPortals();
|
|
1181
1173
|
try {
|
|
1182
|
-
const responseCode =
|
|
1174
|
+
const responseCode = await listVirtualPortals.invoke(cmd);
|
|
1183
1175
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1184
1176
|
logger_1.logger.debug('List virtual portal execution successful');
|
|
1185
|
-
|
|
1177
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1186
1178
|
}
|
|
1187
1179
|
catch (error) {
|
|
1188
1180
|
logger_1.logger.debug('Exception in execution of list virtual portal : %o', error);
|
|
1189
|
-
|
|
1181
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1190
1182
|
}
|
|
1191
1183
|
}
|
|
1192
1184
|
else if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
|
|
1193
1185
|
const createVirtualPortal = new createVirtualPortal_1.CreateVirtualPortal();
|
|
1194
1186
|
try {
|
|
1195
|
-
const responseCode =
|
|
1187
|
+
const responseCode = await createVirtualPortal.invoke(cmd);
|
|
1196
1188
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1197
1189
|
logger_1.logger.debug('create virtual portal execution successful');
|
|
1198
|
-
|
|
1190
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1199
1191
|
}
|
|
1200
1192
|
catch (error) {
|
|
1201
1193
|
logger_1.logger.debug('Exception in execution of import virtual portal : %o', error);
|
|
1202
|
-
|
|
1194
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1203
1195
|
}
|
|
1204
1196
|
}
|
|
1205
1197
|
else if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
|
|
1206
1198
|
const importVirtualPortal = new importVirtualPortal_1.ImportVirtualPortal();
|
|
1207
1199
|
try {
|
|
1208
|
-
const responseCode =
|
|
1200
|
+
const responseCode = await importVirtualPortal.invoke(cmd);
|
|
1209
1201
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1210
1202
|
logger_1.logger.debug('Import virtual portal execution successful');
|
|
1211
|
-
|
|
1203
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1212
1204
|
}
|
|
1213
1205
|
catch (error) {
|
|
1214
1206
|
logger_1.logger.debug('Exception in execution of import virtual portal : %o', error);
|
|
1215
|
-
|
|
1207
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1216
1208
|
}
|
|
1217
1209
|
}
|
|
1218
1210
|
else if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
|
|
1219
1211
|
const exportVirtualPortal = new exportVirtualPortal_1.ExportVirtualPortal();
|
|
1220
1212
|
try {
|
|
1221
|
-
const responseCode =
|
|
1213
|
+
const responseCode = await exportVirtualPortal.invoke(cmd);
|
|
1222
1214
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1223
1215
|
logger_1.logger.debug('List virtual portal execution successful');
|
|
1224
|
-
|
|
1216
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1225
1217
|
}
|
|
1226
1218
|
catch (error) {
|
|
1227
1219
|
logger_1.logger.debug('Exception in execution of list virtual portal : %o', error);
|
|
1228
|
-
|
|
1220
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1229
1221
|
}
|
|
1230
1222
|
}
|
|
1231
|
-
})
|
|
1223
|
+
})
|
|
1232
1224
|
.helpOption(false);
|
|
1233
1225
|
program
|
|
1234
1226
|
.command(`${constants_1.COMMANDS.RESOURCE_ENVIRONMENT_PROVIDER} [subCmd]`)
|
|
1235
|
-
.requiredOption('
|
|
1236
|
-
.requiredOption('
|
|
1237
|
-
.requiredOption('
|
|
1238
|
-
.requiredOption('
|
|
1239
|
-
.requiredOption('
|
|
1240
|
-
.requiredOption('
|
|
1241
|
-
.requiredOption('
|
|
1242
|
-
.requiredOption('
|
|
1243
|
-
.requiredOption('
|
|
1244
|
-
.requiredOption('
|
|
1245
|
-
.requiredOption('
|
|
1246
|
-
.option('
|
|
1247
|
-
.option('
|
|
1248
|
-
.option('
|
|
1249
|
-
.option('
|
|
1250
|
-
.option('
|
|
1227
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1228
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1229
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1230
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1231
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1232
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
1233
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
1234
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
1235
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
1236
|
+
.requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
|
|
1237
|
+
.requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
|
|
1238
|
+
.option('--providerName <value>', 'Name of the Resource Environment Provider ')
|
|
1239
|
+
.option('--propertyName <value>', 'Name of the Custom Property ')
|
|
1240
|
+
.option('--propertyValue <value>', 'Value of the Custom Property ')
|
|
1241
|
+
.option('--propertyDesc <value>', 'Description of the Custom Property ')
|
|
1242
|
+
.option('--filePath <value>', 'File path of the import Resource Environment Provider files')
|
|
1251
1243
|
.option('-h, --help')
|
|
1252
1244
|
.description('- Creates, Updates, Deletes,Import,Retrieves or Exports a custom property')
|
|
1253
|
-
.action((subCommand, commands) =>
|
|
1245
|
+
.action(async (subCommand, commands) => {
|
|
1254
1246
|
logger_1.logger.debug('Resource Environment provider process started.');
|
|
1255
1247
|
if ((subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY
|
|
1256
1248
|
|| subCommand === constants_1.SUB_COMMANDS.EXPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY)
|
|
1257
|
-
&& (
|
|
1249
|
+
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1258
1250
|
logger_1.logger.help('Usage: dxclient resource-env-provider [options] [subCmd](create-property/update-property/delete-property/export-properties/import-properties/retrieve-property)\n');
|
|
1259
1251
|
logger_1.logger.help('- Creates, Retrieves, Updates, Deletes, Import or Exports custom properties.\n');
|
|
1260
|
-
logger_1.logger.help(`
|
|
1261
|
-
logger_1.logger.help(`
|
|
1262
|
-
logger_1.logger.help(`
|
|
1263
|
-
logger_1.logger.help(`
|
|
1264
|
-
logger_1.logger.help(`
|
|
1265
|
-
logger_1.logger.help(`
|
|
1252
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1253
|
+
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1254
|
+
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
1255
|
+
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
1256
|
+
logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
|
|
1257
|
+
logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
|
|
1266
1258
|
logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
|
|
1267
1259
|
if (subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY) {
|
|
1268
|
-
logger_1.logger.help('
|
|
1269
|
-
logger_1.logger.help('
|
|
1270
|
-
logger_1.logger.help('
|
|
1271
|
-
logger_1.logger.help('
|
|
1260
|
+
logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
|
|
1261
|
+
logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
|
|
1262
|
+
logger_1.logger.help(' --propertyValue <value> Value of the Custom Property');
|
|
1263
|
+
logger_1.logger.help(' --propertyDesc <value> Description of the Custom Property');
|
|
1272
1264
|
}
|
|
1273
1265
|
if (subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY) {
|
|
1274
|
-
logger_1.logger.help('
|
|
1275
|
-
logger_1.logger.help('
|
|
1266
|
+
logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
|
|
1267
|
+
logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
|
|
1276
1268
|
}
|
|
1277
1269
|
if (subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES) {
|
|
1278
|
-
logger_1.logger.help('
|
|
1270
|
+
logger_1.logger.help(' --filePath <value> File path of the import Resource Environment Provider files');
|
|
1279
1271
|
}
|
|
1280
1272
|
if (subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY) {
|
|
1281
|
-
logger_1.logger.help('
|
|
1282
|
-
logger_1.logger.help('
|
|
1273
|
+
logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
|
|
1274
|
+
logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
|
|
1283
1275
|
}
|
|
1284
1276
|
logger_1.logger.help(' -h, --help display help for command');
|
|
1285
1277
|
process.exit(1);
|
|
@@ -1296,109 +1288,109 @@ program
|
|
|
1296
1288
|
}
|
|
1297
1289
|
else {
|
|
1298
1290
|
try {
|
|
1299
|
-
commands_1.configureCommand(subCommand);
|
|
1300
|
-
commands = utils_1.unmaskPasswords(commands);
|
|
1301
|
-
validateOptions_1.validateOptions(commands);
|
|
1291
|
+
(0, commands_1.configureCommand)(subCommand);
|
|
1292
|
+
commands = (0, utils_1.unmaskPasswords)(commands);
|
|
1293
|
+
(0, validateOptions_1.validateOptions)(commands);
|
|
1302
1294
|
}
|
|
1303
1295
|
catch (error) {
|
|
1304
1296
|
logger_1.logger.error(error.message);
|
|
1305
|
-
|
|
1297
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1306
1298
|
}
|
|
1307
1299
|
}
|
|
1308
1300
|
const repActions = new resEnvProviderActions_1.ResourceEnvironmentProviderActions();
|
|
1309
1301
|
try {
|
|
1310
|
-
const responseCode =
|
|
1311
|
-
|
|
1302
|
+
const responseCode = await repActions.invoke(subCommand, commands);
|
|
1303
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1312
1304
|
}
|
|
1313
1305
|
catch (error) {
|
|
1314
1306
|
logger_1.logger.debug('Exception in execution of Resource Environment Provider Process : %o', error);
|
|
1315
|
-
|
|
1307
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1316
1308
|
}
|
|
1317
|
-
})
|
|
1309
|
+
})
|
|
1318
1310
|
.helpOption(false);
|
|
1319
1311
|
program
|
|
1320
1312
|
.command(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION)
|
|
1321
|
-
.requiredOption('
|
|
1322
|
-
.requiredOption('
|
|
1323
|
-
.requiredOption('
|
|
1324
|
-
.requiredOption('
|
|
1325
|
-
.requiredOption('
|
|
1326
|
-
.requiredOption('
|
|
1327
|
-
.requiredOption('
|
|
1328
|
-
.requiredOption('
|
|
1329
|
-
.requiredOption('
|
|
1330
|
-
.requiredOption('
|
|
1331
|
-
.requiredOption('
|
|
1332
|
-
.option('
|
|
1333
|
-
.option('
|
|
1334
|
-
.option('
|
|
1335
|
-
.option('
|
|
1336
|
-
.option('
|
|
1337
|
-
.option('
|
|
1338
|
-
.option('
|
|
1339
|
-
.option('
|
|
1313
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1314
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1315
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1316
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1317
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1318
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
|
|
1319
|
+
.requiredOption('--syndicatorUrl <value>', 'Syndicator URL e.g http(s)://host:port/wps/wcm')
|
|
1320
|
+
.requiredOption('--syndicatorName <value>', 'New syndicator name: syndicatorName')
|
|
1321
|
+
.requiredOption('--subscriberName <value>', 'New subscriber name: subscriberName')
|
|
1322
|
+
.requiredOption('--vaultSlotName <value>', 'Credential Vault Name: vaultSlotName')
|
|
1323
|
+
.requiredOption('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
|
|
1324
|
+
.option('--isEnabled <value>', 'Whether the syndicator/subscriber pair is enabled on creation: isEnabled (default is true)', true)
|
|
1325
|
+
.option('--updateAfterCreation <value>', 'Whether the syndicator/subscriber pair is updateAfterCreation : updateAfterCreation (default is true)', true)
|
|
1326
|
+
.option('--syndicationType <value>', 'The libraries to syndicate eg. all-items,liveItems,liveProjectsItem,all-items,published-items and all-items-and-versions')
|
|
1327
|
+
.option('--webContentLibraries <value>', ' Libraries Name: webContentLibraries')
|
|
1328
|
+
.option('--subscriberURL <value>', 'Subscriber URL e.g http(s)://host:port/wps/wcm')
|
|
1329
|
+
.option('--mode <value>', 'Syndicator/subscriber mode')
|
|
1330
|
+
.option('--syndicatorVaultSlotName <value>', 'Credential Vault Name: syndicatorVaultSlotName')
|
|
1331
|
+
.option('--virtualPortalContext <value>', 'Virtual portal Context', config.virtualPortalContext)
|
|
1340
1332
|
.description('- Creates a syndication relation between syndicator and subscriber in the DX server.')
|
|
1341
|
-
.action((cmdOptions) =>
|
|
1342
|
-
commands_1.configureCommand(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION);
|
|
1333
|
+
.action(async (cmdOptions) => {
|
|
1334
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION);
|
|
1343
1335
|
logger_1.logger.debug('Create syndication relation execution started');
|
|
1344
1336
|
try {
|
|
1345
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1346
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1337
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1338
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1347
1339
|
}
|
|
1348
1340
|
catch (error) {
|
|
1349
1341
|
logger_1.logger.error(error.message);
|
|
1350
|
-
|
|
1342
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1351
1343
|
}
|
|
1352
1344
|
try {
|
|
1353
1345
|
const createSyndication = new createSyndicationRelation_1.CreateSyndicationRelation();
|
|
1354
|
-
const responseCode =
|
|
1346
|
+
const responseCode = await createSyndication.invoke(cmdOptions);
|
|
1355
1347
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1356
1348
|
logger_1.logger.debug('Create syndication relation execution completed');
|
|
1357
|
-
|
|
1349
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1358
1350
|
}
|
|
1359
1351
|
catch (error) {
|
|
1360
1352
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
1361
|
-
|
|
1353
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1362
1354
|
}
|
|
1363
|
-
})
|
|
1355
|
+
});
|
|
1364
1356
|
program
|
|
1365
1357
|
.command(`${constants_1.COMMANDS.MANAGE_DAM_STAGING} [subCommand]`)
|
|
1366
|
-
.requiredOption('
|
|
1367
|
-
.requiredOption('
|
|
1368
|
-
.requiredOption('
|
|
1369
|
-
.requiredOption('
|
|
1370
|
-
.requiredOption('
|
|
1371
|
-
.option('
|
|
1372
|
-
.option('
|
|
1373
|
-
.requiredOption('
|
|
1374
|
-
.requiredOption('
|
|
1375
|
-
.requiredOption('
|
|
1376
|
-
.requiredOption('
|
|
1377
|
-
.option('
|
|
1378
|
-
.option('
|
|
1379
|
-
.option('
|
|
1380
|
-
.option('
|
|
1381
|
-
.option('
|
|
1382
|
-
.option('
|
|
1383
|
-
.option('
|
|
1384
|
-
.option('
|
|
1385
|
-
.option('
|
|
1386
|
-
.option('
|
|
1387
|
-
.option('
|
|
1388
|
-
.option('
|
|
1358
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server of the publisher', config.dxProtocol)
|
|
1359
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server of the publisher', config.hostname)
|
|
1360
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server of the publisher', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1361
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server of the publisher', config.dxUsername)
|
|
1362
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server of the publisher', MaskData.maskPassword(config.dxPassword))
|
|
1363
|
+
.option('--targetServerUsername <value>', 'Username of the DX Core server of the subscriber')
|
|
1364
|
+
.option('--targetServerPassword <value>', 'Password of the DX Core server of the subscriber')
|
|
1365
|
+
.requiredOption('--damAPIPort <value>', 'Port number of the DAM API server of the publisher', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
|
|
1366
|
+
.requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server of the publisher', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
|
|
1367
|
+
.requiredOption('--damAPIVersion <value>', 'API Version number of DAM of the publisher', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
|
|
1368
|
+
.requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core of the publisher', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
|
|
1369
|
+
.option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
|
|
1370
|
+
.option('--subscriberId <value>', 'Subscriber id of the target environment of the subscriber')
|
|
1371
|
+
.option('--targetHostname <value>', 'Host name of the target environment of the subscriber', config.targetHostname)
|
|
1372
|
+
.option('--interval <value>', 'Interval between two sync cycles. The unit of interval is minute. Default value of interval is 2 minutes.')
|
|
1373
|
+
.option('--recordType <value>', 'Type of the mismatch record')
|
|
1374
|
+
.option('--recordAction <value>', 'Action of the mismatch record')
|
|
1375
|
+
.option('--reportPath <value>', 'Location of the file path to download report')
|
|
1376
|
+
.option('--forceDownload <value>', 'Force download the report', 'false')
|
|
1377
|
+
.option('--dxWASUsername <value>', 'Username of the DX WAS server of the publisher', '')
|
|
1378
|
+
.option('--dxWASPassword <value>', 'Password of the DX WAS server of the publisher', '')
|
|
1379
|
+
.option('--targetServerWASUsername <value>', 'Username of the DX WAS server of the subscriber', '')
|
|
1380
|
+
.option('--targetServerWASPassword <value>', 'Password of the DX WAS server of the subscriber', '')
|
|
1389
1381
|
.option('-h, --help')
|
|
1390
1382
|
.description(`- Registration/Deregistration of the subscriber, trigger the dam staging, get all the subscriber details,
|
|
1391
1383
|
get staging mismatch report, find the dam staging mismatch, start staging resync or delete staging mismatch logs`)
|
|
1392
|
-
.action((subCommand, commands) =>
|
|
1384
|
+
.action(async (subCommand, commands) => {
|
|
1393
1385
|
if ((subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER
|
|
1394
1386
|
|| subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER
|
|
1395
1387
|
|| subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING
|
|
1396
1388
|
|| subCommand === constants_1.SUB_COMMANDS.DAM_GET_ALL_SUBSCRIBERS
|
|
1397
1389
|
|| subCommand === constants_1.SUB_COMMANDS.UPDATE_SECRETS
|
|
1398
|
-
|| (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT))
|
|
1390
|
+
|| (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT))
|
|
1399
1391
|
|| subCommand === constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH
|
|
1400
1392
|
|| subCommand === constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC
|
|
1401
|
-
|| subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) && (
|
|
1393
|
+
|| subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1402
1394
|
logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]\n');
|
|
1403
1395
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
|
|
1404
1396
|
logger_1.logger.help(' Registration of the subscriber\n');
|
|
@@ -1427,29 +1419,29 @@ program
|
|
|
1427
1419
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) {
|
|
1428
1420
|
logger_1.logger.help(' Delete dam staging mismatch logs\n');
|
|
1429
1421
|
}
|
|
1430
|
-
logger_1.logger.help(`
|
|
1431
|
-
logger_1.logger.help(`
|
|
1432
|
-
logger_1.logger.help(`
|
|
1422
|
+
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server of the publisher (default: "${config.dxProtocol}")`);
|
|
1423
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server of the publisher (default: "${config.hostname}")`);
|
|
1424
|
+
logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, \
|
|
1433
1425
|
for any Kubernetes Environment default port is 443 (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
|
|
1434
|
-
logger_1.logger.help(`
|
|
1435
|
-
logger_1.logger.help(`
|
|
1436
|
-
logger_1.logger.help(`
|
|
1426
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server of the publisher (default: "${config.dxUsername}")`);
|
|
1427
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server of the publisher (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
1428
|
+
logger_1.logger.help(` --damAPIPort <value> Port number of the DAM API server of the publisher (default: "${config.damAPIPort
|
|
1437
1429
|
? config.damAPIPort.toString() : config.damAPIPort}")`);
|
|
1438
|
-
logger_1.logger.help(`
|
|
1430
|
+
logger_1.logger.help(` --ringAPIPort <value> Port number of the DX Core API server of the publisher (default: "${config.ringAPIPort
|
|
1439
1431
|
? config.ringAPIPort.toString() : config.ringAPIPort}")`);
|
|
1440
|
-
logger_1.logger.help(`
|
|
1432
|
+
logger_1.logger.help(` --damAPIVersion <value> API Version number of DAM API server of the publisher \
|
|
1441
1433
|
(default: "${config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion}")`);
|
|
1442
|
-
logger_1.logger.help(`
|
|
1434
|
+
logger_1.logger.help(` --ringAPIVersion <value> API Version number of DX Core API server of the publisher \
|
|
1443
1435
|
(default: "${config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion}")`);
|
|
1444
1436
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
|
|
1445
|
-
logger_1.logger.help(`
|
|
1437
|
+
logger_1.logger.help(` --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
|
|
1446
1438
|
logger_1.logger.help(' -interval,--interval <value> Interval between two sync cycles.The unit of interval is in minutes.Default value of interval is 2 minutes.');
|
|
1447
1439
|
}
|
|
1448
1440
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER) {
|
|
1449
1441
|
logger_1.logger.help(' -subscriberId, --subscriberId <value> Subscriber id of the target environment of the subscriber');
|
|
1450
1442
|
}
|
|
1451
1443
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING) {
|
|
1452
|
-
logger_1.logger.help(`
|
|
1444
|
+
logger_1.logger.help(` --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
|
|
1453
1445
|
}
|
|
1454
1446
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT) {
|
|
1455
1447
|
logger_1.logger.help(` -ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value> LTPA Token Refresh time in minutes (default: ${constants_2.LTPA_TOKEN_REFRESH_TIME})`);
|
|
@@ -1492,208 +1484,208 @@ for any Kubernetes Environment default port is 443 (default: "${config.dxPort ?
|
|
|
1492
1484
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH} -h" for more details`);
|
|
1493
1485
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC} -h" for more details`);
|
|
1494
1486
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH} -h" for more details`);
|
|
1495
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
|
|
1487
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
|
|
1496
1488
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT} -h" for more details`);
|
|
1497
1489
|
}
|
|
1498
1490
|
}
|
|
1499
1491
|
else {
|
|
1500
1492
|
logger_1.logger.debug('Manage DAM staging started');
|
|
1501
1493
|
try {
|
|
1502
|
-
commands_1.configureCommand(subCommand);
|
|
1503
|
-
commands = utils_1.unmaskPasswords(commands);
|
|
1504
|
-
validateOptions_1.validateOptions(commands);
|
|
1494
|
+
(0, commands_1.configureCommand)(subCommand);
|
|
1495
|
+
commands = (0, utils_1.unmaskPasswords)(commands);
|
|
1496
|
+
(0, validateOptions_1.validateOptions)(commands);
|
|
1505
1497
|
}
|
|
1506
1498
|
catch (error) {
|
|
1507
1499
|
logger_1.logger.error(error.message);
|
|
1508
|
-
|
|
1500
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1509
1501
|
}
|
|
1510
1502
|
}
|
|
1511
1503
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER) {
|
|
1512
1504
|
try {
|
|
1513
1505
|
logger_1.logger.debug('DAM subscriber de registration started');
|
|
1514
1506
|
const subscriberUnRegistration = new subscriberDeRegistration_1.SubscriberDeRegistration();
|
|
1515
|
-
const responseCode =
|
|
1507
|
+
const responseCode = await subscriberUnRegistration.invoke(commands);
|
|
1516
1508
|
logger_1.logger.debug('Subscriber deregister completed');
|
|
1517
|
-
|
|
1509
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1518
1510
|
}
|
|
1519
1511
|
catch (error) {
|
|
1520
1512
|
logger_1.logger.error('Exception in execution deregister: %o', error);
|
|
1521
|
-
|
|
1513
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1522
1514
|
}
|
|
1523
1515
|
}
|
|
1524
1516
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING) {
|
|
1525
1517
|
try {
|
|
1526
1518
|
logger_1.logger.debug('DAM staging sync triggered');
|
|
1527
1519
|
const triggerManualStaging = new triggerDAMStaging_1.TriggerStaging();
|
|
1528
|
-
const responseCode =
|
|
1520
|
+
const responseCode = await triggerManualStaging.invoke(commands);
|
|
1529
1521
|
logger_1.logger.debug('DAM staging sync completed');
|
|
1530
|
-
|
|
1522
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1531
1523
|
}
|
|
1532
1524
|
catch (error) {
|
|
1533
1525
|
logger_1.logger.error('Exception in execution trigger staging: %o', error);
|
|
1534
|
-
|
|
1526
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1535
1527
|
}
|
|
1536
1528
|
}
|
|
1537
1529
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
|
|
1538
1530
|
try {
|
|
1539
1531
|
logger_1.logger.debug('DAM subscriber registration started');
|
|
1540
1532
|
const subscriberRegistration = new subscriberRegistration_1.SubscriberRegistration();
|
|
1541
|
-
commands = utils_1.getTrimmedArguments(commands);
|
|
1542
|
-
const responseCode =
|
|
1533
|
+
commands = (0, utils_1.getTrimmedArguments)(commands);
|
|
1534
|
+
const responseCode = await subscriberRegistration.invoke(commands);
|
|
1543
1535
|
logger_1.logger.debug('Subscriber Registration completed');
|
|
1544
|
-
|
|
1536
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1545
1537
|
}
|
|
1546
1538
|
catch (error) {
|
|
1547
1539
|
logger_1.logger.debug('Exception in execution subscriber registration: %o', error);
|
|
1548
|
-
|
|
1540
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1549
1541
|
}
|
|
1550
1542
|
}
|
|
1551
1543
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_ALL_SUBSCRIBERS) {
|
|
1552
1544
|
try {
|
|
1553
1545
|
logger_1.logger.debug('DAM get all subscribers execution started');
|
|
1554
1546
|
const subscriberDetails = new subscriberDetails_1.SubscriberDetails();
|
|
1555
|
-
const responseCode =
|
|
1547
|
+
const responseCode = await subscriberDetails.invoke(commands);
|
|
1556
1548
|
logger_1.logger.debug('DAM get all subscribers command execution completed');
|
|
1557
|
-
|
|
1549
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1558
1550
|
}
|
|
1559
1551
|
catch (error) {
|
|
1560
1552
|
logger_1.logger.debug('Exception in execution get all subscribers command: %o', error);
|
|
1561
|
-
|
|
1553
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1562
1554
|
}
|
|
1563
1555
|
}
|
|
1564
1556
|
else if (subCommand === constants_1.SUB_COMMANDS.UPDATE_SECRETS) {
|
|
1565
1557
|
try {
|
|
1566
1558
|
logger_1.logger.debug('DAM update secrets execution started');
|
|
1567
1559
|
const updateSecrets = new updateSecrets_1.UpdateSecrets();
|
|
1568
|
-
commands = utils_1.getTrimmedArguments(commands);
|
|
1569
|
-
const responseCode =
|
|
1560
|
+
commands = (0, utils_1.getTrimmedArguments)(commands);
|
|
1561
|
+
const responseCode = await updateSecrets.invoke(commands);
|
|
1570
1562
|
logger_1.logger.debug('DAM update secrets command execution completed');
|
|
1571
|
-
|
|
1563
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1572
1564
|
}
|
|
1573
1565
|
catch (error) {
|
|
1574
1566
|
logger_1.logger.debug('Exception in execution update secrets command: %o', error);
|
|
1575
|
-
|
|
1567
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1576
1568
|
}
|
|
1577
1569
|
}
|
|
1578
|
-
else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
|
|
1570
|
+
else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
|
|
1579
1571
|
try {
|
|
1580
1572
|
logger_1.logger.debug('DAM Get staging mismatch report started');
|
|
1581
1573
|
const stagingMismatchReport = new stagingMismatchReport_1.StagingMismatchReport();
|
|
1582
|
-
const responseCode =
|
|
1574
|
+
const responseCode = await stagingMismatchReport.invoke(commands);
|
|
1583
1575
|
logger_1.logger.debug('DAM Get staging mismatch report command execution completed');
|
|
1584
|
-
|
|
1576
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1585
1577
|
}
|
|
1586
1578
|
catch (error) {
|
|
1587
1579
|
logger_1.logger.debug('Exception in execution get staging mismatch report command: %o', error);
|
|
1588
|
-
|
|
1580
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1589
1581
|
}
|
|
1590
1582
|
}
|
|
1591
1583
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH) {
|
|
1592
1584
|
try {
|
|
1593
1585
|
logger_1.logger.debug('DAM find staging mismatch started');
|
|
1594
1586
|
const findStagingMismatch = new findDAMStagingMismatch_1.FindStagingMismatch();
|
|
1595
|
-
const responseCode =
|
|
1596
|
-
|
|
1587
|
+
const responseCode = await findStagingMismatch.invoke(commands);
|
|
1588
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1597
1589
|
}
|
|
1598
1590
|
catch (error) {
|
|
1599
1591
|
logger_1.logger.error('Exception in execution find staging mismatch log: %o', error);
|
|
1600
|
-
|
|
1592
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1601
1593
|
}
|
|
1602
1594
|
}
|
|
1603
1595
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC) {
|
|
1604
1596
|
try {
|
|
1605
1597
|
logger_1.logger.debug('DAM staging resync started');
|
|
1606
1598
|
const startStagingResync = new stagingResync_1.StagingResync();
|
|
1607
|
-
const responseCode =
|
|
1599
|
+
const responseCode = await startStagingResync.invoke(commands);
|
|
1608
1600
|
logger_1.logger.debug('DAM staging resync completed');
|
|
1609
|
-
|
|
1601
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1610
1602
|
}
|
|
1611
1603
|
catch (error) {
|
|
1612
1604
|
logger_1.logger.error('Exception in execution staging resync: %o', error);
|
|
1613
|
-
|
|
1605
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1614
1606
|
}
|
|
1615
1607
|
}
|
|
1616
1608
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) {
|
|
1617
1609
|
try {
|
|
1618
1610
|
logger_1.logger.debug('DAM delete staging mismatch started');
|
|
1619
1611
|
const DeleteStagingMismatches = new deleteDAMStagingMismatch_1.DeleteStagingMismatch();
|
|
1620
|
-
const responseCode =
|
|
1612
|
+
const responseCode = await DeleteStagingMismatches.invoke(commands);
|
|
1621
1613
|
logger_1.logger.debug('DAM delete staging mismatch completed');
|
|
1622
|
-
|
|
1614
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1623
1615
|
}
|
|
1624
1616
|
catch (error) {
|
|
1625
1617
|
logger_1.logger.error('Exception in execution delete staging mismatch: %o', error);
|
|
1626
|
-
|
|
1618
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1627
1619
|
}
|
|
1628
1620
|
}
|
|
1629
|
-
})
|
|
1621
|
+
});
|
|
1630
1622
|
program
|
|
1631
1623
|
.command(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT)
|
|
1632
|
-
.requiredOption('
|
|
1633
|
-
.requiredOption('
|
|
1634
|
-
.requiredOption('
|
|
1635
|
-
.requiredOption('
|
|
1636
|
-
.requiredOption('
|
|
1637
|
-
.requiredOption('
|
|
1638
|
-
.requiredOption('
|
|
1639
|
-
.requiredOption('
|
|
1640
|
-
.requiredOption('
|
|
1641
|
-
.option('
|
|
1642
|
-
.option('
|
|
1643
|
-
.option('
|
|
1624
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1625
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1626
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1627
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1628
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1629
|
+
.requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
|
|
1630
|
+
.requiredOption('--vaultUsername <value>', 'The name of the shared vaultUsername', config.vaultUsername)
|
|
1631
|
+
.requiredOption('--vaultPassword <value>', 'The password for the shared userid', MaskData.maskPassword(config.vaultPassword))
|
|
1632
|
+
.requiredOption('--credentialSlotName <value>', 'The name of a credential vault slot')
|
|
1633
|
+
.option('--vaultUserGroup <value>', 'Credential vault portal UserGroup')
|
|
1634
|
+
.option('--vaultSegmentName <value>', 'The name of a new vault segment ')
|
|
1635
|
+
.option('--vaultDescription <value>', 'Description for the credential segment ')
|
|
1644
1636
|
.description('- Creates credential vault in DX Core server before registering a subscriber')
|
|
1645
|
-
.action((cmdOptions) =>
|
|
1646
|
-
commands_1.configureCommand(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT);
|
|
1637
|
+
.action(async (cmdOptions) => {
|
|
1638
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT);
|
|
1647
1639
|
logger_1.logger.debug('Creates credential vault slot in the DX Core server before registering a subscriber');
|
|
1648
1640
|
try {
|
|
1649
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1650
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1641
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1642
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1651
1643
|
}
|
|
1652
1644
|
catch (error) {
|
|
1653
1645
|
logger_1.logger.error(error.message);
|
|
1654
|
-
|
|
1646
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1655
1647
|
}
|
|
1656
1648
|
try {
|
|
1657
1649
|
logger_1.logger.debug('Create credential vault execution started');
|
|
1658
1650
|
const createCredentialVault = new createCredentialVault_1.CreateCredentialVault();
|
|
1659
|
-
const responseCode =
|
|
1651
|
+
const responseCode = await createCredentialVault.invoke(cmdOptions);
|
|
1660
1652
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1661
1653
|
logger_1.logger.debug('Create credential vault execution completed');
|
|
1662
|
-
|
|
1654
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1663
1655
|
}
|
|
1664
1656
|
catch (error) {
|
|
1665
1657
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
1666
|
-
|
|
1658
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1667
1659
|
}
|
|
1668
|
-
})
|
|
1660
|
+
});
|
|
1669
1661
|
program
|
|
1670
1662
|
.command(`${constants_1.COMMANDS.DIFFERENTIAL_REPORT} [subCmd]`)
|
|
1671
|
-
.option('
|
|
1672
|
-
.requiredOption('
|
|
1673
|
-
.requiredOption('
|
|
1674
|
-
.requiredOption('
|
|
1675
|
-
.requiredOption('
|
|
1676
|
-
.option('
|
|
1677
|
-
.option('
|
|
1678
|
-
.option('
|
|
1679
|
-
.option('
|
|
1680
|
-
.option('
|
|
1663
|
+
.option('--hostname <value>', 'Host name of the DX core server', config.hostname)
|
|
1664
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
1665
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
1666
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
1667
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
1668
|
+
.option('--targetHostname <value>', 'Host name of the target DX core server', config.targetHostname)
|
|
1669
|
+
.option('--targetDxConnectPort <value>', 'Port number of the target server', config.targetDxConnectPort ? config.targetDxConnectPort.toString() : config.targetDxConnectPort)
|
|
1670
|
+
.option('--targetDxConnectUsername <value>', 'Username for the target server', config.targetDxConnectUsername)
|
|
1671
|
+
.option('--targetDxConnectPassword <value>', 'Password for the target server', MaskData.maskPassword(config.targetDxConnectPassword))
|
|
1672
|
+
.option('--targetDxProfileName <value>', 'Profile name of the target DX core server ', config.targetDxProfileName)
|
|
1681
1673
|
.option('-h, --help')
|
|
1682
1674
|
.description('- generates dx-core-configuration-reports')
|
|
1683
|
-
.action((subCmd, cmdOptions) =>
|
|
1684
|
-
if ((subCmd === constants_1.SUB_COMMANDS.SUMMARY_REPORT || constants_1.SUB_COMMANDS.RESOURCE_REPORT) && (
|
|
1675
|
+
.action(async (subCmd, cmdOptions) => {
|
|
1676
|
+
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))) {
|
|
1685
1677
|
logger_1.logger.help(' Usage: dxclient dx-core-configuration-reports [options] [subCmd]\n');
|
|
1686
1678
|
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');
|
|
1687
|
-
logger_1.logger.help(`
|
|
1688
|
-
logger_1.logger.help(`
|
|
1689
|
-
logger_1.logger.help(`
|
|
1690
|
-
logger_1.logger.help(`
|
|
1679
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX core server(default: "${config.hostname}")`);
|
|
1680
|
+
logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
|
|
1681
|
+
logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
|
|
1682
|
+
logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
|
|
1691
1683
|
logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
|
|
1692
|
-
logger_1.logger.help(`
|
|
1693
|
-
logger_1.logger.help(`
|
|
1694
|
-
logger_1.logger.help(`
|
|
1695
|
-
logger_1.logger.help(`
|
|
1696
|
-
logger_1.logger.help(`
|
|
1684
|
+
logger_1.logger.help(` --targetHostname <value> Host name of the target DX core server (default: "${config.targetHostname}")`);
|
|
1685
|
+
logger_1.logger.help(` --targetDxConnectPort <value> Port number of the target server (default: "${config.targetDxConnectPort}")`);
|
|
1686
|
+
logger_1.logger.help(` --targetDxConnectUsername <value> Username for the target server (default: "${config.targetDxConnectUsername}")`);
|
|
1687
|
+
logger_1.logger.help(` --targetDxConnectPassword <value> Password for the target server (default: "${MaskData.maskPassword(config.targetDxConnectPassword)}")`);
|
|
1688
|
+
logger_1.logger.help(` --targetDxProfileName <value> Profile name of the target DX core server(default: "${config.targetDxProfileName}")`);
|
|
1697
1689
|
logger_1.logger.help(' -h, --help display help for command');
|
|
1698
1690
|
process.exit(1);
|
|
1699
1691
|
}
|
|
@@ -1701,122 +1693,122 @@ program
|
|
|
1701
1693
|
logger_1.logger.help(' Required (sub)command summary-report: use "dx-core-configuration-reports summary-report -h" for more details');
|
|
1702
1694
|
process.exit(1);
|
|
1703
1695
|
}
|
|
1704
|
-
commands_1.configureCommand(subCmd);
|
|
1696
|
+
(0, commands_1.configureCommand)(subCmd);
|
|
1705
1697
|
logger_1.logger.debug('Differential report execution started');
|
|
1706
1698
|
try {
|
|
1707
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1708
|
-
validateOptions_1.validateOptionsInConfigReports(cmdOptions);
|
|
1699
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1700
|
+
(0, validateOptions_1.validateOptionsInConfigReports)(cmdOptions);
|
|
1709
1701
|
}
|
|
1710
1702
|
catch (error) {
|
|
1711
1703
|
logger_1.logger.error(error.message);
|
|
1712
|
-
|
|
1704
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1713
1705
|
}
|
|
1714
1706
|
try {
|
|
1715
1707
|
const differentialReport = new differentialReport_1.DifferentialReport();
|
|
1716
|
-
const responseCode =
|
|
1708
|
+
const responseCode = await differentialReport.invoke(cmdOptions);
|
|
1717
1709
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1718
1710
|
logger_1.logger.debug('Differential report execution completed');
|
|
1719
|
-
|
|
1711
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1720
1712
|
}
|
|
1721
1713
|
catch (error) {
|
|
1722
1714
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
1723
|
-
|
|
1715
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1724
1716
|
}
|
|
1725
|
-
})
|
|
1717
|
+
})
|
|
1726
1718
|
.helpOption(false);
|
|
1727
1719
|
program
|
|
1728
1720
|
.command(constants_1.COMMANDS.WCM_LIBRARY_EXPORT)
|
|
1729
|
-
.option('
|
|
1730
|
-
.requiredOption('
|
|
1731
|
-
.requiredOption('
|
|
1732
|
-
.requiredOption('
|
|
1733
|
-
.requiredOption('
|
|
1734
|
-
.requiredOption('
|
|
1735
|
-
.requiredOption('
|
|
1736
|
-
.requiredOption('
|
|
1737
|
-
.requiredOption('
|
|
1738
|
-
.option('
|
|
1739
|
-
.option('
|
|
1740
|
-
.option('
|
|
1721
|
+
.option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1722
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1723
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1724
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
1725
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
1726
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
1727
|
+
.requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
|
|
1728
|
+
.requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
|
|
1729
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
1730
|
+
.option('--librariesName <value>', 'Name of the wcm library')
|
|
1731
|
+
.option('--exportAllLibraries <value>', 'Enable this parameter if you export all wcm library')
|
|
1732
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal from which need to export the WCM Library', config.virtualPortalContext)
|
|
1741
1733
|
.description('- Exports single, multiple or all WCM libraries from the DX Core server')
|
|
1742
|
-
.action((cmdOptions) =>
|
|
1743
|
-
commands_1.configureCommand(constants_1.COMMANDS.WCM_LIBRARY_EXPORT);
|
|
1734
|
+
.action(async (cmdOptions) => {
|
|
1735
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_EXPORT);
|
|
1744
1736
|
logger_1.logger.debug('export of the wcm libraries execution started');
|
|
1745
1737
|
try {
|
|
1746
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1747
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1738
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1739
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1748
1740
|
}
|
|
1749
1741
|
catch (error) {
|
|
1750
1742
|
logger_1.logger.error(error.message);
|
|
1751
|
-
|
|
1743
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1752
1744
|
}
|
|
1753
1745
|
const exportWCMLibraryObj = new exportWCMLibrary_1.ExportWCMLibrary();
|
|
1754
1746
|
try {
|
|
1755
|
-
const responseCode =
|
|
1747
|
+
const responseCode = await exportWCMLibraryObj.invoke(cmdOptions);
|
|
1756
1748
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1757
1749
|
logger_1.logger.debug('export wcm libraries execution successful');
|
|
1758
|
-
|
|
1750
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1759
1751
|
}
|
|
1760
1752
|
catch (error) {
|
|
1761
1753
|
logger_1.logger.debug('Exception in execution of export wcm libraries : %o', error);
|
|
1762
|
-
|
|
1754
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1763
1755
|
}
|
|
1764
|
-
})
|
|
1756
|
+
});
|
|
1765
1757
|
program
|
|
1766
1758
|
.command(constants_1.COMMANDS.WCM_LIBRARY_IMPORT)
|
|
1767
|
-
.option('
|
|
1768
|
-
.requiredOption('
|
|
1769
|
-
.requiredOption('
|
|
1770
|
-
.requiredOption('
|
|
1771
|
-
.requiredOption('
|
|
1772
|
-
.requiredOption('
|
|
1773
|
-
.requiredOption('
|
|
1774
|
-
.requiredOption('
|
|
1775
|
-
.requiredOption('
|
|
1776
|
-
.option('
|
|
1777
|
-
.option('
|
|
1759
|
+
.option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1760
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1761
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1762
|
+
.requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
|
|
1763
|
+
.requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
|
|
1764
|
+
.requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
|
|
1765
|
+
.requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
|
|
1766
|
+
.requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
|
|
1767
|
+
.requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
|
|
1768
|
+
.option('--libFilePath <value>', 'Path to the file containing the wcm libraries to be imported')
|
|
1769
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal to which need to import the WCM Library', config.virtualPortalContext)
|
|
1778
1770
|
.description('- Imports single or multiple WCM libraries into the DX Core server')
|
|
1779
|
-
.action((cmdOptions) =>
|
|
1780
|
-
commands_1.configureCommand(constants_1.COMMANDS.WCM_LIBRARY_IMPORT);
|
|
1771
|
+
.action(async (cmdOptions) => {
|
|
1772
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_IMPORT);
|
|
1781
1773
|
logger_1.logger.debug('import of the wcm libraries execution started');
|
|
1782
1774
|
try {
|
|
1783
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
1784
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
1775
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
1776
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
1785
1777
|
}
|
|
1786
1778
|
catch (error) {
|
|
1787
1779
|
logger_1.logger.error(error.message);
|
|
1788
|
-
|
|
1780
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1789
1781
|
}
|
|
1790
1782
|
const importWCMLibraryObj = new importWCMLibrary_1.ImportWCMLibrary();
|
|
1791
1783
|
try {
|
|
1792
|
-
const responseCode =
|
|
1784
|
+
const responseCode = await importWCMLibraryObj.invoke(cmdOptions);
|
|
1793
1785
|
logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
|
|
1794
1786
|
logger_1.logger.debug('import wcm libraries execution successful');
|
|
1795
|
-
|
|
1787
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1796
1788
|
}
|
|
1797
1789
|
catch (error) {
|
|
1798
1790
|
logger_1.logger.debug('Exception in execution of export wcm libraries : %o', error);
|
|
1799
|
-
|
|
1791
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1800
1792
|
}
|
|
1801
|
-
})
|
|
1793
|
+
});
|
|
1802
1794
|
program
|
|
1803
1795
|
.command(`${constants_1.COMMANDS.MANAGE_DAM_ASSETS} [subCommand]`)
|
|
1804
|
-
.requiredOption('
|
|
1805
|
-
.requiredOption('
|
|
1806
|
-
.requiredOption('
|
|
1807
|
-
.requiredOption('
|
|
1808
|
-
.requiredOption('
|
|
1809
|
-
.requiredOption('
|
|
1810
|
-
.requiredOption('
|
|
1811
|
-
.option('
|
|
1812
|
-
.option('
|
|
1813
|
-
.option('
|
|
1814
|
-
.option('
|
|
1796
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
1797
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
1798
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1799
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
1800
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
1801
|
+
.requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
|
|
1802
|
+
.requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
|
|
1803
|
+
.option('--exportPath <value>', 'Location of the file path to export')
|
|
1804
|
+
.option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
|
|
1805
|
+
.option('--exportBinary <value>', 'Use true or false to include or exclude binary as part of export')
|
|
1806
|
+
.option('--importBinary <value>', 'Use true or false to include or exclude binary as part of import')
|
|
1815
1807
|
.option('-h, --help')
|
|
1816
1808
|
.description('- Export or Import or Validate the DAM assets')
|
|
1817
|
-
.action((subCommand, commands) =>
|
|
1809
|
+
.action(async (subCommand, commands) => {
|
|
1818
1810
|
if ((subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT || subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT)
|
|
1819
|
-
&& (
|
|
1811
|
+
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1820
1812
|
logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]');
|
|
1821
1813
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
|
|
1822
1814
|
logger_1.logger.help(' -Export the DAM assets from DX.\n');
|
|
@@ -1824,32 +1816,32 @@ program
|
|
|
1824
1816
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
|
|
1825
1817
|
logger_1.logger.help(' -Import the DAM assets from DX.\n');
|
|
1826
1818
|
}
|
|
1827
|
-
logger_1.logger.help(`
|
|
1828
|
-
logger_1.logger.help(`
|
|
1829
|
-
logger_1.logger.help(`
|
|
1819
|
+
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1820
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1821
|
+
logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
|
|
1830
1822
|
(default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
|
|
1831
|
-
logger_1.logger.help(`
|
|
1832
|
-
logger_1.logger.help(`
|
|
1833
|
-
logger_1.logger.help(`
|
|
1823
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
|
|
1824
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
1825
|
+
logger_1.logger.help(` --damAPIPort <value> Port number of the DAM server, for any Kubernetes Environment default port is 443 \
|
|
1834
1826
|
(default: "${config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort}")`);
|
|
1835
|
-
logger_1.logger.help(`
|
|
1827
|
+
logger_1.logger.help(` --ringAPIPort <value> Port number of the DX Core API server, for any Kubernetes Environment default is 443 \
|
|
1836
1828
|
(default: "${config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort}")`);
|
|
1837
|
-
logger_1.logger.help(`
|
|
1829
|
+
logger_1.logger.help(` --ltpaTokenRefreshTime <value> LTPA Token Refresh time in minutes (default: ${constants_2.LTPA_TOKEN_REFRESH_TIME})`);
|
|
1838
1830
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
|
|
1839
|
-
logger_1.logger.help('
|
|
1840
|
-
logger_1.logger.help('
|
|
1831
|
+
logger_1.logger.help(' --exportPath <value> Location of the file path to export(default is store/outputFiles/dam-export-assets/)');
|
|
1832
|
+
logger_1.logger.help(' --exportBinary <value> Use true or false to include or exclude binary as part of export(default is true)');
|
|
1841
1833
|
}
|
|
1842
1834
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
|
|
1843
|
-
logger_1.logger.help('
|
|
1844
|
-
logger_1.logger.help('
|
|
1835
|
+
logger_1.logger.help(' --exportPath <value> Location of the file path to import(default is store/outputFiles/dam-export-assets/)');
|
|
1836
|
+
logger_1.logger.help(' --importBinary <value> Use true or false to include or exclude binary as part of import(default is true)');
|
|
1845
1837
|
}
|
|
1846
1838
|
logger_1.logger.help(' -h, --help display help for command');
|
|
1847
1839
|
process.exit(1);
|
|
1848
1840
|
}
|
|
1849
|
-
else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE && (
|
|
1841
|
+
else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1850
1842
|
logger_1.logger.help(' -Validate the exported DAM assets in your local.');
|
|
1851
|
-
logger_1.logger.help('
|
|
1852
|
-
logger_1.logger.help('
|
|
1843
|
+
logger_1.logger.help(' --exportPath <value> Location of the exported file path(default is store/outputFiles/dam-export-assets/)');
|
|
1844
|
+
logger_1.logger.help(' --importBinary <value> Use true or false to validate binary as part of validation(default is true)');
|
|
1853
1845
|
logger_1.logger.help(' -h, --help display help for command');
|
|
1854
1846
|
process.exit(1);
|
|
1855
1847
|
}
|
|
@@ -1861,86 +1853,86 @@ program
|
|
|
1861
1853
|
else {
|
|
1862
1854
|
logger_1.logger.debug('Manage DAM assets started');
|
|
1863
1855
|
try {
|
|
1864
|
-
commands_1.configureCommand(subCommand);
|
|
1865
|
-
commands = utils_1.unmaskPasswords(commands);
|
|
1866
|
-
validateOptions_1.validateOptions(commands);
|
|
1856
|
+
(0, commands_1.configureCommand)(subCommand);
|
|
1857
|
+
commands = (0, utils_1.unmaskPasswords)(commands);
|
|
1858
|
+
(0, validateOptions_1.validateOptions)(commands);
|
|
1867
1859
|
}
|
|
1868
1860
|
catch (error) {
|
|
1869
1861
|
logger_1.logger.error(error.message);
|
|
1870
|
-
|
|
1862
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
1871
1863
|
}
|
|
1872
1864
|
}
|
|
1873
1865
|
if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
|
|
1874
1866
|
try {
|
|
1875
1867
|
logger_1.logger.debug('DAM assets export started');
|
|
1876
1868
|
const exportAssets = new exportAssets_1.ExportAssets();
|
|
1877
|
-
const responseCode =
|
|
1869
|
+
const responseCode = await exportAssets.invoke(commands);
|
|
1878
1870
|
logger_1.logger.debug('DAM assets export completed');
|
|
1879
|
-
|
|
1871
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1880
1872
|
}
|
|
1881
1873
|
catch (error) {
|
|
1882
1874
|
logger_1.logger.debug('Exception in execution of DAM assets export: %o', error);
|
|
1883
|
-
|
|
1875
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1884
1876
|
}
|
|
1885
1877
|
}
|
|
1886
1878
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
|
|
1887
1879
|
try {
|
|
1888
1880
|
logger_1.logger.debug('DAM assets validation started');
|
|
1889
1881
|
const validateAssets = new validateAssets_1.ValidateAssets();
|
|
1890
|
-
const validateResponseCode =
|
|
1882
|
+
const validateResponseCode = await validateAssets.invoke(commands);
|
|
1891
1883
|
if (!validateResponseCode) {
|
|
1892
1884
|
logger_1.logger.debug('DAM assets validation failed');
|
|
1893
|
-
|
|
1885
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1894
1886
|
}
|
|
1895
1887
|
logger_1.logger.debug('DAM assets validation completed');
|
|
1896
1888
|
logger_1.logger.debug('DAM assets import started');
|
|
1897
1889
|
const importAssets = new importAssets_1.ImportAssets();
|
|
1898
|
-
const responseCode =
|
|
1890
|
+
const responseCode = await importAssets.invoke(commands);
|
|
1899
1891
|
logger_1.logger.debug('DAM assets import completed');
|
|
1900
|
-
|
|
1892
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1901
1893
|
}
|
|
1902
1894
|
catch (error) {
|
|
1903
1895
|
logger_1.logger.debug('Exception in execution of DAM assets import: %o', error);
|
|
1904
|
-
|
|
1896
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1905
1897
|
}
|
|
1906
1898
|
}
|
|
1907
1899
|
else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE) {
|
|
1908
1900
|
try {
|
|
1909
1901
|
logger_1.logger.debug('DAM assets validation started');
|
|
1910
1902
|
const validateAssets = new validateAssets_1.ValidateAssets();
|
|
1911
|
-
const responseCode =
|
|
1903
|
+
const responseCode = await validateAssets.invoke(commands);
|
|
1912
1904
|
logger_1.logger.debug('DAM assets validation completed');
|
|
1913
|
-
|
|
1905
|
+
await (0, utils_1.flushLogAndExitProcess)(responseCode);
|
|
1914
1906
|
}
|
|
1915
1907
|
catch (error) {
|
|
1916
1908
|
logger_1.logger.debug('Exception in execution of DAM assets validation: %o', error);
|
|
1917
|
-
|
|
1909
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
1918
1910
|
}
|
|
1919
1911
|
}
|
|
1920
|
-
})
|
|
1921
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
1912
|
+
});
|
|
1913
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
1922
1914
|
program
|
|
1923
1915
|
.command(`${constants_1.COMMANDS.LIVESYNC} [subCommand]`)
|
|
1924
|
-
.requiredOption('
|
|
1925
|
-
.requiredOption('
|
|
1926
|
-
.requiredOption('
|
|
1927
|
-
.requiredOption('
|
|
1928
|
-
.requiredOption('
|
|
1929
|
-
.requiredOption('
|
|
1930
|
-
.option('
|
|
1931
|
-
.option('
|
|
1932
|
-
.option('
|
|
1933
|
-
.option('
|
|
1934
|
-
.option('
|
|
1935
|
-
.option('
|
|
1936
|
-
.option('
|
|
1937
|
-
.option('
|
|
1916
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Server', config.dxProtocol)
|
|
1917
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Server', config.hostname)
|
|
1918
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
1919
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core Server', config.dxUsername)
|
|
1920
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core Server', MaskData.maskPassword(config.dxPassword))
|
|
1921
|
+
.requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
|
|
1922
|
+
.option('--themeName <value>', 'Theme System Name (or Theme Title)')
|
|
1923
|
+
.option('--themePath <value>', 'Local path to the Theme folder')
|
|
1924
|
+
.option('--wcmLibraryName <value>', 'WCM Design Library Name', config.wcmLibraryName)
|
|
1925
|
+
.option('--wcmLibraryId <value>', 'UUID of the WCM Design Library', config.wcmLibraryId)
|
|
1926
|
+
.option('--wcmLibraryPath <value>', 'Local path to the Library folder', config.wcmLibraryPath)
|
|
1927
|
+
.option('--wcmProjectName <value>', 'Name of the WCM Project', config.wcmProjectName)
|
|
1928
|
+
.option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server')
|
|
1929
|
+
.option('--disablePrompt <value>', 'Disables the confirmation prompt for overwriting local and server files.', config.disablePrompt)
|
|
1938
1930
|
.option('-h, --help')
|
|
1939
1931
|
.description('- Syncs theme files in WebDAV Server and Local')
|
|
1940
1932
|
.helpOption(false)
|
|
1941
|
-
.action((subCommand, cmdOptions) =>
|
|
1933
|
+
.action(async (subCommand, cmdOptions) => {
|
|
1942
1934
|
if ((constants_1.LIVESYNC_THEME_SUB_CMDS.includes(subCommand))
|
|
1943
|
-
&& (
|
|
1935
|
+
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1944
1936
|
if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME) {
|
|
1945
1937
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME} [options]\n`);
|
|
1946
1938
|
logger_1.logger.help('- Pulls theme files from WebDAV Server into local themePath.\n');
|
|
@@ -1950,28 +1942,28 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
1950
1942
|
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');
|
|
1951
1943
|
}
|
|
1952
1944
|
logger_1.logger.help('Options:\n');
|
|
1953
|
-
logger_1.logger.help(`
|
|
1954
|
-
logger_1.logger.help(`
|
|
1955
|
-
logger_1.logger.help(`
|
|
1945
|
+
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1946
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1947
|
+
logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
|
|
1956
1948
|
(default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
|
|
1957
|
-
logger_1.logger.help(`
|
|
1958
|
-
logger_1.logger.help(`
|
|
1959
|
-
logger_1.logger.help(`
|
|
1949
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
|
|
1950
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
1951
|
+
logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
|
|
1960
1952
|
(default: "${config.contenthandlerPath}")`);
|
|
1961
1953
|
if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME) {
|
|
1962
|
-
logger_1.logger.help('
|
|
1963
|
-
logger_1.logger.help('
|
|
1954
|
+
logger_1.logger.help(' --themeName <value> Theme System Name (or Theme Title)');
|
|
1955
|
+
logger_1.logger.help(' --themePath <value> Local path to the Theme folder');
|
|
1964
1956
|
}
|
|
1965
1957
|
else if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME) {
|
|
1966
|
-
logger_1.logger.help('
|
|
1967
|
-
logger_1.logger.help('
|
|
1958
|
+
logger_1.logger.help(' --themeName <value> Theme System Name (or Theme Title)');
|
|
1959
|
+
logger_1.logger.help(' --themePath <value> Local path to the Theme folder');
|
|
1968
1960
|
}
|
|
1969
|
-
logger_1.logger.help('
|
|
1961
|
+
logger_1.logger.help(' --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
|
|
1970
1962
|
logger_1.logger.help(' -h, --help Display help for command');
|
|
1971
1963
|
process.exit(1);
|
|
1972
1964
|
}
|
|
1973
|
-
else if ((constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM))
|
|
1974
|
-
&& (
|
|
1965
|
+
else if ((constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM))
|
|
1966
|
+
&& (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
|
|
1975
1967
|
if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY) {
|
|
1976
1968
|
logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY} [options]\n`);
|
|
1977
1969
|
logger_1.logger.help('- Pulls wcm design library files from dx Server into local target libraryPath directory.\n');
|
|
@@ -1981,29 +1973,29 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
1981
1973
|
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');
|
|
1982
1974
|
}
|
|
1983
1975
|
logger_1.logger.help('Options:\n');
|
|
1984
|
-
logger_1.logger.help(`
|
|
1985
|
-
logger_1.logger.help(`
|
|
1986
|
-
logger_1.logger.help(`
|
|
1976
|
+
logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
|
|
1977
|
+
logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
|
|
1978
|
+
logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
|
|
1987
1979
|
(default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
|
|
1988
|
-
logger_1.logger.help(`
|
|
1989
|
-
logger_1.logger.help(`
|
|
1990
|
-
logger_1.logger.help(`
|
|
1980
|
+
logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
|
|
1981
|
+
logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
|
|
1982
|
+
logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
|
|
1991
1983
|
(default: "${config.contenthandlerPath}")`);
|
|
1992
|
-
logger_1.logger.help('
|
|
1993
|
-
logger_1.logger.help('
|
|
1994
|
-
logger_1.logger.help('
|
|
1995
|
-
logger_1.logger.help('
|
|
1996
|
-
logger_1.logger.help('
|
|
1997
|
-
logger_1.logger.help('
|
|
1984
|
+
logger_1.logger.help(' --wcmLibraryName <value> WCM Design Library Name');
|
|
1985
|
+
logger_1.logger.help(' --wcmLibraryId <value> UUID of the WCM Design Library');
|
|
1986
|
+
logger_1.logger.help(' --wcmLibraryPath <value> Local path to the Library folder');
|
|
1987
|
+
logger_1.logger.help(' --wcmProjectName <value> Name of the WCM Project');
|
|
1988
|
+
logger_1.logger.help(' --virtualPortalContext <value> Context of the virtual portal of the DX Core server');
|
|
1989
|
+
logger_1.logger.help(' --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
|
|
1998
1990
|
logger_1.logger.help(' -h, --help Display help for command');
|
|
1999
1991
|
process.exit(1);
|
|
2000
1992
|
}
|
|
2001
1993
|
if (!subCommand
|
|
2002
|
-
|| (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM))
|
|
1994
|
+
|| (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !(0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM))
|
|
2003
1995
|
|| (!constants_1.LIVESYNC_SUB_CMDS.includes(subCommand))) {
|
|
2004
1996
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME} -h" for more details`);
|
|
2005
1997
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME} -h" for more details`);
|
|
2006
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM)) {
|
|
1998
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM)) {
|
|
2007
1999
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY} -h" for more details`);
|
|
2008
2000
|
logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY} -h" for more details`);
|
|
2009
2001
|
}
|
|
@@ -2011,23 +2003,23 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2011
2003
|
}
|
|
2012
2004
|
else {
|
|
2013
2005
|
logger_1.logger.debug('LiveSync execution started');
|
|
2014
|
-
commands_1.configureCommand(constants_1.COMMANDS.LIVESYNC);
|
|
2006
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.LIVESYNC);
|
|
2015
2007
|
try {
|
|
2016
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
2017
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
2008
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
2009
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
2018
2010
|
}
|
|
2019
2011
|
catch (error) {
|
|
2020
2012
|
logger_1.logger.error(error.message);
|
|
2021
|
-
|
|
2013
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
2022
2014
|
}
|
|
2023
2015
|
}
|
|
2024
2016
|
if (constants_1.LIVESYNC_THEME_SUB_CMDS.includes(subCommand) && !cmdOptions.themeName) {
|
|
2025
2017
|
const baseUrl = `${cmdOptions.dxProtocol}://${cmdOptions.hostname}:${cmdOptions.dxPort}`;
|
|
2026
2018
|
const themePath = `${cmdOptions.contenthandlerPath}${constants_1.URL_PATH.webDavTheme}`;
|
|
2027
2019
|
try {
|
|
2028
|
-
const themeOptions =
|
|
2020
|
+
const themeOptions = await themeServices_1.themeServices.getAvailableThemes(baseUrl, themePath, cmdOptions.dxUsername, cmdOptions.dxPassword);
|
|
2029
2021
|
logger_1.logger.info('Please select a Theme name');
|
|
2030
|
-
|
|
2022
|
+
await (0, cli_select_1.default)({ values: themeOptions, valueRenderer: (value, selected) => { return `[${value}]`; } }).then((response) => {
|
|
2031
2023
|
logger_1.logger.info('Theme "%s" has been selected.', response.value);
|
|
2032
2024
|
cmdOptions.themeName = response.value;
|
|
2033
2025
|
}).catch(() => {
|
|
@@ -2035,27 +2027,27 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2035
2027
|
});
|
|
2036
2028
|
if (!cmdOptions.themeName) {
|
|
2037
2029
|
logger_1.logger.info('Unable to find a valid themeName, exiting DXCLient.');
|
|
2038
|
-
|
|
2030
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2039
2031
|
}
|
|
2040
2032
|
}
|
|
2041
2033
|
catch (error) {
|
|
2042
2034
|
logger_1.logger.error('An error occurred during theme selection: %o', error.message ? error.message : error);
|
|
2043
|
-
|
|
2035
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2044
2036
|
}
|
|
2045
2037
|
}
|
|
2046
2038
|
if (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !(cmdOptions.wcmLibraryId || cmdOptions.wcmLibraryName)) {
|
|
2047
2039
|
try {
|
|
2048
|
-
const mappedLibraryPath = utils_1.mapToHostPath(cmdOptions.wcmLibraryPath, []);
|
|
2040
|
+
const mappedLibraryPath = (0, utils_1.mapToHostPath)(cmdOptions.wcmLibraryPath, []);
|
|
2049
2041
|
logger_1.logger.info(`Checking for saved WCM Design Library in ${mappedLibraryPath}`);
|
|
2050
|
-
const savedMetadata = metadataServices_1.getLibraryMetadata(cmdOptions.wcmLibraryPath);
|
|
2042
|
+
const savedMetadata = (0, metadataServices_1.getLibraryMetadata)(cmdOptions.wcmLibraryPath);
|
|
2051
2043
|
if (savedMetadata) {
|
|
2052
2044
|
if (savedMetadata.type !== 'Library') {
|
|
2053
2045
|
logger_1.logger.error('DXClient exiting due to invalid metadata. Error: Metadata not for Library.');
|
|
2054
|
-
|
|
2046
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
2055
2047
|
}
|
|
2056
2048
|
else if (!savedMetadata.id) {
|
|
2057
2049
|
logger_1.logger.error('DXClient exiting due to invalid metadata. Error: Missing Library ID.');
|
|
2058
|
-
|
|
2050
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
2059
2051
|
}
|
|
2060
2052
|
cmdOptions.wcmLibraryId = savedMetadata.id;
|
|
2061
2053
|
cmdOptions.wcmLibraryName = savedMetadata.displayTitle;
|
|
@@ -2075,9 +2067,9 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2075
2067
|
virtualPortalContext: cmdOptions.virtualPortalContext,
|
|
2076
2068
|
wcmProjectName: cmdOptions.wcmProjectName,
|
|
2077
2069
|
};
|
|
2078
|
-
const wcmlibraryResp =
|
|
2070
|
+
const wcmlibraryResp = await (0, wcmRestV2Services_1.libraries)(apiOptions);
|
|
2079
2071
|
const wcmlibraryOptions = wcmlibraryResp.data['library-entries'];
|
|
2080
|
-
|
|
2072
|
+
await (0, cli_select_1.default)({
|
|
2081
2073
|
values: wcmlibraryOptions,
|
|
2082
2074
|
valueRenderer: (value, selected) => {
|
|
2083
2075
|
let { displayTitle } = value;
|
|
@@ -2101,20 +2093,20 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2101
2093
|
});
|
|
2102
2094
|
if (!cmdOptions.wcmLibraryId) {
|
|
2103
2095
|
logger_1.logger.info('Unable to find a valid WCM Design Library, exiting DXCLient.');
|
|
2104
|
-
|
|
2096
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2105
2097
|
}
|
|
2106
2098
|
}
|
|
2107
2099
|
}
|
|
2108
2100
|
catch (error) {
|
|
2109
2101
|
logger_1.logger.error('An error occurred during Library selection: %o', error.message ? error.message : error);
|
|
2110
|
-
|
|
2102
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2111
2103
|
}
|
|
2112
2104
|
}
|
|
2113
2105
|
if (cmdOptions.disablePrompt === 'false') {
|
|
2114
2106
|
let isOverwritePermitted = true;
|
|
2115
2107
|
if ([constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME, constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY].includes(subCommand)) {
|
|
2116
2108
|
const diffSyncMsg = subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY ? ' using updated local files' : '';
|
|
2117
|
-
const prompt =
|
|
2109
|
+
const prompt = await (0, prompts_1.default)([{
|
|
2118
2110
|
type: 'text',
|
|
2119
2111
|
name: 'confirmation',
|
|
2120
2112
|
message: `This command will overwrite existing files in your DX Server${diffSyncMsg}. Enter 'OVERWRITE-SERVER' to proceed:`,
|
|
@@ -2123,7 +2115,7 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2123
2115
|
isOverwritePermitted = prompt.confirmation === 'OVERWRITE-SERVER';
|
|
2124
2116
|
}
|
|
2125
2117
|
else if ([constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME, constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY].includes(subCommand)) {
|
|
2126
|
-
const prompt =
|
|
2118
|
+
const prompt = await (0, prompts_1.default)([{
|
|
2127
2119
|
type: 'text',
|
|
2128
2120
|
name: 'confirmation',
|
|
2129
2121
|
message: 'This command will overwrite existing files in your local workspace. Enter \'OVERWRITE-LOCAL\' to proceed:',
|
|
@@ -2133,7 +2125,7 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2133
2125
|
}
|
|
2134
2126
|
if (isOverwritePermitted === false) {
|
|
2135
2127
|
logger_1.logger.info('LiveSync overwrite confirmation not validated, exiting DXClient.');
|
|
2136
|
-
|
|
2128
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2137
2129
|
}
|
|
2138
2130
|
}
|
|
2139
2131
|
const liveSyncSubCommands = [
|
|
@@ -2144,69 +2136,70 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
|
|
|
2144
2136
|
];
|
|
2145
2137
|
logger_1.logger.info('LiveSync %s execution started.', liveSyncSubCommands.find((subCmd) => { return subCmd.key === subCommand; }).label);
|
|
2146
2138
|
try {
|
|
2147
|
-
const response =
|
|
2148
|
-
|
|
2139
|
+
const response = await liveSyncSubCommands.find((subCmd) => { return subCmd.key === subCommand; }).value.invoke(cmdOptions);
|
|
2140
|
+
await (0, utils_1.flushLogAndExitProcess)(response);
|
|
2149
2141
|
}
|
|
2150
2142
|
catch (error) {
|
|
2151
2143
|
logger_1.logger.debug('Exception in execution : %o', error);
|
|
2152
|
-
|
|
2144
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2153
2145
|
}
|
|
2154
|
-
})
|
|
2146
|
+
});
|
|
2155
2147
|
}
|
|
2156
|
-
if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_REINDEXING)) {
|
|
2148
|
+
if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_REINDEXING)) {
|
|
2157
2149
|
program
|
|
2158
2150
|
.command(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING)
|
|
2159
2151
|
.description('- Trigger Search content-source reindexing')
|
|
2160
|
-
.requiredOption('
|
|
2161
|
-
.requiredOption('
|
|
2162
|
-
.requiredOption('
|
|
2163
|
-
.requiredOption('
|
|
2164
|
-
.requiredOption('
|
|
2165
|
-
.requiredOption('
|
|
2166
|
-
.requiredOption('
|
|
2167
|
-
.requiredOption('
|
|
2168
|
-
.requiredOption('
|
|
2169
|
-
.option('
|
|
2170
|
-
.option('
|
|
2152
|
+
.requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
|
|
2153
|
+
.requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
|
|
2154
|
+
.requiredOption('--dxPort <value>', 'Port number of the DX Core server', config.dxPort ? config.dxPort.toString() : config.dxPort)
|
|
2155
|
+
.requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
|
|
2156
|
+
.requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
|
|
2157
|
+
.requiredOption('--damAPIPort <value>', 'Port number of the DAM API server', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
|
|
2158
|
+
.requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
|
|
2159
|
+
.requiredOption('--damAPIVersion <value>', 'API Version number of DAM', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
|
|
2160
|
+
.requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
|
|
2161
|
+
.option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
|
|
2162
|
+
.option('--reportPath <value>', 'Location of the file path to download report')
|
|
2171
2163
|
.option('-h, --help')
|
|
2172
|
-
.action((cmdOptions) =>
|
|
2173
|
-
commands_1.configureCommand(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING);
|
|
2164
|
+
.action(async (cmdOptions) => {
|
|
2165
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING);
|
|
2174
2166
|
try {
|
|
2175
|
-
cmdOptions = utils_1.unmaskPasswords(cmdOptions);
|
|
2176
|
-
validateOptions_1.validateOptions(cmdOptions);
|
|
2167
|
+
cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
|
|
2168
|
+
(0, validateOptions_1.validateOptions)(cmdOptions);
|
|
2177
2169
|
}
|
|
2178
2170
|
catch (error) {
|
|
2179
2171
|
logger_1.logger.error(error.message);
|
|
2180
|
-
|
|
2172
|
+
await (0, utils_1.flushLogAndExitProcess)(false, true);
|
|
2181
2173
|
}
|
|
2182
2174
|
try {
|
|
2183
2175
|
const triggerDamReindexing = new triggerDamReindexing_1.TriggerDamReindexing();
|
|
2184
|
-
const res =
|
|
2185
|
-
|
|
2176
|
+
const res = await triggerDamReindexing.invoke(cmdOptions);
|
|
2177
|
+
await (0, utils_1.flushLogAndExitProcess)(res);
|
|
2186
2178
|
}
|
|
2187
2179
|
catch (error) {
|
|
2188
|
-
|
|
2180
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2189
2181
|
}
|
|
2190
|
-
})
|
|
2182
|
+
});
|
|
2191
2183
|
}
|
|
2192
2184
|
program
|
|
2193
2185
|
.command(constants_1.COMMANDS.ACCEPT_LICENSE)
|
|
2194
2186
|
.description('- accept-license.')
|
|
2195
|
-
.action(() =>
|
|
2187
|
+
.action(async () => {
|
|
2196
2188
|
logger_1.logger.debug('accept-license.');
|
|
2197
|
-
commands_1.configureCommand(constants_1.COMMANDS.ACCEPT_LICENSE);
|
|
2189
|
+
(0, commands_1.configureCommand)(constants_1.COMMANDS.ACCEPT_LICENSE);
|
|
2198
2190
|
try {
|
|
2199
|
-
|
|
2191
|
+
await (0, logger_1.flushLogs)(true);
|
|
2200
2192
|
process.exit(0);
|
|
2201
2193
|
}
|
|
2202
2194
|
catch (error) {
|
|
2203
2195
|
logger_1.logger.error(error.message);
|
|
2204
|
-
|
|
2196
|
+
await (0, utils_1.flushLogAndExitProcess)(false);
|
|
2205
2197
|
}
|
|
2206
|
-
})
|
|
2207
|
-
(() =>
|
|
2208
|
-
|
|
2209
|
-
|
|
2198
|
+
});
|
|
2199
|
+
(async () => { await (0, utils_1.checkLicense)(process.argv[2]); })().then(async () => {
|
|
2200
|
+
const commandArgs = await (0, utils_1.convertSingleToDoubleHyphen)(process.argv);
|
|
2201
|
+
program.parse(commandArgs);
|
|
2202
|
+
}).catch((error) => {
|
|
2210
2203
|
logger_1.logger.error(error.message);
|
|
2211
2204
|
process.exit(1);
|
|
2212
2205
|
});
|