@squiz/dxp-cli-next 5.7.1-develop.4 → 5.8.0-develop.1
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/lib/__tests__/integration/main.spec.js +0 -15
- package/lib/dxp.js +2 -4
- package/package.json +1 -1
|
@@ -4,11 +4,9 @@ const helpers_1 = require("../helpers");
|
|
|
4
4
|
describe('dxp', () => {
|
|
5
5
|
beforeEach(() => {
|
|
6
6
|
process.env.FEATURE_TD_ACTIVE = 'true';
|
|
7
|
-
process.env.ENABLE_JOB_RUNNER = 'true';
|
|
8
7
|
});
|
|
9
8
|
afterAll(() => {
|
|
10
9
|
process.env.FEATURE_TD_ACTIVE = undefined;
|
|
11
|
-
process.env.ENABLE_JOB_RUNNER = undefined;
|
|
12
10
|
});
|
|
13
11
|
it('should display the help contents', () => {
|
|
14
12
|
const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
|
|
@@ -16,7 +14,6 @@ describe('dxp', () => {
|
|
|
16
14
|
});
|
|
17
15
|
it('should show all available commands', () => {
|
|
18
16
|
var _a;
|
|
19
|
-
process.env.ENABLE_JOB_RUNNER = 'true';
|
|
20
17
|
const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
|
|
21
18
|
const commandsText = (_a = stdout
|
|
22
19
|
.match(/Commands\:(.*)/is)) === null || _a === void 0 ? void 0 : _a[1].split('\n').map(a => a.trim()).filter(a => !!a);
|
|
@@ -29,7 +26,6 @@ describe('dxp', () => {
|
|
|
29
26
|
it('if FEATURE_TD_ACTIVE not set to true, td command should not be visible', () => {
|
|
30
27
|
var _a;
|
|
31
28
|
process.env.FEATURE_TD_ACTIVE = undefined;
|
|
32
|
-
process.env.ENABLE_JOB_RUNNER = 'true';
|
|
33
29
|
const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
|
|
34
30
|
const commandsText = (_a = stdout
|
|
35
31
|
.match(/Commands\:(.*)/is)) === null || _a === void 0 ? void 0 : _a[1].split('\n').map(a => a.trim()).filter(a => !!a);
|
|
@@ -39,15 +35,4 @@ describe('dxp', () => {
|
|
|
39
35
|
'cmp Component Service Commands',
|
|
40
36
|
]);
|
|
41
37
|
});
|
|
42
|
-
it('if ENABLE_JOB_RUNNER not set to true, job-runner command should not be visible', () => {
|
|
43
|
-
var _a;
|
|
44
|
-
process.env.ENABLE_JOB_RUNNER = undefined;
|
|
45
|
-
const { stdout } = (0, helpers_1.runCLI)(process.cwd(), ['--help']);
|
|
46
|
-
const commandsText = (_a = stdout
|
|
47
|
-
.match(/Commands\:(.*)/is)) === null || _a === void 0 ? void 0 : _a[1].split('\n').map(a => a.trim()).filter(a => !!a);
|
|
48
|
-
expect(commandsText).toEqual([
|
|
49
|
-
'auth Authenticate into the DXP CLI',
|
|
50
|
-
'cmp Component Service Commands',
|
|
51
|
-
]);
|
|
52
|
-
});
|
|
53
38
|
});
|
package/lib/dxp.js
CHANGED
|
@@ -22,10 +22,8 @@ program
|
|
|
22
22
|
.name('dxp')
|
|
23
23
|
.version(version)
|
|
24
24
|
.description('dxp commands')
|
|
25
|
-
.addCommand(auth_1.default)
|
|
26
|
-
|
|
27
|
-
program.addCommand(job_runner_1.default);
|
|
28
|
-
}
|
|
25
|
+
.addCommand(auth_1.default)
|
|
26
|
+
.addCommand(job_runner_1.default);
|
|
29
27
|
// if (process.env.FEATURE_TD_ACTIVE === 'true') {
|
|
30
28
|
// program.addCommand(tdCommand);
|
|
31
29
|
// }
|