@pega/custom-dx-components 0.25.18 → 0.25.20
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 +1 -1
- package/src/cli.js +6 -0
- package/src/constants.js +3 -1
- package/src/tasks/build-jest-assets/index.js +5 -5
- package/src/tasks/create-version/helper.js +30 -0
- package/src/tasks/create-version/index.js +12 -4
- package/src/tasks/delete-pub/helper.js +1 -1
- package/src/tasks/delete-pub/index.js +6 -1
- package/src/tasks/export-archive/helper.js +12 -12
- package/src/tasks/export-archive/index.js +6 -0
- package/src/tasks/import-archive/helper.js +205 -3
- package/src/tasks/import-archive/index.js +146 -31
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/template/package.json.mustache +2 -1
- package/src/tasks/list-pub/helper.js +3 -3
- package/src/tasks/publish-archive/index.js +5 -2
- package/src/tasks/restore/index.js +72 -0
- package/src/tasks/show-help/index.js +25 -7
- package/src/tasks/show-status/index.js +10 -6
- package/src/util.js +58 -1
- 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/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/localizations.json +5 -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
|
@@ -12,13 +12,13 @@ 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
|
|
|
24
24
|
describe(`createLib createAll list createVersion switchVersion move deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -78,13 +78,13 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
78
78
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
it(`npm run createLib - ${
|
|
81
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
82
82
|
|
|
83
83
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
84
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
84
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
85
85
|
|
|
86
86
|
const { stdout, stderr } = await exec(script);
|
|
87
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
87
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
88
88
|
|
|
89
89
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
90
90
|
|
|
@@ -163,67 +163,67 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
it(`npm run createLibVersion and NO copy - ${
|
|
166
|
+
it(`npm run createLibVersion and NO copy - ${isLibraryBasedCL}`, async() => {
|
|
167
167
|
|
|
168
168
|
const script = `npm run createLibVersion 0.0.2 N N NoAbout --prefix ../../..`;
|
|
169
169
|
const { stdout, stderr } = await exec(script);
|
|
170
170
|
|
|
171
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
172
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.2
|
|
171
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been stored.');
|
|
172
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.2 has been created!');
|
|
173
173
|
|
|
174
174
|
}, 50000);
|
|
175
175
|
|
|
176
|
-
it(`npm run switchLibVersion - ${
|
|
176
|
+
it(`npm run switchLibVersion - ${isLibraryBasedCL}`, async() => {
|
|
177
177
|
// we are at version 0.0.2, switch to 0.0.1
|
|
178
|
-
const script = `npm run switchLibVersion Y 0.0.1
|
|
178
|
+
const script = `npm run switchLibVersion Y 0.0.1 NoAbout --prefix ../../..`;
|
|
179
179
|
const { stdout, stderr } = await exec(script);
|
|
180
180
|
|
|
181
|
-
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1
|
|
181
|
+
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1!');
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
}, 50000);
|
|
185
185
|
|
|
186
|
-
it(`npm run move (move) - ${
|
|
186
|
+
it(`npm run move (move) - ${isLibraryBasedCL}`, async() => {
|
|
187
187
|
// move a component to version 0.0.2
|
|
188
|
-
const script = `npm run move Move Pega_DXIL_MyCurrency Pega_DXIL 0.0.2
|
|
188
|
+
const script = `npm run move Move Pega_DXIL_MyCurrency Pega_DXIL 0.0.2 Y --prefix ../../..`;
|
|
189
189
|
const { stdout, stderr } = await exec(script);
|
|
190
190
|
|
|
191
|
-
expect(stdout).toContain('Moved Pega_DXIL_MyCurrency to Pega_DXIL/0.0.2
|
|
191
|
+
expect(stdout).toContain('Moved Pega_DXIL_MyCurrency to Pega_DXIL/0.0.2 as Pega_DXIL_MyCurrency');
|
|
192
192
|
|
|
193
193
|
}, 50000);
|
|
194
194
|
|
|
195
|
-
it(`npm run move (copy) - ${
|
|
195
|
+
it(`npm run move (copy) - ${isLibraryBasedCL}`, async() => {
|
|
196
196
|
// copy a component to version 0.0.2
|
|
197
|
-
const script = `npm run move Copy Pega_DXIL_MyDetails Pega_DXIL 0.0.2
|
|
197
|
+
const script = `npm run move Copy Pega_DXIL_MyDetails Pega_DXIL 0.0.2 Y --prefix ../../..`;
|
|
198
198
|
const { stdout, stderr } = await exec(script);
|
|
199
199
|
|
|
200
|
-
expect(stdout).toContain('Copied Pega_DXIL_MyDetails to Pega_DXIL/0.0.2
|
|
200
|
+
expect(stdout).toContain('Copied Pega_DXIL_MyDetails to Pega_DXIL/0.0.2 as Pega_DXIL_MyDetails');
|
|
201
201
|
|
|
202
202
|
}, 50000);
|
|
203
203
|
|
|
204
|
-
it(`npm run listLib (0.0.2) - ${
|
|
205
|
-
// list 0.0.2
|
|
206
|
-
const script = `npm run listLib Pega_DXIL 0.0.2
|
|
204
|
+
it(`npm run listLib (0.0.2) - ${isLibraryBasedCL}`, async() => {
|
|
205
|
+
// list 0.0.2 and verify it is there
|
|
206
|
+
const script = `npm run listLib Pega_DXIL 0.0.2 --prefix ../../..`;
|
|
207
207
|
const { stdout, stderr } = await exec(script);
|
|
208
208
|
|
|
209
209
|
expect(stdout).toContain('Pega_DXIL_MyCurrency');
|
|
210
210
|
expect(stdout).toContain('Pega_DXIL_MyDetails');
|
|
211
|
-
expect(stdout).toContain('0.0.2
|
|
211
|
+
expect(stdout).toContain('0.0.2');
|
|
212
212
|
|
|
213
213
|
}, 30000);
|
|
214
214
|
|
|
215
|
-
it(`npm run list (0.0.1) - ${
|
|
216
|
-
// list 0.0.2
|
|
215
|
+
it(`npm run list (0.0.1) - ${isLibraryBasedCL}`, async() => {
|
|
216
|
+
// list 0.0.2 and verify it is there
|
|
217
217
|
const script = `npm run list --prefix ../../..`;
|
|
218
218
|
const { stdout, stderr } = await exec(script);
|
|
219
219
|
|
|
220
220
|
expect(stdout).not.toContain('Pega_DXIL_MyCurrency');
|
|
221
221
|
expect(stdout).toContain('Pega_DXIL_MyDetails');
|
|
222
|
-
expect(stdout).toContain('0.0.1
|
|
222
|
+
expect(stdout).toContain('0.0.1');
|
|
223
223
|
|
|
224
224
|
}, 40000);
|
|
225
225
|
|
|
226
|
-
it(`npm run deleteLib - ${
|
|
226
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
227
227
|
|
|
228
228
|
const script = `npm run deleteLib Pega_DXIL ALL Y --prefix ../../..`;
|
|
229
229
|
const { stdout, stderr } = await exec(script);
|
|
@@ -12,13 +12,13 @@ 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
|
|
|
24
24
|
describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -74,14 +74,14 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
it(`npm run createLib - ${
|
|
77
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
81
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
81
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
82
82
|
|
|
83
83
|
const { stdout, stderr } = await exec(script);
|
|
84
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
84
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
85
85
|
|
|
86
86
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
87
87
|
|
|
@@ -158,13 +158,13 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
158
158
|
// done();
|
|
159
159
|
}, 10000);
|
|
160
160
|
|
|
161
|
-
it(`npm run createLib other - ${
|
|
161
|
+
it(`npm run createLib other - ${isLibraryBasedCL}`, async() => {
|
|
162
162
|
|
|
163
163
|
const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
|
|
164
|
-
const compConf = path.join("store", "Pega_Other","0.0.1
|
|
164
|
+
const compConf = path.join("store", "Pega_Other","0.0.1", "componentsconfig.json");
|
|
165
165
|
|
|
166
166
|
const { stdout, stderr } = await exec(script);
|
|
167
|
-
expect(stdout).toContain('Library Pega_Other/0.0.1
|
|
167
|
+
expect(stdout).toContain('Library Pega_Other/0.0.1 has been created!');
|
|
168
168
|
|
|
169
169
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
170
170
|
|
|
@@ -172,12 +172,12 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
172
172
|
|
|
173
173
|
}, 30000);
|
|
174
174
|
|
|
175
|
-
it(`npm run switchLib DXIL - ${
|
|
175
|
+
it(`npm run switchLib DXIL - ${isLibraryBasedCL}`, async() => {
|
|
176
176
|
|
|
177
|
-
const script = `npm run switchLib Pega_DXIL 0.0.1
|
|
177
|
+
const script = `npm run switchLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
178
178
|
|
|
179
179
|
const { stdout, stderr } = await exec(script);
|
|
180
|
-
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1
|
|
180
|
+
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1!');
|
|
181
181
|
|
|
182
182
|
}, 30000);
|
|
183
183
|
|
|
@@ -218,14 +218,14 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
|
|
|
218
218
|
}, 10000);
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
it(`npm run deleteLib - ${
|
|
221
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
222
222
|
|
|
223
|
-
let script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
223
|
+
let script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
224
224
|
let { stdout, stderr } = await exec(script);
|
|
225
225
|
|
|
226
226
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
227
227
|
|
|
228
|
-
script = `npm run deleteLib Pega_Other 0.0.1
|
|
228
|
+
script = `npm run deleteLib Pega_Other 0.0.1 Y --prefix ../../..`;
|
|
229
229
|
({ stdout, stderr } = await exec(script));
|
|
230
230
|
|
|
231
231
|
expect(stdout).toContain('Pega_Other is deleted from Local.');
|
|
@@ -12,13 +12,13 @@ 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
|
|
|
24
24
|
describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -54,8 +54,8 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
54
54
|
afterAll( async() => {
|
|
55
55
|
|
|
56
56
|
//restore
|
|
57
|
-
|
|
58
|
-
tasksConfigJSON['
|
|
57
|
+
isLibraryBasedCL = savedLibraryBased
|
|
58
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
59
59
|
|
|
60
60
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
61
61
|
|
|
@@ -79,13 +79,13 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
it(`npm run createLib - ${
|
|
82
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
83
83
|
|
|
84
84
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
85
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
85
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
86
86
|
|
|
87
87
|
const { stdout, stderr } = await exec(script);
|
|
88
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
88
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
89
89
|
|
|
90
90
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
91
91
|
|
|
@@ -162,27 +162,11 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
|
|
|
162
162
|
// done();
|
|
163
163
|
}, 10000);
|
|
164
164
|
|
|
165
|
-
it(`npm run deleteLib- ${isLibraryBased}`, async() => {
|
|
166
165
|
|
|
167
|
-
const script = `npm run showStatus --prefix ../../..`;
|
|
168
|
-
const { stdout, stderr } = await exec(script);
|
|
169
|
-
|
|
170
|
-
expect(stdout).toContain('Organization:');
|
|
171
|
-
expect(stdout).toContain('Pega');
|
|
172
|
-
expect(stdout).toContain('Library:');
|
|
173
|
-
expect(stdout).toContain('DXIL');
|
|
174
|
-
expect(stdout).toContain('Version:');
|
|
175
|
-
expect(stdout).toContain('0.0.1-dev');
|
|
176
|
-
expect(stdout).toContain('Permanent:');
|
|
177
|
-
expect(stdout).toContain('false');
|
|
178
|
-
expect(stdout).toContain('Component count:');
|
|
179
|
-
expect(stdout).toContain('26');
|
|
180
|
-
|
|
181
|
-
}, 30000);
|
|
182
166
|
|
|
183
|
-
it(`npm run deleteLib- ${
|
|
167
|
+
it(`npm run deleteLib- ${isLibraryBasedCL}`, async() => {
|
|
184
168
|
|
|
185
|
-
const script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
169
|
+
const script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
186
170
|
const { stdout, stderr } = await exec(script);
|
|
187
171
|
|
|
188
172
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
@@ -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(`createLib create validate deleteLib: ${serverDir} - ${compType}` , () => {
|
|
@@ -27,9 +27,9 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
27
27
|
beforeAll( async() => {
|
|
28
28
|
|
|
29
29
|
// make libraryBased
|
|
30
|
-
|
|
31
|
-
tasksConfigJSON['
|
|
32
|
-
compType =
|
|
30
|
+
isLibraryBasedCL = true;
|
|
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
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -56,8 +56,8 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
56
56
|
afterAll( async() => {
|
|
57
57
|
|
|
58
58
|
//restore
|
|
59
|
-
|
|
60
|
-
tasksConfigJSON['
|
|
59
|
+
isLibraryBasedCL = savedLibraryBased
|
|
60
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
61
61
|
|
|
62
62
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
63
63
|
|
|
@@ -76,13 +76,13 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
it(`npm run createLib - ${
|
|
79
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
80
80
|
|
|
81
81
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
82
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
82
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
83
83
|
|
|
84
84
|
const { stdout, stderr } = await exec(script);
|
|
85
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
85
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
86
86
|
|
|
87
87
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
88
88
|
|
|
@@ -186,7 +186,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
186
186
|
// }
|
|
187
187
|
}, 10000);
|
|
188
188
|
|
|
189
|
-
it(`npm run validate Pega_DXIL_MyTestText - ${
|
|
189
|
+
it(`npm run validate Pega_DXIL_MyTestText - ${isLibraryBasedCL}`, async() => {
|
|
190
190
|
|
|
191
191
|
const script = `npm run validate Pega_DXIL_MyTestText --prefix ../../..`;
|
|
192
192
|
const { stdout, stderr } = await exec(script);
|
|
@@ -196,7 +196,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
196
196
|
|
|
197
197
|
}, 200000);
|
|
198
198
|
|
|
199
|
-
it(`npm run validateAll - ${
|
|
199
|
+
it(`npm run validateAll - ${isLibraryBasedCL}`, async() => {
|
|
200
200
|
|
|
201
201
|
const script = `npm run validateAll --prefix ../../..`;
|
|
202
202
|
const { stdout, stderr } = await exec(script);
|
|
@@ -211,9 +211,9 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
|
|
|
211
211
|
}, 200000);
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
it(`npm run deleteLib - ${
|
|
214
|
+
it(`npm run deleteLib - ${isLibraryBasedCL}`, async() => {
|
|
215
215
|
|
|
216
|
-
const script = `npm run deleteLib Pega_DXIL 0.0.1
|
|
216
|
+
const script = `npm run deleteLib Pega_DXIL 0.0.1 Y --prefix ../../..`;
|
|
217
217
|
const { stdout, stderr } = await exec(script);
|
|
218
218
|
expect(stdout).toContain('Pega_DXIL is deleted from Local.');
|
|
219
219
|
|
|
@@ -12,13 +12,13 @@ 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
|
|
|
24
24
|
describe(`createLib createAll list createLibVersion(with copy) switchLibe list deleteLibVersion(all) : ${serverDir} - ${compType}` , () => {
|
|
@@ -26,9 +26,9 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
26
26
|
beforeAll( async() => {
|
|
27
27
|
|
|
28
28
|
// make libraryBased
|
|
29
|
-
|
|
30
|
-
tasksConfigJSON['
|
|
31
|
-
compType =
|
|
29
|
+
isLibraryBasedCL = true;
|
|
30
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
31
|
+
compType = isLibraryBasedCL ? "library" : "original";
|
|
32
32
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
33
33
|
|
|
34
34
|
const storeDir = path.join(path.resolve('../../..'), 'store');
|
|
@@ -55,8 +55,8 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
55
55
|
afterAll( async() => {
|
|
56
56
|
|
|
57
57
|
//restore
|
|
58
|
-
|
|
59
|
-
tasksConfigJSON['
|
|
58
|
+
isLibraryBasedCL = savedLibraryBased
|
|
59
|
+
tasksConfigJSON['libraryModeCL'] = isLibraryBasedCL;
|
|
60
60
|
|
|
61
61
|
fs.writeFileSync(tasksConfigDir, JSON.stringify(tasksConfigJSON, null, 4), { encoding: 'utf8' });
|
|
62
62
|
|
|
@@ -80,13 +80,13 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
it(`npm run createLib - ${
|
|
83
|
+
it(`npm run createLib - ${isLibraryBasedCL}`, async() => {
|
|
84
84
|
|
|
85
85
|
const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
|
|
86
|
-
const compConf = path.join("store", "Pega_DXIL","0.0.1
|
|
86
|
+
const compConf = path.join("store", "Pega_DXIL","0.0.1", "componentsconfig.json");
|
|
87
87
|
|
|
88
88
|
const { stdout, stderr } = await exec(script);
|
|
89
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
89
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been created!');
|
|
90
90
|
|
|
91
91
|
const doesExist = fs.existsSync(path.resolve('../../..', compConf));
|
|
92
92
|
|
|
@@ -210,10 +210,10 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
210
210
|
let assetFileData = fs.readFileSync(assetFilePath, { encoding: 'utf8' });
|
|
211
211
|
|
|
212
212
|
// so that we don't have to generate all new assets, change "version"
|
|
213
|
-
// from 0.0.1
|
|
213
|
+
// from 0.0.1 to 0.0.1 for now
|
|
214
214
|
if (file === "config.json") {
|
|
215
|
-
expect(componentFileData).toContain("0.0.1
|
|
216
|
-
// componentFileData = componentFileData.replace("0.0.1
|
|
215
|
+
expect(componentFileData).toContain("0.0.1");
|
|
216
|
+
// componentFileData = componentFileData.replace("0.0.1", "0.0.1");
|
|
217
217
|
|
|
218
218
|
// normalize
|
|
219
219
|
componentFileData = JSON.stringify(JSON.parse(componentFileData));
|
|
@@ -225,13 +225,13 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
225
225
|
});
|
|
226
226
|
}, 10000);
|
|
227
227
|
|
|
228
|
-
it(`npm run createLibVersion and copy - ${
|
|
228
|
+
it(`npm run createLibVersion and copy - ${isLibraryBasedCL}`, async() => {
|
|
229
229
|
|
|
230
230
|
const script = `npm run createLibVersion 0.0.2 N Y NoAbout --prefix ../../..`;
|
|
231
231
|
const { stdout, stderr } = await exec(script);
|
|
232
232
|
|
|
233
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.1
|
|
234
|
-
expect(stdout).toContain('Library Pega_DXIL/0.0.2
|
|
233
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.1 has been stored.');
|
|
234
|
+
expect(stdout).toContain('Library Pega_DXIL/0.0.2 has been created!');
|
|
235
235
|
|
|
236
236
|
}, 30000);
|
|
237
237
|
|
|
@@ -318,10 +318,10 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
318
318
|
let assetFileData = fs.readFileSync(assetFilePath, { encoding: 'utf8' });
|
|
319
319
|
|
|
320
320
|
// so that we don't have to generate all new assets, change "version"
|
|
321
|
-
// from 0.0.2
|
|
321
|
+
// from 0.0.2 to 0.0.1 for now
|
|
322
322
|
if (file === "config.json") {
|
|
323
|
-
expect(componentFileData).toContain("0.0.2
|
|
324
|
-
componentFileData = componentFileData.replace("0.0.2
|
|
323
|
+
expect(componentFileData).toContain("0.0.2");
|
|
324
|
+
componentFileData = componentFileData.replace("0.0.2", "0.0.1");
|
|
325
325
|
|
|
326
326
|
// normalize
|
|
327
327
|
componentFileData = JSON.stringify(JSON.parse(componentFileData));
|
|
@@ -333,12 +333,12 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
333
333
|
});
|
|
334
334
|
}, 10000);
|
|
335
335
|
|
|
336
|
-
it(`npm run switchLibVersion - ${
|
|
336
|
+
it(`npm run switchLibVersion - ${isLibraryBasedCL}`, async() => {
|
|
337
337
|
// we are at version 0.0.2, switch to 0.0.1
|
|
338
|
-
const script = `npm run switchLibVersion Y 0.0.1
|
|
338
|
+
const script = `npm run switchLibVersion Y 0.0.1 NoAbout --prefix ../../..`;
|
|
339
339
|
const { stdout, stderr } = await exec(script);
|
|
340
340
|
|
|
341
|
-
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1
|
|
341
|
+
expect(stdout).toContain('Switched to Pega_DXIL/0.0.1!');
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
}, 30000);
|
|
@@ -426,10 +426,10 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
426
426
|
let assetFileData = fs.readFileSync(assetFilePath, { encoding: 'utf8' });
|
|
427
427
|
|
|
428
428
|
// so that we don't have to generate all new assets, change "version"
|
|
429
|
-
// from 0.0.1
|
|
429
|
+
// from 0.0.1 to 0.0.1 for now
|
|
430
430
|
if (file === "config.json") {
|
|
431
|
-
expect(componentFileData).toContain("0.0.1
|
|
432
|
-
// componentFileData = componentFileData.replace("0.0.1
|
|
431
|
+
expect(componentFileData).toContain("0.0.1");
|
|
432
|
+
// componentFileData = componentFileData.replace("0.0.1", "0.0.1");
|
|
433
433
|
// normalize
|
|
434
434
|
componentFileData = JSON.stringify(JSON.parse(componentFileData));
|
|
435
435
|
assetFileData = JSON.stringify(JSON.parse(assetFileData));
|
|
@@ -440,7 +440,7 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
|
|
|
440
440
|
});
|
|
441
441
|
}, 10000);
|
|
442
442
|
|
|
443
|
-
it(`npm run deleteLibVersion ALL - ${
|
|
443
|
+
it(`npm run deleteLibVersion ALL - ${isLibraryBasedCL}`, async() => {
|
|
444
444
|
|
|
445
445
|
const script = `npm run deleteLibVersion Pega_DXIL ALL Y --prefix ../../..`;
|
|
446
446
|
const { stdout, stderr } = await exec(script);
|