Skip to content

Commit

Permalink
Merge pull request #1228 from contentstack/feat/CS-43173
Browse files Browse the repository at this point in the history
Feat: Audit fix command integration with clone [CS-43173]
  • Loading branch information
antonyagustine authored Jan 9, 2024
2 parents dc1dddb + 0a273ad commit 505254a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.8.1",
"version": "1.9.0",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions packages/contentstack-clone/src/commands/cm/stacks/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class StackCloneCommand extends Command {
const listOfTokens = configHandler.get('tokens');

config.forceStopMarketplaceAppsPrompt = yes;
config.skipAudit = cloneCommandFlags['skip-audit'];

if (cloneType) {
config.cloneType = cloneType;
Expand Down Expand Up @@ -245,6 +246,9 @@ b) Structure with content (all modules including entries & assets)
required: false,
description: '[Optional] Override marketplace prompts',
}),
'skip-audit': flags.boolean({
description: 'Skips the audit fix.',
}),
};

StackCloneCommand.usage =
Expand Down
2 changes: 2 additions & 0 deletions packages/contentstack-clone/src/lib/util/clone-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ class CloneHandler {
cmd.push('--import-webhook-status', config.importWebhookStatus);
}

if (config.skipAudit) cmd.push('--skip-audit');

if (config.forceStopMarketplaceAppsPrompt) cmd.push('-y');

fs.writeFileSync(path.join(__dirname, 'dummyConfig.json'), JSON.stringify(config));
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@contentstack/cli-cm-bootstrap": "~1.7.1",
"@contentstack/cli-cm-branches": "~1.0.19",
"@contentstack/cli-cm-bulk-publish": "~1.4.0",
"@contentstack/cli-cm-clone": "~1.8.1",
"@contentstack/cli-cm-clone": "~1.9.0",
"@contentstack/cli-cm-export": "~1.10.2",
"@contentstack/cli-cm-export-to-csv": "~1.6.2",
"@contentstack/cli-cm-import": "~1.13.0",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 505254a

Please sign in to comment.