@pega/custom-dx-components 0.25.66 → 0.25.67

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.25.66",
3
+ "version": "0.25.67",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "keywords": [
@@ -49,6 +49,7 @@ export const updateConfig = async (
49
49
  version,
50
50
  targetDirectory,
51
51
  newLabel = "",
52
+ organization
52
53
  },
53
54
  options,
54
55
  onlyCompanion = false
@@ -63,6 +64,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
63
64
  if (configData.componentKey) configData.componentKey = newComponentKey;
64
65
  configData.library = library;
65
66
  configData.version = version;
67
+ configData.organization = organization;
66
68
 
67
69
  if (newLabel != "") {
68
70
  configData.label = newLabel;
@@ -97,17 +99,19 @@ addDebugLog("updateFile", `fileName: ${fileName}, oldComponentKeyPC: ${oldCompon
97
99
  // rename the component
98
100
  export const renameComponent = async (
99
101
  componentKey,
100
- library,
102
+ orgLib,
101
103
  version,
102
104
  newName = "",
103
105
  newLabel = "",
106
+ organization,
104
107
  options
105
108
  ) => {
106
109
 
107
- addDebugLog("renameComponent", `library: ${library}, componentKey: ${componentKey}`, "");
110
+ addDebugLog("renameComponent", `orgLib: ${orgLib}, componentKey: ${componentKey}`, "");
108
111
 
109
112
  const componentName = newName != "" ? newName : componentKey.split("_")[2];
110
- const newComponentKey = `${library}_${componentName}`;
113
+ const newComponentKey = `${orgLib}_${componentName}`;
114
+ const library = orgLib.split("_")[1];
111
115
  const oldComponentKey = componentKey;
112
116
  const newComponentKeyPC = convertIntoPascalCase(newComponentKey);
113
117
  const oldComponentKeyPC = convertIntoPascalCase(oldComponentKey);
@@ -136,7 +140,8 @@ addDebugLog("renameComponent", `library: ${library}, componentKey: ${componentKe
136
140
  library,
137
141
  version,
138
142
  targetDirectory,
139
- newLabel
143
+ newLabel,
144
+ organization
140
145
  },
141
146
  options
142
147
  );
@@ -252,7 +257,7 @@ addDebugLog("importComp", `filePath: ${filePath}, fileName: ${fileName}`, "");
252
257
 
253
258
  configData = configData && JSON.parse(configData);
254
259
 
255
- const newCompKey = await renameComponent(configData.componentKey, configDef.currentOrgLib, configDef.buildVersion, newName, newLabel, null);
260
+ const newCompKey = await renameComponent(configData.componentKey, configDef.currentOrgLib, configDef.buildVersion, newName, newLabel, configDef.organization, null);
256
261
  console.log(`\n${chalk.green(`${fileName}`)} has been imported as ${chalk.green(`${newCompKey}`)}\n`);
257
262
 
258
263
  if (askValidate) {
@@ -108,7 +108,7 @@
108
108
  "@babel/preset-react": "^7.27.1",
109
109
  "@babel/preset-typescript": "^7.27.1",
110
110
  "@pega/configs": "^0.16.3",
111
- "@pega/custom-dx-components": "~0.25.66",
111
+ "@pega/custom-dx-components": "~25.1.22",
112
112
  "@pega/pcore-pconnect-typedefs": "^4.1.0",
113
113
  "@storybook/addon-actions": "^8.6.14",
114
114
  "@storybook/addon-essentials": "^8.6.14",
package/src/util.js CHANGED
@@ -963,7 +963,7 @@ if (showDebug) { addDebugLog("getPegaConfig", "END", "-"); }
963
963
  export const getPegaServerConfig = async (force = false) => {
964
964
  if (showDebug) addDebugLog("getPegaServerConfig", "", "+");
965
965
  if (!pegaConfig || force) {
966
- pegaConfig = await getPegaConfig();
966
+ pegaConfig = await getPegaConfig(force);
967
967
 
968
968
  if (getServerType() === "launchpad") {
969
969
 
@@ -1342,7 +1342,7 @@ export const showVersion = async () => {
1342
1342
  process.exit();
1343
1343
  }
1344
1344
 
1345
- // do a check of node version, it should be 18 or greater
1345
+ // do a check of node version, it should be 24 or greater
1346
1346
  const arNodeVersion = process.versions.node.split('.');
1347
1347
 
1348
1348
  const nodeMajorVersion = parseInt(arNodeVersion[0]);
@@ -1352,7 +1352,7 @@ export const showVersion = async () => {
1352
1352
  if (nodeMajorVersion < 24) {
1353
1353
  console.log(
1354
1354
  chalk.redBright(
1355
- `DX Component Builder - requires node v24.14.1 or greater, current version: ${process.version}`
1355
+ `DX Component Builder - requires node v24.4.1 or greater, current version: ${process.version}`
1356
1356
  )
1357
1357
  );
1358
1358
  process.exit(1);
@@ -1360,7 +1360,7 @@ export const showVersion = async () => {
1360
1360
  else if ( nodeMajorVersion == 24 && nodeMinorVersion < 4) {
1361
1361
  console.log(
1362
1362
  chalk.redBright(
1363
- `DX Component Builder - requires node v24.14.1 or greater, current version: ${process.version}`
1363
+ `DX Component Builder - requires node v24.4.1 or greater, current version: ${process.version}`
1364
1364
  )
1365
1365
  );
1366
1366
  process.exit(1);
@@ -1368,7 +1368,7 @@ export const showVersion = async () => {
1368
1368
  else if (nodeMajorVersion == 24 && nodeMinorVersion == 4 && nodePatchVersion < 1 ) {
1369
1369
  console.log(
1370
1370
  chalk.redBright(
1371
- `DX Component Builder - requires node v24.14.1 or greater, current version: ${process.version}`
1371
+ `DX Component Builder - requires node v24.4.1 or greater, current version: ${process.version}`
1372
1372
  )
1373
1373
  );
1374
1374
  process.exit(1);
@@ -1729,7 +1729,7 @@ if (showDebug) addDebugLog("getBootstrapConfig", `restServerUrl: ${restServerUrl
1729
1729
 
1730
1730
  export const updateC11NB2SForInfinity = async () => {
1731
1731
  if (showDebug) addDebugLog("updateC11NB2SForInfinity", "", "");
1732
- const serverConfig = await getPegaServerConfig();
1732
+ const serverConfig = await getPegaServerConfig(true);
1733
1733
  const { server } = serverConfig;
1734
1734
  const OAuthData = fs.readFileSync(TOKEN_PATH, 'utf8');
1735
1735