@pega/custom-dx-components 0.25.15 → 0.25.16

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.15",
3
+ "version": "0.25.16",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -7,7 +7,8 @@ import {
7
7
  getPegaServerConfig,
8
8
  validateSemver,
9
9
  addDebugLog,
10
- getLibraryBased
10
+ getLibraryBased,
11
+ getLibraryBasedCL
11
12
  } from '../../util.js';
12
13
 
13
14
 
@@ -17,6 +18,7 @@ addDebugLog("getBuildComoponentQuestions", `defaultVerion: ${defaultVersion}`, "
17
18
  const defaultPegaConfig = await getPegaServerConfig();
18
19
 
19
20
  const isLibraryBased = getLibraryBased();
21
+ const isLibraryBasedCL = getLibraryBasedCL();
20
22
 
21
23
 
22
24
  if (components.length == 0) {
@@ -24,23 +26,42 @@ addDebugLog("getBuildComoponentQuestions", `defaultVerion: ${defaultVersion}`, "
24
26
  process.exit(1);
25
27
  }
26
28
 
27
- return [
28
- {
29
- name: 'version',
30
- message: 'Enter library version',
31
- default: defaultVersion,
32
- validate: (value) => {
33
- if (validateSemver(value)) {
34
- return true;
29
+ if (isLibraryBasedCL) {
30
+ return [
31
+ {
32
+ name: 'version',
33
+ message: 'Enter library version',
34
+ default: defaultVersion,
35
+ validate: (value) => {
36
+ if (validateSemver(value)) {
37
+ return true;
38
+ }
39
+ return 'Please provide semver compatible version e.g 0.0.1';
35
40
  }
36
- return 'Please provide semver compatible version e.g 0.0.1';
37
41
  }
38
- },
39
- {
40
- name: 'devBuild',
41
- type: 'confirm',
42
- message: 'When publish, make deletable ?',
43
- default: defaultPegaConfig.devBuild
44
- }
45
- ];
42
+ ];
43
+ }
44
+ else {
45
+ return [
46
+ {
47
+ name: 'version',
48
+ message: 'Enter library version',
49
+ default: defaultVersion,
50
+ validate: (value) => {
51
+ if (validateSemver(value)) {
52
+ return true;
53
+ }
54
+ return 'Please provide semver compatible version e.g 0.0.1';
55
+ }
56
+ },
57
+ {
58
+ name: 'devBuild',
59
+ type: 'confirm',
60
+ message: 'When publish, make deletable ?',
61
+ default: defaultPegaConfig.devBuild
62
+ }
63
+ ];
64
+ }
65
+
66
+
46
67
  };
@@ -115,11 +115,16 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
115
115
  // with subdirectories for each version.
116
116
  // If "buildDev", we append to version "-dev". Currently, only "-dev" versions, when published, can be deleted.
117
117
  addDebugLog("buildLib", "services call", "");
118
+ // buildLibV3(
119
+ // buildLibName,
120
+ // buildVersion,
121
+ // tokenAndStaticServer.C11NB2S,
122
+ // tokenAndStaticServer.appStaticContentServer
123
+ // );
124
+
118
125
  buildLibV3(
119
126
  buildLibName,
120
- buildVersion,
121
- tokenAndStaticServer.C11NB2S,
122
- tokenAndStaticServer.appStaticContentServer
127
+ buildVersion
123
128
  );
124
129
  addDebugLog("buildLib", "services end", "");
125
130
 
@@ -106,7 +106,7 @@
106
106
  "@babel/preset-react": "^7.26.3",
107
107
  "@babel/preset-typescript": "^7.26.0",
108
108
  "@pega/configs": "^0.16.2",
109
- "@pega/custom-dx-components": "~0.25.15",
109
+ "@pega/custom-dx-components": "~0.25.16",
110
110
  "@pega/pcore-pconnect-typedefs": "^4.1.0-alpha.1",
111
111
  "@storybook/addon-actions": "^7.6.19",
112
112
  "@storybook/addon-essentials": "^7.6.19",
@@ -141,7 +141,7 @@ addDebugLog("getInfinityLibraries", '', "");
141
141
  const rulesetName = defaultPegaServerConfig.rulesetName;
142
142
  const rulesetVersion = defaultPegaServerConfig.rulesetVersion;
143
143
 
144
- let urlParams = `/AppName/${ApplicationName}/AppVersion/${ApplicationVersion}/ruleset/${rulesetName}/rulesetVersion/${rulesetVersion}`;
144
+ let urlParams = `/app-name/${ApplicationName}/app-version/${ApplicationVersion}/rulesetname/${rulesetName}/rulesetversion/${rulesetVersion}`;
145
145
  //let urlParams = `&ApplicationName=${ApplicationName}&ApplicationVersion=${ApplicationVersion}&RulesetName=${rulesetName}&RulesetVersion=${rulesetVersion}`;
146
146
  //urlParams = encodeURIComponent(urlParams);
147
147
 
@@ -306,6 +306,8 @@ addDebugLog("deleteLib", "services end", "");
306
306
 
307
307
  export default async (options) => {
308
308
  const isLibraryBased = getLibraryBased();
309
+ const isLibraryBasedCL = getLibraryBasedCL();
310
+
309
311
  if (!isLibraryBased) {
310
312
  console.log(`Command only supported for ${chalk.bold.green('library mode')} components.`)
311
313
  process.exit();
@@ -411,7 +413,8 @@ addDebugLog("publishLibrary", "", "+");
411
413
  return;
412
414
  }
413
415
 
414
- if (!version.includes("-dev") && !internalPublish) {
416
+
417
+ if (!version.includes("-dev") && !internalPublish && !isLibraryBasedCL) {
415
418
  okToPublish = false;
416
419
  const publishAnswers = await inquirer.prompt([
417
420