@pega/custom-dx-components 0.25.24 → 0.25.26

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.24",
3
+ "version": "0.25.26",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "publishAll": "custom-dx-components publishAll",
30
30
  "promoteWebPack": "custom-dx-components promoteWebPack",
31
31
  "revertWebPack": "custom-dx-components revertWebPack",
32
- "_***Library_mode_only***": "Library mode only commands, Beta capability and subject to change. Developer experimental. Do not use in a Production Deployment",
32
+ "_***Library_mode_only***": "Library CL mode only commands",
33
33
  "createLib": "custom-dx-components createLibrary",
34
34
  "switchLib": "custom-dx-components switchLibrary",
35
35
  "createLibVersion": "custom-dx-components createVersion",
@@ -107,7 +107,7 @@
107
107
  "@babel/preset-react": "^7.26.3",
108
108
  "@babel/preset-typescript": "^7.26.0",
109
109
  "@pega/configs": "^0.16.2",
110
- "@pega/custom-dx-components": "~0.25.24",
110
+ "@pega/custom-dx-components": "~0.25.26",
111
111
  "@pega/pcore-pconnect-typedefs": "^4.1.0-alpha.1",
112
112
  "@storybook/addon-actions": "^7.6.19",
113
113
  "@storybook/addon-essentials": "^7.6.19",
package/src/util.js CHANGED
@@ -337,6 +337,8 @@ if (showDebug) addDebugLog("applyPegaData", "", "");
337
337
 
338
338
  export const checkJWTExpiration = async () => {
339
339
  const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
340
+ const isLibraryBased = getLibraryBased();
341
+ const isLibraryBasedCL = getLibraryBasedCL();
340
342
 
341
343
  if (tokenAndStaticServer.C11NB2S === undefined) {
342
344
  console.log(chalk.redBright("Need to authenticate, missing services token.\nBuilding a library requires authentication to acquire a token to build."));
@@ -350,13 +352,19 @@ export const checkJWTExpiration = async () => {
350
352
  process.exit(1);
351
353
  }
352
354
 
353
- // check that there is customer_org
354
- if (!customer_org || customer_org === "") {
355
- console.log(chalk.red(`PegaInfinity server DSS setting ${chalk.redBright.bold(`C11nCCv2CustomerOrg`)} is NOT set.`));
356
- console.log(chalk.red("Please update DSS setting, save and then reauthenticate."));
357
- process.exit(1);
355
+
356
+ // only check if older isLibraryBased
357
+ if (!isLibraryBasedCL && isLibraryBased) {
358
+ // check that there is customer_org
359
+ if (!customer_org || customer_org === "") {
360
+ console.log(chalk.red(`PegaInfinity server DSS setting ${chalk.redBright.bold(`C11nCCv2CustomerOrg`)} is NOT set.`));
361
+ console.log(chalk.red("Please update DSS setting, save and then reauthenticate."));
362
+ process.exit(1);
363
+ }
364
+
358
365
  }
359
366
 
367
+
360
368
  }
361
369
 
362
370
  export const checkAccessTokenExpiration = async() => {
@@ -1564,7 +1572,8 @@ if (showDebug) addDebugLog("updateC11NB2SForInfinity", "", "");
1564
1572
 
1565
1573
  const objOauthData = JSON.parse(OAuthData);
1566
1574
  objOauthData["C11NB2S"] = bootstrap.tokens.C11NB2S;
1567
- objOauthData["appStaticContentServer"] = bootstrap.serviceConfig.appStaticContentServer;
1575
+ // objOauthData["appStaticContentServer"] = bootstrap.serviceConfig.appStaticContentServer;
1576
+ objOauthData["appStaticContentServer"] = (bootstrap.serviceConfig.appStaticContentServer != "no-cdn" && bootstrap.serviceConfig.appStaticContentServer != "") ? bootstrap.serviceConfig.appStaticContentServer : bootstrap.serviceConfig.staticContentServer;
1568
1577
 
1569
1578
  // write out file
1570
1579
  fs.writeFileSync(TOKEN_PATH, JSON.stringify(objOauthData), { encoding: 'utf8',flag:'w' });