@squiz/dxp-cli-next 5.6.0-develop.5 → 5.6.0-develop.7
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/job-runner/job/listJobs/listJobs.js +14 -12
- package/lib/job-runner/job/listJobs/listJobs.spec.js +4 -7
- package/lib/job-runner/jobContext/listJobContexts.js +10 -2
- package/lib/job-runner/jobContext/listJobContexts.spec.js +1 -1
- package/lib/job-runner/jobExecution/beginJob/beginJob.js +1 -1
- package/lib/job-runner/jobExecution/listJobExecutions/listJobExecutions.js +19 -13
- package/lib/job-runner/jobExecution/listJobExecutions/listJobExecutions.spec.js +4 -7
- package/lib/job-runner/jobExecution/terminateJob/terminateJob.js +1 -1
- package/lib/job-runner/utils.d.ts +12 -0
- package/lib/job-runner/utils.js +51 -1
- package/lib/job-runner/utils.spec.js +24 -0
- package/package.json +2 -2
|
@@ -21,7 +21,10 @@ const createListJobsCommand = () => {
|
|
|
21
21
|
const listJobsCommand = new commander_1.Command('listJobs')
|
|
22
22
|
.name('listJobs')
|
|
23
23
|
.description('List all jobs')
|
|
24
|
-
.addOption(new commander_1.Option('-
|
|
24
|
+
.addOption(new commander_1.Option('-s, --size <string>', 'Pagination page size. Choices are tiny (5), small (20), medium (50), large (100). If not included, will default to small').choices(['tiny', 'small', 'medium', 'large']))
|
|
25
|
+
.addOption(new commander_1.Option('-b, --before <string>', 'Pagination page before token'))
|
|
26
|
+
.addOption(new commander_1.Option('-a, --after <string>', 'Pagination page after token'))
|
|
27
|
+
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to run against. If not provided will use configured tenant from login'))
|
|
25
28
|
.configureOutput({
|
|
26
29
|
outputError(str, write) {
|
|
27
30
|
write(chalk_1.default.red(str));
|
|
@@ -32,22 +35,21 @@ const createListJobsCommand = () => {
|
|
|
32
35
|
const spinner = (0, ora_1.default)('Retrieving jobs').start();
|
|
33
36
|
try {
|
|
34
37
|
const apiService = new ApiService_1.ApiService(utils_1.validateAxiosStatus);
|
|
35
|
-
|
|
38
|
+
let listJobsUrl = `${yield (0, utils_1.buildJobRunnerUrl)(options.tenant, options.overrideUrl)}/job/latest?`;
|
|
39
|
+
listJobsUrl = (0, utils_1.addPaginationToUrl)(listJobsUrl, {
|
|
40
|
+
before: options.before,
|
|
41
|
+
after: options.after,
|
|
42
|
+
size: options.size,
|
|
43
|
+
});
|
|
36
44
|
const res = yield apiService.client.get(listJobsUrl);
|
|
37
|
-
if (Array.isArray(res.data) && res.data.length > 0) {
|
|
38
|
-
spinner.succeed(`Retrieved ${res.data.length} jobs`);
|
|
39
|
-
(0, utils_1.
|
|
40
|
-
res.data.forEach((element) => {
|
|
41
|
-
Object.keys(element).forEach(key => {
|
|
42
|
-
console.log(`${key}: ${element[key]}`);
|
|
43
|
-
});
|
|
44
|
-
(0, utils_1.writeLineSeparator)();
|
|
45
|
-
});
|
|
46
|
-
return;
|
|
45
|
+
if (Array.isArray(res.data.data) && res.data.data.length > 0) {
|
|
46
|
+
spinner.succeed(`Retrieved ${res.data.data.length} jobs`);
|
|
47
|
+
yield (0, utils_1.logArrayResults)(res.data.data, res.data.links);
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
50
|
spinner.succeed('No jobs found');
|
|
50
51
|
}
|
|
52
|
+
return;
|
|
51
53
|
}
|
|
52
54
|
catch (error) {
|
|
53
55
|
spinner.fail();
|
|
@@ -14,13 +14,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const nock_1 = __importDefault(require("nock"));
|
|
16
16
|
const listJobs_1 = __importDefault(require("./listJobs"));
|
|
17
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
18
17
|
const logSpy = jest.spyOn(global.console, 'log');
|
|
19
18
|
describe('listJobs', () => {
|
|
20
19
|
it('correctly lists the job', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
20
|
process.env.ENABLE_OVERRIDE_JOB_RUNNER_URL = 'true';
|
|
22
21
|
(0, nock_1.default)('http://localhost:9999')
|
|
23
|
-
.get('/job')
|
|
22
|
+
.get('/job/latest?&page[size]=5')
|
|
24
23
|
.reply(200, [{ name: 'simple-job', type: 'job', version: '1.0.0' }]);
|
|
25
24
|
const program = (0, listJobs_1.default)();
|
|
26
25
|
yield program.parseAsync([
|
|
@@ -28,6 +27,8 @@ describe('listJobs', () => {
|
|
|
28
27
|
'dxp-cli',
|
|
29
28
|
'job-runner',
|
|
30
29
|
'listJobs',
|
|
30
|
+
'-s',
|
|
31
|
+
'tiny',
|
|
31
32
|
'-t',
|
|
32
33
|
'myTenant',
|
|
33
34
|
'-ou',
|
|
@@ -36,10 +37,6 @@ describe('listJobs', () => {
|
|
|
36
37
|
const opts = program.opts();
|
|
37
38
|
expect(opts.tenant).toEqual('myTenant');
|
|
38
39
|
expect(opts.overrideUrl).toEqual('http://localhost:9999');
|
|
39
|
-
expect(
|
|
40
|
-
expect(logSpy).toHaveBeenCalledWith('name: simple-job');
|
|
41
|
-
expect(logSpy).toHaveBeenCalledWith('type: job');
|
|
42
|
-
expect(logSpy).toHaveBeenCalledWith('version: 1.0.0');
|
|
43
|
-
expect(logSpy).toHaveBeenCalledWith(chalk_1.default.cyan('------------------------------'));
|
|
40
|
+
expect(opts.size).toEqual('tiny');
|
|
44
41
|
}));
|
|
45
42
|
});
|
|
@@ -21,7 +21,10 @@ const createListJobContextsCommand = () => {
|
|
|
21
21
|
const listJobContextsCommand = new commander_1.Command('listJobContexts')
|
|
22
22
|
.name('listJobContexts')
|
|
23
23
|
.description('List all job contexts')
|
|
24
|
-
.addOption(new commander_1.Option('-
|
|
24
|
+
.addOption(new commander_1.Option('-s, --size <string>', 'Pagination page size. Choices are tiny (5), small (20), medium (50), large (100). If not included, will default to small').choices(['tiny', 'small', 'medium', 'large']))
|
|
25
|
+
.addOption(new commander_1.Option('-b, --before <string>', 'Pagination page before token'))
|
|
26
|
+
.addOption(new commander_1.Option('-a, --after <string>', 'Pagination page after token'))
|
|
27
|
+
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to run against. If not provided will use configured tenant from login'))
|
|
25
28
|
.configureOutput({
|
|
26
29
|
outputError(str, write) {
|
|
27
30
|
write(chalk_1.default.red(str));
|
|
@@ -32,7 +35,12 @@ const createListJobContextsCommand = () => {
|
|
|
32
35
|
const spinner = (0, ora_1.default)('Retrieving job contexts\r\n').start();
|
|
33
36
|
try {
|
|
34
37
|
const apiService = new ApiService_1.ApiService(utils_1.validateAxiosStatus);
|
|
35
|
-
|
|
38
|
+
let listJobContextsUrl = `${yield (0, utils_1.buildJobRunnerUrl)(options.tenant, options.overrideUrl)}/job-context?`;
|
|
39
|
+
listJobContextsUrl = (0, utils_1.addPaginationToUrl)(listJobContextsUrl, {
|
|
40
|
+
before: options.before,
|
|
41
|
+
after: options.after,
|
|
42
|
+
size: options.size,
|
|
43
|
+
});
|
|
36
44
|
const res = yield apiService.client.get(listJobContextsUrl);
|
|
37
45
|
if (Array.isArray(res.data) && res.data.length > 0) {
|
|
38
46
|
spinner.succeed(`${res.data.length} contexts successfully retrieved`);
|
|
@@ -20,7 +20,7 @@ describe('listJobContexts', () => {
|
|
|
20
20
|
process.env.ENABLE_OVERRIDE_JOB_RUNNER_URL = 'true';
|
|
21
21
|
it('correctly lists the job contexts', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
22
|
(0, nock_1.default)('http://localhost:9999')
|
|
23
|
-
.get('/job-context')
|
|
23
|
+
.get('/job-context?')
|
|
24
24
|
.reply(200, [
|
|
25
25
|
{
|
|
26
26
|
contextName: 'dev',
|
|
@@ -21,7 +21,7 @@ const createBeginJobCommand = () => {
|
|
|
21
21
|
const beginJobCommand = new commander_1.Command('beginJob')
|
|
22
22
|
.name('beginJob')
|
|
23
23
|
.description('Add a job to the queue')
|
|
24
|
-
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to
|
|
24
|
+
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to run against. If not provided will use configured tenant from login'))
|
|
25
25
|
.addOption(new commander_1.Option('-i, --inputFile <string>', 'Path to the .json input file for the job execution e.g. documents/inputs/myInput.json'))
|
|
26
26
|
.addArgument(new commander_1.Argument('<jobName>', 'Name of the job to pass to the request'))
|
|
27
27
|
.addArgument(new commander_1.Argument('<contextName>', 'Name of the job context to pass to the request'))
|
|
@@ -21,28 +21,34 @@ const createListJobExecutionsCommand = () => {
|
|
|
21
21
|
const listJobExecutionsCommand = new commander_1.Command('listJobExecutions')
|
|
22
22
|
.name('listJobExecutions')
|
|
23
23
|
.description('List all job executions')
|
|
24
|
-
.addOption(new commander_1.Option('-
|
|
24
|
+
.addOption(new commander_1.Option('-s, --size <string>', 'Pagination page size. Choices are tiny (5), small (20), medium (50), large (100). If not included, will default to small').choices(['tiny', 'small', 'medium', 'large']))
|
|
25
|
+
.addOption(new commander_1.Option('-b, --before <string>', 'Pagination page before token'))
|
|
26
|
+
.addOption(new commander_1.Option('-a, --after <string>', 'Pagination page after token'))
|
|
27
|
+
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to run against. If not provided will use configured tenant from login'))
|
|
28
|
+
.addArgument(new commander_1.Argument('<jobName>', 'Name of the job to pass to the request'))
|
|
25
29
|
.configureOutput({
|
|
26
30
|
outputError(str, write) {
|
|
27
31
|
write(chalk_1.default.red(str));
|
|
28
32
|
},
|
|
29
33
|
})
|
|
30
|
-
.action((options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
.action((jobName, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
35
|
yield (0, utils_1.throwErrorIfNotLoggedIn)(listJobExecutionsCommand);
|
|
32
36
|
const spinner = (0, ora_1.default)('Retrieving job executions').start();
|
|
33
37
|
try {
|
|
34
38
|
const apiService = new ApiService_1.ApiService(utils_1.validateAxiosStatus);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
let listExecutionsUrl = `${yield (0, utils_1.buildJobRunnerUrl)(options.tenant, options.overrideUrl)}/executions/jobName/${jobName}?`;
|
|
40
|
+
listExecutionsUrl = (0, utils_1.addPaginationToUrl)(listExecutionsUrl, {
|
|
41
|
+
before: options.before,
|
|
42
|
+
after: options.after,
|
|
43
|
+
size: options.size,
|
|
44
|
+
});
|
|
45
|
+
const res = yield apiService.client.get(listExecutionsUrl);
|
|
46
|
+
if (Array.isArray(res.data.data) && res.data.data.length > 0) {
|
|
47
|
+
spinner.succeed(`Retrieved ${res.data.data.length} executions`);
|
|
48
|
+
yield (0, utils_1.logArrayResults)(res.data.data, res.data.links);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
spinner.succeed('No executions found');
|
|
46
52
|
}
|
|
47
53
|
return;
|
|
48
54
|
}
|
|
@@ -14,13 +14,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const nock_1 = __importDefault(require("nock"));
|
|
16
16
|
const listJobExecutions_1 = __importDefault(require("./listJobExecutions"));
|
|
17
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
18
17
|
const logSpy = jest.spyOn(global.console, 'log');
|
|
19
18
|
describe('listJobExecutions', () => {
|
|
20
19
|
it('correctly lists the job executions', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
20
|
process.env.ENABLE_OVERRIDE_JOB_RUNNER_URL = 'true';
|
|
22
21
|
(0, nock_1.default)('http://localhost:9999')
|
|
23
|
-
.get('/executions')
|
|
22
|
+
.get('/executions/jobName/job-runner?&page[size]=5')
|
|
24
23
|
.reply(200, [
|
|
25
24
|
{
|
|
26
25
|
context: 'dev',
|
|
@@ -49,6 +48,8 @@ describe('listJobExecutions', () => {
|
|
|
49
48
|
'dxp-cli',
|
|
50
49
|
'job-runner',
|
|
51
50
|
'listJobExecutions',
|
|
51
|
+
'-s',
|
|
52
|
+
'tiny',
|
|
52
53
|
'-t',
|
|
53
54
|
'myTenant',
|
|
54
55
|
'-ou',
|
|
@@ -57,10 +58,6 @@ describe('listJobExecutions', () => {
|
|
|
57
58
|
const opts = program.opts();
|
|
58
59
|
expect(opts.tenant).toEqual('myTenant');
|
|
59
60
|
expect(opts.overrideUrl).toEqual('http://localhost:9999');
|
|
60
|
-
expect(
|
|
61
|
-
expect(logSpy).toHaveBeenCalledTimes(19);
|
|
62
|
-
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('status')}: ${JSON.stringify('successfully-completed')}`);
|
|
63
|
-
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('jobName')}: ${JSON.stringify('simple-job')}`);
|
|
64
|
-
expect(logSpy).toHaveBeenCalledWith(chalk_1.default.cyan('------------------------------'));
|
|
61
|
+
expect(opts.size).toBe('tiny');
|
|
65
62
|
}));
|
|
66
63
|
});
|
|
@@ -21,7 +21,7 @@ const createTerminateJobCommand = () => {
|
|
|
21
21
|
const terminateJobCommand = new commander_1.Command('terminateJob')
|
|
22
22
|
.name('terminateJob')
|
|
23
23
|
.description('Terminate a job in the queue')
|
|
24
|
-
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to
|
|
24
|
+
.addOption(new commander_1.Option('-t, --tenant <string>', 'Tenant ID to run against. If not provided will use configured tenant from login'))
|
|
25
25
|
.addOption(new commander_1.Option('-ou, --overrideUrl <string>', 'Developer option to override the entire job runner url with a custom value'))
|
|
26
26
|
.addArgument(new commander_1.Argument('<jobName>', 'Name of the job to pass to the request'))
|
|
27
27
|
.addArgument(new commander_1.Argument('<executionId>', 'Name of the job execution id to pass to the request'))
|
|
@@ -5,3 +5,15 @@ export declare function buildJobRunnerUrl(tenantID?: string, overrideUrl?: strin
|
|
|
5
5
|
export declare function readInputFile(inputPath: string): Promise<any>;
|
|
6
6
|
export declare function writeLineSeparator(): void;
|
|
7
7
|
export declare function validateAxiosStatus(status: number): boolean;
|
|
8
|
+
export declare function addPaginationToUrl(url: string, opts: PaginationOpts): string;
|
|
9
|
+
export declare function logArrayResults(results: Array<any>, links?: PaginationLinks): Promise<void>;
|
|
10
|
+
interface PaginationLinks {
|
|
11
|
+
prev: string;
|
|
12
|
+
next: string;
|
|
13
|
+
}
|
|
14
|
+
interface PaginationOpts {
|
|
15
|
+
before: string;
|
|
16
|
+
after: string;
|
|
17
|
+
size: 'tiny' | 'small' | 'medium' | 'large';
|
|
18
|
+
}
|
|
19
|
+
export {};
|
package/lib/job-runner/utils.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.validateAxiosStatus = exports.writeLineSeparator = exports.readInputFile = exports.buildJobRunnerUrl = exports.throwErrorIfNotLoggedIn = exports.handleCommandError = void 0;
|
|
15
|
+
exports.logArrayResults = exports.addPaginationToUrl = exports.validateAxiosStatus = exports.writeLineSeparator = exports.readInputFile = exports.buildJobRunnerUrl = exports.throwErrorIfNotLoggedIn = exports.handleCommandError = void 0;
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
const chalk_1 = __importDefault(require("chalk"));
|
|
18
18
|
const ApplicationConfig_1 = require("../ApplicationConfig");
|
|
@@ -92,3 +92,53 @@ function validateAxiosStatus(status) {
|
|
|
92
92
|
return status < 400;
|
|
93
93
|
}
|
|
94
94
|
exports.validateAxiosStatus = validateAxiosStatus;
|
|
95
|
+
function addPaginationToUrl(url, opts) {
|
|
96
|
+
if (opts.before && opts.after) {
|
|
97
|
+
throw new Error('Only one of before and after can be set');
|
|
98
|
+
}
|
|
99
|
+
if (opts.size) {
|
|
100
|
+
url += `&page[size]=${PaginationPageLimit[opts.size]}`;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
`&page[size]=${PaginationPageLimit.small}`;
|
|
104
|
+
}
|
|
105
|
+
if (opts.before) {
|
|
106
|
+
url += `&page[before]=${opts.before}`;
|
|
107
|
+
}
|
|
108
|
+
if (opts.after) {
|
|
109
|
+
url += `&page[after]=${opts.after}`;
|
|
110
|
+
}
|
|
111
|
+
return url;
|
|
112
|
+
}
|
|
113
|
+
exports.addPaginationToUrl = addPaginationToUrl;
|
|
114
|
+
function logArrayResults(results, links) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
if (Array.isArray(results) && results.length > 0) {
|
|
117
|
+
writeLineSeparator();
|
|
118
|
+
results.forEach((res) => {
|
|
119
|
+
for (const [key, value] of Object.entries(res)) {
|
|
120
|
+
console.log(`${chalk_1.default.bold([key])}: ${JSON.stringify(value)}`);
|
|
121
|
+
}
|
|
122
|
+
writeLineSeparator();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
if (links) {
|
|
126
|
+
const afterStr = 'page[after]=';
|
|
127
|
+
console.log(`${chalk_1.default.bold('nextPageToken')}: ${links.next !== null
|
|
128
|
+
? links.next.slice(links.next.lastIndexOf(afterStr) + afterStr.length)
|
|
129
|
+
: null}`);
|
|
130
|
+
const beforeStr = 'page[before]=';
|
|
131
|
+
console.log(`${chalk_1.default.bold('prevPageToken')}: ${links.prev !== null
|
|
132
|
+
? links.prev.slice(links.prev.lastIndexOf(beforeStr) + beforeStr.length)
|
|
133
|
+
: null}`);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
exports.logArrayResults = logArrayResults;
|
|
138
|
+
var PaginationPageLimit;
|
|
139
|
+
(function (PaginationPageLimit) {
|
|
140
|
+
PaginationPageLimit[PaginationPageLimit["tiny"] = 5] = "tiny";
|
|
141
|
+
PaginationPageLimit[PaginationPageLimit["small"] = 20] = "small";
|
|
142
|
+
PaginationPageLimit[PaginationPageLimit["medium"] = 50] = "medium";
|
|
143
|
+
PaginationPageLimit[PaginationPageLimit["large"] = 100] = "large";
|
|
144
|
+
})(PaginationPageLimit || (PaginationPageLimit = {}));
|
|
@@ -90,3 +90,27 @@ describe('readInputFile', () => {
|
|
|
90
90
|
yield expect((0, utils_1.readInputFile)(path_1.default.join(source))).rejects.toThrow(`Unable to read file ${path_1.default.join(source)} - Unexpected token i in JSON at position 1`);
|
|
91
91
|
}));
|
|
92
92
|
});
|
|
93
|
+
describe('addPaginationToUrl', () => {
|
|
94
|
+
it('correctly adds the pagination size param to the url', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
95
|
+
const url = (0, utils_1.addPaginationToUrl)('http://localhost:9999//__dxp/au/job-runner/someTenant/job/latest?', { size: 'tiny', before: '', after: '' });
|
|
96
|
+
expect(url).toBe('http://localhost:9999//__dxp/au/job-runner/someTenant/job/latest?&page[size]=5');
|
|
97
|
+
}));
|
|
98
|
+
it('correctly adds the pagination params to the url', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
+
const url = (0, utils_1.addPaginationToUrl)('http://localhost:9999//__dxp/au/job-runner/someTenant/job/latest?', { size: 'tiny', before: '12345', after: '' });
|
|
100
|
+
expect(url).toBe('http://localhost:9999//__dxp/au/job-runner/someTenant/job/latest?&page[size]=5&page[before]=12345');
|
|
101
|
+
}));
|
|
102
|
+
it('correctly throws error for before and after params', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
expect(() => {
|
|
104
|
+
(0, utils_1.addPaginationToUrl)('http://localhost:9999//__dxp/au/job-runner/someTenant/job/latest?', { size: 'tiny', before: '12345', after: '54321' });
|
|
105
|
+
}).toThrow('Only one of before and after can be set');
|
|
106
|
+
}));
|
|
107
|
+
});
|
|
108
|
+
describe('logArrayResults', () => {
|
|
109
|
+
it('correctly logs results with links', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
110
|
+
yield (0, utils_1.logArrayResults)([{ something: 'awesome' }, { somethingElse: 'also awesome' }], { next: 'page[after]=12345', prev: 'page[before]=1234' });
|
|
111
|
+
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('something')}: "awesome"`);
|
|
112
|
+
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('somethingElse')}: "also awesome"`);
|
|
113
|
+
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('prevPageToken')}: 1234`);
|
|
114
|
+
expect(logSpy).toHaveBeenCalledWith(`${chalk_1.default.bold('nextPageToken')}: 12345`);
|
|
115
|
+
}));
|
|
116
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squiz/dxp-cli-next",
|
|
3
|
-
"version": "5.6.0-develop.
|
|
3
|
+
"version": "5.6.0-develop.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://gitlab.squiz.net/developer-experience/dxp-cli-next"
|
|
6
6
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"codecov"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@squiz/component-cli-lib": "^1.
|
|
42
|
+
"@squiz/component-cli-lib": "^1.45.1-alpha",
|
|
43
43
|
"axios": "1.1.3",
|
|
44
44
|
"cli-color": "2.0.3",
|
|
45
45
|
"commander": "9.4.0",
|