Skip to content

Commit 70980e8

Browse files
Merge branch 'development' into feat/bootstrap-kickstarts
2 parents 4e423a5 + b3c158f commit 70980e8

File tree

19 files changed

+943
-829
lines changed

19 files changed

+943
-829
lines changed

.talismanrc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fileignoreconfig:
22
- filename: package-lock.json
33
checksum: 44b582fb5d952f027fdcb2c771b5b684a1677d1860f9a5ab928a14781d0a0186
44
- filename: pnpm-lock.yaml
5-
checksum: d28afee9b463d66004354b9476b1e39344f903e2db3a15c5f83bd84e688c01d6
5+
checksum: 006cd155027af9b70649f4e9295e7a158a960d7c87a74fad0710443fb3b814bc
66
- filename: packages/contentstack-import-setup/test/unit/backup-handler.test.ts
77
checksum: 0582d62b88834554cf12951c8690a73ef3ddbb78b82d2804d994cf4148e1ef93
88
- filename: packages/contentstack-import-setup/test/config.json
@@ -57,8 +57,10 @@ fileignoreconfig:
5757
checksum: f93aa9b0c964608b60c88d4c72ff33840b58ec900297c4bae1f4ea365aa51048
5858
- filename: packages/contentstack-auth/test/utils/mfa-handler.test.ts
5959
checksum: b067f93cf0185d794e8419cc41e8fac96ed790dea8fc48dc083ee242ccacbd4d
60-
- filename: packages/contentstack-utilities/src/logger/logger.ts
61-
checksum: 76429bc87e279624b386f00e7eb3f4ec25621ace7056289f812b9a076d6e184e
62-
- filename: packages/contentstack-import/src/import/modules/entries.ts
63-
checksum: 2fd4e8ecf75e077632a6408d09997f0921d2a3508f9f2cb8f47fe79a28592300
64-
version: "1.0"
60+
- filename: packages/contentstack-import/src/import/module-importer.ts
61+
checksum: 93fac2407e20070aa393f783e5a21093e99424e5fd2873aabc2099ac3ea02b27
62+
- filename: packages/contentstack-import/src/utils/import-config-handler.ts
63+
checksum: bb8093633dc7de888541990623c3e02a482b7e6f5db0ba396bedc20c4c74b782
64+
- filename: packages/contentstack-import/src/utils/setup-branch.ts
65+
checksum: a4a968a20d5ab7cbc08c266819907541bbf793cc098521a5e810ada3cbacbee6
66+
version: "1.0"

package-lock.json

Lines changed: 116 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-clone/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@contentstack/cli-cm-clone",
33
"description": "Contentstack stack clone plugin",
4-
"version": "1.15.2",
4+
"version": "1.16.0",
55
"author": "Contentstack",
66
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
77
"dependencies": {
88
"@colors/colors": "^1.6.0",
99
"@contentstack/cli-cm-export": "~1.20.0",
10-
"@contentstack/cli-cm-import": "~1.26.3",
10+
"@contentstack/cli-cm-import": "~1.27.0",
1111
"@contentstack/cli-command": "~1.6.1",
1212
"@contentstack/cli-utilities": "~1.14.0",
1313
"@oclif/core": "^4.3.0",

packages/contentstack-clone/src/commands/cm/stacks/clone.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class StackCloneCommand extends Command {
1818
type: cloneType,
1919
'stack-name': stackName,
2020
'source-branch': sourceStackBranch,
21+
'source-branch-alias': sourceStackBranchAlias,
2122
'target-branch': targetStackBranch,
23+
'target-branch-alias': targetStackBranchAlias,
2224
'source-stack-api-key': sourceStackApiKey,
2325
'destination-stack-api-key': destinationStackApiKey,
2426
'source-management-token-alias': sourceManagementTokenAlias,
@@ -47,8 +49,14 @@ class StackCloneCommand extends Command {
4749
if (sourceStackBranch) {
4850
config.sourceStackBranch = sourceStackBranch;
4951
}
52+
if (sourceStackBranchAlias) {
53+
config.sourceStackBranchAlias = sourceStackBranchAlias;
54+
}
5055
if (targetStackBranch) {
5156
config.targetStackBranch = targetStackBranch;
57+
}
58+
if (targetStackBranchAlias) {
59+
config.targetStackBranchAlias = targetStackBranchAlias;
5260
}
5361
if (sourceStackApiKey) {
5462
config.source_stack = sourceStackApiKey;
@@ -202,11 +210,25 @@ StackCloneCommand.flags = {
202210
required: false,
203211
multiple: false,
204212
description: 'Branch of the source stack.',
213+
exclusive: ['source-branch-alias']
214+
}),
215+
'source-branch-alias': flags.string({
216+
required: false,
217+
multiple: false,
218+
description: 'Alias of Branch of the source stack.',
219+
exclusive: ['source-branch']
205220
}),
206221
'target-branch': flags.string({
207222
required: false,
208223
multiple: false,
209224
description: 'Branch of the target stack.',
225+
exclusive: ['target-branch-alias']
226+
}),
227+
'target-branch-alias': flags.string({
228+
required: false,
229+
multiple: false,
230+
description: 'Alias of Branch of the target stack.',
231+
exclusive: ['target-branch']
210232
}),
211233
'source-management-token-alias': flags.string({
212234
required: false,
@@ -229,8 +251,8 @@ StackCloneCommand.flags = {
229251
multiple: false,
230252
options: ['a', 'b'],
231253
description: ` Type of data to clone. You can select option a or b.
232-
a) Structure (all modules except entries & assets).
233-
b) Structure with content (all modules including entries & assets).
254+
a) Structure (all modules except entries & assets).
255+
b) Structure with content (all modules including entries & assets).
234256
`,
235257
}),
236258
'source-stack-api-key': flags.string({

packages/contentstack-clone/src/lib/util/clone-handler.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,10 @@ class CloneHandler {
634634
cmd.push('--branch', exportConfig.sourceStackBranch);
635635
}
636636

637+
if (!exportConfig.sourceStackBranch && exportConfig.sourceStackBranchAlias) {
638+
cmd.push('--branch-alias', exportConfig.sourceStackBranchAlias);
639+
}
640+
637641
if (exportConfig.forceStopMarketplaceAppsPrompt) cmd.push('-y');
638642

639643
cmd.push('-c');
@@ -663,6 +667,10 @@ class CloneHandler {
663667
if (importConfig.targetStackBranch) {
664668
cmd.push('--branch', importConfig.targetStackBranch);
665669
}
670+
671+
if (!importConfig.targetStackBranch && importConfig.targetStackBranchAlias) {
672+
cmd.push('--branch-alias', importConfig.targetStackBranchAlias);
673+
}
666674
if (importConfig.importWebhookStatus) {
667675
cmd.push('--import-webhook-status', importConfig.importWebhookStatus);
668676
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@contentstack/cli-cm-export-to-csv",
33
"description": "Export entities to csv",
4-
"version": "1.9.1",
4+
"version": "1.9.2",
55
"author": "Abhinav Gupta @abhinav-from-contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
88
"@contentstack/cli-command": "~1.6.1",
99
"@contentstack/cli-utilities": "~1.14.0",
1010
"@oclif/core": "^4.3.0",
11-
"@oclif/plugin-help": "^6.2.28",
11+
"@oclif/plugin-help": "^6.2.32",
1212
"fast-csv": "^4.3.6",
13-
"inquirer": "8.2.6",
13+
"inquirer": "8.2.7",
1414
"inquirer-checkbox-plus-prompt": "1.4.2",
1515
"mkdirp": "^3.0.1"
1616
},

packages/contentstack-export-to-csv/src/commands/cm/export-to-csv.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const {
66
isAuthenticated,
77
cliux,
88
doesBranchExist,
9-
isManagementTokenValid
9+
isManagementTokenValid,
10+
log
1011
} = require('@contentstack/cli-utilities');
1112
const util = require('../../util');
1213
const config = require('../../util/config');
@@ -126,7 +127,7 @@ class ExportToCsvCommand extends Command {
126127
}
127128

128129
stackAPIClient = this.getStackClient(managementAPIClient, stack);
129-
await this.checkAndUpdateBranchDetail(branchUid, stack, stackAPIClient, managementAPIClient);
130+
stackAPIClient = await this.checkAndUpdateBranchDetail(branchUid, stack, stackAPIClient, managementAPIClient);
130131

131132
const contentTypeCount = await util.getContentTypeCount(stackAPIClient);
132133

@@ -321,6 +322,7 @@ class ExportToCsvCommand extends Command {
321322
stackAPIClient = this.getStackClient(managementAPIClient, stack);
322323
}
323324
}
325+
return stackAPIClient;
324326
}
325327

326328
/**

packages/contentstack-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-import",
33
"description": "Contentstack CLI plugin to import content into stack",
4-
"version": "1.26.3",
4+
"version": "1.27.0",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {

0 commit comments

Comments
 (0)