@pega/custom-dx-components 0.25.21 → 0.25.23
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 +0 -1
- package/src/tasks/build-lib/helper.js +0 -2
- package/src/tasks/build-lib/index.js +3 -3
- package/src/tasks/delete/helper.js +0 -1
- package/src/tasks/delete/index.js +5 -1
- package/src/tasks/delete-lib/helper.js +0 -1
- package/src/tasks/delete-pub/helper.js +7 -2
- package/src/tasks/delete-version/index.js +0 -1
- package/src/tasks/export-archive/helper.js +7 -1
- package/src/tasks/export-archive/index.js +10 -34
- package/src/tasks/import-archive/helper.js +19 -5
- package/src/tasks/import-archive/index.js +247 -35
- package/src/tasks/import-comp/helper.js +0 -2
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/init/template/tasks.config.json +1 -1
- package/src/tasks/list/helper.js +17 -2
- package/src/tasks/list-lib/index.js +10 -1
- package/src/tasks/list-pub/helper.js +2 -4
- package/src/tasks/list-pub/index.js +15 -2
- package/src/tasks/publish/helper.js +0 -1
- package/src/tasks/publish/index.js +13 -1
- package/src/tasks/publish-all/index.js +10 -1
- package/src/tasks/publish-archive/index.js +51 -83
- package/src/tasks/publish-lib/index.js +0 -23
- package/src/tasks/rename/index.js +9 -1
- package/src/tasks/restore/index.js +19 -13
- package/src/tasks/set-perm/index.js +0 -2
- package/src/tasks/show-help/index.js +1 -5
- package/src/tasks/show-status/index.js +19 -6
- package/src/tasks/store/index.js +39 -18
- package/src/tasks/switch-lib/helper.js +0 -1
- package/src/util.js +6 -77
- package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +8 -8
- package/tests/functional/localCreateBuildDelete.test.js +8 -8
- package/tests/functional/localCreateListDelete.test.js +8 -8
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +8 -8
- package/tests/functional/localCreatePublishDelete.test.js +8 -8
- package/tests/functional/localCreateRenameDelete.test.js +8 -8
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
package/src/util.js
CHANGED
|
@@ -302,14 +302,6 @@ if (showDebug) addDebugLog("applyPegaData", "", "");
|
|
|
302
302
|
// let currentPackageData;
|
|
303
303
|
let currentPackageLockData;
|
|
304
304
|
|
|
305
|
-
// try {
|
|
306
|
-
// currentPackageData = fs.readFileSync(currentPackagePath);
|
|
307
|
-
// }
|
|
308
|
-
// catch (ex) {
|
|
309
|
-
// console.log(chalk.red(`\nUnable to retrieve current package.json.`));
|
|
310
|
-
// process.exit(1);
|
|
311
|
-
// }
|
|
312
|
-
|
|
313
305
|
try {
|
|
314
306
|
currentPackageLockData = fs.readFileSync(currentPackageLockPath);
|
|
315
307
|
}
|
|
@@ -401,32 +393,6 @@ export const getApplicationAndVersionFromToken = async() => {
|
|
|
401
393
|
|
|
402
394
|
export const getLibraryBased = () => {
|
|
403
395
|
if (showDebug) addDebugLog("getLibraryBased", "", "");
|
|
404
|
-
// const currentDirectory = process.cwd();
|
|
405
|
-
// const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
406
|
-
|
|
407
|
-
// try {
|
|
408
|
-
// // force to throw error and not console log
|
|
409
|
-
// await checkPathAccess(pegaConfigJsonPath, {}, true);
|
|
410
|
-
// }
|
|
411
|
-
// catch (ex) {
|
|
412
|
-
// // when can't find it, always be false, assume no library based.
|
|
413
|
-
// // This is IMPORTANT for init (npx install)
|
|
414
|
-
// return false;
|
|
415
|
-
// }
|
|
416
|
-
|
|
417
|
-
// let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
418
|
-
// data = JSON.parse(data);
|
|
419
|
-
|
|
420
|
-
// if (data[LIBRARY_BASED]) {
|
|
421
|
-
// if (showDebug) addDebugLog("getLibraryBased", `based: ${data[LIBRARY_BASED]}`, "");
|
|
422
|
-
// if (showDebug) addDebugLog("getLibraryBased", "END", "-");
|
|
423
|
-
// return data[LIBRARY_BASED];
|
|
424
|
-
// }
|
|
425
|
-
// else {
|
|
426
|
-
// if (showDebug) addDebugLog("getLibraryBased", "END", "-");
|
|
427
|
-
// return false;
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
396
|
return defaultConfigs.isLibraryBased;
|
|
431
397
|
}
|
|
432
398
|
|
|
@@ -525,26 +491,7 @@ export const setLibraryBasedCL = async (isLibraryBasedCL) => {
|
|
|
525
491
|
}
|
|
526
492
|
|
|
527
493
|
export const getShowDebug = () => {
|
|
528
|
-
|
|
529
|
-
// const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
530
|
-
|
|
531
|
-
// try {
|
|
532
|
-
// // force to throw error and not console log
|
|
533
|
-
// await checkPathAccess(pegaConfigJsonPath, {}, true);
|
|
534
|
-
// }
|
|
535
|
-
// catch (ex) {
|
|
536
|
-
// // when can't find it, always be false, assume no library based.
|
|
537
|
-
// // This is IMPORTANT for init (npx install)
|
|
538
|
-
// return false;
|
|
539
|
-
// }
|
|
540
|
-
|
|
541
|
-
// let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
542
|
-
// data = JSON.parse(data);
|
|
543
|
-
|
|
544
|
-
// if (data[SHOW_DEBUG]) {
|
|
545
|
-
// return data[SHOW_DEBUG];
|
|
546
|
-
// }
|
|
547
|
-
// else return false;
|
|
494
|
+
|
|
548
495
|
return defaultConfigs.showDebug;
|
|
549
496
|
|
|
550
497
|
}
|
|
@@ -924,8 +871,11 @@ if (showDebug) addDebugLog("getPegaServerConfig", "", "+");
|
|
|
924
871
|
|
|
925
872
|
if (OAuthData) {
|
|
926
873
|
const oOAuthData = JSON.parse(OAuthData);
|
|
927
|
-
|
|
928
|
-
|
|
874
|
+
if (oOAuthData["isolation-ids"]) {
|
|
875
|
+
const isolationId = oOAuthData["isolation-ids"].write;
|
|
876
|
+
pegaConfig['server-config'].isolationId = isolationId[0];
|
|
877
|
+
}
|
|
878
|
+
|
|
929
879
|
}
|
|
930
880
|
|
|
931
881
|
}
|
|
@@ -1267,12 +1217,6 @@ export const showVersion = async () => {
|
|
|
1267
1217
|
process.exit(1);
|
|
1268
1218
|
}
|
|
1269
1219
|
|
|
1270
|
-
// const hasGit = checkGit(process.cwd());
|
|
1271
|
-
|
|
1272
|
-
// if (!hasGit) {
|
|
1273
|
-
// console.log(chalk.redBright('DX Component Builder - Git needs to be installed.'));
|
|
1274
|
-
// process.exit(1);
|
|
1275
|
-
// }
|
|
1276
1220
|
};
|
|
1277
1221
|
|
|
1278
1222
|
export const getOOTBComponents = async () => {
|
|
@@ -2534,21 +2478,6 @@ if (showDebug) addDebugLog("checkLibraryAndArchives", ``, "");
|
|
|
2534
2478
|
|
|
2535
2479
|
export const hasLibraryAndVersion = async (libraryName, version, devBuild) => {
|
|
2536
2480
|
if (showDebug) addDebugLog("hasLibraryAndVersion", `libraryName: ${libraryName}, version: ${version}, devBuild: ${devBuild}`, "");
|
|
2537
|
-
// const orgLib = getConfigDefaults();
|
|
2538
|
-
// const currentOrgLib = `${orgLib.organization}_${libraryName}`;
|
|
2539
|
-
// const libFiles = await getLibraryArchivesFiles(currentOrgLib);
|
|
2540
|
-
// let currentVersion = version;
|
|
2541
|
-
// if (devBuild) {
|
|
2542
|
-
// currentVersion = currentVersion.concat("-dev");
|
|
2543
|
-
// }
|
|
2544
|
-
// const fileName = `${currentOrgLib}_${currentVersion}.zip`;
|
|
2545
|
-
// if (libFiles && libFiles.length > 0) {
|
|
2546
|
-
// if (libFiles.includes(fileName)) {
|
|
2547
|
-
// return true;
|
|
2548
|
-
// }
|
|
2549
|
-
// }
|
|
2550
|
-
|
|
2551
|
-
// return false;
|
|
2552
2481
|
|
|
2553
2482
|
const orgLib = getConfigDefaults();
|
|
2554
2483
|
const currentOrgLib = `${orgLib.organization}_${libraryName}`;
|
|
@@ -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;
|
|
@@ -12,22 +12,22 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
describe(`create buildAll deleteAll local: ${serverDir} - ${compType}`, () => {
|
|
24
24
|
|
|
25
25
|
beforeAll( async() => {
|
|
26
26
|
|
|
27
27
|
// make non libraryBased
|
|
28
|
-
|
|
29
|
-
tasksConfigJSON['
|
|
30
|
-
compType =
|
|
28
|
+
isLibraryBasedCL = false;
|
|
29
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
30
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
31
31
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
32
32
|
|
|
33
33
|
// make organzation Pega
|
|
@@ -48,8 +48,8 @@ describe(`create buildAll deleteAll local: ${serverDir} - ${compType}`, () => {
|
|
|
48
48
|
afterAll( async() => {
|
|
49
49
|
|
|
50
50
|
//restore
|
|
51
|
-
|
|
52
|
-
tasksConfigJSON['
|
|
51
|
+
isLibraryBasedCL = savedLibraryBased
|
|
52
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
53
53
|
|
|
54
54
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
55
55
|
|
|
@@ -13,13 +13,13 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
13
13
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
14
14
|
let packageJSON = JSON.parse(packageJSONData);
|
|
15
15
|
|
|
16
|
-
let
|
|
17
|
-
const savedLibraryBased =
|
|
16
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
17
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
18
18
|
const savedOrganization = packageJSON.organization;
|
|
19
19
|
|
|
20
20
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
21
21
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
22
|
-
let compType =
|
|
22
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
describe(`create library delete Library: ${serverDir} - ${compType}`, () => {
|
|
@@ -27,9 +27,9 @@ describe(`create library delete Library: ${serverDir} - ${compType}`, () => {
|
|
|
27
27
|
beforeAll( async() => {
|
|
28
28
|
|
|
29
29
|
// make non libraryBased
|
|
30
|
-
|
|
31
|
-
tasksConfigJSON['
|
|
32
|
-
compType =
|
|
30
|
+
isLibraryBasedCL = false;
|
|
31
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
32
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
33
33
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
34
34
|
|
|
35
35
|
// make organzation Pega
|
|
@@ -50,8 +50,8 @@ describe(`create library delete Library: ${serverDir} - ${compType}`, () => {
|
|
|
50
50
|
afterAll( async() => {
|
|
51
51
|
|
|
52
52
|
//restore
|
|
53
|
-
|
|
54
|
-
tasksConfigJSON['
|
|
53
|
+
isLibraryBasedCL = savedLibraryBased
|
|
54
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
55
55
|
|
|
56
56
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
57
57
|
|
|
@@ -12,22 +12,22 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['librayModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
describe(`createLib createAll list deleteLib: ${serverDir} - ${compType}`, () => {
|
|
24
24
|
|
|
25
25
|
beforeAll( async() => {
|
|
26
26
|
|
|
27
27
|
// make non libraryBased
|
|
28
|
-
|
|
29
|
-
tasksConfigJSON['
|
|
30
|
-
compType =
|
|
28
|
+
isLibraryBasedCL = false;
|
|
29
|
+
tasksConfigJSON['librayModeCL'] = isLibraryBasedCL;
|
|
30
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
31
31
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
32
32
|
|
|
33
33
|
// make organzation Pega
|
|
@@ -48,8 +48,8 @@ describe(`createLib createAll list deleteLib: ${serverDir} - ${compType}`, () =>
|
|
|
48
48
|
afterAll( async() => {
|
|
49
49
|
|
|
50
50
|
//restore
|
|
51
|
-
|
|
52
|
-
tasksConfigJSON['
|
|
51
|
+
isLibraryBasedCL = savedLibraryBased
|
|
52
|
+
tasksConfigJSON['librayModeCL'] = isLibraryBasedCL;
|
|
53
53
|
|
|
54
54
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
55
55
|
|
|
@@ -12,22 +12,22 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['librayModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
describe(`create publish deleteAll local: ${serverDir} - ${compType}`, () => {
|
|
24
24
|
|
|
25
25
|
beforeAll( async() => {
|
|
26
26
|
|
|
27
27
|
// make non libraryBased
|
|
28
|
-
|
|
29
|
-
tasksConfigJSON['
|
|
30
|
-
compType =
|
|
28
|
+
isLibraryBasedCL = false;
|
|
29
|
+
tasksConfigJSON['librayModeCL'] = isLibraryBasedCL;
|
|
30
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
31
31
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
32
32
|
|
|
33
33
|
// make organzation Pega
|
|
@@ -48,8 +48,8 @@ describe(`create publish deleteAll local: ${serverDir} - ${compType}`, () => {
|
|
|
48
48
|
afterAll( async() => {
|
|
49
49
|
|
|
50
50
|
//restore
|
|
51
|
-
|
|
52
|
-
tasksConfigJSON['
|
|
51
|
+
isLibraryBasedCL = savedLibraryBased
|
|
52
|
+
tasksConfigJSON['librayModeCL'] = isLibraryBasedCL;
|
|
53
53
|
|
|
54
54
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
55
55
|
|
|
@@ -12,22 +12,22 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
describe(`create publish delete local: ${serverDir} - ${compType}`, () => {
|
|
24
24
|
|
|
25
25
|
beforeAll( async() => {
|
|
26
26
|
|
|
27
27
|
// make non libraryBased
|
|
28
|
-
|
|
29
|
-
tasksConfigJSON['
|
|
30
|
-
compType =
|
|
28
|
+
isLibraryBasedCL = false;
|
|
29
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
30
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
31
31
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
32
32
|
|
|
33
33
|
// make organzation Pega
|
|
@@ -48,8 +48,8 @@ describe(`create publish delete local: ${serverDir} - ${compType}`, () => {
|
|
|
48
48
|
afterAll( async() => {
|
|
49
49
|
|
|
50
50
|
//restore
|
|
51
|
-
|
|
52
|
-
tasksConfigJSON['
|
|
51
|
+
isLibraryBasedCL = savedLibraryBased
|
|
52
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
53
53
|
|
|
54
54
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
55
55
|
|
|
@@ -12,22 +12,22 @@ const packageJSONDir = path.resolve('../../..', 'package.json');
|
|
|
12
12
|
const packageJSONData = fs.readFileSync(packageJSONDir, { encoding: 'utf8'});
|
|
13
13
|
let packageJSON = JSON.parse(packageJSONData);
|
|
14
14
|
|
|
15
|
-
let
|
|
16
|
-
const savedLibraryBased =
|
|
15
|
+
let isLibraryBasedCL = tasksConfigJSON['libraryModeCL'];
|
|
16
|
+
const savedLibraryBased = isLibraryBasedCL;
|
|
17
17
|
const savedOrganization = packageJSON.organization;
|
|
18
18
|
|
|
19
19
|
const serverType = tasksConfigJSON['server-config'].serverType;
|
|
20
20
|
const serverDir = serverType === 'launchpad' ? 'Launchpad' : 'Constellation';
|
|
21
|
-
let compType =
|
|
21
|
+
let compType = isLibraryBasedCL ? "library" : "original";
|
|
22
22
|
|
|
23
23
|
describe(`create rename delete local: ${serverDir} - ${compType}`, () => {
|
|
24
24
|
|
|
25
25
|
beforeAll( async() => {
|
|
26
26
|
|
|
27
27
|
// make non libraryBased
|
|
28
|
-
|
|
29
|
-
tasksConfigJSON['
|
|
30
|
-
compType =
|
|
28
|
+
isLibraryBasedCL = false;
|
|
29
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
30
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
31
31
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
32
32
|
|
|
33
33
|
// make organzation Pega
|
|
@@ -48,8 +48,8 @@ describe(`create rename delete local: ${serverDir} - ${compType}`, () => {
|
|
|
48
48
|
afterAll( async() => {
|
|
49
49
|
|
|
50
50
|
//restore
|
|
51
|
-
|
|
52
|
-
tasksConfigJSON['
|
|
51
|
+
isLibraryBasedCL = savedLibraryBased
|
|
52
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
53
53
|
|
|
54
54
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
55
55
|
|
|
@@ -207,7 +207,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
|
|
|
207
207
|
expect(stdout).toContain('Pega_DXIL_MyTestDetails schema is valid');
|
|
208
208
|
|
|
209
209
|
expect(stdout).toContain('Building Library...');
|
|
210
|
-
expect(stdout).toContain('Compile check...');
|
|
210
|
+
// expect(stdout).toContain('Compile check...');
|
|
211
211
|
|
|
212
212
|
expect(stdout).toContain('Webpacked library Pega_DXIL:0.0.1 successfully!!');
|
|
213
213
|
expect(stdout).toContain('== Creating manifest for the library version - completed ==');
|
|
@@ -197,7 +197,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
|
|
|
197
197
|
expect(stdout).toContain('Pega_DXIL_MyTestDetails schema is valid');
|
|
198
198
|
|
|
199
199
|
expect(stdout).toContain('Building Library...');
|
|
200
|
-
expect(stdout).toContain('Compile check...');
|
|
200
|
+
// expect(stdout).toContain('Compile check...');
|
|
201
201
|
|
|
202
202
|
expect(stdout).toContain('Webpacked library Pega_DXIL:0.0.1 successfully!!');
|
|
203
203
|
expect(stdout).toContain('== Creating manifest for the library version - completed ==');
|