Skip to content

Commit 5e9524a

Browse files
author
naman-contentstack
committed
fix: fix setup issues
1 parent 6412c8d commit 5e9524a

19 files changed

Lines changed: 63 additions & 21 deletions

File tree

packages/contentstack-audit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"dependencies": {
2121
"@contentstack/cli-command": "~1.8.1",
22-
"@contentstack/cli-utilities": "~1.18.2",
22+
"@contentstack/cli-utilities": "~1.18.3",
2323
"@oclif/core": "^4.10.5",
2424
"@oclif/plugin-help": "^6.2.28",
2525
"chalk": "^4.1.2",

packages/contentstack-bootstrap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@contentstack/cli-cm-seed": "~1.15.2",
2020
"@contentstack/cli-command": "~1.8.1",
2121
"@contentstack/cli-config": "~1.20.2",
22-
"@contentstack/cli-utilities": "~1.18.2",
22+
"@contentstack/cli-utilities": "~1.18.3",
2323
"@oclif/core": "^4.10.5",
2424
"@oclif/plugin-help": "^6.2.37",
2525
"inquirer": "8.2.7",

packages/contentstack-branches/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@contentstack/cli-command": "~1.8.1",
99
"@oclif/core": "^4.10.5",
1010
"@oclif/plugin-help": "^6.2.28",
11-
"@contentstack/cli-utilities": "~1.18.2",
11+
"@contentstack/cli-utilities": "~1.18.3",
1212
"chalk": "^4.1.2",
1313
"just-diff": "^6.0.2",
1414
"lodash": "^4.18.1"

packages/contentstack-branches/src/commands/cm/branches/create.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Command } from '@contentstack/cli-command';
22
import { messageHandler, flags, isAuthenticated } from '@contentstack/cli-utilities';
3+
import path from 'path';
34
import { createBranch } from '../../../utils/create-branch';
45
import { interactive, handleErrorMsg } from '../../../utils';
56

@@ -27,6 +28,11 @@ export default class BranchCreateCommand extends Command {
2728
static aliases: string[] = []; // Note: alternative usage if any
2829

2930
async run(): Promise<any> {
31+
if (messageHandler.isEmptyMessages()) {
32+
messageHandler.init({
33+
messageFilePath: path.join(__dirname, '..', '..', '..', 'messages', 'index.json'),
34+
});
35+
}
3036
const { flags: branchCreateFlags } = await this.parse(BranchCreateCommand);
3137
let apiKey = branchCreateFlags['stack-api-key'];
3238
let branch = {

packages/contentstack-branches/src/commands/cm/branches/delete.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Command } from '@contentstack/cli-command';
22
import { messageHandler, flags, cliux, isAuthenticated } from '@contentstack/cli-utilities';
3+
import path from 'path';
34
import { deleteBranch } from '../../../utils/delete-branch';
45
import { interactive, handleErrorMsg } from '../../../utils';
56

@@ -30,6 +31,11 @@ export default class BranchDeleteCommand extends Command {
3031
static aliases: string[] = []; // Note: alternative usage if any
3132

3233
async run(): Promise<any> {
34+
if (messageHandler.isEmptyMessages()) {
35+
messageHandler.init({
36+
messageFilePath: path.join(__dirname, '..', '..', '..', 'messages', 'index.json'),
37+
});
38+
}
3339
const { flags: branchDeleteFlags } = await this.parse(BranchDeleteCommand);
3440
let apiKey = branchDeleteFlags['stack-api-key'];
3541
if (!isAuthenticated()) {

packages/contentstack-branches/src/commands/cm/branches/diff.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Command } from '@contentstack/cli-command';
22
import { messageHandler, flags, isAuthenticated } from '@contentstack/cli-utilities';
3+
import path from 'path';
34
import { BranchOptions } from '../../../interfaces/index';
45
import { BranchDiffHandler } from '../../../branch';
56
import { handleErrorMsg } from '../../../utils';
@@ -58,6 +59,11 @@ export default class BranchDiffCommand extends Command {
5859

5960
async run(): Promise<any> {
6061
try {
62+
if (messageHandler.isEmptyMessages()) {
63+
messageHandler.init({
64+
messageFilePath: path.join(__dirname, '..', '..', '..', 'messages', 'index.json'),
65+
});
66+
}
6167
const { flags: branchDiffFlags } = await this.parse(BranchDiffCommand);
6268
let options: BranchOptions = {
6369
baseBranch: branchDiffFlags['base-branch'],

packages/contentstack-branches/src/commands/cm/branches/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
isAuthenticated,
88
TableHeader,
99
} from '@contentstack/cli-utilities';
10+
import path from 'path';
1011
import { getbranchesList, getbranchConfig, interactive, handleErrorMsg } from '../../../utils/index';
1112
import chalk from 'chalk';
1213
export default class BranchListCommand extends Command {
@@ -25,6 +26,11 @@ export default class BranchListCommand extends Command {
2526

2627
async run(): Promise<any> {
2728
try {
29+
if (messageHandler.isEmptyMessages()) {
30+
messageHandler.init({
31+
messageFilePath: path.join(__dirname, '..', '..', '..', 'messages', 'index.json'),
32+
});
33+
}
2834
const managementAPIClient = await managementSDKClient({ host: this.cmaHost });
2935
const { flags: branchListFlags } = await this.parse(BranchListCommand);
3036
let stackApiKey = branchListFlags['stack-api-key'];

packages/contentstack-bulk-publish/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@contentstack/cli-command": "~1.8.1",
99
"@contentstack/cli-config": "~1.20.2",
10-
"@contentstack/cli-utilities": "~1.18.2",
10+
"@contentstack/cli-utilities": "~1.18.3",
1111
"@oclif/core": "^4.10.5",
1212
"@oclif/plugin-help": "^6.2.44",
1313
"chalk": "^4.1.2",

packages/contentstack-clone/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@contentstack/cli-cm-export": "~1.25.0",
1010
"@contentstack/cli-cm-import": "~1.33.0",
1111
"@contentstack/cli-command": "~1.8.1",
12-
"@contentstack/cli-utilities": "~1.18.2",
12+
"@contentstack/cli-utilities": "~1.18.3",
1313
"@oclif/core": "^4.10.5",
1414
"@oclif/plugin-help": "^6.2.28",
1515
"chalk": "^4.1.2",

packages/contentstack-export-to-csv/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
88
"@contentstack/cli-command": "~1.8.1",
9-
"@contentstack/cli-utilities": "~1.18.2",
9+
"@contentstack/cli-utilities": "~1.18.3",
1010
"@oclif/core": "^4.10.5",
1111
"@oclif/plugin-help": "^6.2.32",
1212
"fast-csv": "^4.3.6",

0 commit comments

Comments
 (0)