Skip to content

Commit 9eed317

Browse files
Merge pull request #802 from contentstack/development
Staging <- Development : 18/05/2023 (NRP Release)
2 parents ab86591 + c6f418d commit 9eed317

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/contentstack-clone/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-clone",
33
"description": "Contentstack stack clone plugin",
4-
"version": "1.4.4",
4+
"version": "1.4.5",
55
"author": "Contentstack",
66
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
77
"dependencies": {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class StackCloneCommand extends Command {
7676
const cloneHandler = new CloneHandler(config);
7777
const managementAPIClient = await managementSDKClient(config);
7878
cloneHandler.setClient(managementAPIClient);
79-
cloneHandler.execute().catch();
79+
cloneHandler.execute().catch((error)=>{
80+
console.log(error);
81+
});
8082
};
8183

8284
if (sourceManagementTokenAlias && destinationManagementTokenAlias) {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ class CloneHandler {
271271
await cloneCommand.execute(new SetBranchCommand(null, this));
272272

273273
if (exportRes) {
274-
this.executeDestination().catch(() => {
275-
reject();
274+
this.executeDestination().catch((error) => {
275+
return reject(error);
276276
});
277277
}
278278
}
@@ -362,6 +362,8 @@ class CloneHandler {
362362
await cloneCommand.execute(new CloneTypeSelectionCommand(null, this));
363363
return resolve();
364364
} catch (error) {
365+
console.log(error);
366+
stackAbortController.signal.aborted = true;
365367
reject(error);
366368
} finally {
367369
// If not aborted and ran successfully

packages/contentstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@contentstack/cli-auth": "^1.3.5",
2525
"@contentstack/cli-cm-bootstrap": "^1.4.5",
2626
"@contentstack/cli-cm-bulk-publish": "^1.3.4",
27-
"@contentstack/cli-cm-clone": "^1.4.4",
27+
"@contentstack/cli-cm-clone": "^1.4.5",
2828
"@contentstack/cli-cm-export": "^1.5.5",
2929
"@contentstack/cli-cm-export-to-csv": "^1.3.5",
3030
"@contentstack/cli-cm-import": "^1.5.5",

0 commit comments

Comments
 (0)