@pega/custom-dx-components 0.25.15 → 0.25.17
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
|
@@ -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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
};
|
|
@@ -20,7 +20,8 @@ import {
|
|
|
20
20
|
getConfigDevBuild,
|
|
21
21
|
checkJWTExpiration,
|
|
22
22
|
getConfigDefaults,
|
|
23
|
-
getLibraryBased
|
|
23
|
+
getLibraryBased,
|
|
24
|
+
getLibraryBasedCL
|
|
24
25
|
} from '../../util.js';
|
|
25
26
|
import bundleComponent from '../bundle/index.js';
|
|
26
27
|
|
|
@@ -56,6 +57,7 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
|
|
|
56
57
|
const components = await getComponents();
|
|
57
58
|
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
58
59
|
const currentOrgLib = organization.concat('_').concat(library);
|
|
60
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
59
61
|
|
|
60
62
|
if (tokenAndStaticServer.C11NB2S === undefined) {
|
|
61
63
|
console.log(
|
|
@@ -102,6 +104,8 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
|
|
|
102
104
|
// compile to see if any errors, as buildLib doesn't catch all errors.
|
|
103
105
|
// Turning off stats (last param), so won't show warnings, as
|
|
104
106
|
// warnings are part of buildLib
|
|
107
|
+
|
|
108
|
+
// for now
|
|
105
109
|
console.log(chalk.green.bold('Compile check...'));
|
|
106
110
|
await bundleComponent(components[0], null, devBuild, false);
|
|
107
111
|
console.log('');
|
|
@@ -115,12 +119,30 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
|
|
|
115
119
|
// with subdirectories for each version.
|
|
116
120
|
// If "buildDev", we append to version "-dev". Currently, only "-dev" versions, when published, can be deleted.
|
|
117
121
|
addDebugLog("buildLib", "services call", "");
|
|
118
|
-
buildLibV3(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
);
|
|
122
|
+
// buildLibV3(
|
|
123
|
+
// buildLibName,
|
|
124
|
+
// buildVersion,
|
|
125
|
+
// tokenAndStaticServer.C11NB2S,
|
|
126
|
+
// tokenAndStaticServer.appStaticContentServer
|
|
127
|
+
// );
|
|
128
|
+
|
|
129
|
+
if (isLibraryBasedCL) {
|
|
130
|
+
buildLibV3(
|
|
131
|
+
buildLibName,
|
|
132
|
+
buildVersion
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
buildLib(
|
|
137
|
+
buildLibName,
|
|
138
|
+
buildVersion,
|
|
139
|
+
tokenAndStaticServer.C11NB2S,
|
|
140
|
+
tokenAndStaticServer.appStaticContentServer
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
124
146
|
addDebugLog("buildLib", "services end", "");
|
|
125
147
|
|
|
126
148
|
}
|
|
@@ -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.
|
|
109
|
+
"@pega/custom-dx-components": "~0.25.17",
|
|
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 = `/
|
|
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
|
-
|
|
416
|
+
|
|
417
|
+
if (!version.includes("-dev") && !internalPublish && !isLibraryBasedCL) {
|
|
415
418
|
okToPublish = false;
|
|
416
419
|
const publishAnswers = await inquirer.prompt([
|
|
417
420
|
|