@pega/custom-dx-components 0.242.45 → 0.242.47

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 (47) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  3. package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +2 -2
  4. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +2 -2
  5. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +1 -1
  6. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +2 -2
  7. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +1 -1
  8. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +2 -2
  9. package/src/tasks/delete-lib/helper.js +5 -0
  10. package/src/tasks/delete-lib/index.js +72 -20
  11. package/src/tasks/delete-version/index.js +13 -4
  12. package/src/tasks/export-archive/helper.js +1 -1
  13. package/src/tasks/export-archive/index.js +22 -6
  14. package/src/tasks/import-comp/index.js +29 -17
  15. package/src/tasks/init/template/package.json.mustache +15 -15
  16. package/src/tasks/show-help/index.js +1 -1
  17. package/src/tasks/switch-lib/helper.js +3 -8
  18. package/src/tasks/switch-lib/index.js +39 -10
  19. package/src/util.js +8 -0
  20. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +1 -1
  21. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +2 -2
  22. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +2 -2
  23. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  24. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +2 -2
  25. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +1 -1
  26. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +2 -2
  27. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +2 -2
  28. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  29. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +2 -2
  30. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +1 -1
  31. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +2 -2
  32. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +2 -2
  33. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  34. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +2 -2
  35. package/tests/functional/localLibCreateLibAlreadyDeleteLib.test.js +1 -1
  36. package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
  37. package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
  38. package/tests/functional/localLibCreateLibDeleteLib.test.js +1 -1
  39. package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
  40. package/tests/functional/localLibCreateLibExportLib.test.js +1 -1
  41. package/tests/functional/localLibCreateLibImportCompDeleteLib.test.js +3 -3
  42. package/tests/functional/localLibCreateLibListDeleteLib.test.js +3 -3
  43. package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +3 -3
  44. package/tests/functional/localLibCreateLibPermDeleteLib.test.js +1 -1
  45. package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +1 -1
  46. package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +1 -1
  47. package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.242.45",
3
+ "version": "0.242.47",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -187,7 +187,7 @@ export const updatePropertiesForNewRecord = (
187
187
  dataObj
188
188
  .fetchData(newCaseId)
189
189
  // @ts-ignore
190
- .then(displayResponse => {
190
+ .then((displayResponse: any) => {
191
191
  let columnsWithSetProperty = [];
192
192
  if (dataApiObj.columns) {
193
193
  columnsWithSetProperty = dataApiObj.columns
@@ -16,8 +16,8 @@ interface {{COMPONENT_CLASS_NAME}}AvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: {{COMPONENT_CLASS_NAME}}AvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -16,8 +16,8 @@ interface {{COMPONENT_CLASS_NAME}}AvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: {{COMPONENT_CLASS_NAME}}AvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -32,7 +32,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
32
32
  ];
33
33
 
34
34
  useEffect(() => {
35
- const payload = { dataViewParameters: [{ CaseInstanceKey: caseID }] };
35
+ const payload = { dataViewParameters: { CaseInstanceKey: caseID } };
36
36
  PCore.getDataApiUtils()
37
37
  .getData('D_pyWorkHistory', payload, context)
38
38
  .then((response: any) => {
@@ -16,8 +16,8 @@ interface {{COMPONENT_CLASS_NAME}}AvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: {{COMPONENT_CLASS_NAME}}AvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -30,7 +30,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
30
30
  ];
31
31
 
32
32
  useEffect(() => {
33
- const payload = { dataViewParameters: [{ ObjectID: caseID }] };
33
+ const payload = { dataViewParameters: { ObjectID: caseID } };
34
34
  PCore.getDataApiUtils()
35
35
  .getData('ObjectHistory', payload, context)
36
36
  .then((response: any) => {
@@ -16,8 +16,8 @@ interface {{COMPONENT_CLASS_NAME}}AvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: {{COMPONENT_CLASS_NAME}}AvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -14,6 +14,11 @@ addDebugLog("getDeleteLibraryQuestions", "", "");
14
14
  const configDef = getConfigDefaults();
15
15
  const archLibs = await getLibraryArchiveDirectories("");
16
16
 
17
+ if (archLibs.length === 0) {
18
+ console.log(chalk.red(`No libraries exist to delete.`));
19
+ process.exit();
20
+ }
21
+
17
22
  return [
18
23
  {
19
24
  name: 'libraryName',
@@ -24,7 +24,7 @@ import { showCurrentStatus } from '../show-status/index.js';
24
24
 
25
25
 
26
26
 
27
- export const deleteLibraryVersion = async (libraryName, version = "") => {
27
+ export const deleteLibraryVersion = async (libraryName, version = "", okToDelete) => {
28
28
  addDebugLog("deleteLibraryVersion", "", "+");
29
29
 
30
30
  const isLibraryBased = getLibraryBased();
@@ -42,25 +42,65 @@ addDebugLog("deleteLibraryVersion", "", "+");
42
42
  }
43
43
  catch (ex) {}
44
44
 
45
- if (version === "") {
45
+ if (version === "" || version === "ALL") {
46
46
 
47
47
  if (libVersions.length > 0) {
48
48
  // ALL option
49
49
 
50
- if (libVersions.length > 1) {
51
- libVersions.unshift('ALL');
52
- }
50
+ if (version !== "ALL") {
51
+ if (libVersions.length > 1) {
52
+ libVersions.unshift('ALL');
53
+ }
54
+
55
+ const versionQuestions = await getLibraryVersionQuestion(libraryName, libVersions);
56
+ const versionAnswers = await inquirer.prompt(versionQuestions);
53
57
 
54
- const versionQuestions = await getLibraryVersionQuestion(libraryName, libVersions);
55
- const versionAnswers = await inquirer.prompt(versionQuestions);
58
+ ({version, confirmDeletion} = versionAnswers);
59
+
60
+ if (!confirmDeletion) {
61
+ console.log(chalk.green(`Library not deleted.`));
62
+ process.exit();
63
+ }
64
+ }
56
65
 
57
- ({version, confirmDeletion} = versionAnswers);
66
+ if (okToDelete === undefined) {
67
+ if (libraryName === compDef.currentOrgLib && (version === "ALL" || version === compDef.buildVersion)) {
68
+ console.log(`\n${chalk.bold.yellow(`${compDef.displayLibVersion}`)} is your ${chalk.yellow('CURRENT')} library/version.`);
69
+ console.log(chalk.bold.yellow('Your current components will be DELETED!!!'))
70
+ const confirmAnswers = await inquirer.prompt([
71
+ {
72
+ name: 'confirmDeletion',
73
+ type: 'confirm',
74
+ message: 'Ok to delete?',
75
+ default: false
76
+ }
77
+ ]);
78
+
79
+ if (!confirmAnswers.confirmDeletion) {
80
+ console.log(chalk.green(`Library not deleted.`));
81
+ process.exit();
82
+ }
58
83
 
59
- if (!confirmDeletion) {
84
+ }
85
+ }
86
+ else if (!okToDelete) {
60
87
  console.log(chalk.green(`Library not deleted.`));
61
88
  process.exit();
62
89
  }
63
90
 
91
+
92
+ }
93
+ else {
94
+ // No library with that name
95
+ console.log(chalk.redBright(`No local library named: ${libraryName} exists.`));
96
+ addDebugLog("deleteLibraryVersion", "END", "-");
97
+ process.exit();
98
+
99
+ }
100
+
101
+ }
102
+ else {
103
+ if (okToDelete === undefined) {
64
104
  if (libraryName === compDef.currentOrgLib && (version === "ALL" || version === compDef.buildVersion)) {
65
105
  console.log(`\n${chalk.bold.yellow(`${compDef.displayLibVersion}`)} is your ${chalk.yellow('CURRENT')} library/version.`);
66
106
  console.log(chalk.bold.yellow('Your current components will be DELETED!!!'))
@@ -79,16 +119,13 @@ addDebugLog("deleteLibraryVersion", "", "+");
79
119
  }
80
120
 
81
121
  }
82
-
83
122
  }
84
- else {
85
- // No library with that name
86
- console.log(chalk.redBright(`No local library named: ${libraryName} exists.`));
87
- addDebugLog("deleteLibraryVersion", "END", "-");
88
- process.exit();
89
-
123
+ else if (!okToDelete) {
124
+ console.log(chalk.green(`Library not deleted.`));
125
+ process.exit();
90
126
  }
91
127
 
128
+
92
129
  }
93
130
 
94
131
  // so if going to remove the only version, then remove ALL
@@ -165,6 +202,7 @@ addDebugLog("deleteLibrary", "", "+");
165
202
 
166
203
 
167
204
  let version = "";
205
+ let okToDelete;
168
206
 
169
207
  const compDef = getConfigDefaults();
170
208
  let libraryName;
@@ -173,16 +211,30 @@ addDebugLog("deleteLibrary", "", "+");
173
211
  libraryName = options.params[3];
174
212
  version = options.params[4];
175
213
 
214
+ if (options.params.length >=6 ) {
215
+ const okToDel = options.params[5];
216
+ okToDelete = !!(okToDel === 'Y' || okToDel === 'y' || okToDel === true || okToDel === 'true');
217
+ }
218
+
219
+
176
220
  }
177
221
  else {
178
222
 
179
- const questions = await getDeleteLibraryQuestions();
180
- const answers = await inquirer.prompt(questions);
181
- ({ libraryName } = answers);
223
+ if (options.params.length === 4) {
224
+ libraryName = options.params[3];
225
+ version = "ALL"
226
+ }
227
+ else {
228
+ const questions = await getDeleteLibraryQuestions();
229
+ const answers = await inquirer.prompt(questions);
230
+ ({ libraryName } = answers);
231
+ }
232
+
233
+
182
234
 
183
235
  }
184
236
 
185
- await deleteLibraryVersion(libraryName, version);
237
+ await deleteLibraryVersion(libraryName, version, okToDelete);
186
238
 
187
239
 
188
240
 
@@ -28,16 +28,25 @@ addDebugLog("deleteVersion", "", "+");
28
28
 
29
29
 
30
30
  let version = "";
31
+ let okToDelete;
31
32
 
32
33
  const configDef = getConfigDefaults();
33
- let libraryName;
34
+ let libraryName = configDef.currentOrgLib;
34
35
 
35
- if (options.params.length >= 4) {
36
- version = options.params[3];
36
+ if (options.params.length >= 5) {
37
+ libraryName = options.params[3]
38
+ version = options.params[4];
37
39
 
40
+ if (options.params.length >=6 ) {
41
+ const okToDel = options.params[5];
42
+ okToDelete = !!(okToDel === 'Y' || okToDel === 'y' || okToDel === true || okToDel === 'true');
43
+ }
44
+ }
45
+ else if (options.params.length >= 4) {
46
+ libraryName = options.params[3];
38
47
  }
39
48
 
40
- await deleteLibraryVersion(configDef.currentOrgLib, version);
49
+ await deleteLibraryVersion(libraryName, version, okToDelete);
41
50
 
42
51
 
43
52
 
@@ -33,7 +33,7 @@ addDebugLog("getFilePathQuestions", "", "");
33
33
  return [
34
34
  {
35
35
  name: 'filePath',
36
- message: 'Enter full file path of zip file location:',
36
+ message: 'Enter full file path of directory to export zip file:',
37
37
  default: defaultPath
38
38
  }
39
39
  ];
@@ -19,6 +19,7 @@ import {
19
19
  } from '../../util.js';
20
20
  import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH } from '../../constants.js';
21
21
  import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath } from './helper.js';
22
+ import { or } from 'ajv/dist/compile/codegen/index.js';
22
23
 
23
24
  export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
24
25
  const currentDirectory = process.cwd();
@@ -200,14 +201,29 @@ export default async options => {
200
201
 
201
202
  }
202
203
  else {
204
+ let orgLibName = "";
205
+ let selectedVersion = "";
206
+
207
+ if (options.params.length >= 4) {
208
+ orgLibName = options.params[3];
209
+ if (options.params.length >= 5) {
210
+ selectedVersion = options.params[4];
211
+ }
212
+ }
213
+
203
214
 
204
- const libraryQuestion = await getLibraryQuestion();
205
- const libraryAnswers = await inquirer.prompt(libraryQuestion);
206
- const { orgLibName } = libraryAnswers;
215
+ if (orgLibName === "") {
216
+ const libraryQuestion = await getLibraryQuestion();
217
+ const libraryAnswers = await inquirer.prompt(libraryQuestion);
218
+ ({ orgLibName } = libraryAnswers);
219
+ }
220
+
221
+ if (selectedVersion === "") {
222
+ const libraryVersionQuestion = await getLibraryVersionQuestion(orgLibName);
223
+ const libraryVersionAnswer = await inquirer.prompt(libraryVersionQuestion);
224
+ ({ selectedVersion } = libraryVersionAnswer);
225
+ }
207
226
 
208
- const libraryVersionQuestion = await getLibraryVersionQuestion(orgLibName);
209
- const libraryVersionAnswer = await inquirer.prompt(libraryVersionQuestion);
210
- const { selectedVersion } = libraryVersionAnswer;
211
227
 
212
228
  const filePathQuestions = await getFilePathQuestions();
213
229
  const filePathAnswers = await inquirer.prompt(filePathQuestions);
@@ -153,7 +153,7 @@ addDebugLog("renameComponent", `library: ${library}, componentKey: ${componentKe
153
153
  };
154
154
 
155
155
 
156
- export const importComp = async(filePath, fileName) => {
156
+ export const importComp = async(filePath, fileName, askValidate) => {
157
157
  addDebugLog("importComp", `filePath: ${filePath}, fileName: ${fileName}`, "");
158
158
 
159
159
  const currentDirectory = process.cwd();
@@ -250,24 +250,27 @@ addDebugLog("importComp", `filePath: ${filePath}, fileName: ${fileName}`, "");
250
250
  const newCompKey = await renameComponent(configData.componentKey, configDef.currentOrgLib, configDef.buildVersion, newName, newLabel, null);
251
251
  console.log(`\n${chalk.green(`${fileName}`)} has been imported as ${chalk.green(`${newCompKey}`)}\n`);
252
252
 
253
- const validateAnswers = await inquirer.prompt([
254
- {
255
- name: 'doValidate',
256
- type: 'confirm',
257
- message: `Validate ${chalk.yellow(`${newCompKey}`)}`,
258
- default: true
259
- }]);
260
-
261
- if (validateAnswers.doValidate) {
262
- const args = [ '','', '', `${newCompKey}`];
263
- let myOptions = {};
264
- myOptions["params"] = args;
265
-
266
- await buildComponent(myOptions);
253
+ if (askValidate) {
254
+ const validateAnswers = await inquirer.prompt([
255
+ {
256
+ name: 'doValidate',
257
+ type: 'confirm',
258
+ message: `Validate ${chalk.yellow(`${newCompKey}`)}`,
259
+ default: true
260
+ }]);
261
+
262
+ if (validateAnswers.doValidate) {
263
+ const args = [ '','', '', `${newCompKey}`];
264
+ let myOptions = {};
265
+ myOptions["params"] = args;
266
+
267
+ await buildComponent(myOptions);
268
+ }
267
269
  }
268
270
 
269
271
 
270
272
 
273
+
271
274
  }
272
275
 
273
276
 
@@ -323,7 +326,16 @@ addDebugLog("importComponent", "", "+");
323
326
  if (options.params.length >= 5) {
324
327
  const filePath = options.params[3];
325
328
  const fileName = options.params[4];
326
- await importComp( filePath, fileName);
329
+ let askValidate = true;
330
+
331
+ if (options.params.length >= 6) {
332
+ if (options.params[5] === "noAskValidate") {
333
+ askValidate = false;
334
+ }
335
+
336
+ }
337
+
338
+ await importComp( filePath, fileName, askValidate);
327
339
 
328
340
  }
329
341
  else {
@@ -345,7 +357,7 @@ addDebugLog("importComponent", "", "+");
345
357
  const fileNameAnswers = await inquirer.prompt(fileNameQuestions);
346
358
  const {fileName} = fileNameAnswers;
347
359
 
348
- await importComp( filePath, fileName);
360
+ await importComp( filePath, fileName, true);
349
361
 
350
362
  }
351
363
 
@@ -79,7 +79,7 @@
79
79
  "@pega/cosmos-react-core": "~7.0.6",
80
80
  "@pega/cosmos-react-work": "~7.0.6",
81
81
  "@pega/eslint-config": "^0.10.2",
82
- "@pega/tsconfig": "^0.10.2",
82
+ "@pega/tsconfig": "^0.15.1",
83
83
  "babel-loader": "^9.1.3",
84
84
  "dayjs": "^1.11.11",
85
85
  "fast-deep-equal": "3.1.3",
@@ -99,15 +99,15 @@
99
99
  "webpack-cli": "^5.1.4"
100
100
  },
101
101
  "devDependencies": {
102
- "@pega/configs": "^0.6.0",
103
- "@pega/custom-dx-components": "~0.242.45",
104
- "@pega/pcore-pconnect-typedefs": "~3.0.0",
105
- "@storybook/addon-actions": "^7.6.7",
102
+ "@pega/configs": "^0.15.1",
103
+ "@pega/custom-dx-components": "~0.242.47",
104
+ "@pega/pcore-pconnect-typedefs": "~3.2.0-alpha.1",
105
+ "@storybook/addon-actions": "^7.6.19",
106
106
  "@storybook/addon-essentials": "^7.6.19",
107
107
  "@storybook/addon-knobs": "^7.1.1",
108
108
  "@storybook/addon-links": "^7.6.19",
109
109
  "@storybook/addon-storysource": "^7.6.19",
110
- "@storybook/react": "^7.6.7",
110
+ "@storybook/react": "^7.6.19",
111
111
  "@storybook/react-webpack5": "^7.6.19",
112
112
  "@types/emoji-mart": "^3.0.14",
113
113
  "@types/lodash.get": "^4.4.9",
@@ -118,12 +118,12 @@
118
118
  "@typescript-eslint/eslint-plugin": "^5.62.0",
119
119
  "babel-loader": "^9.1.3",
120
120
  "eslint": "^8.57.0",
121
- "eslint-plugin-import": "^2.29.1",
122
- "eslint-plugin-jest": "^27.9.0",
123
- "eslint-plugin-jsx-a11y": "^6.8.0",
124
- "eslint-plugin-mdx": "^2.3.4",
125
- "eslint-plugin-prettier": "^5.1.3",
126
- "eslint-plugin-react": "^7.34.2",
121
+ "eslint-plugin-import": "^2.31.0",
122
+ "eslint-plugin-jest": "^28.8.3",
123
+ "eslint-plugin-jsx-a11y": "^6.10.0",
124
+ "eslint-plugin-mdx": "^3.1.5",
125
+ "eslint-plugin-prettier": "^5.2.1",
126
+ "eslint-plugin-react": "^7.37.1",
127
127
  "eslint-plugin-react-hooks": "^4.6.2",
128
128
  "eslint-plugin-sonarjs": "^0.23.0",
129
129
  "eslint-plugin-storybook": "^0.6.15",
@@ -132,9 +132,9 @@
132
132
  "jest-junit": "^16.0.0",
133
133
  "jwt-decode": "^4.0.0",
134
134
  "npm-run-all": "^4.1.5",
135
- "prettier": "3.1.1",
135
+ "prettier": "3.3.3",
136
136
  "storybook": "^7.6.19",
137
- "stylelint": "^14.16.1",
138
- "typescript": "~5.2.2"
137
+ "stylelint": "^16.10.0",
138
+ "typescript": "~5.3.3"
139
139
  }
140
140
  }
@@ -86,7 +86,7 @@ export const showHelpV2 = () => {
86
86
  console.log(`${chalk.cyan('npm run setPermanent ')}\tmake current version permanent or non permanent upon publish`);
87
87
 
88
88
  console.log(`\n${chalk.underline(`Published Versions (needs authentication)`)}`);
89
- console.log(`${chalk.cyan('npm run publishLibVersion')}\tpublish current library/version to server (creates a local published library as well)`);
89
+ console.log(`${chalk.cyan('npm run publish')}\tpublish current library/version to server (creates a local published library as well)`);
90
90
  console.log(`${chalk.cyan('npm run listPublishedLib')}\tget contents of published library/version (local or server)`);
91
91
  console.log(`${chalk.cyan('npm run deletePublishedLib')}\tdelete ALL contents of published libary/version (local or server)`);
92
92
 
@@ -30,16 +30,11 @@ addDebugLog("updateAllComponentsConfig", `newVersion: ${newVersion}`, "");
30
30
  }
31
31
  };
32
32
 
33
- export const getSwitchLibraryComponentQuestions = async () => {
33
+ export const getSwitchLibraryComponentQuestions = async (archVersionList, inputOrgLib) => {
34
34
  addDebugLog("getSwitchLibraryComponentQuestions", "", "");
35
35
  const defaultPegaConfig = await getPegaServerConfig();
36
36
  const componentDefaults = getConfigDefaults();
37
37
  const orgLib = getConfigDefaults();
38
- const currentOrgLib = `${orgLib.organization}_${orgLib.library}`;
39
-
40
-
41
- const archVersionList = await getLibraryArchiveDirectories(currentOrgLib);
42
-
43
38
 
44
39
  console.log(chalk.bold.yellow('\nBe sure to SAVE all changes before switching versions, unsaved changes will be LOST.'))
45
40
 
@@ -53,10 +48,10 @@ addDebugLog("getSwitchLibraryComponentQuestions", "", "");
53
48
  {
54
49
  name: 'newOrgLib',
55
50
  type: 'rawlist',
56
- message: `Select a library (current library is ${chalk.bold.green(`${currentOrgLib}`)}) `,
51
+ message: `Select a library (current library is ${chalk.bold.green(`${orgLib.currentOrgLib}`)}) `,
57
52
  choices: archVersionList,
58
53
  when(answers) {
59
- return answers.okToContinue === true;
54
+ return answers.okToContinue === true && inputOrgLib === "";
60
55
  }
61
56
  }
62
57
  ];
@@ -16,11 +16,13 @@ import {
16
16
  getConfigDefaults,
17
17
  forceDefaultsUpdate,
18
18
  getHaveDependencyDifference,
19
- cleanUpTemp
19
+ cleanUpTemp,
20
+ getLibraryArchiveDirectories
20
21
  } from '../../util.js';
21
22
 
22
23
  import { getSwitchLibraryComponentQuestions, getSwitchVersionComponentQuestions } from './helper.js';
23
24
  import { showCurrentStatus } from '../show-status/index.js';
25
+ import { arch } from 'os';
24
26
 
25
27
 
26
28
  export default async options => {
@@ -37,7 +39,8 @@ export default async options => {
37
39
  addDebugLog("switchLibrary", "", "+");
38
40
  let libraryName;
39
41
  let version;
40
- let newOrgLib;
42
+ let newOrgLib = "";
43
+ let inputOrgLib = "";
41
44
  // permBuild is the opposite of devBuild
42
45
 
43
46
  let okToContinue;
@@ -45,16 +48,35 @@ addDebugLog("switchLibrary", "", "+");
45
48
  const currentDirectory = process.cwd();
46
49
  const componentDirectory = join (currentDirectory, "src", "components");
47
50
 
48
-
51
+ // params are in different order then questions, because want of VS Code pluggin
49
52
  if (options.params.length >= 6) {
50
- const okToCont = options.params[3];
51
- newOrgLib = options.params[4];
52
- version = options.params[5];
53
+ newOrgLib = options.params[3];
54
+ version = options.params[4];
53
55
 
56
+ const okToCont = options.params[5];
54
57
  okToContinue = !!(okToCont === 'Y' || okToCont === 'y' || okToCont === true || okToCont === 'true');
55
58
 
59
+
56
60
  } else {
57
- const questions = await getSwitchLibraryComponentQuestions();
61
+
62
+ if (options.params.length >= 5) {
63
+ inputOrgLib = options.params[3];
64
+ version = options.params[4];
65
+ }
66
+ else if (options.params.length >= 4) {
67
+ inputOrgLib = options.params[3];
68
+ }
69
+
70
+ const orgLib = getConfigDefaults();
71
+
72
+ const archVersionList = await getLibraryArchiveDirectories(orgLib.currentOrgLib);
73
+ if (archVersionList.length === 0) {
74
+ console.log(chalk.red(`No other available libraries to switch to.`));
75
+ process.exit();
76
+ }
77
+
78
+
79
+ const questions = await getSwitchLibraryComponentQuestions(archVersionList, inputOrgLib);
58
80
  const answers = await inquirer.prompt(questions);
59
81
  ({ okToContinue, newOrgLib } = answers);
60
82
 
@@ -62,9 +84,16 @@ addDebugLog("switchLibrary", "", "+");
62
84
  process.exit()
63
85
  }
64
86
 
65
- const nextQuestion = await getSwitchVersionComponentQuestions(newOrgLib);
66
- const nextAnswers = await inquirer.prompt(nextQuestion);
67
- ({ version } = nextAnswers);
87
+ if (newOrgLib === ""|| newOrgLib === undefined ) {
88
+ newOrgLib = inputOrgLib;
89
+ }
90
+
91
+ if (version === "" || version === undefined) {
92
+ const nextQuestion = await getSwitchVersionComponentQuestions(newOrgLib);
93
+ const nextAnswers = await inquirer.prompt(nextQuestion);
94
+ ({ version } = nextAnswers);
95
+ }
96
+
68
97
 
69
98
 
70
99
  }
package/src/util.js CHANGED
@@ -1831,6 +1831,14 @@ export const deleteLocalArchiveLibrary = async(libraryName) => {
1831
1831
  // throw new Error(`No such file ${libraryName}`);
1832
1832
  }
1833
1833
 
1834
+ // check if no other libraries, the remove /store
1835
+ const archList = getLibraryArchiveDirectories();
1836
+ if (archList.length === 0) {
1837
+ const archPath = join (currentDirectory, ARCHIVES_PATH);
1838
+
1839
+ fs.rmSync(archPath, { recursive : true});
1840
+ }
1841
+
1834
1842
  }
1835
1843
 
1836
1844
  export const deleteLocalArchiveLibraryVersion = async(libraryName, version) => {
@@ -32,7 +32,7 @@ function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
32
32
  ];
33
33
 
34
34
  useEffect(() => {
35
- const payload = { dataViewParameters: [{ CaseInstanceKey: caseID }] };
35
+ const payload = { dataViewParameters: { CaseInstanceKey: caseID } };
36
36
  PCore.getDataApiUtils()
37
37
  .getData('D_pyWorkHistory', payload, context)
38
38
  .then((response: any) => {
@@ -16,8 +16,8 @@ interface PegaDxilMyDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -16,8 +16,8 @@ interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -187,7 +187,7 @@ export const updatePropertiesForNewRecord = (
187
187
  dataObj
188
188
  .fetchData(newCaseId)
189
189
  // @ts-ignore
190
- .then(displayResponse => {
190
+ .then((displayResponse: any) => {
191
191
  let columnsWithSetProperty = [];
192
192
  if (dataApiObj.columns) {
193
193
  columnsWithSetProperty = dataApiObj.columns
@@ -16,8 +16,8 @@ interface PegaDxilMyTwoColumnDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyTwoColumnDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -32,7 +32,7 @@ function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
32
32
  ];
33
33
 
34
34
  useEffect(() => {
35
- const payload = { dataViewParameters: [{ CaseInstanceKey: caseID }] };
35
+ const payload = { dataViewParameters: { CaseInstanceKey: caseID } };
36
36
  PCore.getDataApiUtils()
37
37
  .getData('D_pyWorkHistory', payload, context)
38
38
  .then((response: any) => {
@@ -16,8 +16,8 @@ interface PegaDxilMyDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -16,8 +16,8 @@ interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -187,7 +187,7 @@ export const updatePropertiesForNewRecord = (
187
187
  dataObj
188
188
  .fetchData(newCaseId)
189
189
  // @ts-ignore
190
- .then(displayResponse => {
190
+ .then((displayResponse: any) => {
191
191
  let columnsWithSetProperty = [];
192
192
  if (dataApiObj.columns) {
193
193
  columnsWithSetProperty = dataApiObj.columns
@@ -16,8 +16,8 @@ interface PegaDxilMyTwoColumnDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyTwoColumnDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -30,7 +30,7 @@ function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
30
30
  ];
31
31
 
32
32
  useEffect(() => {
33
- const payload = { dataViewParameters: [{ ObjectID: caseID }] };
33
+ const payload = { dataViewParameters: { ObjectID: caseID } };
34
34
  PCore.getDataApiUtils()
35
35
  .getData('ObjectHistory', payload, context)
36
36
  .then((response: any) => {
@@ -16,8 +16,8 @@ interface PegaDxilMyDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -16,8 +16,8 @@ interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -187,7 +187,7 @@ export const updatePropertiesForNewRecord = (
187
187
  dataObj
188
188
  .fetchData(newCaseId)
189
189
  // @ts-ignore
190
- .then(displayResponse => {
190
+ .then((displayResponse: any) => {
191
191
  let columnsWithSetProperty = [];
192
192
  if (dataApiObj.columns) {
193
193
  columnsWithSetProperty = dataApiObj.columns
@@ -16,8 +16,8 @@ interface PegaDxilMyTwoColumnDetailsAvatarProps extends PConnFieldProps {
16
16
  function Avatar(props: PegaDxilMyTwoColumnDetailsAvatarProps) {
17
17
  const { metaObj, showStatus = false } = props;
18
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
19
- let userName: string;
20
- let userIdentifier: string;
19
+ let userName: any;
20
+ let userIdentifier: any;
21
21
 
22
22
  // TODO Below if conditions can be removed once we have apis to get worklist/mywork info
23
23
  // This is non CaseView case (Dashboard, MyWork etc)
@@ -107,7 +107,7 @@ describe(`createLib createLib (already exists) deleteLib: ${serverDir} - ${compT
107
107
 
108
108
  it(`npm run deleteLib- ${isLibraryBased}`, async() => {
109
109
 
110
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
110
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
111
111
  const { stdout, stderr } = await exec(script);
112
112
 
113
113
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -218,7 +218,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
218
218
 
219
219
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
220
220
 
221
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
221
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
222
222
  const { stdout, stderr } = await exec(script);
223
223
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
224
224
 
@@ -223,7 +223,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
223
223
 
224
224
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
225
225
 
226
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
226
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
227
227
  const { stdout, stderr } = await exec(script);
228
228
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
229
229
 
@@ -149,7 +149,7 @@ describe(`createLib deleteLib: ${serverDir} - ${compType}` , () => {
149
149
 
150
150
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
151
151
 
152
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
152
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
153
153
  const { stdout, stderr } = await exec(script);
154
154
 
155
155
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -230,7 +230,7 @@ describe(`createLib createAll exportStore importStore deleteLib: ${serverDir} -
230
230
 
231
231
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
232
232
 
233
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
233
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
234
234
  const { stdout, stderr } = await exec(script);
235
235
 
236
236
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -207,7 +207,7 @@ describe(`createLib createAll exportStore deleteLib: ${serverDir} - ${compType}`
207
207
 
208
208
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
209
209
 
210
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
210
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
211
211
  const { stdout, stderr } = await exec(script);
212
212
 
213
213
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -98,12 +98,12 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
98
98
  const assetDir = path.resolve(`tests/assets/${compType}/components/createAll/${serverDir}`);
99
99
 
100
100
  // pulling in DXIL MyBoolean but should be renamed to Other MyBoolean
101
- const script = `npm run importComponent ${assetDir} Pega_DXIL_MyBoolean --prefix ../../..`;
101
+ const script = `npm run importComponent ${assetDir} Pega_DXIL_MyBoolean noAskValidate --prefix ../../..`;
102
102
  const { stdout, stderr } = await exec(script);
103
103
 
104
104
  expect(stdout).toContain('Pega_DXIL_MyBoolean has been imported as Pega_Other_MyBoolean');
105
105
 
106
- }, 30000);
106
+ }, 50000);
107
107
 
108
108
  it('npm run list (1 component)', async () => {
109
109
  const script = 'npm run list --prefix ../../..';
@@ -119,7 +119,7 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
119
119
 
120
120
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
121
121
 
122
- const script = `npm run deleteLib Pega_Other 0.0.1-dev --prefix ../../..`;
122
+ const script = `npm run deleteLib Pega_Other 0.0.1-dev Y --prefix ../../..`;
123
123
  const { stdout, stderr } = await exec(script);
124
124
 
125
125
  expect(stdout).toContain('Pega_Other is deleted from Local.');
@@ -238,18 +238,18 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
238
238
 
239
239
  // since only version, will delete the lib as well
240
240
 
241
- const script = `npm run deleteLibVersion 0.0.1-dev Y --prefix ../../..`;
241
+ const script = `npm run deleteLibVersion Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
242
242
  const { stdout, stderr } = await exec(script);
243
243
 
244
244
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
245
245
  expect(stdout).toContain('Switched to Pega_Other/0.0.1-dev');
246
246
 
247
247
 
248
- }, 30000);
248
+ }, 50000);
249
249
 
250
250
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
251
251
 
252
- const script = `npm run deleteLib Pega_Other 0.0.1-dev --prefix ../../..`;
252
+ const script = `npm run deleteLib Pega_Other 0.0.1-dev Y --prefix ../../..`;
253
253
  const { stdout, stderr } = await exec(script);
254
254
 
255
255
  expect(stdout).toContain('Pega_Other is deleted from Local.');
@@ -174,7 +174,7 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
174
174
 
175
175
  it(`npm run switchLib DXIL - ${isLibraryBased}`, async() => {
176
176
 
177
- const script = `npm run switchLib Y Pega_DXIL 0.0.1-dev --prefix ../../..`;
177
+ const script = `npm run switchLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
178
178
 
179
179
  const { stdout, stderr } = await exec(script);
180
180
  expect(stdout).toContain('Switched to Pega_DXIL/0.0.1-dev!');
@@ -220,12 +220,12 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
220
220
 
221
221
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
222
222
 
223
- let script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
223
+ let script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
224
224
  let { stdout, stderr } = await exec(script);
225
225
 
226
226
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
227
227
 
228
- script = `npm run deleteLib Pega_Other 0.0.1-dev --prefix ../../..`;
228
+ script = `npm run deleteLib Pega_Other 0.0.1-dev Y --prefix ../../..`;
229
229
  ({ stdout, stderr } = await exec(script));
230
230
 
231
231
  expect(stdout).toContain('Pega_Other is deleted from Local.');
@@ -132,7 +132,7 @@ describe(`createLib setPerm setNotPerm deleteLib: ${serverDir} - ${compType}` ,
132
132
 
133
133
  it(`npm run deleteLib- ${isLibraryBased}`, async() => {
134
134
 
135
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
135
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
136
136
  const { stdout, stderr } = await exec(script);
137
137
 
138
138
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -182,7 +182,7 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
182
182
 
183
183
  it(`npm run deleteLib- ${isLibraryBased}`, async() => {
184
184
 
185
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
185
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
186
186
  const { stdout, stderr } = await exec(script);
187
187
 
188
188
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
@@ -213,7 +213,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
213
213
 
214
214
  it(`npm run deleteLib - ${isLibraryBased}`, async() => {
215
215
 
216
- const script = `npm run deleteLib Pega_DXIL 0.0.1-dev --prefix ../../..`;
216
+ const script = `npm run deleteLib Pega_DXIL 0.0.1-dev Y --prefix ../../..`;
217
217
  const { stdout, stderr } = await exec(script);
218
218
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');
219
219
 
@@ -442,7 +442,7 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
442
442
 
443
443
  it(`npm run deleteLibVersion ALL - ${isLibraryBased}`, async() => {
444
444
 
445
- const script = `npm run deleteLibVersion ALL --prefix ../../..`;
445
+ const script = `npm run deleteLibVersion Pega_DXIL ALL Y --prefix ../../..`;
446
446
  const { stdout, stderr } = await exec(script);
447
447
 
448
448
  expect(stdout).toContain('Pega_DXIL is deleted from Local.');