@hcl-software/dxclient 222.0.0 → 224.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.
Files changed (57) hide show
  1. package/README.md +187 -0
  2. package/dist/configuration/config.json +1 -0
  3. package/dist/configuration/versionConfigMap.json +1 -0
  4. package/dist/package.json +11 -11
  5. package/dist/packages/admintasks/src/commands/restartDXCore.js +18 -9
  6. package/dist/packages/admintasks/src/commands/restartDXCore.js.map +1 -1
  7. package/dist/packages/admintasks/src/errors/CommandLineMessages_en.json +1 -0
  8. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.d.ts +3 -2
  9. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js +221 -75
  10. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js.map +1 -1
  11. package/dist/packages/livesync/src/commands/pushTheme.js +8 -0
  12. package/dist/packages/livesync/src/commands/pushTheme.js.map +1 -1
  13. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.d.ts +5 -2
  14. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js +325 -164
  15. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js.map +1 -1
  16. package/dist/packages/livesync/src/errors/CommandLineMessages_en.json +45 -42
  17. package/dist/packages/livesync/src/messages/messages_en.json +11 -7
  18. package/dist/packages/livesync/src/services/EventsQueue.d.ts +1 -0
  19. package/dist/packages/livesync/src/services/EventsQueue.js +9 -2
  20. package/dist/packages/livesync/src/services/EventsQueue.js.map +1 -1
  21. package/dist/packages/livesync/src/services/foldersWcmServices.js +36 -6
  22. package/dist/packages/livesync/src/services/foldersWcmServices.js.map +1 -1
  23. package/dist/packages/livesync/src/services/htmlComponentWcmServices.js +34 -6
  24. package/dist/packages/livesync/src/services/htmlComponentWcmServices.js.map +1 -1
  25. package/dist/packages/livesync/src/services/livesyncUtils.d.ts +5 -1
  26. package/dist/packages/livesync/src/services/livesyncUtils.js +47 -1
  27. package/dist/packages/livesync/src/services/livesyncUtils.js.map +1 -1
  28. package/dist/packages/livesync/src/services/metadataServices.d.ts +8 -6
  29. package/dist/packages/livesync/src/services/metadataServices.js +279 -88
  30. package/dist/packages/livesync/src/services/metadataServices.js.map +1 -1
  31. package/dist/packages/livesync/src/services/ongoingSyncServices.js +144 -101
  32. package/dist/packages/livesync/src/services/ongoingSyncServices.js.map +1 -1
  33. package/dist/packages/livesync/src/services/presentationTemplateWcmServices.d.ts +6 -0
  34. package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js +138 -0
  35. package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js.map +1 -0
  36. package/dist/packages/livesync/src/services/wcmRestV2Services.js +9 -2
  37. package/dist/packages/livesync/src/services/wcmRestV2Services.js.map +1 -1
  38. package/dist/packages/livesync/src/types/EventQueueItem.type.d.ts +1 -1
  39. package/dist/packages/livesync/src/types/WCMDesignLibraryCache.type.d.ts +9 -0
  40. package/dist/packages/livesync/src/types/WCMDesignLibraryCache.type.js +3 -0
  41. package/dist/packages/livesync/src/types/WCMDesignLibraryCache.type.js.map +1 -0
  42. package/dist/packages/livesync/src/types/WcmRestApiV2.type.d.ts +18 -0
  43. package/dist/packages/livesync/src/types/index.d.ts +1 -0
  44. package/dist/packages/livesync/src/types/index.js +1 -0
  45. package/dist/packages/livesync/src/types/index.js.map +1 -1
  46. package/dist/src/index.js +29 -23
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/services/apiServices.js +80 -78
  49. package/dist/src/services/apiServices.js.map +1 -1
  50. package/dist/src/utils/constants.d.ts +9 -3
  51. package/dist/src/utils/constants.js +18 -8
  52. package/dist/src/utils/constants.js.map +1 -1
  53. package/dist/src/utils/utils.js +6 -2
  54. package/dist/src/utils/utils.js.map +1 -1
  55. package/dist/src/utils/validateOptions.js +4 -4
  56. package/dist/src/utils/validateOptions.js.map +1 -1
  57. package/package.json +11 -11
package/README.md CHANGED
@@ -10,6 +10,8 @@ DXClient comes with two deployment options:
10
10
 
11
11
  1. One option is the DXClient container package. DXClient is packaged as a container that can be run using OCI-based runtimes such as Docker or Podman. It is available as a container image with HCL DX 9.5 CF196 and later releases.
12
12
 
13
+ **Warning** - Recent changes to Podman introduced by RedHat have caused a compatibility issue with the container implementation of DXClient. HCL is currently investigating how this might be resolved. Until further notice, Docker is recommended for using the DXClient container implementation.
14
+
13
15
  2. The alternative deployment option is DXClient as native JavaScript code. Customers who want to rely on this deployment option need to install their own Node.js and NPM runtime environment in the correct version and must install necessary dependencies as needed.
14
16
 
15
17
  **Important Note related to DXClient version & distribution:** DXClient is now available free to download/install through NpmJS and harbor repositories. Following the decision to openly distribute DXClient, we have changed the current versioning format of DXClient from 1.xx.x to <CFNumber>.x.x. For example, the last release version of DXClient was "1.29.0" but the upcoming release is reformatted to "221.0.0". The number 221 is synonymous with the CF Number version of DX deployments.
@@ -266,6 +268,9 @@ Note that a few parameters are deprecated and replaced with new parameters in th
266
268
  * DXClient will be openly distributed in NpmJS & harbor repository.
267
269
  * In DAM Staging tasks, the parameters dxWASUsername, dxWASPassword, targetServerWASUsername, and targetServerWASPassword are now deprecated and should no longer be used.
268
270
 
271
+ 22. If connecting to an HCL DX 9.5 CF224 release, following changes are to be expected.
272
+ * New DXClient LiveSync Sub-Commands: LiveSync push-wcm-design-library | pull-wcm-design-library
273
+
269
274
  ## DXClient configuration
270
275
 
271
276
  Common command arguments that are listed in `config.json` can be pre-configured via this file. The common arguments could also be provided through command line. If so, it will override the values in `config.json` and execute.
@@ -329,6 +334,9 @@ dxclient manage-dam-assets import-assets [options] - command to import the dam a
329
334
  dxclient restart-core-pods [options] - command to execute the Restart Core Pods action (for Kubernetes deployments)
330
335
  dxclient livesync push-theme [options] - command for watching a theme folder path live and syncs it in DX Server
331
336
  dxclient livesync pull-theme [options] - command for downloading theme files from DX Server to a target local theme folder
337
+ dxclient livesync push-wcm-design-library [options] - command for watching a WCM Design Library folder path live and syncs it in DX Server
338
+ dxclient livesync pull-wcm-design-library [options] - command for downloading WCM Design Library files from DX Server to a target local folder
339
+
332
340
  ```
333
341
  ### DXClient Help commands
334
342
 
@@ -1111,6 +1119,26 @@ The import command imports the translated contents into DX and It would overwrit
1111
1119
  dxclient mls-import -dxProtocol <dxProtocol> -hostname <hostname> -dxPort <dxPort>
1112
1120
  -contenthandlerPath <contenthandlerPath> -dxUsername <dxUsername> -dxPassword <dxPassword> -importPath <importPath> -wcmProjectName <wcmProjectName> -virtualPortalContext <virtualPortalContext>
1113
1121
  ```
1122
+ Editable fields in CSV files
1123
+
1124
+ In the exported CSV file, you can only edit the following fields: **target**, **title**, and **description**.
1125
+
1126
+ Maximum data length for importing the translated contents:
1127
+ ```
1128
+ Only ShortTextComponent element type has an explicit maximum data length defined as 250 characters. Import command would validate the length of the data for this particular element type before proceeding with the actual import flow. Any errors due to custom configuration of limits are caught by the import/export during the execution cycle and the error log is reported.
1129
+ ```
1130
+ CSV file length limits
1131
+ ```
1132
+ Only ShortTextComponent element type has an explicit maximum data length defined as 250 characters. And this limit is seen by users in the CSV file as new column called fieldLimit is added.
1133
+ ```
1134
+ Link field to see translators content
1135
+ ```
1136
+ User can just preview the link of the portal content directly from the CSV file as new column called previewLink is added.
1137
+ ```
1138
+ Content information data
1139
+ ```
1140
+ Content specific information rows namely title and description has been provided in the CSV file. User can edit the title and description of the content while importing the contents to portal.
1141
+ ```
1114
1142
 
1115
1143
  ### 11. Deploy Application
1116
1144
 
@@ -3123,6 +3151,165 @@ Example usage:
3123
3151
  dxclient manage-dam-staging find-staging-mismatch -dxProtocol <dxProtocol> -hostname <hostname> -dxPort <dxPort> -dxUsername <dxUsername> -dxPassword <dxPassword> -damAPIPort <damAPIPort> -ringAPIPort <ringAPIPort> -damAPIVersion <damAPIVersion> -ringAPIVersion <ringAPIVersion> -subscriberId <subscriberId>
3124
3152
  ```
3125
3153
 
3154
+ ### 44. LiveSync Push WCM Design Library
3155
+
3156
+ This command will sync your WCM Design Library local files into DX Server. Then, it will watch for succeeding changes within the given `wcmLibraryPath` and immediately reflect the changes in the DX server.
3157
+
3158
+ > :warning: **Feature Limitations:**
3159
+ > 1. Currently only HTML and Folder components are the covered components of this feature.
3160
+ > 2. Moving and Renaming of files will be equivalent to deleting the original components and creation of an entirely new components.
3161
+ > 3. If a published component have a draft version, the feature will pull and push into the draft version.
3162
+ > 4. The Push WCM Design Library feature will only work on WCM Design Library previously pulled by the LiveSync Pull WCM Design Library feature.
3163
+
3164
+ Commands Description
3165
+
3166
+ This command invokes the livesync push-wcm-design-library tool inside the DXClient.
3167
+
3168
+ This command initially pushes all the changes that happened in local WCM Design Library files (provided in `wcmLibraryPath`) to DX Server with the WCM Design Library system name (provided in `wcmLibraryName`). It will then create a file system watcher which will watch for any changes (files or folders) under `wcmLibraryPath` and immediately reflect those changes in DX Server. To stop watching, press (Ctrl + C).
3169
+
3170
+ ```shell
3171
+ dxclient livesync push-wcm-design-library
3172
+ ```
3173
+
3174
+ **Help command**
3175
+ This command shows the help information for `live-sync` command usage:
3176
+
3177
+ ```shell
3178
+ dxclient livesync push-wcm-design-library -h
3179
+ ```
3180
+ **Command options**
3181
+ ```
3182
+ -dxProtocol, --dxProtocol <value>
3183
+ Protocol of the DX server
3184
+
3185
+ -hostname, --hostname <value>
3186
+ Host name of the DX server
3187
+
3188
+ -dxPort, --dxPort <value>
3189
+ Port number of the DX Server, for any Kubernetes Environment default port is 443
3190
+
3191
+ -dxUsername, --dxUsername <value>
3192
+ Username of the DX Core server
3193
+
3194
+ -dxPassword, --dxPassword <value>
3195
+ Password of the DX Core server
3196
+
3197
+ -contenthandlerPath,--contenthandlerPath <value>
3198
+ Alternate path for the portal context root or the content handler servlet (default: "/wps/mycontenthandler")
3199
+
3200
+ -wcmLibraryName, --wcmLibraryName <value>
3201
+ WCM Design Library Name
3202
+
3203
+ -wcmLibraryId, --wcmLibraryId <value>
3204
+ UUID of the WCM Design Library
3205
+
3206
+ -wcmLibraryPath, --wcmLibraryPath <value>
3207
+ Local path to the Library folder
3208
+
3209
+ -wcmProjectName, --wcmProjectName <value>
3210
+ Name of the WCM Project
3211
+
3212
+ -virtualPortalContext, --virtualPortalContext <value>
3213
+ Context of the virtual portal of the DX Core server
3214
+
3215
+ -disablePrompt, --disablePrompt <value>
3216
+ Disable the confirmation prompt for overwriting local and server files. Bypasses the prompt and immediately proceeds on pushing or pulling theme files.
3217
+ ```
3218
+ Example usage:
3219
+
3220
+ ```
3221
+ dxclient livesync push-wcm-design-library -dxUsername <dxUsername> -dxPassword <dxPassword> -dxPort <dxPort> -dxProtocol <dxProtocol> -hostname <hostname> -contenthandlerPath <contenthandlerPath> -wcmLibraryPath <wcmLibraryPath> -wcmLibraryName <wcmLibraryName>
3222
+ ```
3223
+
3224
+ **Optional wcmLibraryName and wcmLibraryId inputs**
3225
+ If the user provided neither of these options. The dxclient livesync push-wcm-design-library will use the metadata of saved WCM Design Library in the `wcmLibraryPath`.
3226
+
3227
+ ### 45. LiveSync Pull WCM Design Library
3228
+
3229
+ This command is used to sync a DX WCM Design Library from DX Server to a local folder.
3230
+
3231
+ > :warning: **Feature Limitations:**
3232
+ > 1. Currently only HTML and Folder components are the covered components of this feature.
3233
+ > 2. Moving and Renaming of files will be equivalent to deleting the original components and creation of an entirely new components.
3234
+ > 3. If a published component have a draft version, the feature will pull and push into the draft version.
3235
+ > 4. The Push WCM Design Library feature will only work on WCM Design Library previously pulled by the LiveSync Pull WCM Design Library feature.
3236
+
3237
+ Commands Description
3238
+
3239
+ This command invokes the livesync pull-wcm-design-library tool inside the DXClient.
3240
+
3241
+ This command will download the WCM Design Library files in DX Server under the given library name (provided in `-wcmLibraryName`). This will then be saved to the target local directory of the library (provided in `-wcmLibraryPath`), overwriting existing files in this local directory which also deletes stale files in the process.
3242
+
3243
+ ```
3244
+ dxclient livesync pull-wcm-design-library
3245
+ ```
3246
+ **Help command**
3247
+ This command shows the help information for `livesync pull-wcm-design-library` command usage:
3248
+ ```
3249
+ dxclient livesync pull-wcm-design-library -h
3250
+ ```
3251
+
3252
+ **Command Options:**
3253
+ ```
3254
+ -dxProtocol, --dxProtocol <value>
3255
+ Protocol of the DX server
3256
+
3257
+ -hostname, --hostname <value>
3258
+ Host name of the DX server
3259
+
3260
+ -dxPort, --dxPort <value>
3261
+ Port number of the DX Server, for any Kubernetes Environment default port is 443
3262
+
3263
+ -dxUsername, --dxUsername <value>
3264
+ Username of the DX Core server
3265
+
3266
+ -dxPassword, --dxPassword <value>
3267
+ Password of the DX Core server
3268
+
3269
+ -contenthandlerPath,--contenthandlerPath <value>
3270
+ Alternate path for the portal context root or the content handler servlet (default: "/wps/mycontenthandler")
3271
+
3272
+ -wcmLibraryName, --wcmLibraryName <value>
3273
+ WCM Design Library Name
3274
+
3275
+ -wcmLibraryId, --wcmLibraryId <value>
3276
+ UUID of the WCM Design Library
3277
+
3278
+ -wcmibraryPath, --wcmLibraryPath <value>
3279
+ Local path to the Library folder
3280
+
3281
+ -wcmProjectName, --wcmProjectName <value>
3282
+ Name of the WCM Project
3283
+
3284
+ -virtualPortalContext, --virtualPortalContext <value>
3285
+ Context of the virtual portal of the DX Core server
3286
+
3287
+ -disablePrompt, --disablePrompt <value>
3288
+ Disable the confirmation prompt for overwriting local and server files. Bypasses the prompt and immediately proceeds on pushing or pulling theme files.
3289
+ ```
3290
+
3291
+ Example usage:
3292
+ ```
3293
+ dxclient livesync pull-wcm-design-library -dxUsername <dxUsername> -dxPassword <dxPassword> -dxPort <dxPort> -dxProtocol <dxProtocol> -hostname <hostname> -contenthandlerPath <contenthandlerPath> -wcmLibraryPath <wcmLibraryPath> -wcmLibraryName <wcmLibraryName>
3294
+ ```
3295
+
3296
+ **Optional wcmLibraryName and wcmLibraryId inputs**
3297
+
3298
+ If neither of these options is not provided:
3299
+ 1. The LiveSync will check if a saved library was previously pull using this command and use that as the basis.
3300
+ 2. If no saved library is detected, a list of WCM Design Libraries displayed and you can select a WCM Design Library to pull.
3301
+
3302
+ Sample WCM Design Library Selection Prompt
3303
+ ```shell
3304
+ $ dxclient livesync pull-wcm-design-library -dxUsername <dxUsername> -dxPassword <dxPassword> -dxPort <dxPort> -dxProtocol <dxProtocol> -hostname <hostname> -contenthandlerPath <contenthandlerPath> -wcmLibraryPath <wcmLibraryPath>
3305
+ 2024-08-16 19:53:06 : Checking for saved WCM Design Library in <wcmLibraryPath>
3306
+ 2024-08-16 19:53:06 : Please select a WCM Design Library
3307
+ (x) [Library Name: blog solo template v70, Display Title: Blog Solo Template v70, ID: ddc1c6de-b18d-4cfd-af8f-dac5ccdd5d30]
3308
+ ( ) [Library Name: blog template v70, Display Title: Blog Template v70, ID: 5eb62c46-6f7d-498f-b71d-6bbdaac3e84a]
3309
+ ( ) [Library Name: ml configuration, Display Title: ML Configuration, ID: cac73711-d639-436b-a922-1a717c5e1105]
3310
+ ( ) [Library Name: portal site, Display Title: Portal Site, ID: TWFuYWdlZCBQYWdlcyBSb290IExpYnJhcnk]
3311
+ ```
3312
+
3126
3313
  # Logger enablement
3127
3314
 
3128
3315
  ## Enable logger
@@ -48,5 +48,6 @@
48
48
  "wcmSiteArea": "",
49
49
  "wcmLibraryId": "",
50
50
  "wcmLibraryName": "",
51
+ "wcmLibraryPath": "",
51
52
  "wcmProjectName": ""
52
53
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "CF223": "223.0.0",
2
3
  "CF222": "222.0.0",
3
4
  "CF221": "221.0.0",
4
5
  "CF220": "1.29.0",
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hcl-software/dxclient",
3
3
  "description": "DXClient is a CLI tool to manage tasks such as deploying portlets, script applications and themes easily from source development environments to target HCL DX deployments. This tool is capable of taking artifacts developed locally and deploying them into DX servers deployed on supported on-premise platforms in standalone, cluster or farm topologies and Kubernetes. Kubernetes platforms are supported for HCL Digital Experience 9.5 CF192 and higher only. \n\nCommon command arguments that are listed in `config.json` can be pre-configured via this file. The common arguments could also be provided through command line. If so, it will override the values in `config.json` and execute. A sample configuration file 'default-config-kube.json' for Kubernetes environments is available under the 'samples/sample-configurations' folder for reference.",
4
- "version": "222.0.0",
4
+ "version": "224.0.0",
5
5
  "license": "Licensed Materials - Property of HCL, Copyright HCL Technologies Ltd. 2020, 2024. All Rights Reserved.",
6
6
  "bin": {
7
7
  "dxclient": "bin/dxclient"
@@ -10,13 +10,13 @@
10
10
  "tsc": "tsc",
11
11
  "clean": "rimraf '{src}/**/*.{js,js.map}'",
12
12
  "build": "tsc && mkdir -p dist/ && cp LICENSE dist/ && mkdir -p dist/src/errors && cp src/errors/* dist/src/errors && mkdir -p dist/packages/deployscriptapplication/src/messages && cp packages/deployscriptapplication/src/messages/* dist/packages/deployscriptapplication/src/messages && mkdir -p dist/packages/deployscriptapplication/src/errors && cp packages/deployscriptapplication/src/errors/* dist/packages/deployscriptapplication/src/errors && mkdir -p dist/packages/deployscriptapplication/src/commands && cp packages/deployscriptapplication/src/commands/*js dist/packages/deployscriptapplication/src/commands/ && mkdir -p dist/packages/deploytheme/src/utils/ && cp packages/deploytheme/src/utils/* dist/packages/deploytheme/src/utils/ && mkdir -p dist/packages/deploytheme/src/messages && cp packages/deploytheme/src/messages/* dist/packages/deploytheme/src/messages && mkdir -p dist/packages/deploytheme/src/errors && cp packages/deploytheme/src/errors/* dist/packages/deploytheme/src/errors && mkdir -p dist/packages/livesync/src/messages && cp packages/livesync/src/messages/* dist/packages/livesync/src/messages && mkdir -p dist/packages/livesync/src/errors && cp packages/livesync/src/errors/* dist/packages/livesync/src/errors && mkdir -p dist/packages/deployportlet/src/messages && cp packages/deployportlet/src/messages/* dist/packages/deployportlet/src/messages && mkdir -p dist/packages/deployportlet/src/errors && cp packages/deployportlet/src/errors/* dist/packages/deployportlet/src/errors && mkdir -p dist/packages/mls_exim/src/export/ && cp packages/mls_exim/src/export/* dist/packages/mls_exim/src/export && mkdir -p dist/packages/mls_exim/src/messages && cp packages/mls_exim/src/messages/* dist/packages/mls_exim/src/messages && mkdir -p dist/packages/mls_exim/src/errors && cp packages/mls_exim/src/errors/* dist/packages/mls_exim/src/errors && mkdir -p dist/packages/mls_exim/src/utils && cp -r packages/mls_exim/src/utils/* dist/packages/mls_exim/src/utils && mkdir -p dist/packages/syndication/src/messages && cp packages/syndication/src/messages/* dist/packages/syndication/src/messages && mkdir -p dist/packages/syndication/src/errors && cp packages/syndication/src/errors/* dist/packages/syndication/src/errors && mkdir -p dist/packages/admintasks/src/messages && cp packages/admintasks/src/messages/* dist/packages/admintasks/src/messages && mkdir -p dist/packages/admintasks/src/errors && cp packages/admintasks/src/errors/* dist/packages/admintasks/src/errors && mkdir -p dist/packages/admintasks/src/utils/ && cp packages/admintasks/src/utils/* dist/packages/admintasks/src/utils/ && mkdir -p dist/packages/sharedlibrary/src/messages && cp packages/sharedlibrary/src/messages/* dist/packages/sharedlibrary/src/messages && mkdir -p dist/packages/sharedlibrary/src/errors && cp packages/sharedlibrary/src/errors/* dist/packages/sharedlibrary/src/errors && mkdir -p dist/packages/mls_exim/src/import/ && cp packages/mls_exim/src/import/* dist/packages/mls_exim/src/import && mkdir -p dist/packages/dam/src/messages && cp packages/dam/src/messages/* dist/packages/dam/src/messages && mkdir -p dist/packages/dam/src/errors && cp packages/dam/src/errors/* dist/packages/dam/src/errors && mkdir -p dist/packages/dam/src/messages && cp packages/dam/src/messages/* dist/packages/dam/src/messages && mkdir -p dist/packages/dam/src/errors && cp packages/dam/src/errors/* dist/packages/dam/src/errors;",
13
- "test": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --testMatch \"**/src/__tests__/(unit|integration)**/*[^d].(ts)\" --coverage",
14
- "test-target": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --testMatch \"**/src/__tests__/(unit|integration|acceptance)/*[^d].(ts)\" ",
15
- "test-unit": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --watchAll=false --testMatch \"**/src/__tests__/(unit)/*[^d].(ts)\" --coverage",
16
- "test-integration": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(integration)/*[^d].(ts)\" --coverage",
17
- "test-mockable": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(integration/*-mocked.test.ts|unit/*.test.ts)\" --coverage",
18
- "test-acceptance": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(acceptance)/*[^d].test.(ts)\" ",
19
- "test-extra-AT": "NODE_TLS_REJECT_UNAUTHORIZED=0 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/acceptance/*[^d].extra_test.ts\" ",
13
+ "test": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --testMatch \"**/src/__tests__/(unit|integration)**/*[^d].(ts)\" --coverage",
14
+ "test-target": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --testMatch \"**/src/__tests__/(unit|integration|acceptance)/*[^d].(ts)\" ",
15
+ "test-unit": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --watchAll=false --testMatch \"**/src/__tests__/(unit)/*[^d].(ts)\" --coverage",
16
+ "test-integration": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(integration)/*[^d].(ts)\" --coverage",
17
+ "test-mockable": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(integration/*-mocked.test.ts|unit/*.test.ts)\" --coverage",
18
+ "test-acceptance": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/(acceptance)/*[^d].test.(ts)\" ",
19
+ "test-extra-AT": "NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_NO_WARNINGS=1 CI=true jest --verbose --runInBand --testTimeout=200000 --watchAll=false --testMatch \"**/src/__tests__/acceptance/*[^d].extra_test.ts\" ",
20
20
  "add-logger-names": "ts-node src/logger/add-logger-names.ts",
21
21
  "nls-test": "ts-node src/nls/nls-test.ts",
22
22
  "lint": "eslint --ext .ts src",
@@ -39,7 +39,7 @@
39
39
  "csv-writer": "^1.6.0",
40
40
  "csvtojson": "^2.0.0",
41
41
  "execa": "^4.0.3",
42
- "express": "^4.17.1",
42
+ "express": "^4.21.0",
43
43
  "form-data": "^3.0.0",
44
44
  "fs-extra": "8.1.0",
45
45
  "intl-messageformat": "^9.3.11",
@@ -51,7 +51,7 @@
51
51
  "prompts": "^2.3.2",
52
52
  "tmp": "^0.2.1",
53
53
  "true-case-path": "^2.2.1",
54
- "ts-retry-promise": "^0.7.0",
54
+ "ts-retry-promise": "^0.8.0",
55
55
  "urlencode": "^1.1.0",
56
56
  "webdav": "^4.11.0",
57
57
  "winston": "^3.3.3",
@@ -120,7 +120,7 @@
120
120
  "coverageThreshold": {
121
121
  "global": {
122
122
  "branches": 85.53,
123
- "functions": 94.74,
123
+ "functions": 94.65,
124
124
  "lines": 93.19,
125
125
  "statements": 93.31
126
126
  }
@@ -44,15 +44,24 @@ class RestartDXCore {
44
44
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
45
45
  try {
46
46
  const restartDXCoreResponse = yield restartDXCoreService_1.restartDXCoreService.executeRestartDXCore(restartDXCoreURL, cmdArgs.dxUsername, cmdArgs.dxPassword, cmdArgs.dxConnectUsername, cmdArgs.dxConnectPassword, cmdArgs.dxProfileName, cmdArgs.dxProfilePath, cmdArgs.requestId);
47
- if (restartDXCoreResponse && restartDXCoreResponse.status === constants_1.HttpStatus.SUCCESS) {
48
- logger_1.logger.info(utils_1.message('RESTART_DXCORE_SUCCESS'));
49
- restartStatus = true;
50
- }
51
- else if (restartDXCoreResponse && restartDXCoreResponse.status === constants_1.HttpStatus.ACCEPTED) {
52
- logger_1.logger.info(utils_1.errorMessage('REQUEST_UNDER_PROCESS', { 0: restartDXCoreResponse.data.uuid }, true));
53
- }
54
- else if (restartDXCoreResponse && restartDXCoreResponse.data) {
55
- logger_1.logger.info(utils_1.errorMessage('ERROR_RESTART_DXCORE', { 0: restartDXCoreResponse.data.message }));
47
+ if (restartDXCoreResponse) {
48
+ switch (restartDXCoreResponse.status) {
49
+ case constants_1.HttpStatus.SUCCESS:
50
+ logger_1.logger.info(utils_1.message('RESTART_DXCORE_SUCCESS'));
51
+ restartStatus = true;
52
+ break;
53
+ case constants_1.HttpStatus.ACCEPTED:
54
+ logger_1.logger.info(utils_1.errorMessage('REQUEST_UNDER_PROCESS', { 0: restartDXCoreResponse.data.uuid }, true));
55
+ break;
56
+ case constants_1.HttpStatus.NOT_FOUND:
57
+ logger_1.logger.error(utils_1.errorMessage('ERROR_RESTART_DXCORE_NOT_FOUND'));
58
+ logger_1.logger.debug(`Restart DX Core URL not found or not been defined ${restartDXCoreURL}`);
59
+ break;
60
+ default:
61
+ if (restartDXCoreResponse.data) {
62
+ logger_1.logger.info(utils_1.errorMessage('ERROR_RESTART_DXCORE', { 0: restartDXCoreResponse.data.message }));
63
+ }
64
+ }
56
65
  }
57
66
  }
58
67
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"restartDXCore.js","sourceRoot":"","sources":["../../../../../packages/admintasks/src/commands/restartDXCore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,8EAAgE;AAChE,+DAAmF;AACnF,yDAAsD;AACtD,uDAAoE;AACpE,2EAAwE;AAExE,MAAa,aAAa;IAMlB,MAAM,CAAC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AM,EAAE;wBACpC,KAAK,sBAAU,CAAC,OAAO;4BACrB,eAAM,CAAC,IAAI,CAAC,eAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;4BAC/C,aAAa,GAAG,IAAI,CAAC;4BACrB,MAAM;wBACR,KAAK,sBAAU,CAAC,QAAQ;4BACtB,eAAM,CAAC,IAAI,CAAC,oBAAY,CAAC,uBAAuB,EAAE,EAAE,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;4BACjG,MAAM;wBACR,KAAK,sBAAU,CAAC,SAAS;4BACvB,eAAM,CAAC,KAAK,CAAC,oBAAY,CAAC,gCAAgC,CAAC,CAAC,CAAC;4BAC7D,eAAM,CAAC,KAAK,CAAC,qDAAqD,gBAAgB,EAAE,CAAC,CAAC;4BACtF,MAAM;wBACR;4BACE,IAAI,qBAAqB,CAAC,IAAI,EAAE;gCAC9B,eAAM,CAAC,IAAI,CAAC,oBAAY,CAAC,sBAAsB,EAAE,EAAE,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;6BAC9F;qBACJ;iBACF;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,eAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBAC7D,eAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aAC7B;YACD,eAAM,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;YAC5D,OAAO,aAAa,CAAC;QACvB,CAAC;KAAA;CACF;AA5CD,sCA4CC"}
@@ -7,6 +7,7 @@
7
7
  "ERROR_TARGET_PORT": "Please enter a valid target server port.",
8
8
  "ERROR_TARGET_DX_PROFILE_NAME": "Please enter a valid profile name of the target server.",
9
9
  "ERROR_RESTART_DXCORE": "Error in restarting the DX Core: {0}.",
10
+ "ERROR_RESTART_DXCORE_NOT_FOUND": "An unexpected issue occurred while attempting to restart DX Core. Please check DXClient logs and DX Core Server logs.",
10
11
  "ERROR_RESPONSE_UNAUTHORIZED": "Restart of DX Core failed due to an authorization failure.",
11
12
  "ERROR_VP_CONTEXT": "Please enter a valid virtual portal context.",
12
13
  "ERROR_VP_TITLE": "Please enter a valid virtual portal name.",
@@ -8,11 +8,12 @@ export declare class PullWcmDesignLibrary {
8
8
  };
9
9
  private libraryPath;
10
10
  invoke(cmdArgs: commander.Command): Promise<boolean>;
11
- pullLibrary(libraryId: string): Promise<boolean>;
12
- getLibraryId(libraryName: string): Promise<string>;
11
+ pullLibrary(libraryId: string, projectId?: string): Promise<boolean>;
12
+ private pullFolderPresets;
13
13
  getLibraryMetadata(libraryId?: string): Promise<Library>;
14
14
  emptyLocalPath(localLibraryPath: string): boolean;
15
15
  private processFolders;
16
16
  private createFolder;
17
17
  private createAndAssignFolder;
18
+ getProjectId(wcmProjectName: string): Promise<string>;
18
19
  }