@pega/custom-dx-components 0.25.37 → 0.25.39
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
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
|
|
19
19
|
import { SHARED_FILE_NAMES } from '../../constants.js';
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
export const updateAllComponentsConfig = async( newVersion ) => {
|
|
23
22
|
addDebugLog("updateAllComponentsConfig", `newVersion: ${newVersion}`, "");
|
|
24
23
|
const componentList = await getComponents();
|
|
@@ -70,9 +69,15 @@ export const updateAllMigrateToLibChanges = async() => {
|
|
|
70
69
|
|
|
71
70
|
for (const index in SHARED_FILE_NAMES) {
|
|
72
71
|
const sFileName = SHARED_FILE_NAMES[index].split(".")[0];
|
|
73
|
-
const orgPath = "./".concat(sFileName);
|
|
74
|
-
const newPath = "../shared/".concat(sFileName);
|
|
75
72
|
|
|
73
|
+
// test for ../ first
|
|
74
|
+
let orgPath = "../".concat(sFileName);
|
|
75
|
+
let newPath = "../shared/".concat(sFileName);
|
|
76
|
+
newOutput = newOutput.replaceAll(orgPath, newPath);
|
|
77
|
+
|
|
78
|
+
// then test for ./
|
|
79
|
+
orgPath = "./".concat(sFileName);
|
|
80
|
+
newPath = "../shared/".concat(sFileName);
|
|
76
81
|
newOutput = newOutput.replaceAll(orgPath, newPath);
|
|
77
82
|
|
|
78
83
|
// updates for ESLint 9
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"author": "",
|
|
82
82
|
"license": "Enter License",
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@pega/cosmos-react-condition-builder": "^8.0.0-build.
|
|
85
|
-
"@pega/cosmos-react-core": "^8.0.0-build.
|
|
86
|
-
"@pega/cosmos-react-work": "^8.0.0-build.
|
|
84
|
+
"@pega/cosmos-react-condition-builder": "^8.0.0-build.43.4",
|
|
85
|
+
"@pega/cosmos-react-core": "^8.0.0-build.43.4",
|
|
86
|
+
"@pega/cosmos-react-work": "^8.0.0-build.43.4",
|
|
87
87
|
"@pega/eslint-config": "^0.16.3",
|
|
88
88
|
"@pega/tsconfig": "^0.16.3",
|
|
89
89
|
"babel-loader": "^10.0.0",
|
|
@@ -107,22 +107,22 @@
|
|
|
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.
|
|
110
|
+
"@pega/custom-dx-components": "~0.25.39",
|
|
111
111
|
"@pega/pcore-pconnect-typedefs": "^4.1.0-alpha.1",
|
|
112
|
-
"@storybook/addon-actions": "^8.6.
|
|
113
|
-
"@storybook/addon-essentials": "^8.6.
|
|
114
|
-
"@storybook/addon-links": "^8.6.
|
|
115
|
-
"@storybook/addon-storysource": "^8.6.
|
|
116
|
-
"@storybook/manager-api": "^8.6.
|
|
117
|
-
"@storybook/react": "^8.6.
|
|
118
|
-
"@storybook/react-vite": "^8.6.
|
|
119
|
-
"@storybook/react-webpack5": "^8.6.
|
|
120
|
-
"@storybook/test": "^8.6.
|
|
112
|
+
"@storybook/addon-actions": "^8.6.14",
|
|
113
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
114
|
+
"@storybook/addon-links": "^8.6.14",
|
|
115
|
+
"@storybook/addon-storysource": "^8.6.14",
|
|
116
|
+
"@storybook/manager-api": "^8.6.14",
|
|
117
|
+
"@storybook/react": "^8.6.14",
|
|
118
|
+
"@storybook/react-vite": "^8.6.14",
|
|
119
|
+
"@storybook/react-webpack5": "^8.6.14",
|
|
120
|
+
"@storybook/test": "^8.6.14",
|
|
121
121
|
"@storybook/test-runner": "^0.22.0",
|
|
122
|
-
"@storybook/theming": "^8.6.
|
|
122
|
+
"@storybook/theming": "^8.6.14",
|
|
123
123
|
"@testing-library/dom": "^10.4.0",
|
|
124
124
|
"@testing-library/jest-dom": "^6.6.3",
|
|
125
|
-
"@testing-library/react": "^
|
|
125
|
+
"@testing-library/react": "^16.3.0",
|
|
126
126
|
"@types/emoji-mart": "^3.0.14",
|
|
127
127
|
"@types/jest": "^29.5.14",
|
|
128
128
|
"@types/lodash.get": "^4.4.9",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"eslint-plugin-mdx": "^3.4.1",
|
|
140
140
|
"eslint-plugin-prettier": "^5.4.0",
|
|
141
141
|
"eslint-plugin-react": "^7.37.5",
|
|
142
|
-
"eslint-plugin-react-hooks": "^
|
|
142
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
143
143
|
"eslint-plugin-sonarjs": "^0.23.0",
|
|
144
144
|
"eslint-plugin-storybook": "^0.6.15",
|
|
145
145
|
"esm": "^3.2.25",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"node-stream-zip": "^1.15.0",
|
|
152
152
|
"npm-run-all": "^4.1.5",
|
|
153
153
|
"prettier": "3.5.3",
|
|
154
|
-
"storybook": "^8.6.
|
|
154
|
+
"storybook": "^8.6.14",
|
|
155
155
|
"stylelint": "^16.19.1",
|
|
156
156
|
"ts-jest": "^29.3.2",
|
|
157
157
|
"typescript": "~5.5.4",
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
checkJWTExpiration,
|
|
22
22
|
getConfigDefaults,
|
|
23
23
|
getInputConfigForCommand,
|
|
24
|
-
convertYNToBoolean
|
|
24
|
+
convertYNToBoolean,
|
|
25
|
+
checkForBranch } from '../../util.js';
|
|
25
26
|
|
|
26
27
|
import { getPublishComponentQuestions, publishComponentToServer, zipComponent } from './helper.js';
|
|
27
28
|
import { default as buildLibrary } from '../build-lib/index.js';
|
|
@@ -124,6 +125,10 @@ addDebugLog("publish", "", "+");
|
|
|
124
125
|
options.params.push(answers.rulesetName);
|
|
125
126
|
options.params.push(answers.rulesetVersion);
|
|
126
127
|
|
|
128
|
+
await checkForBranch(answers.rulesetName);
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
127
132
|
updateServerConfigRuleSetAndVersion(answers.rulesetName, answers.rulesetVersion);
|
|
128
133
|
}
|
|
129
134
|
}
|
|
@@ -198,6 +203,8 @@ addDebugLog("publish", "", "+");
|
|
|
198
203
|
const dBuild = options.params[6];
|
|
199
204
|
devBuild = dBuild === 'Y' || dBuild === 'y' || dBuild === true || dBuild === 'true';
|
|
200
205
|
|
|
206
|
+
await checkForBranch(rulesetName);
|
|
207
|
+
|
|
201
208
|
// eslint-disable-next-line no-unneeded-ternary,no-nested-ternary
|
|
202
209
|
doFetch = options.params.length >= 7 ? (options.params[7] === 'noFetch' ? false : true) : true;
|
|
203
210
|
|
|
@@ -218,6 +225,8 @@ addDebugLog("publish", "", "+");
|
|
|
218
225
|
};
|
|
219
226
|
}
|
|
220
227
|
|
|
228
|
+
await checkForBranch(content.rulesetName);
|
|
229
|
+
|
|
221
230
|
// update ruleset and version config for future
|
|
222
231
|
if (componentDefaults.serverType === "infinity") {
|
|
223
232
|
updateServerConfigRuleSetAndVersion(content.rulesetName, content.rulesetVersion);
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
addDebugLog,
|
|
15
15
|
getPegaServerConfig,
|
|
16
16
|
updateServerConfigRuleSetAndVersion,
|
|
17
|
-
checkLibraryAndArchives
|
|
17
|
+
checkLibraryAndArchives,
|
|
18
|
+
checkForBranch } from '../../util.js';
|
|
18
19
|
|
|
19
20
|
import {
|
|
20
21
|
getPublishComponentQuestions,
|
|
@@ -115,6 +116,8 @@ addDebugLog("publishAll", "", "+");
|
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
await checkForBranch(content.rulesetName);
|
|
120
|
+
|
|
118
121
|
// update ruleset and version config for future
|
|
119
122
|
if (defaultPegaConfig.serverType === "infinity") {
|
|
120
123
|
updateServerConfigRuleSetAndVersion(content.rulesetName, content.rulesetVersion);
|
|
@@ -9,7 +9,7 @@ import ora from 'ora';
|
|
|
9
9
|
|
|
10
10
|
import validate from '../validator/index.js';
|
|
11
11
|
import { lintComponent } from '../linter/index.js';
|
|
12
|
-
import { constructCompleteUrl, getComponentDirectoryPath, getHttpsAgent, getPegaServerConfig, showVersion, getC11NB2STokenAndStaticServer, getLocalLibraryVersions, getLibraryBased, getLibraryBasedCL, deletePublishExtras, addDebugLog, checkLibraryAndArchives, checkJWTExpiration, getConfigDefaults } from '../../util.js';
|
|
12
|
+
import { constructCompleteUrl, getComponentDirectoryPath, getHttpsAgent, getPegaServerConfig, showVersion, getC11NB2STokenAndStaticServer, getLocalLibraryVersions, getLibraryBased, getLibraryBasedCL, deletePublishExtras, addDebugLog, checkLibraryAndArchives, checkJWTExpiration, getConfigDefaults, checkForBranch } from '../../util.js';
|
|
13
13
|
|
|
14
14
|
import { publishLib, listLibJSONResponse, deleteLibVersion } from '@pega/constellation-dx-components-build-utils/index.js';
|
|
15
15
|
|
|
@@ -135,6 +135,7 @@ addDebugLog("publishComponentToServer", `data: ${data}`, "");
|
|
|
135
135
|
);
|
|
136
136
|
let apiBody;
|
|
137
137
|
|
|
138
|
+
|
|
138
139
|
if (isLaunchpad) {
|
|
139
140
|
// currently no launchpad records to rule resolve a library
|
|
140
141
|
|
|
@@ -362,6 +363,8 @@ addDebugLog("publishLibrary", "", "+");
|
|
|
362
363
|
|
|
363
364
|
}
|
|
364
365
|
|
|
366
|
+
await checkForBranch(rulesetName);
|
|
367
|
+
|
|
365
368
|
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
366
369
|
|
|
367
370
|
if (tokenAndStaticServer.C11NB2S === undefined) {
|
package/src/util.js
CHANGED
|
@@ -1276,6 +1276,7 @@ export const showVersion = async () => {
|
|
|
1276
1276
|
const sLibMode = getLibraryBased() ? "(library mode)" : "";
|
|
1277
1277
|
|
|
1278
1278
|
const pData = require('@pega/custom-dx-components/package.json');
|
|
1279
|
+
const serverConfig = await getPegaServerConfig();
|
|
1279
1280
|
|
|
1280
1281
|
console.log(chalk.green(`DX Component Builder${sLibMode} v${pData.version}`));
|
|
1281
1282
|
showDebug = getShowDebug();
|
|
@@ -1291,17 +1292,37 @@ export const showVersion = async () => {
|
|
|
1291
1292
|
const nodeMajorVersion = parseInt(arNodeVersion[0]);
|
|
1292
1293
|
const nodeMinorVersion = parseInt(arNodeVersion[1]);
|
|
1293
1294
|
|
|
1294
|
-
if (nodeMajorVersion <
|
|
1295
|
+
if (nodeMajorVersion < 22 && nodeMinorVersion < 15 ) {
|
|
1295
1296
|
console.log(
|
|
1296
1297
|
chalk.redBright(
|
|
1297
|
-
`DX Component Builder - SDK requires node
|
|
1298
|
+
`DX Component Builder - SDK requires node v20.15.0 or greater, current version: ${process.version}`
|
|
1298
1299
|
)
|
|
1299
1300
|
);
|
|
1300
1301
|
process.exit(1);
|
|
1301
1302
|
}
|
|
1302
1303
|
|
|
1304
|
+
await checkForBranch(serverConfig.rulesetName);
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1303
1308
|
};
|
|
1304
1309
|
|
|
1310
|
+
export const checkForBranch = async(rulesetName) => {
|
|
1311
|
+
if (rulesetName === "") {
|
|
1312
|
+
const serverConfig = await getPegaServerConfig();
|
|
1313
|
+
rulesetName = serverConfig.rulesetName;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
if (rulesetName.toLowerCase().indexOf("_branch") >= 0) {
|
|
1317
|
+
console.log(
|
|
1318
|
+
chalk.redBright(
|
|
1319
|
+
`Ruleset ${chalk.bold(`${rulesetName}`)} cannot be a branch ruleset.`
|
|
1320
|
+
)
|
|
1321
|
+
);
|
|
1322
|
+
process.exit(1);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1305
1326
|
export const getOOTBComponents = async () => {
|
|
1306
1327
|
if (showDebug) addDebugLog("getOOTBComponents", "", "");
|
|
1307
1328
|
return new Promise(resolve => {
|
|
@@ -2714,7 +2735,7 @@ export const getSubTypeLabel = (type, subtype) => {
|
|
|
2714
2735
|
}
|
|
2715
2736
|
|
|
2716
2737
|
export const getMaxComponentNameCount = () => {
|
|
2717
|
-
let count = MAX_RFT_CHARS
|
|
2738
|
+
let count = MAX_RFT_CHARS;
|
|
2718
2739
|
const configDef = getConfigDefaults();
|
|
2719
2740
|
const orgLibCount = configDef.currentOrgLib.length + 1;
|
|
2720
2741
|
const versionCount = configDef.version.length - 2;
|