@contentstack/cli-cm-clone 2.0.0-beta.14 → 2.0.0-beta.16
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/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
|
|
|
16
16
|
$ csdx COMMAND
|
|
17
17
|
running command...
|
|
18
18
|
$ csdx (--version)
|
|
19
|
-
@contentstack/cli-cm-clone/2.0.0-beta.
|
|
19
|
+
@contentstack/cli-cm-clone/2.0.0-beta.16 linux-x64 node-v22.22.2
|
|
20
20
|
$ csdx --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ csdx COMMAND
|
|
@@ -578,8 +578,8 @@ class CloneHandler {
|
|
|
578
578
|
if (importConfig.data) {
|
|
579
579
|
importConfig.contentDir = importConfig.data;
|
|
580
580
|
}
|
|
581
|
-
if (!importConfig.contentDir && importConfig.
|
|
582
|
-
const dataPath =
|
|
581
|
+
if (!importConfig.contentDir && importConfig.pathDir) {
|
|
582
|
+
const dataPath = importConfig.pathDir;
|
|
583
583
|
cmd.push('-d', dataPath);
|
|
584
584
|
cli_utilities_2.log.debug(`Import data path: ${dataPath}`, this.config.cloneContext);
|
|
585
585
|
}
|
|
@@ -601,7 +601,7 @@ class CloneHandler {
|
|
|
601
601
|
}
|
|
602
602
|
cli_utilities_2.log.debug(`Writing import config to: ${configFilePath}`, this.config.cloneContext);
|
|
603
603
|
fs.writeFileSync(configFilePath, JSON.stringify(importConfig));
|
|
604
|
-
cli_utilities_2.log.debug('Import command prepared', Object.assign(Object.assign({}, this.config.cloneContext), { cmd: cmd.join(' '), targetStack: importConfig.apiKey || importConfig.target_stack, targetBranch: importConfig.targetStackBranch, dataPath: importConfig.contentDir ||
|
|
604
|
+
cli_utilities_2.log.debug('Import command prepared', Object.assign(Object.assign({}, this.config.cloneContext), { cmd: cmd.join(' '), targetStack: importConfig.apiKey || importConfig.target_stack, targetBranch: importConfig.targetStackBranch, dataPath: importConfig.contentDir || importConfig.pathDir || undefined }));
|
|
605
605
|
cli_utilities_2.log.debug('Running import command', Object.assign(Object.assign({}, this.config.cloneContext), { cmd }));
|
|
606
606
|
const importData = cli_cm_import_1.default.run(cmd);
|
|
607
607
|
importData.then(() => {
|
|
@@ -720,9 +720,10 @@ class CloneHandler {
|
|
|
720
720
|
];
|
|
721
721
|
let successMsg;
|
|
722
722
|
let selectedValue = {};
|
|
723
|
-
//
|
|
723
|
+
// Export root only (single-branch layout: modules live directly under -d, not pathDir/<branch>)
|
|
724
724
|
const cloneTypePackageRoot = path.resolve(__dirname, '../../..');
|
|
725
|
-
this.config.contentDir =
|
|
725
|
+
this.config.contentDir =
|
|
726
|
+
this.config.pathDir || path.join(cloneTypePackageRoot, 'contents');
|
|
726
727
|
cli_utilities_2.log.debug(`Clone content directory: ${this.config.contentDir}`, this.config.cloneContext);
|
|
727
728
|
if (!this.config.cloneType) {
|
|
728
729
|
cli_utilities_2.log.debug('Clone type not specified, prompting user for selection', this.config.cloneContext);
|
|
@@ -21,7 +21,7 @@ export interface CloneConfig {
|
|
|
21
21
|
importWebhookStatus?: 'disable' | 'current';
|
|
22
22
|
skipAudit?: boolean;
|
|
23
23
|
forceStopMarketplaceAppsPrompt?: boolean;
|
|
24
|
-
/**
|
|
24
|
+
/** Export root directory for import (same path as export `-d`; not a branch-named subdirectory) */
|
|
25
25
|
contentDir?: string;
|
|
26
26
|
modules?: string[];
|
|
27
27
|
filteredModules?: string[];
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-clone",
|
|
3
3
|
"description": "Contentstack stack clone plugin",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.16",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@colors/colors": "^1.6.0",
|
|
9
|
-
"@contentstack/cli-cm-export": "~2.0.0-beta.
|
|
10
|
-
"@contentstack/cli-cm-import": "~2.0.0-beta.
|
|
11
|
-
"@contentstack/cli-command": "~2.0.0-beta.
|
|
12
|
-
"@contentstack/cli-utilities": "~2.0.0-beta.
|
|
9
|
+
"@contentstack/cli-cm-export": "~2.0.0-beta.15",
|
|
10
|
+
"@contentstack/cli-cm-import": "~2.0.0-beta.15",
|
|
11
|
+
"@contentstack/cli-command": "~2.0.0-beta.6",
|
|
12
|
+
"@contentstack/cli-utilities": "~2.0.0-beta.7",
|
|
13
13
|
"@oclif/core": "^4.3.0",
|
|
14
14
|
"@oclif/plugin-help": "^6.2.28",
|
|
15
15
|
"chalk": "^5.6.2",
|
|
16
16
|
"inquirer": "12.11.1",
|
|
17
|
-
"lodash": "^4.
|
|
17
|
+
"lodash": "^4.18.1",
|
|
18
18
|
"merge": "^2.1.1",
|
|
19
19
|
"ora": "^5.4.1",
|
|
20
20
|
"prompt": "^1.3.0",
|