@pega/custom-dx-components 0.25.22 → 0.25.24

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 (159) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/build-jest-assets/index.js +0 -1
  3. package/src/tasks/build-lib/helper.js +0 -2
  4. package/src/tasks/build-lib/index.js +3 -3
  5. package/src/tasks/create/index.js +5 -1
  6. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +1 -0
  7. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +1 -0
  8. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +1 -0
  9. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +1 -0
  10. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +1 -0
  11. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +1 -0
  12. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +1 -0
  13. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +1 -0
  14. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +1 -0
  15. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +1 -0
  16. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +1 -0
  17. package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +1 -0
  18. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +1 -0
  19. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +1 -0
  20. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +1 -0
  21. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +1 -0
  22. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +1 -0
  23. package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +1 -0
  24. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +1 -0
  25. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +1 -0
  26. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +1 -0
  27. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +1 -0
  28. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +1 -0
  29. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -0
  30. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +1 -0
  31. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +1 -0
  32. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +1 -0
  33. package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -0
  34. package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +1 -0
  35. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +1 -0
  36. package/src/tasks/create-all/index.js +5 -1
  37. package/src/tasks/delete/helper.js +0 -1
  38. package/src/tasks/delete/index.js +5 -1
  39. package/src/tasks/delete-lib/helper.js +0 -1
  40. package/src/tasks/delete-pub/helper.js +7 -2
  41. package/src/tasks/delete-version/index.js +0 -1
  42. package/src/tasks/export-archive/helper.js +7 -1
  43. package/src/tasks/export-archive/index.js +10 -34
  44. package/src/tasks/import-archive/helper.js +19 -5
  45. package/src/tasks/import-archive/index.js +247 -35
  46. package/src/tasks/import-comp/helper.js +0 -2
  47. package/src/tasks/init/template/package.json.mustache +1 -1
  48. package/src/tasks/init/template/tasks.config.json +1 -1
  49. package/src/tasks/list/helper.js +17 -2
  50. package/src/tasks/list-lib/index.js +10 -1
  51. package/src/tasks/list-pub/helper.js +2 -4
  52. package/src/tasks/list-pub/index.js +15 -2
  53. package/src/tasks/publish/helper.js +0 -1
  54. package/src/tasks/publish/index.js +13 -1
  55. package/src/tasks/publish-all/index.js +10 -1
  56. package/src/tasks/publish-archive/index.js +53 -83
  57. package/src/tasks/publish-lib/index.js +0 -23
  58. package/src/tasks/rename/index.js +9 -1
  59. package/src/tasks/restore/index.js +19 -13
  60. package/src/tasks/set-perm/index.js +0 -2
  61. package/src/tasks/show-help/index.js +1 -5
  62. package/src/tasks/show-status/index.js +19 -6
  63. package/src/tasks/store/index.js +39 -18
  64. package/src/tasks/switch-lib/helper.js +0 -1
  65. package/src/tasks/validator/index.js +10 -5
  66. package/src/util.js +21 -77
  67. package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -0
  68. package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
  69. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
  70. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
  71. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
  72. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
  73. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
  74. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
  75. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
  76. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
  77. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
  78. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
  79. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  80. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
  81. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
  82. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  83. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
  84. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
  85. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
  86. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
  87. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
  88. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  89. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
  90. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
  91. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
  92. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
  93. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  94. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  95. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  96. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
  97. package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
  98. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +1 -0
  99. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
  100. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
  101. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
  102. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
  103. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
  104. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
  105. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
  106. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
  107. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
  108. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  109. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
  110. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
  111. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  112. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
  113. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
  114. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
  115. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
  116. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
  117. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  118. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
  119. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
  120. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
  121. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  122. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  123. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  124. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
  125. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +1 -0
  126. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -0
  127. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +1 -0
  128. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +1 -0
  129. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +1 -0
  130. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +1 -0
  131. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +1 -0
  132. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +1 -0
  133. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +1 -0
  134. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  135. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +1 -0
  136. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +1 -0
  137. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  138. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +1 -0
  139. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +1 -0
  140. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +1 -0
  141. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +1 -0
  142. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +1 -0
  143. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  144. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +1 -0
  145. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +1 -0
  146. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +1 -0
  147. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  148. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  149. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  150. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +1 -0
  151. package/tests/functional/localCreateBuildAllDeleteAll.test.js +8 -8
  152. package/tests/functional/localCreateBuildDelete.test.js +8 -8
  153. package/tests/functional/localCreateListDelete.test.js +8 -8
  154. package/tests/functional/localCreatePublishAllDeleteAll.test.js +8 -8
  155. package/tests/functional/localCreatePublishDelete.test.js +8 -8
  156. package/tests/functional/localCreateRenameDelete.test.js +8 -8
  157. package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
  158. package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
  159. package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.25.22",
3
+ "version": "0.25.24",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -2,7 +2,6 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { join } from 'path';
4
4
  import inquirer from 'inquirer';
5
- import { Listr } from 'listr2';
6
5
  import chalk from 'chalk';
7
6
 
8
7
  import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents, getLibraryBasedCL, setLibraryBasedCL, forceDefaultsUpdate } from '../../util.js';
@@ -1,5 +1,3 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
1
  import chalk from 'chalk';
4
2
 
5
3
  import {
@@ -106,9 +106,9 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
106
106
  // warnings are part of buildLib
107
107
 
108
108
  // for now
109
- console.log(chalk.green.bold('Compile check...'));
110
- await bundleComponent(components[0], null, devBuild, false);
111
- console.log('');
109
+ // console.log(chalk.green.bold('Compile check...'));
110
+ // await bundleComponent(components[0], null, devBuild, false);
111
+ // console.log('');
112
112
 
113
113
  // remove dist/lib stuff
114
114
  await cleanUp();
@@ -22,7 +22,8 @@ import {
22
22
  getLibraryBased,
23
23
  addDebugLog,
24
24
  checkLibraryAndArchives,
25
- getConfigDefaults
25
+ getConfigDefaults,
26
+ getSubTypeLabel
26
27
  } from '../../util.js';
27
28
  import { COMPONENT_SCHEMA, SHARED_FILE_NAMES } from '../../constants.js';
28
29
 
@@ -103,6 +104,8 @@ const compileMustacheTemplates = async (
103
104
  files.forEach(file => {
104
105
  const filePath = path.join(componentDirectory, file);
105
106
 
107
+ const subTypeLabel = getSubTypeLabel(type, subtype);
108
+
106
109
  const output = compileMustacheTemplate(filePath, {
107
110
  COMPONENT_KEY: componentKey,
108
111
  COMPONENT_NAME: componentName,
@@ -114,6 +117,7 @@ const compileMustacheTemplates = async (
114
117
  ALLOWEDAPPS: JSON.stringify(allowedApplications),
115
118
  TYPE: type,
116
119
  SUB_TYPE: JSON.stringify(mustacheSubType),
120
+ SUB_TYPE_LABEL: subTypeLabel,
117
121
  DESCRIPTION: description,
118
122
  IS_TEMPLATE: isTemplate,
119
123
  IS_PICKLIST: isPicklist,
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-checkbox-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-date-time-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-decimal-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-currency-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  {{#IS_TEMPLATE}}
13
14
  "icon": "images/pz-integer-active.svg",
14
15
  {{/IS_TEMPLATE}}
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  {{#IS_TEMPLATE}}
13
14
  "icon": "images/pz-text-input-active.svg",
14
15
  {{/IS_TEMPLATE}}
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-email-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": "Text",
12
+ "subtypeLabel": "Text",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-text-area-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-phone-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-date-time-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnDetails.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "TwoColumnDetails.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "DefaultForm.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "TwoColumn.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
10
  "type": "{{TYPE}}",
11
11
  "subtype": {{{SUB_TYPE}}},
12
+ "subtypeLabel": "{{SUB_TYPE_LABEL}}",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -23,7 +23,8 @@ import { checkPathAccess, showVersion ,
23
23
  getLibraryBased,
24
24
  addDebugLog,
25
25
  checkLibraryAndArchives,
26
- getConfigDefaults
26
+ getConfigDefaults,
27
+ getSubTypeLabel
27
28
  } from '../../util.js';
28
29
 
29
30
  import { COMPONENT_SCHEMA, COMPONENTS_DIRECTORY_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_PATH, CATEGORY_CONSTELLATION, SHARED_FILE_NAMES } from '../../constants.js';
@@ -113,6 +114,8 @@ export const compileMustacheTemplates = async (
113
114
  files.forEach((file) => {
114
115
  const filePath = path.join(componentDirectory, file);
115
116
 
117
+ const subTypeLabel = getSubTypeLabel(type, subtype).toString();
118
+
116
119
  const output = compileMustacheTemplate(filePath, {
117
120
  COMPONENT_KEY: componentKey,
118
121
  COMPONENT_NAME: componentName,
@@ -124,6 +127,7 @@ export const compileMustacheTemplates = async (
124
127
  ALLOWEDAPPS: JSON.stringify(allowedApplications),
125
128
  TYPE: type,
126
129
  SUB_TYPE: JSON.stringify(mustacheSubType),
130
+ SUB_TYPE_LABEL: subTypeLabel,
127
131
  DESCRIPTION: description,
128
132
  IS_TEMPLATE: isTemplate,
129
133
  IS_PICKLIST: isPicklist,
@@ -13,7 +13,6 @@ import {
13
13
  getComponents,
14
14
  getPegaServerConfig,
15
15
  standardizeStr,
16
- sanitize,
17
16
  addDebugLog,
18
17
  checkAccessTokenExpiration
19
18
  } from '../../util.js';
@@ -2,7 +2,11 @@ import inquirer from 'inquirer';
2
2
 
3
3
  import { showVersion, getLibraryBased, addDebugLog, checkLibraryAndArchives } from '../../util.js';
4
4
 
5
- import { deleteLocalComponents, SOURCE_OF_COMPONENT_TYPES, deleteServerComponents, getDeleteComponentsQuestions } from './helper.js';
5
+ import {
6
+ deleteLocalComponents,
7
+ SOURCE_OF_COMPONENT_TYPES,
8
+ deleteServerComponents,
9
+ getDeleteComponentsQuestions } from './helper.js';
6
10
 
7
11
 
8
12
  const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
@@ -1,4 +1,3 @@
1
- import path from 'path';
2
1
  import chalk from 'chalk';
3
2
 
4
3
  import { addDebugLog, getConfigDefaults, getLibraryArchiveDirectories } from '../../util.js';
@@ -1,9 +1,14 @@
1
1
  import fs from 'fs';
2
- import path from 'path';
3
2
  import chalk from 'chalk';
4
3
  import fetch from 'node-fetch';
5
4
 
6
- import { getPegaServerConfig, addDebugLog, getApplicationAndVersionFromToken, constructCompleteUrl, getHttpsAgent, validateRulesetVersion } from '../../util.js';
5
+ import {
6
+ getPegaServerConfig,
7
+ addDebugLog,
8
+ getApplicationAndVersionFromToken,
9
+ constructCompleteUrl,
10
+ getHttpsAgent,
11
+ validateRulesetVersion } from '../../util.js';
7
12
  import { LIST_COMPONENT_LIBRARIES_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
8
13
 
9
14
  export const SOURCE_OF_COMPONENT_TYPES = {
@@ -1,4 +1,3 @@
1
- import inquirer from 'inquirer';
2
1
  import chalk from 'chalk';
3
2
 
4
3
  import {
@@ -1,7 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
  import path from 'path';
3
3
  import { join } from 'path';
4
- import { addDebugLog, getConfigDefaults, getLibraryArchiveDirectories, getLibraryArchivesVersions, setConfigExportRelativePath, forceDefaultsUpdate } from '../../util.js';
4
+ import {
5
+ addDebugLog,
6
+ getConfigDefaults,
7
+ getLibraryArchiveDirectories,
8
+ getLibraryArchivesVersions,
9
+ setConfigExportRelativePath,
10
+ forceDefaultsUpdate } from '../../util.js';
5
11
 
6
12
  export const SOURCE_OF_COMPONENT_TYPES = {
7
13
  SERVER: 'Server',
@@ -1,7 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import { promisify } from 'util';
3
3
  import { join } from 'path';
4
- import path from 'path';
5
4
 
6
5
  import inquirer from 'inquirer';
7
6
  import ncp from 'ncp';
@@ -21,7 +20,7 @@ import {
21
20
  checkAccessTokenExpiration
22
21
  } from '../../util.js';
23
22
  import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, BIN_ARCHIVES_PATH } from '../../constants.js';
24
- import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath, getFullArchiveQuestions, getServerOrDirectoryQuestion } from './helper.js';
23
+ import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath, getServerOrDirectoryQuestion } from './helper.js';
25
24
  import { localBuildLibrary } from '../build-lib/index.js';
26
25
  import publishArchive from '../publish-archive/index.js';
27
26
 
@@ -143,8 +142,6 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
143
142
  }
144
143
  }
145
144
 
146
-
147
-
148
145
  // archive it
149
146
  output = await zipVersionAndArchiveCL(configDef.currentOrgLib, configDef.buildVersion);
150
147
 
@@ -163,9 +160,6 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
163
160
 
164
161
 
165
162
 
166
-
167
-
168
-
169
163
  }
170
164
 
171
165
 
@@ -191,30 +185,6 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
191
185
 
192
186
  if (orgLibName === configDef.currentOrgLib && selectedVersion === configDef.buildVersion) {
193
187
 
194
- /*
195
- let currentOrStore = currentOrArchive;
196
- if (currentOrArchive === "") {
197
- console.log("\nYou've selected the current working library/version.");
198
- console.log("Export store or the current.");
199
- const archAnswers = await inquirer.prompt([
200
- {
201
- name: 'currentOrStore',
202
- type: 'rawlist',
203
- message: 'Select current or store',
204
- default: "Current",
205
- choices: ["Current", "Store"]
206
- },
207
- ]);
208
-
209
- currentOrStore = archAnswers.currentOrStore;
210
-
211
- }
212
-
213
- if (currentOrStore === "Current") {
214
- archiveBeforeStore = true;
215
- }
216
- */
217
-
218
188
  // We are just going to archive before store and not ask
219
189
  archiveBeforeStore = true;
220
190
 
@@ -262,6 +232,8 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
262
232
 
263
233
 
264
234
  if (archiveBeforeStore) {
235
+
236
+
265
237
  // archive it
266
238
  output = await zipVersionAndArchive(configDef.currentOrgLib, configDef.buildVersion);
267
239
 
@@ -386,7 +358,7 @@ export default async options => {
386
358
  ({ selectedVersion } = libraryVersionAnswer);
387
359
  }
388
360
 
389
- /* when we can export to server, un comment this out
361
+ // when we can export to server, un comment this out
390
362
  if (isLibraryBasedCL) {
391
363
  if (exportTo === "") {
392
364
  const serverOrDirectoryQuestion = await getServerOrDirectoryQuestion();
@@ -397,8 +369,8 @@ export default async options => {
397
369
  else {
398
370
  exportTo = "Directory";
399
371
  }
400
- */
401
- exportTo = "Directory"; // remove this line when above is uncommented out
372
+
373
+ //exportTo = "Directory"; // remove this line when above is uncommented out
402
374
 
403
375
 
404
376
  if (exportTo === "Directory") {
@@ -422,6 +394,10 @@ export default async options => {
422
394
  else {
423
395
  await checkAccessTokenExpiration();
424
396
 
397
+ // archive it
398
+ await zipVersionAndArchive(orgLibName, selectedVersion);
399
+
400
+
425
401
  // publish to server
426
402
  await publishArchive(orgLibName, selectedVersion);
427
403
 
@@ -4,8 +4,25 @@ import path from 'path';
4
4
  import fetch from 'node-fetch';
5
5
  import { join } from 'path';
6
6
  import { Listr } from 'listr2';
7
- import { addDebugLog, getHttpsAgent, getConfigDefaults, getPegaServerConfig, convertIntoPascalCase, getComponents, getComponentDirectoryPath, getDirectoryFiles, setConfigImportRelativePath, forceDefaultsUpdate, constructCompleteUrl } from '../../util.js';
8
- import { TASKS_CONFIG_JSON_FILENAME, TEMP_PATH, PACKAGE_JSON_FILENAME, LIST_COMPONENT_LIBRARY_ARCHIVES_SERVICE_REST_ENDPOINT, COMPONENT_LIBRARY_ARCHIVE_SERVICE_REST_ENDPOINT, TOKEN_PATH} from '../../constants.js';
7
+ import {
8
+ addDebugLog,
9
+ getHttpsAgent,
10
+ getConfigDefaults,
11
+ getPegaServerConfig,
12
+ convertIntoPascalCase,
13
+ getComponents,
14
+ getComponentDirectoryPath,
15
+ getDirectoryFiles,
16
+ setConfigImportRelativePath,
17
+ forceDefaultsUpdate,
18
+ constructCompleteUrl } from '../../util.js';
19
+ import {
20
+ TASKS_CONFIG_JSON_FILENAME,
21
+ TEMP_PATH,
22
+ PACKAGE_JSON_FILENAME,
23
+ LIST_COMPONENT_LIBRARY_ARCHIVES_SERVICE_REST_ENDPOINT,
24
+ COMPONENT_LIBRARY_ARCHIVE_SERVICE_REST_ENDPOINT,
25
+ TOKEN_PATH} from '../../constants.js';
9
26
 
10
27
 
11
28
 
@@ -513,9 +530,6 @@ async function fetchComponentLibraryArchivesFromInfinity(apiUrl, headers) {
513
530
  );
514
531
 
515
532
  let urlParams = `/app-name/${appName}/file-name/${fileName}/file-type/${fileType}/rulesetname/${ruleSet}/rulesetversion/${ruleSetVersion}`;
516
- //let urlParams = `&ApplicationName=${ApplicationName}&ApplicationVersion=${ApplicationVersion}&RulesetName=${rulesetName}&RulesetVersion=${rulesetVersion}`;
517
- //urlParams = encodeURIComponent(urlParams);
518
-
519
533
 
520
534
  url = url.concat(urlParams);
521
535