@contentstack/cli-cm-export 2.0.0-beta.1 → 2.0.0-beta.3
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 +3 -3
- package/lib/commands/cm/stacks/export.js +4 -1
- package/lib/config/index.js +7 -0
- package/lib/export/module-exporter.js +3 -2
- package/lib/export/modules/base-class.js +1 -1
- package/lib/export/modules/composable-studio.d.ts +15 -0
- package/lib/export/modules/composable-studio.js +87 -0
- package/lib/export/modules/content-types.js +4 -2
- package/lib/export/modules/entries.js +7 -7
- package/lib/export/modules/global-fields.js +6 -2
- package/lib/export/modules/marketplace-apps.js +33 -21
- package/lib/export/modules/stack.js +18 -18
- package/lib/export/modules/taxonomies.d.ts +32 -8
- package/lib/export/modules/taxonomies.js +204 -129
- package/lib/export/modules/workflows.js +1 -1
- package/lib/types/default-config.d.ts +6 -0
- package/lib/types/index.d.ts +27 -1
- package/lib/utils/basic-login.js +1 -1
- package/lib/utils/export-config-handler.js +5 -5
- package/lib/utils/file-helper.js +1 -1
- package/lib/utils/marketplace-app-helper.js +1 -3
- package/messages/index.json +73 -67
- package/oclif.manifest.json +2 -2
- package/package.json +13 -6
package/messages/index.json
CHANGED
|
@@ -1,71 +1,77 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
|
|
3
|
-
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully with %s folder(s)",
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
|
|
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",
|
|
32
|
-
|
|
33
|
-
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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'",
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
2
|
+
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
|
|
3
|
+
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully with %s folder(s)",
|
|
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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
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
|
+
|
|
27
|
+
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
|
|
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",
|
|
32
|
+
|
|
33
|
+
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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'",
|
|
59
|
+
|
|
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
|
+
|
|
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
|
+
|
|
71
|
+
"BRANCH_EXPORT_FAILED": "Failed to export contents from branch (UID: %s)",
|
|
72
|
+
|
|
73
|
+
"ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
|
|
74
|
+
"ROLES_EXPORTING_ROLE": "Exporting role '%s'",
|
|
69
75
|
|
|
70
76
|
"GLOBAL_FIELDS_NOT_FOUND": "No global fields found in the current stack"
|
|
71
77
|
}
|
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, 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": "2.0.0-beta.
|
|
162
|
+
"version": "2.0.0-beta.3"
|
|
163
163
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-export",
|
|
3
3
|
"description": "Contentstack CLI plugin to export content from stack",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.3",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "~1.
|
|
9
|
-
"@contentstack/cli-variants": "~2.0.0-beta",
|
|
8
|
+
"@contentstack/cli-command": "~1.7.0",
|
|
10
9
|
"@oclif/core": "^4.3.3",
|
|
10
|
+
"@contentstack/cli-variants": "~2.0.0-beta.3",
|
|
11
11
|
"@contentstack/cli-utilities": "~1.15.0",
|
|
12
12
|
"async": "^3.2.6",
|
|
13
13
|
"big-json": "^3.2.0",
|
|
@@ -21,14 +21,18 @@
|
|
|
21
21
|
"winston": "^3.17.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@contentstack/cli-auth": "~1.6.
|
|
25
|
-
"@contentstack/cli-config": "~1.15.
|
|
24
|
+
"@contentstack/cli-auth": "~1.6.2",
|
|
25
|
+
"@contentstack/cli-config": "~1.15.3",
|
|
26
26
|
"@contentstack/cli-dev-dependencies": "~1.3.1",
|
|
27
27
|
"@oclif/plugin-help": "^6.2.28",
|
|
28
28
|
"@oclif/test": "^4.1.13",
|
|
29
29
|
"@types/big-json": "^3.2.5",
|
|
30
|
+
"@types/chai": "^4.3.11",
|
|
30
31
|
"@types/mkdirp": "^1.0.2",
|
|
32
|
+
"@types/mocha": "^10.0.6",
|
|
31
33
|
"@types/progress-stream": "^2.0.5",
|
|
34
|
+
"@types/sinon": "^17.0.2",
|
|
35
|
+
"chai": "^4.4.1",
|
|
32
36
|
"dotenv": "^16.5.0",
|
|
33
37
|
"dotenv-expand": "^9.0.0",
|
|
34
38
|
"eslint": "^8.57.1",
|
|
@@ -36,6 +40,8 @@
|
|
|
36
40
|
"mocha": "10.8.2",
|
|
37
41
|
"nyc": "^15.1.0",
|
|
38
42
|
"oclif": "^4.17.46",
|
|
43
|
+
"sinon": "^17.0.1",
|
|
44
|
+
"source-map-support": "^0.5.21",
|
|
39
45
|
"ts-node": "^10.9.2",
|
|
40
46
|
"typescript": "^4.9.5"
|
|
41
47
|
},
|
|
@@ -54,7 +60,8 @@
|
|
|
54
60
|
"format": "eslint src/**/*.ts --fix",
|
|
55
61
|
"test:integration": "INTEGRATION_TEST=true mocha --config ./test/.mocharc.js --forbid-only \"test/run.test.js\"",
|
|
56
62
|
"test:integration:report": "INTEGRATION_TEST=true nyc --extension .js mocha --forbid-only \"test/run.test.js\"",
|
|
57
|
-
"test:unit": "mocha --forbid-only \"test/unit
|
|
63
|
+
"test:unit": "mocha --forbid-only \"test/unit/**/*.test.ts\"",
|
|
64
|
+
"test:unit:report": "nyc --reporter=text --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
|
|
58
65
|
},
|
|
59
66
|
"engines": {
|
|
60
67
|
"node": ">=14.0.0"
|