@pega/custom-dx-components 0.25.49-TEST-0.7 → 0.25.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.25.49-TEST-0.7",
3
+ "version": "0.25.51",
4
4
  "description": "Utility for building custom UI components",
5
- "keywords": [
5
+ "bin": "./bin/index.js",
6
+ "keywords": [
6
7
  "pega",
7
8
  "custom-components"
8
9
  ],
@@ -10,7 +11,6 @@
10
11
  "author": "Custom component dev",
11
12
  "sideEffects": false,
12
13
  "type": "module",
13
- "bin": "./bin/index.js",
14
14
  "scripts": {
15
15
  "lint:es": "eslint .",
16
16
  "lint:format": "prettier -c .",
@@ -373,7 +373,7 @@ addDebugLog("createAll", "", "+");
373
373
  data = data && JSON.parse(data);
374
374
 
375
375
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
376
- console.error(`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`);
376
+ console.error(`${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`);
377
377
  process.exit(1);
378
378
  }
379
379
 
@@ -60,7 +60,7 @@ addDebugLog("getLaunchPadFilterQuestions", "", "");
60
60
 
61
61
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
62
62
  console.error(
63
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
63
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
64
64
  );
65
65
  process.exit(1);
66
66
  }
@@ -55,7 +55,7 @@ addDebugLog("getLaunchPadFilterQuestions", "", "");
55
55
 
56
56
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
57
57
  console.error(
58
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
58
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
59
59
  );
60
60
  process.exit(1);
61
61
  }
@@ -107,7 +107,7 @@
107
107
  "@babel/preset-react": "^7.27.1",
108
108
  "@babel/preset-typescript": "^7.27.1",
109
109
  "@pega/configs": "^0.16.3",
110
- "@pega/custom-dx-components": "~0.25.49-TEST-0.7",
110
+ "@pega/custom-dx-components": "~0.25.51",
111
111
  "@pega/pcore-pconnect-typedefs": "^4.1.0-alpha.1",
112
112
  "@storybook/addon-actions": "^8.6.14",
113
113
  "@storybook/addon-essentials": "^8.6.14",
@@ -57,7 +57,7 @@ addDebugLog("getLaunchPadFilterQuestions", "", "");
57
57
 
58
58
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
59
59
  console.error(
60
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
60
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
61
61
  );
62
62
  process.exit(1);
63
63
  }
@@ -145,7 +145,7 @@ addDebugLog("listLibrary", "", "+");
145
145
  else {
146
146
  // No library with that name
147
147
  console.log(chalk.redBright(`No other library versions for ${libraryName} exist other than current library version.`));
148
- console.log(chalk.redBright(`To see contents for the currnet library version, enter 'npm run list'.`));
148
+ console.log(chalk.redBright(`To see contents for the current library version, enter 'npm run list'.`));
149
149
  addDebugLog("listLibrary", "END", "-");
150
150
  process.exit();
151
151
  }
@@ -29,7 +29,7 @@ addDebugLog("getServerLibraryVersions", `libraryName: ${libraryName}`, "");
29
29
  const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
30
30
 
31
31
  if (tokenAndStaticServer.C11NB2S === undefined) {
32
- console.log(chalk.redBright("Need to authenticate, missing services token.\nDeleting a library requires authentication to acquire a token to delete."));
32
+ console.log(chalk.redBright("Need to authenticate, missing services token."));
33
33
  process.exit(1);
34
34
  }
35
35
 
@@ -346,7 +346,7 @@ addDebugLog("move", "", "+");
346
346
 
347
347
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
348
348
  console.error(
349
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
349
+ `${chalk.red.bold('ERROR')} Unable find to components directory path in config.json`
350
350
  );
351
351
  process.exit(1);
352
352
  }
@@ -67,18 +67,18 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
67
67
  configData.version = version;
68
68
  configData.description = (description != '') ? description : componentLabel;
69
69
 
70
- if (allowedApplications.trim() === '') {
71
- allowedApplications = [];
72
- } else {
73
- if (allowedApplications.indexOf(',') !== -1) {
74
- allowedApplications = allowedApplications.split(',');
75
- }
76
- allowedApplications = [].concat(allowedApplications);
77
- }
70
+ // if (allowedApplications.trim() === '') {
71
+ // allowedApplications = [];
72
+ // } else {
73
+ // if (allowedApplications.indexOf(',') !== -1) {
74
+ // allowedApplications = allowedApplications.split(',');
75
+ // }
76
+ // allowedApplications = [].concat(allowedApplications);
77
+ // }
78
78
 
79
- allowedApplications = allowedApplications.filter(el => !!el.trim()).map(el => el.trim());
79
+ // allowedApplications = allowedApplications.filter(el => !!el.trim()).map(el => el.trim());
80
80
 
81
- configData.allowedApplications = allowedApplications;
81
+ // configData.allowedApplications = allowedApplications;
82
82
 
83
83
  // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
84
84
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8' });
@@ -199,7 +199,7 @@ addDebugLog("rename", "", "+");
199
199
 
200
200
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
201
201
  console.error(
202
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
202
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
203
203
  );
204
204
  process.exit(1);
205
205
  }
@@ -323,12 +323,12 @@ addDebugLog("rename", "", "+");
323
323
  },
324
324
  when: () => !isLibraryBased
325
325
  },
326
- {
327
- name: 'allowedApplications',
328
- message: 'Please enter the application names to be supported (comma-separated). ',
329
- suffix: 'Keep empty for all applications',
330
- when: () => !isLibraryBased
331
- },
326
+ // {
327
+ // name: 'allowedApplications',
328
+ // message: 'Please enter the application names to be supported (comma-separated). ',
329
+ // suffix: 'Keep empty for all applications',
330
+ // when: () => !isLibraryBased
331
+ // },
332
332
  {
333
333
  name: 'description',
334
334
  message: 'Enter new description for the component (defaults to new label)',
@@ -267,7 +267,7 @@ addDebugLog("renameLibrary", "", "+");
267
267
 
268
268
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
269
269
  console.error(
270
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
270
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
271
271
  );
272
272
  process.exit(1);
273
273
  }
package/src/util.js CHANGED
@@ -278,7 +278,7 @@ if (showDebug) addDebugLog("checkPathAccess", "END", "-");
278
278
  else {
279
279
  if (showDebug) addDebugLog("checkPathAccess", "path: ".concat(path), "+");
280
280
  const message =
281
- errorMessage || `${chalk.red.bold('ERROR')} Could not able to access path - ${path}`;
281
+ errorMessage || `${chalk.red.bold('ERROR')} Unable to access path - ${path}`;
282
282
  console.error(message);
283
283
  if (showDebug) addDebugLog("checkPathAccess", "END", "-");
284
284
  process.exit(1);
@@ -307,7 +307,7 @@ if (showDebug) addDebugLog("getUseWebPackPromotion", "", "");
307
307
 
308
308
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
309
309
  console.error(
310
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
310
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
311
311
  );
312
312
  process.exit(1);
313
313
  }
@@ -335,7 +335,7 @@ if (showDebug) addDebugLog("updateUseWebPackPromotion", "", "");
335
335
 
336
336
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
337
337
  console.error(
338
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
338
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
339
339
  );
340
340
  process.exit(1);
341
341
  }
@@ -605,7 +605,7 @@ if (showDebug) addDebugLog("deleteLocalComponent", `componentKey: ${componentKey
605
605
 
606
606
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
607
607
  console.error(
608
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
608
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
609
609
  );
610
610
  process.exit(1);
611
611
  }
@@ -1257,7 +1257,7 @@ if (showDebug) addDebugLog("getComponentDirectoryPath", "", "+");
1257
1257
 
1258
1258
  if (!data[COMPONENTS_DIRECTORY_PATH]) {
1259
1259
  console.error(
1260
- `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
1260
+ `${chalk.red.bold('ERROR')} Unable to find components directory path in config.json`
1261
1261
  );
1262
1262
  process.exit(1);
1263
1263
  }
@@ -1340,7 +1340,7 @@ export const showVersion = async () => {
1340
1340
  if (nodeMajorVersion < 22 && nodeMinorVersion < 15 ) {
1341
1341
  console.log(
1342
1342
  chalk.redBright(
1343
- `DX Component Builder - SDK requires node v20.15.0 or greater, current version: ${process.version}`
1343
+ `DX Component Builder - requires node v22.15.0 or greater, current version: ${process.version}`
1344
1344
  )
1345
1345
  );
1346
1346
  process.exit(1);
@@ -1363,7 +1363,7 @@ export const checkForBranch = async(rulesetName) => {
1363
1363
  if (rulesetName.toLowerCase().indexOf("_branch") >= 0) {
1364
1364
  console.log(
1365
1365
  chalk.redBright(
1366
- `Ruleset ${chalk.bold(`${rulesetName}`)} cannot be a branch ruleset.`
1366
+ `Ruleset ${chalk.bold(`${rulesetName}`)} is a branch ruleset.\nBranch rulesets are not supported.`
1367
1367
  )
1368
1368
  );
1369
1369
  process.exit(1);
@@ -1451,7 +1451,7 @@ if (showDebug) addDebugLog("deleteInfinityServerComponent", `componentKey: ${com
1451
1451
  if (!response.ok) {
1452
1452
  if (status === 401) {
1453
1453
  throw new Error(
1454
- 'Error occurred in authentication. Please regenerate using authenticate'
1454
+ 'Error occurred in authentication. Please regenerate using authenticate.'
1455
1455
  );
1456
1456
  // console.log(accessTokenUri, refreshToken);
1457
1457
  /* TODO - Handle refresh_token */
@@ -2843,7 +2843,6 @@ export const isComponentValidLength = (componentKey) => {
2843
2843
  return false;
2844
2844
  }
2845
2845
 
2846
-
2847
2846
  export const emptyDirSync = dir => (
2848
2847
  fs.rmSync(dir, { recursive: true, force: true }),
2849
2848
  fs.mkdirSync(dir, { recursive: true })