@pega/custom-dx-components 0.25.19 → 0.25.21
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 +2 -2
- package/src/tasks/build-jest-assets/index.js +5 -5
- package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +0 -24
- package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +0 -4
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create-lib/helper.js +6 -2
- package/src/tasks/create-lib/index.js +3 -1
- package/src/tasks/delete-pub/index.js +3 -1
- package/src/tasks/export-archive/index.js +10 -5
- package/src/tasks/import-archive/index.js +12 -18
- package/src/tasks/init/template/.eslintrc.json +1 -1
- package/src/tasks/init/template/package.json.mustache +4 -4
- package/src/tasks/list-pub/index.js +15 -7
- package/src/tasks/publish-lib/index.js +131 -135
- package/src/tasks/restore/index.js +7 -1
- package/src/tasks/show-status/index.js +10 -6
- package/src/util.js +83 -4
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -1
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/create-nonce.ts +1 -0
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/create/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +9 -0
- package/tests/functional/localCreateAllListDeleteAll.test.js +8 -8
- package/tests/functional/localLibCreateLibAlreadyDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibExportImportLib.test.js +27 -27
- package/tests/functional/localLibCreateLibExportLib.test.js +19 -19
- package/tests/functional/localLibCreateLibImportCompDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibListDeleteLib.test.js +22 -22
- package/tests/functional/localLibCreateLibListMoveDeleteLib.test.js +31 -31
- package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +13 -29
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +15 -15
- package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +27 -27
- package/tests/functional/localLibCreateLibPermDeleteLib.test.js +0 -144
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/custom-dx-components",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.21",
|
|
4
4
|
"description": "Utility for building custom UI components",
|
|
5
5
|
"bin": "./bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
20
20
|
"@babel/preset-react": "^7.26.3",
|
|
21
21
|
"@pega/auth": "^0.2.23",
|
|
22
|
-
"@pega/constellation-dx-components-build-utils": "^2.0.
|
|
22
|
+
"@pega/constellation-dx-components-build-utils": "^2.0.2-dev",
|
|
23
23
|
"@pega/inquirer-fuzzy-path": "^3.0.0",
|
|
24
24
|
"ajv": "^8.17.1",
|
|
25
25
|
"ajv-keywords": "^5.1.0",
|
|
@@ -5,7 +5,7 @@ import inquirer from 'inquirer';
|
|
|
5
5
|
import { Listr } from 'listr2';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
|
|
8
|
-
import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents,
|
|
8
|
+
import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents, getLibraryBasedCL, setLibraryBasedCL, forceDefaultsUpdate } from '../../util.js';
|
|
9
9
|
import createAll from '../create-all/index.js';
|
|
10
10
|
import create from '../create/index.js';
|
|
11
11
|
import createLib from '../create-lib/index.js';
|
|
@@ -220,9 +220,9 @@ export default async options => {
|
|
|
220
220
|
if (buildAssets) {
|
|
221
221
|
// get current server type
|
|
222
222
|
const savedServerType = await getServerType();
|
|
223
|
-
const
|
|
223
|
+
const savedLibraryBasedCL = getLibraryBasedCL();
|
|
224
224
|
|
|
225
|
-
await
|
|
225
|
+
await setLibraryBasedCL(false);
|
|
226
226
|
|
|
227
227
|
// Constellation
|
|
228
228
|
await setServerType("infinity");
|
|
@@ -233,7 +233,7 @@ export default async options => {
|
|
|
233
233
|
await createJestOriginalAssets(true);
|
|
234
234
|
|
|
235
235
|
// Constellation Library
|
|
236
|
-
await
|
|
236
|
+
await setLibraryBasedCL(true);
|
|
237
237
|
await setServerType("infinity");
|
|
238
238
|
|
|
239
239
|
await createJestLibraryAssets(false);
|
|
@@ -246,7 +246,7 @@ export default async options => {
|
|
|
246
246
|
|
|
247
247
|
// restore serverType
|
|
248
248
|
await setServerType(savedServerType);
|
|
249
|
-
await
|
|
249
|
+
await setLibraryBasedCL(savedLibraryBasedCL);
|
|
250
250
|
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -381,30 +381,6 @@ export function format(value, type, options) {
|
|
|
381
381
|
let formattedValue;
|
|
382
382
|
|
|
383
383
|
switch (type?.toLowerCase()) {
|
|
384
|
-
case 'currency': {
|
|
385
|
-
const defaultOptions = {
|
|
386
|
-
locale: getLocale(),
|
|
387
|
-
position: 'before',
|
|
388
|
-
decPlaces: 2
|
|
389
|
-
};
|
|
390
|
-
const params = { ...defaultOptions, ...options };
|
|
391
|
-
formattedValue = Currency.Currency(value, params);
|
|
392
|
-
break;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
case 'decimal': {
|
|
396
|
-
const defaultOptions = { locale: getLocale(), decPlaces: 2 };
|
|
397
|
-
const params = { ...defaultOptions, ...options };
|
|
398
|
-
formattedValue = Currency.Decimal(value, params);
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
case 'integer': {
|
|
403
|
-
const defaultOptions = { locale: getLocale() };
|
|
404
|
-
const params = { ...defaultOptions, ...options };
|
|
405
|
-
formattedValue = Currency.Integer(value, params);
|
|
406
|
-
break;
|
|
407
|
-
}
|
|
408
384
|
|
|
409
385
|
case 'date': {
|
|
410
386
|
const defaultOptions = {
|
|
@@ -165,10 +165,6 @@ export function updateWithTimeZone(stateFromTable, meta) {
|
|
|
165
165
|
return stateFromTable;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
export function isHybrid() {
|
|
169
|
-
return typeof pega !== 'undefined' && typeof pega.desktop !== 'undefined';
|
|
170
|
-
}
|
|
171
|
-
|
|
172
168
|
export const isPageListInPath = (propertyName, currentClassID) => {
|
|
173
169
|
if (!propertyName.includes('.')) {
|
|
174
170
|
return false;
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
addDebugLog,
|
|
9
9
|
getConfigDefaults,
|
|
10
10
|
getComponents,
|
|
11
|
-
updateConfigVersion
|
|
11
|
+
updateConfigVersion,
|
|
12
|
+
getLibraryBasedCL
|
|
12
13
|
} from '../../util.js';
|
|
13
14
|
|
|
14
15
|
|
|
@@ -59,6 +60,8 @@ addDebugLog("getCreateLibComponentQuestions", "", "");
|
|
|
59
60
|
const archDirectories = await getLibraryArchiveDirectories();
|
|
60
61
|
const orgLib = getConfigDefaults();
|
|
61
62
|
|
|
63
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
64
|
+
|
|
62
65
|
|
|
63
66
|
return [
|
|
64
67
|
{
|
|
@@ -106,7 +109,8 @@ addDebugLog("getCreateLibComponentQuestions", "", "");
|
|
|
106
109
|
name: 'permBuild',
|
|
107
110
|
type: 'confirm',
|
|
108
111
|
message: `Version to be ${chalk.bold.yellow('PERMANENT')} upon publish `,
|
|
109
|
-
default: false
|
|
112
|
+
default: false,
|
|
113
|
+
when: () => !isLibraryBasedCL
|
|
110
114
|
}
|
|
111
115
|
];
|
|
112
116
|
};
|
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
forceDefaultsUpdate,
|
|
19
19
|
cleanUpTemp,
|
|
20
20
|
restoreTopLevelConfigFilesFromTemplate,
|
|
21
|
-
getHaveDependencyDifference
|
|
21
|
+
getHaveDependencyDifference,
|
|
22
|
+
setConfigDevBuild
|
|
22
23
|
} from '../../util.js';
|
|
23
24
|
|
|
24
25
|
import { getCreateLibComponentQuestions, getOkToProceedQuestion, updateAllComponentsConfig, getCurrentOrOriginalQuestion } from './helper.js';
|
|
@@ -81,6 +82,7 @@ addDebugLog("createLibrary", "", "+");
|
|
|
81
82
|
// no -dev for PegaInfinity
|
|
82
83
|
permBuild = true;
|
|
83
84
|
}
|
|
85
|
+
await setConfigDevBuild(!permBuild);
|
|
84
86
|
|
|
85
87
|
|
|
86
88
|
// if have store, then that means there is a current library, so
|
|
@@ -125,7 +125,9 @@ addDebugLog("deletePublished", "END", "-");
|
|
|
125
125
|
await deleteInfinityServerComponentLibrary(libraryName, rulesetName, rulesetVersion);
|
|
126
126
|
}
|
|
127
127
|
catch (err) {
|
|
128
|
-
|
|
128
|
+
let sErr = err.toString();
|
|
129
|
+
sErr = sErr.replaceAll("Error: ", "");
|
|
130
|
+
console.log(chalk.redBright.bold("Error: " + sErr));
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
// spinner.stop();
|
|
@@ -343,11 +343,13 @@ export default async options => {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
346
|
+
// diable question to build "CL"
|
|
347
|
+
// if (fullArchive === "" ) {
|
|
348
|
+
// const fullArchiveQuestions = await getFullArchiveQuestions();
|
|
349
|
+
// const fullArchiveAnswers = await inquirer.prompt(fullArchiveQuestions);
|
|
350
|
+
// ({ fullArchive } = fullArchiveAnswers);
|
|
351
|
+
// }
|
|
352
|
+
fullArchive = "Full";
|
|
351
353
|
|
|
352
354
|
let filePathQuestions;
|
|
353
355
|
let filePathAnswers;
|
|
@@ -384,6 +386,7 @@ export default async options => {
|
|
|
384
386
|
({ selectedVersion } = libraryVersionAnswer);
|
|
385
387
|
}
|
|
386
388
|
|
|
389
|
+
/* when we can export to server, un comment this out
|
|
387
390
|
if (isLibraryBasedCL) {
|
|
388
391
|
if (exportTo === "") {
|
|
389
392
|
const serverOrDirectoryQuestion = await getServerOrDirectoryQuestion();
|
|
@@ -394,6 +397,8 @@ export default async options => {
|
|
|
394
397
|
else {
|
|
395
398
|
exportTo = "Directory";
|
|
396
399
|
}
|
|
400
|
+
*/
|
|
401
|
+
exportTo = "Directory"; // remove this line when above is uncommented out
|
|
397
402
|
|
|
398
403
|
|
|
399
404
|
if (exportTo === "Directory") {
|
|
@@ -474,6 +474,8 @@ export default async options => {
|
|
|
474
474
|
|
|
475
475
|
await checkPathAccess(pegaConfigJsonPath);
|
|
476
476
|
const isLibraryBased = getLibraryBased();
|
|
477
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
478
|
+
|
|
477
479
|
if (!isLibraryBased) {
|
|
478
480
|
console.log(`Command only supported for ${chalk.bold.green('library mode')} components.`)
|
|
479
481
|
process.exit();
|
|
@@ -498,14 +500,18 @@ export default async options => {
|
|
|
498
500
|
|
|
499
501
|
inquirer.registerPrompt('fuzzypath', inquirerFuzzyPath);
|
|
500
502
|
|
|
503
|
+
let importFrom = "Directory";
|
|
501
504
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
if (isLibraryBasedCL) {
|
|
506
|
+
const localOrServerQuestion = await getServerOrDirectoryQuestion();
|
|
507
|
+
const localOrServerAnswer = await inquirer.prompt(localOrServerQuestion);
|
|
508
|
+
({importFrom} = localOrServerAnswer);
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
importFrom = "Directory";
|
|
512
|
+
}
|
|
505
513
|
|
|
506
514
|
if (importFrom === "Server") {
|
|
507
|
-
|
|
508
|
-
|
|
509
515
|
await checkAccessTokenExpiration();
|
|
510
516
|
|
|
511
517
|
let archiveVersions = [];
|
|
@@ -533,18 +539,11 @@ export default async options => {
|
|
|
533
539
|
|
|
534
540
|
const arArchData = archiveData.split(",");
|
|
535
541
|
let fileName = `${arArchData[1]}.${arArchData[2]}`;
|
|
542
|
+
|
|
536
543
|
// get archive
|
|
537
544
|
const fileData = await getServerLibraryArchive(arArchData[0],arArchData[1], arArchData[2], arArchData[3], arArchData[4]);
|
|
538
|
-
|
|
539
|
-
// console.log(fileSource);
|
|
540
|
-
|
|
541
|
-
// fileName = "big.zip";
|
|
542
|
-
|
|
543
|
-
|
|
544
545
|
await writeZipBuffer(fileName, fileData.pyFileSource);
|
|
545
546
|
|
|
546
|
-
|
|
547
|
-
|
|
548
547
|
// import archive
|
|
549
548
|
const currentDirectory = process.cwd();
|
|
550
549
|
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
@@ -553,13 +552,8 @@ export default async options => {
|
|
|
553
552
|
// const zipFilePath = join(tempDirectory, fileName);
|
|
554
553
|
//await unZipFromArchive(zipFilePath);
|
|
555
554
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
555
|
}
|
|
560
556
|
|
|
561
|
-
|
|
562
|
-
|
|
563
557
|
}
|
|
564
558
|
else {
|
|
565
559
|
// No library with that name
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
// rules for typescript (keeping old rules for js)
|
|
194
194
|
"files": "*.@(ts|tsx)",
|
|
195
195
|
"rules": {
|
|
196
|
-
"no-undef": "
|
|
196
|
+
"no-undef": "error",
|
|
197
197
|
"no-console": "off",
|
|
198
198
|
"import/prefer-default-export": "off",
|
|
199
199
|
"import/no-relative-packages": "off",
|
|
@@ -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.35.1",
|
|
85
|
+
"@pega/cosmos-react-core": "^8.0.0-build.35.1",
|
|
86
|
+
"@pega/cosmos-react-work": "^8.0.0-build.35.1",
|
|
87
87
|
"@pega/eslint-config": "^0.16.2",
|
|
88
88
|
"@pega/tsconfig": "^0.16.2",
|
|
89
89
|
"babel-loader": "^9.1.3",
|
|
@@ -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.
|
|
110
|
+
"@pega/custom-dx-components": "~0.25.21",
|
|
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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import inquirer from 'inquirer';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
|
|
4
|
-
import {showVersion, getC11NB2STokenAndStaticServer, getLocalLibraries, getLocalLibraryVersions, getLocalLibraryVersionData, getLibraryBased, addDebugLog, checkLibraryAndArchives, getConfigDefaults, cleanUpTemp, getPegaServerConfig, getLibraryBasedCL } from '../../util.js';
|
|
4
|
+
import {showVersion, getC11NB2STokenAndStaticServer, getLocalLibraries, getLocalLibraryVersions, getLocalLibraryVersionData, getLibraryBased, addDebugLog, checkLibraryAndArchives, getConfigDefaults, cleanUpTemp, getPegaServerConfig, getLibraryBasedCL, getApplicationAndVersionFromToken } from '../../util.js';
|
|
5
5
|
|
|
6
6
|
import { listLibJSONResponse } from '@pega/constellation-dx-components-build-utils/index.js';
|
|
7
7
|
|
|
@@ -119,11 +119,11 @@ addDebugLog("listPublished", "", "+");
|
|
|
119
119
|
// get built on from first component if exists
|
|
120
120
|
let builtOn = "(date unavailable)";
|
|
121
121
|
if (data[0] && data[0].buildDate) {
|
|
122
|
-
builtOn = data[0].buildDate;
|
|
122
|
+
builtOn = new Date(data[0].buildDate);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
let libData = data.map((component) => ( {'Component': component.name, 'Label': component.label, 'Version': component.version, 'Type': component.type, 'Sub Type' : component.subtype}));
|
|
126
|
-
console.log(chalk.bold.blueBright(`\nList of ${libraryName}:${selectedVersion} components built on ${builtOn}.`));
|
|
126
|
+
console.log(chalk.bold.blueBright(`\nList of ${chalk.inverse(`Local`)} ${libraryName}:${selectedVersion} components built on ${builtOn}.`));
|
|
127
127
|
console.table(libData, ['Component', 'Label', 'Version', 'Type', 'Sub Type']);
|
|
128
128
|
|
|
129
129
|
}
|
|
@@ -148,6 +148,10 @@ addDebugLog("listPublished", "END", "-");
|
|
|
148
148
|
const libs = arLibs.pxResults.map((oLib, index) => ({ name: oLib.pyLabel, value: index}));
|
|
149
149
|
|
|
150
150
|
|
|
151
|
+
const {app_name, app_version } = await getApplicationAndVersionFromToken();
|
|
152
|
+
console.log(chalk.green(`\nList of libraries for Application: ${chalk.bold.green(`${app_name} - ${app_version}`)}\n`));
|
|
153
|
+
|
|
154
|
+
|
|
151
155
|
const libAnswers = await inquirer.prompt([
|
|
152
156
|
{
|
|
153
157
|
name: 'library',
|
|
@@ -160,15 +164,19 @@ addDebugLog("listPublished", "END", "-");
|
|
|
160
164
|
const libraryIndex = libAnswers.library;
|
|
161
165
|
|
|
162
166
|
const data = JSON.parse(arLibs.pxResults[libraryIndex].pxComponentDefinition);
|
|
167
|
+
const library = arLibs.pxResults[libraryIndex].pyLabel.replace(" ", "/");
|
|
168
|
+
const ruleSet = arLibs.pxResults[libraryIndex].pyRuleSet;
|
|
169
|
+
const ruleSetVersion = arLibs.pxResults[libraryIndex].pyRuleSetVersion;
|
|
163
170
|
|
|
164
171
|
// get built on from first component if exists
|
|
165
172
|
let builtOn = "(date unavailable)";
|
|
166
173
|
if (data[0] && data[0].buildDate) {
|
|
167
|
-
builtOn = data[0].buildDate;
|
|
174
|
+
builtOn = new Date(data[0].buildDate);
|
|
175
|
+
|
|
168
176
|
}
|
|
169
177
|
|
|
170
178
|
let libData = data.map((component) => ( {'Component': component.name, 'Label': component.label, 'Version': component.version, 'Type': component.type, 'Sub Type' : component.subtype}));
|
|
171
|
-
console.log(chalk.bold.blueBright(`\nList of ${
|
|
179
|
+
console.log(chalk.bold.blueBright(`\nList of ${library} from ${chalk.inverse(`${ruleSet}:${ruleSetVersion}`)} components built on ${builtOn}.`));
|
|
172
180
|
console.table(libData, ['Component', 'Label', 'Version', 'Type', 'Sub Type']);
|
|
173
181
|
|
|
174
182
|
}
|
|
@@ -221,11 +229,11 @@ addDebugLog("listPublished", "END", "-");
|
|
|
221
229
|
// get built on from first component if exists
|
|
222
230
|
let builtOn = "(date unavailable)";
|
|
223
231
|
if (data[0] && data[0].buildDate) {
|
|
224
|
-
builtOn = data[0].buildDate;
|
|
232
|
+
builtOn = new data[0].buildDate;
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
let libData = data.map((component) => ( {'Component': component.name, 'Label': component.label, 'Version': component.version, 'Type': component.type, 'Sub Type' : component.subtype}));
|
|
228
|
-
console.log(chalk.bold.blueBright(`\nList of ${libraryName}
|
|
236
|
+
console.log(chalk.bold.blueBright(`\nList of ${libraryName}/${selectedVersion} components built on ${builtOn}.`));
|
|
229
237
|
console.table(libData, ['Component', 'Label', 'Version', 'Type', 'Sub Type']);
|
|
230
238
|
}
|
|
231
239
|
else {
|