@contentstack/cli-cm-export 1.22.0 → 1.22.1
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
|
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
|
|
|
48
48
|
$ csdx COMMAND
|
|
49
49
|
running command...
|
|
50
50
|
$ csdx (--version)
|
|
51
|
-
@contentstack/cli-cm-export/1.22.
|
|
51
|
+
@contentstack/cli-cm-export/1.22.1 linux-x64 node-v22.21.1
|
|
52
52
|
$ csdx --help [COMMAND]
|
|
53
53
|
USAGE
|
|
54
54
|
$ csdx COMMAND
|
|
@@ -83,7 +83,7 @@ FLAGS
|
|
|
83
83
|
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
|
|
84
84
|
the modules to the stack. The available modules are assets, content-types, entries,
|
|
85
85
|
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
86
|
-
workflows, custom-roles, taxonomies, and
|
|
86
|
+
workflows, custom-roles, taxonomies, and studio.
|
|
87
87
|
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
|
|
88
88
|
of multiple content types, specify the IDs separated by spaces.
|
|
89
89
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
@@ -133,7 +133,7 @@ FLAGS
|
|
|
133
133
|
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
|
|
134
134
|
the modules to the stack. The available modules are assets, content-types, entries,
|
|
135
135
|
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
136
|
-
workflows, custom-roles, taxonomies, and
|
|
136
|
+
workflows, custom-roles, taxonomies, and studio.
|
|
137
137
|
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
|
|
138
138
|
of multiple content types, specify the IDs separated by spaces.
|
|
139
139
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
@@ -116,7 +116,7 @@ ExportCommand.flags = {
|
|
|
116
116
|
}),
|
|
117
117
|
module: cli_utilities_1.flags.string({
|
|
118
118
|
char: 'm',
|
|
119
|
-
description: '[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and
|
|
119
|
+
description: '[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and studio.',
|
|
120
120
|
parse: (0, cli_utilities_1.printFlagDeprecation)(['-m'], ['--module']),
|
|
121
121
|
}),
|
|
122
122
|
'content-types': cli_utilities_1.flags.string({
|
|
@@ -9,7 +9,7 @@ export default class ExportComposableStudio {
|
|
|
9
9
|
constructor({ exportConfig }: Omit<ModuleClassParams, 'stackAPIClient' | 'moduleName'>);
|
|
10
10
|
start(): Promise<void>;
|
|
11
11
|
/**
|
|
12
|
-
* Export
|
|
12
|
+
* Export Studio projects connected to the current stack
|
|
13
13
|
*/
|
|
14
14
|
exportProjects(): Promise<void>;
|
|
15
15
|
}
|
|
@@ -9,34 +9,34 @@ class ExportComposableStudio {
|
|
|
9
9
|
this.exportConfig = exportConfig;
|
|
10
10
|
this.composableStudioConfig = exportConfig.modules['composable-studio'];
|
|
11
11
|
this.exportConfig.context.module = 'composable-studio';
|
|
12
|
-
// Initialize HttpClient with
|
|
12
|
+
// Initialize HttpClient with Studio API base URL
|
|
13
13
|
this.apiClient = new cli_utilities_1.HttpClient();
|
|
14
14
|
this.apiClient.baseUrl(`${this.composableStudioConfig.apiBaseUrl}/${this.composableStudioConfig.apiVersion}`);
|
|
15
15
|
}
|
|
16
16
|
async start() {
|
|
17
|
-
cli_utilities_1.log.debug('Starting
|
|
17
|
+
cli_utilities_1.log.debug('Starting Studio project export process...', this.exportConfig.context);
|
|
18
18
|
if (!(0, cli_utilities_1.isAuthenticated)()) {
|
|
19
|
-
cli_utilities_1.cliux.print('WARNING!!! To export
|
|
19
|
+
cli_utilities_1.cliux.print('WARNING!!! To export Studio projects, you must be logged in. Please check csdx auth:login --help to log in', { color: 'yellow' });
|
|
20
20
|
return Promise.resolve();
|
|
21
21
|
}
|
|
22
22
|
this.composableStudioPath = (0, node_path_1.resolve)(this.exportConfig.data, this.exportConfig.branchName || '', this.composableStudioConfig.dirName);
|
|
23
|
-
cli_utilities_1.log.debug(`
|
|
23
|
+
cli_utilities_1.log.debug(`Studio folder path: ${this.composableStudioPath}`, this.exportConfig.context);
|
|
24
24
|
await utils_1.fsUtil.makeDirectory(this.composableStudioPath);
|
|
25
|
-
cli_utilities_1.log.debug('Created
|
|
25
|
+
cli_utilities_1.log.debug('Created Studio directory', this.exportConfig.context);
|
|
26
26
|
this.exportConfig.org_uid = this.exportConfig.org_uid || (await (0, utils_1.getOrgUid)(this.exportConfig));
|
|
27
27
|
cli_utilities_1.log.debug(`Organization UID: ${this.exportConfig.org_uid}`, this.exportConfig.context);
|
|
28
28
|
await this.exportProjects();
|
|
29
|
-
cli_utilities_1.log.debug('
|
|
29
|
+
cli_utilities_1.log.debug('Studio project export process completed', this.exportConfig.context);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Export
|
|
32
|
+
* Export Studio projects connected to the current stack
|
|
33
33
|
*/
|
|
34
34
|
async exportProjects() {
|
|
35
35
|
var _a, _b;
|
|
36
|
-
cli_utilities_1.log.debug('Starting
|
|
36
|
+
cli_utilities_1.log.debug('Starting Studio project export...', this.exportConfig.context);
|
|
37
37
|
try {
|
|
38
38
|
// Get authentication details - following personalization-api-adapter pattern
|
|
39
|
-
cli_utilities_1.log.debug('Initializing
|
|
39
|
+
cli_utilities_1.log.debug('Initializing Studio API authentication...', this.exportConfig.context);
|
|
40
40
|
await cli_utilities_1.authenticationHandler.getAuthDetails();
|
|
41
41
|
const token = cli_utilities_1.authenticationHandler.accessToken;
|
|
42
42
|
cli_utilities_1.log.debug(`Authentication type: ${cli_utilities_1.authenticationHandler.isOauthEnabled ? 'OAuth' : 'Token'}`, this.exportConfig.context);
|
|
@@ -71,15 +71,15 @@ class ExportComposableStudio {
|
|
|
71
71
|
}
|
|
72
72
|
// Use the first connected project (stacks should have only one project)
|
|
73
73
|
this.composableStudioProject = connectedProject[0];
|
|
74
|
-
cli_utilities_1.log.debug(`Found
|
|
74
|
+
cli_utilities_1.log.debug(`Found Studio project: ${this.composableStudioProject.name}`, this.exportConfig.context);
|
|
75
75
|
// Write the project to file
|
|
76
76
|
const composableStudioFilePath = (0, node_path_1.resolve)(this.composableStudioPath, this.composableStudioConfig.fileName);
|
|
77
|
-
cli_utilities_1.log.debug(`Writing
|
|
77
|
+
cli_utilities_1.log.debug(`Writing Studio project to: ${composableStudioFilePath}`, this.exportConfig.context);
|
|
78
78
|
utils_1.fsUtil.writeFile(composableStudioFilePath, this.composableStudioProject);
|
|
79
79
|
cli_utilities_1.log.success(cli_utilities_1.messageHandler.parse('COMPOSABLE_STUDIO_EXPORT_COMPLETE', this.composableStudioProject.name), this.exportConfig.context);
|
|
80
80
|
}
|
|
81
81
|
catch (error) {
|
|
82
|
-
cli_utilities_1.log.debug('Error occurred while exporting
|
|
82
|
+
cli_utilities_1.log.debug('Error occurred while exporting Studio project', this.exportConfig.context);
|
|
83
83
|
(0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.exportConfig.context));
|
|
84
84
|
}
|
|
85
85
|
}
|
package/messages/index.json
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
|
|
3
|
-
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully",
|
|
4
|
-
"ASSET_METADATA_EXPORT_COMPLETE": "Asset metadata exported successfully",
|
|
5
|
-
"ASSET_VERSIONED_METADATA_EXPORT_COMPLETE": "Versioned asset metadata exported successfully",
|
|
6
|
-
"ASSET_DOWNLOAD_COMPLETE": "Asset download completed successfully",
|
|
7
|
-
"ASSET_DOWNLOAD_SUCCESS": "Asset '%s' (UID: %s) downloaded successfully",
|
|
8
|
-
"ASSET_DOWNLOAD_FAILED": "Failed to download asset '%s' (UID: %s)",
|
|
9
|
-
"ASSET_WRITE_FAILED": "Failed to write asset file '%s' (UID: %s)",
|
|
10
|
-
"ASSET_QUERY_FAILED": "Failed to query asset data from the API",
|
|
11
|
-
"ASSET_VERSIONED_QUERY_FAILED": "Failed to query versioned asset data from the API",
|
|
12
|
-
"ASSET_COUNT_QUERY_FAILED": "Failed to retrieve total asset count",
|
|
2
|
+
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
|
|
3
|
+
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully",
|
|
4
|
+
"ASSET_METADATA_EXPORT_COMPLETE": "Asset metadata exported successfully",
|
|
5
|
+
"ASSET_VERSIONED_METADATA_EXPORT_COMPLETE": "Versioned asset metadata exported successfully",
|
|
6
|
+
"ASSET_DOWNLOAD_COMPLETE": "Asset download completed successfully",
|
|
7
|
+
"ASSET_DOWNLOAD_SUCCESS": "Asset '%s' (UID: %s) downloaded successfully",
|
|
8
|
+
"ASSET_DOWNLOAD_FAILED": "Failed to download asset '%s' (UID: %s)",
|
|
9
|
+
"ASSET_WRITE_FAILED": "Failed to write asset file '%s' (UID: %s)",
|
|
10
|
+
"ASSET_QUERY_FAILED": "Failed to query asset data from the API",
|
|
11
|
+
"ASSET_VERSIONED_QUERY_FAILED": "Failed to query versioned asset data from the API",
|
|
12
|
+
"ASSET_COUNT_QUERY_FAILED": "Failed to retrieve total asset count",
|
|
13
13
|
|
|
14
|
-
"CONTENT_TYPE_EXPORT_COMPLETE": "Content types exported successfully",
|
|
15
|
-
"CONTENT_TYPE_NO_TYPES": "No content types found",
|
|
16
|
-
"CONTENT_TYPE_EXPORT_FAILED": "Failed to export content types",
|
|
17
|
-
"CONTENT_TYPE_NO_TYPES_RETURNED": "API returned no content types for the given query",
|
|
14
|
+
"CONTENT_TYPE_EXPORT_COMPLETE": "Content types exported successfully",
|
|
15
|
+
"CONTENT_TYPE_NO_TYPES": "No content types found",
|
|
16
|
+
"CONTENT_TYPE_EXPORT_FAILED": "Failed to export content types",
|
|
17
|
+
"CONTENT_TYPE_NO_TYPES_RETURNED": "API returned no content types for the given query",
|
|
18
18
|
|
|
19
|
-
"ENVIRONMENT_EXPORT_COMPLETE": "Successfully exported %s environment(s)",
|
|
20
|
-
"ENVIRONMENT_EXPORT_SUCCESS": "Environment '%s' exported successfully",
|
|
21
|
-
"ENVIRONMENT_NOT_FOUND": "No environments found in the current stack",
|
|
19
|
+
"ENVIRONMENT_EXPORT_COMPLETE": "Successfully exported %s environment(s)",
|
|
20
|
+
"ENVIRONMENT_EXPORT_SUCCESS": "Environment '%s' exported successfully",
|
|
21
|
+
"ENVIRONMENT_NOT_FOUND": "No environments found in the current stack",
|
|
22
22
|
|
|
23
|
-
"EXTENSION_EXPORT_COMPLETE": "Successfully exported %s extension(s)",
|
|
24
|
-
"EXTENSION_EXPORT_SUCCESS": "Extension '%s' exported successfully",
|
|
25
|
-
"EXTENSION_NOT_FOUND": "No extensions found in the current stack",
|
|
23
|
+
"EXTENSION_EXPORT_COMPLETE": "Successfully exported %s extension(s)",
|
|
24
|
+
"EXTENSION_EXPORT_SUCCESS": "Extension '%s' exported successfully",
|
|
25
|
+
"EXTENSION_NOT_FOUND": "No extensions found in the current stack",
|
|
26
26
|
|
|
27
|
-
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
|
|
27
|
+
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
|
|
28
28
|
|
|
29
|
-
"LABELS_EXPORT_COMPLETE": "Successfully exported %s label(s)",
|
|
30
|
-
"LABEL_EXPORT_SUCCESS": "Label '%s' exported successfully",
|
|
31
|
-
"LABELS_NOT_FOUND": "No labels found in the current stack",
|
|
29
|
+
"LABELS_EXPORT_COMPLETE": "Successfully exported %s label(s)",
|
|
30
|
+
"LABEL_EXPORT_SUCCESS": "Label '%s' exported successfully",
|
|
31
|
+
"LABELS_NOT_FOUND": "No labels found in the current stack",
|
|
32
32
|
|
|
33
|
-
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
|
|
33
|
+
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
|
|
34
34
|
|
|
35
|
-
"TAXONOMY_EXPORT_COMPLETE": "Successfully exported %s taxonomy entries",
|
|
36
|
-
"TAXONOMY_EXPORT_SUCCESS": "Taxonomy '%s' exported successfully",
|
|
37
|
-
"TAXONOMY_NOT_FOUND": "No taxonomies found in the current stack",
|
|
35
|
+
"TAXONOMY_EXPORT_COMPLETE": "Successfully exported %s taxonomy entries",
|
|
36
|
+
"TAXONOMY_EXPORT_SUCCESS": "Taxonomy '%s' exported successfully",
|
|
37
|
+
"TAXONOMY_NOT_FOUND": "No taxonomies found in the current stack",
|
|
38
38
|
|
|
39
|
-
"WEBHOOK_EXPORT_COMPLETE": "Successfully exported %s webhook(s)",
|
|
40
|
-
"WEBHOOK_EXPORT_SUCCESS": "Webhook '%s' exported successfully",
|
|
41
|
-
"WEBHOOK_NOT_FOUND": "No webhooks found in the current stack",
|
|
39
|
+
"WEBHOOK_EXPORT_COMPLETE": "Successfully exported %s webhook(s)",
|
|
40
|
+
"WEBHOOK_EXPORT_SUCCESS": "Webhook '%s' exported successfully",
|
|
41
|
+
"WEBHOOK_NOT_FOUND": "No webhooks found in the current stack",
|
|
42
42
|
|
|
43
|
-
"WORKFLOW_EXPORT_COMPLETE": "Successfully exported %s workflow(s)",
|
|
44
|
-
"WORKFLOW_EXPORT_SUCCESS": "Workflow '%s' exported successfully",
|
|
45
|
-
"WORKFLOW_NOT_FOUND": "No workflows found in the current stack",
|
|
43
|
+
"WORKFLOW_EXPORT_COMPLETE": "Successfully exported %s workflow(s)",
|
|
44
|
+
"WORKFLOW_EXPORT_SUCCESS": "Workflow '%s' exported successfully",
|
|
45
|
+
"WORKFLOW_NOT_FOUND": "No workflows found in the current stack",
|
|
46
46
|
|
|
47
|
-
"PERSONALIZE_URL_NOT_SET": "Cannot export Personalize project: URL not configured",
|
|
48
|
-
"PERSONALIZE_SKIPPING_WITH_MANAGEMENT_TOKEN": "Skipping Personalize project export: Management token not supported",
|
|
49
|
-
"PERSONALIZE_MODULE_NOT_IMPLEMENTED": "Module '%s' implementation not found",
|
|
50
|
-
"PERSONALIZE_NOT_ENABLED": "Personalize feature is not enabled for this organization",
|
|
47
|
+
"PERSONALIZE_URL_NOT_SET": "Cannot export Personalize project: URL not configured",
|
|
48
|
+
"PERSONALIZE_SKIPPING_WITH_MANAGEMENT_TOKEN": "Skipping Personalize project export: Management token not supported",
|
|
49
|
+
"PERSONALIZE_MODULE_NOT_IMPLEMENTED": "Module '%s' implementation not found",
|
|
50
|
+
"PERSONALIZE_NOT_ENABLED": "Personalize feature is not enabled for this organization",
|
|
51
51
|
|
|
52
|
-
"MARKETPLACE_APPS_EXPORT_COMPLETE": "Successfully exported %s marketplace app(s)",
|
|
53
|
-
"MARKETPLACE_APP_CONFIG_EXPORT": "Exporting configuration for app '%s'",
|
|
54
|
-
"MARKETPLACE_APP_CONFIG_SUCCESS": "Successfully exported configuration for app '%s'",
|
|
55
|
-
"MARKETPLACE_APP_EXPORT_SUCCESS": "Successfully exported app '%s'",
|
|
56
|
-
"MARKETPLACE_APPS_NOT_FOUND": "No marketplace apps found in the current stack",
|
|
57
|
-
"MARKETPLACE_APP_CONFIG_EXPORT_FAILED": "Failed to export configuration for app '%s'",
|
|
58
|
-
"MARKETPLACE_APP_MANIFEST_EXPORT_FAILED": "Failed to export manifest for app '%s'",
|
|
52
|
+
"MARKETPLACE_APPS_EXPORT_COMPLETE": "Successfully exported %s marketplace app(s)",
|
|
53
|
+
"MARKETPLACE_APP_CONFIG_EXPORT": "Exporting configuration for app '%s'",
|
|
54
|
+
"MARKETPLACE_APP_CONFIG_SUCCESS": "Successfully exported configuration for app '%s'",
|
|
55
|
+
"MARKETPLACE_APP_EXPORT_SUCCESS": "Successfully exported app '%s'",
|
|
56
|
+
"MARKETPLACE_APPS_NOT_FOUND": "No marketplace apps found in the current stack",
|
|
57
|
+
"MARKETPLACE_APP_CONFIG_EXPORT_FAILED": "Failed to export configuration for app '%s'",
|
|
58
|
+
"MARKETPLACE_APP_MANIFEST_EXPORT_FAILED": "Failed to export manifest for app '%s'",
|
|
59
59
|
|
|
60
|
-
"COMPOSABLE_STUDIO_EXPORT_START": "Starting
|
|
61
|
-
"COMPOSABLE_STUDIO_NOT_FOUND": "No
|
|
62
|
-
"COMPOSABLE_STUDIO_EXPORT_COMPLETE": "Successfully exported
|
|
63
|
-
"COMPOSABLE_STUDIO_EXPORT_FAILED": "Failed to export
|
|
64
|
-
"COMPOSABLE_STUDIO_AUTH_REQUIRED": "To export
|
|
60
|
+
"COMPOSABLE_STUDIO_EXPORT_START": "Starting Studio project export...",
|
|
61
|
+
"COMPOSABLE_STUDIO_NOT_FOUND": "No Studio project found for this stack",
|
|
62
|
+
"COMPOSABLE_STUDIO_EXPORT_COMPLETE": "Successfully exported Studio project '%s'",
|
|
63
|
+
"COMPOSABLE_STUDIO_EXPORT_FAILED": "Failed to export Studio project: %s",
|
|
64
|
+
"COMPOSABLE_STUDIO_AUTH_REQUIRED": "To export Studio projects, you must be logged in",
|
|
65
65
|
|
|
66
|
-
"ENTRIES_EXPORT_COMPLETE": "Successfully exported entries (Content Type: %s, Locale: %s)",
|
|
67
|
-
"ENTRIES_EXPORT_SUCCESS": "All entries exported successfully",
|
|
68
|
-
"ENTRIES_VERSIONED_EXPORT_SUCCESS": "Successfully exported versioned entry (Content Type: %s, UID: %s, Locale: %s)",
|
|
69
|
-
"ENTRIES_EXPORT_VERSIONS_FAILED": "Failed to export versions for content type '%s' (UID: %s)",
|
|
66
|
+
"ENTRIES_EXPORT_COMPLETE": "Successfully exported entries (Content Type: %s, Locale: %s)",
|
|
67
|
+
"ENTRIES_EXPORT_SUCCESS": "All entries exported successfully",
|
|
68
|
+
"ENTRIES_VERSIONED_EXPORT_SUCCESS": "Successfully exported versioned entry (Content Type: %s, UID: %s, Locale: %s)",
|
|
69
|
+
"ENTRIES_EXPORT_VERSIONS_FAILED": "Failed to export versions for content type '%s' (UID: %s)",
|
|
70
70
|
|
|
71
|
-
"BRANCH_EXPORT_FAILED": "Failed to export contents from branch (UID: %s)",
|
|
71
|
+
"BRANCH_EXPORT_FAILED": "Failed to export contents from branch (UID: %s)",
|
|
72
72
|
|
|
73
|
-
"ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
|
|
74
|
-
"ROLES_EXPORTING_ROLE": "Exporting role '%s'"
|
|
73
|
+
"ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
|
|
74
|
+
"ROLES_EXPORTING_ROLE": "Exporting role '%s'"
|
|
75
75
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"module": {
|
|
85
85
|
"char": "m",
|
|
86
|
-
"description": "[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and
|
|
86
|
+
"description": "[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and studio.",
|
|
87
87
|
"name": "module",
|
|
88
88
|
"hasDynamicHelp": false,
|
|
89
89
|
"multiple": false,
|
|
@@ -159,5 +159,5 @@
|
|
|
159
159
|
]
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
"version": "1.22.
|
|
162
|
+
"version": "1.22.1"
|
|
163
163
|
}
|
package/package.json
CHANGED