@contentstack/cli-cm-export 1.21.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.
@@ -17,20 +17,20 @@ class ExportStack extends base_class_1.default {
17
17
  async start() {
18
18
  cli_utilities_1.log.debug('Starting stack export process...', this.exportConfig.context);
19
19
  if ((0, cli_utilities_1.isAuthenticated)()) {
20
- cli_utilities_1.log.debug('User is authenticated, fetching stack data...', this.exportConfig.context);
20
+ cli_utilities_1.log.debug('User authenticated.', this.exportConfig.context);
21
21
  const stackData = await this.getStack();
22
22
  if (stackData === null || stackData === void 0 ? void 0 : stackData.org_uid) {
23
- cli_utilities_1.log.debug(`Found organization UID: ${stackData.org_uid}`, this.exportConfig.context);
23
+ cli_utilities_1.log.debug(`Found organization UID: '${stackData.org_uid}'.`, this.exportConfig.context);
24
24
  this.exportConfig.org_uid = stackData.org_uid;
25
25
  this.exportConfig.sourceStackName = stackData.name;
26
- cli_utilities_1.log.debug(`Set source stack name: ${stackData.name}`, this.exportConfig.context);
26
+ cli_utilities_1.log.debug(`Set source stack name: '${stackData.name}'.`, this.exportConfig.context);
27
27
  }
28
28
  else {
29
- cli_utilities_1.log.debug('No stack data found or missing org_uid', this.exportConfig.context);
29
+ cli_utilities_1.log.debug('No stack data found or missing organization UID.', this.exportConfig.context);
30
30
  }
31
31
  }
32
32
  else {
33
- cli_utilities_1.log.debug('User is not authenticated, skipping stack data fetch', this.exportConfig.context);
33
+ cli_utilities_1.log.debug('User is not authenticated.', this.exportConfig.context);
34
34
  }
35
35
  if (this.exportConfig.management_token) {
36
36
  cli_utilities_1.log.info('Skipping stack settings export: Operation is not supported when using a management token.', this.exportConfig.context);
@@ -44,61 +44,61 @@ class ExportStack extends base_class_1.default {
44
44
  return this.getLocales();
45
45
  }
46
46
  else if (this.exportConfig.preserveStackVersion) {
47
- cli_utilities_1.log.debug('Preserve stack version is true, exporting stack...', this.exportConfig.context);
47
+ cli_utilities_1.log.debug('Preserve stack version is set to true.', this.exportConfig.context);
48
48
  return this.exportStack();
49
49
  }
50
50
  else {
51
- cli_utilities_1.log.debug('Master locale already set, skipping locale fetch', this.exportConfig.context);
51
+ cli_utilities_1.log.debug('Master locale is already set.', this.exportConfig.context);
52
52
  }
53
53
  }
54
54
  async getStack() {
55
- cli_utilities_1.log.debug(`Fetching stack data for stack: ${this.exportConfig.source_stack}`, this.exportConfig.context);
55
+ cli_utilities_1.log.debug(`Fetching stack data for: '${this.exportConfig.source_stack}'...`, this.exportConfig.context);
56
56
  const tempAPIClient = await (0, cli_utilities_1.managementSDKClient)({ host: this.exportConfig.host });
57
- cli_utilities_1.log.debug(`Created management SDK client with host: ${this.exportConfig.host}`, this.exportConfig.context);
57
+ cli_utilities_1.log.debug(`Created Management SDK client with host: '${this.exportConfig.host}'.`, this.exportConfig.context);
58
58
  return await tempAPIClient
59
59
  .stack({ api_key: this.exportConfig.source_stack })
60
60
  .fetch()
61
61
  .then((data) => {
62
- cli_utilities_1.log.debug(`Successfully fetched stack data for: ${this.exportConfig.source_stack}`, this.exportConfig.context);
62
+ cli_utilities_1.log.debug(`Successfully fetched stack data for: '${this.exportConfig.source_stack}'.`, this.exportConfig.context);
63
63
  return data;
64
64
  })
65
65
  .catch((error) => {
66
- cli_utilities_1.log.debug(`Failed to fetch stack data for: ${this.exportConfig.source_stack}`, this.exportConfig.context);
66
+ cli_utilities_1.log.debug(`Failed to fetch stack data for: '${this.exportConfig.source_stack}'.`, this.exportConfig.context);
67
67
  return {};
68
68
  });
69
69
  }
70
70
  async getLocales(skip = 0) {
71
71
  if (skip) {
72
72
  this.qs.skip = skip;
73
- cli_utilities_1.log.debug(`Fetching locales with skip: ${skip}`, this.exportConfig.context);
73
+ cli_utilities_1.log.debug(`Fetching locales with skip: ${skip}.`, this.exportConfig.context);
74
74
  }
75
75
  else {
76
- cli_utilities_1.log.debug('Fetching locales with initial query', this.exportConfig.context);
76
+ cli_utilities_1.log.debug('Fetching locales with initial query...', this.exportConfig.context);
77
77
  }
78
- cli_utilities_1.log.debug(`Query parameters: ${JSON.stringify(this.qs)}`, this.exportConfig.context);
78
+ cli_utilities_1.log.debug(`Query parameters: ${JSON.stringify(this.qs)}.`, this.exportConfig.context);
79
79
  return await this.stack
80
80
  .locale()
81
81
  .query(this.qs)
82
82
  .find()
83
83
  .then(async (data) => {
84
84
  const { items, count } = data;
85
- cli_utilities_1.log.debug(`Fetched ${(items === null || items === void 0 ? void 0 : items.length) || 0} locales out of total ${count}`, this.exportConfig.context);
85
+ cli_utilities_1.log.debug(`Fetched ${(items === null || items === void 0 ? void 0 : items.length) || 0} locales out of ${count}.`, this.exportConfig.context);
86
86
  if (items === null || items === void 0 ? void 0 : items.length) {
87
- cli_utilities_1.log.debug(`Processing ${items.length} locales to find master locale`, this.exportConfig.context);
87
+ cli_utilities_1.log.debug(`Processing ${items.length} locales to find the master locale...`, this.exportConfig.context);
88
88
  skip += this.stackConfig.limit || 100;
89
89
  const masterLocalObj = (0, find_1.default)(items, (locale) => {
90
90
  if (locale.fallback_locale === null) {
91
- cli_utilities_1.log.debug(`Found master locale: ${locale.name} (${locale.code})`, this.exportConfig.context);
91
+ cli_utilities_1.log.debug(`Found master locale: '${locale.name}' (code: ${locale.code}).`, this.exportConfig.context);
92
92
  return locale;
93
93
  }
94
94
  });
95
95
  if (masterLocalObj) {
96
- cli_utilities_1.log.debug(`Returning master locale: ${masterLocalObj.name}`, this.exportConfig.context);
96
+ cli_utilities_1.log.debug(`Returning master locale: '${masterLocalObj.name}'.`, this.exportConfig.context);
97
97
  return masterLocalObj;
98
98
  }
99
99
  else if (skip >= count) {
100
100
  cli_utilities_1.log.error(`Master locale not found in the stack ${this.exportConfig.source_stack}. Please ensure that the stack has a master locale.`, this.exportConfig.context);
101
- cli_utilities_1.log.debug('Completed searching all locales without finding master locale', this.exportConfig.context);
101
+ cli_utilities_1.log.debug('Completed search. Master locale not found.', this.exportConfig.context);
102
102
  return;
103
103
  }
104
104
  else {
@@ -107,7 +107,7 @@ class ExportStack extends base_class_1.default {
107
107
  }
108
108
  }
109
109
  else {
110
- cli_utilities_1.log.debug('No locales found to process', this.exportConfig.context);
110
+ cli_utilities_1.log.debug('No locales found to process.', this.exportConfig.context);
111
111
  }
112
112
  })
113
113
  .catch((error) => {
@@ -117,26 +117,26 @@ class ExportStack extends base_class_1.default {
117
117
  });
118
118
  }
119
119
  async exportStack() {
120
- cli_utilities_1.log.debug(`Starting stack export for: ${this.exportConfig.source_stack}`, this.exportConfig.context);
120
+ cli_utilities_1.log.debug(`Starting stack export for: '${this.exportConfig.source_stack}'...`, this.exportConfig.context);
121
121
  await utils_1.fsUtil.makeDirectory(this.stackFolderPath);
122
- cli_utilities_1.log.debug(`Created stack directory at: ${this.stackFolderPath}`, this.exportConfig.context);
122
+ cli_utilities_1.log.debug(`Created stack directory at: '${this.stackFolderPath}'`, this.exportConfig.context);
123
123
  return this.stack
124
124
  .fetch()
125
125
  .then((resp) => {
126
126
  const stackFilePath = (0, node_path_1.resolve)(this.stackFolderPath, this.stackConfig.fileName);
127
- cli_utilities_1.log.debug(`Writing stack data to: ${stackFilePath}`, this.exportConfig.context);
127
+ cli_utilities_1.log.debug(`Writing stack data to: '${stackFilePath}'`, this.exportConfig.context);
128
128
  utils_1.fsUtil.writeFile(stackFilePath, resp);
129
129
  cli_utilities_1.log.success(`Stack details exported successfully for stack ${this.exportConfig.source_stack}`, this.exportConfig.context);
130
- cli_utilities_1.log.debug('Stack export completed successfully', this.exportConfig.context);
130
+ cli_utilities_1.log.debug('Stack export completed successfully.', this.exportConfig.context);
131
131
  return resp;
132
132
  })
133
133
  .catch((error) => {
134
- cli_utilities_1.log.debug(`Error occurred while exporting stack: ${this.exportConfig.source_stack}`, this.exportConfig.context);
134
+ cli_utilities_1.log.debug(`An error occurred while exporting stack: '${this.exportConfig.source_stack}'.`, this.exportConfig.context);
135
135
  (0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.exportConfig.context));
136
136
  });
137
137
  }
138
138
  async exportStackSettings() {
139
- cli_utilities_1.log.info('Exporting stack settings', this.exportConfig.context);
139
+ cli_utilities_1.log.info('Exporting stack settings...', this.exportConfig.context);
140
140
  await utils_1.fsUtil.makeDirectory(this.stackFolderPath);
141
141
  return this.stack
142
142
  .settings()
@@ -42,4 +42,5 @@ export default class ExportTaxonomies extends BaseClass {
42
42
  * Get all locales to export
43
43
  */
44
44
  getLocalesToExport(): string[];
45
+ private isLocalePlanLimitationError;
45
46
  }
@@ -22,12 +22,12 @@ class ExportTaxonomies extends base_class_1.default {
22
22
  }
23
23
  async start() {
24
24
  var _a;
25
- cli_utilities_1.log.debug('Starting taxonomies export process...', this.exportConfig.context);
25
+ cli_utilities_1.log.debug('Starting export process for taxonomies...', this.exportConfig.context);
26
26
  //create taxonomies folder
27
27
  this.taxonomiesFolderPath = (0, node_path_1.resolve)(this.exportConfig.data, this.exportConfig.branchName || '', this.taxonomiesConfig.dirName);
28
- cli_utilities_1.log.debug(`Taxonomies folder path: ${this.taxonomiesFolderPath}`, this.exportConfig.context);
28
+ cli_utilities_1.log.debug(`Taxonomies folder path: '${this.taxonomiesFolderPath}'`, this.exportConfig.context);
29
29
  await utils_1.fsUtil.makeDirectory(this.taxonomiesFolderPath);
30
- cli_utilities_1.log.debug('Created taxonomies directory', this.exportConfig.context);
30
+ cli_utilities_1.log.debug('Created taxonomies directory.', this.exportConfig.context);
31
31
  const localesToExport = this.getLocalesToExport();
32
32
  cli_utilities_1.log.debug(`Will attempt to export taxonomies for ${localesToExport.length} locale(s): ${localesToExport.join(', ')}`, this.exportConfig.context);
33
33
  if (localesToExport.length === 0) {
@@ -38,7 +38,10 @@ class ExportTaxonomies extends base_class_1.default {
38
38
  const masterLocale = (_a = this.exportConfig.master_locale) === null || _a === void 0 ? void 0 : _a.code;
39
39
  await this.fetchTaxonomies(masterLocale, true);
40
40
  if (!this.isLocaleBasedExportSupported) {
41
- cli_utilities_1.log.debug('Localization disabled, falling back to legacy export method', this.exportConfig.context);
41
+ this.taxonomies = {};
42
+ this.taxonomiesByLocale = {};
43
+ // Fetch taxonomies without locale parameter
44
+ await this.fetchTaxonomies();
42
45
  await this.exportTaxonomies();
43
46
  await this.writeTaxonomiesMetadata();
44
47
  }
@@ -122,10 +125,18 @@ class ExportTaxonomies extends base_class_1.default {
122
125
  }
123
126
  catch (error) {
124
127
  cli_utilities_1.log.debug(`Error fetching taxonomies ${localeInfo}`, this.exportConfig.context);
125
- (0, cli_utilities_1.handleAndLogError)(error, Object.assign(Object.assign({}, this.exportConfig.context), (localeCode && { locale: localeCode })));
126
- if (checkLocaleSupport) {
128
+ if (checkLocaleSupport && this.isLocalePlanLimitationError(error)) {
129
+ cli_utilities_1.log.debug('Taxonomy localization is not included in your plan. Falling back to non-localized export.', this.exportConfig.context);
127
130
  this.isLocaleBasedExportSupported = false;
128
131
  }
132
+ else if (checkLocaleSupport) {
133
+ cli_utilities_1.log.debug('Locale-based taxonomy export not supported, will use legacy method', this.exportConfig.context);
134
+ this.isLocaleBasedExportSupported = false;
135
+ }
136
+ else {
137
+ // Log actual errors during normal fetch (not locale check)
138
+ (0, cli_utilities_1.handleAndLogError)(error, Object.assign(Object.assign({}, this.exportConfig.context), (localeCode && { locale: localeCode })));
139
+ }
129
140
  // Break to avoid infinite retry loop on errors
130
141
  break;
131
142
  }
@@ -234,5 +245,11 @@ class ExportTaxonomies extends base_class_1.default {
234
245
  cli_utilities_1.log.debug(`Total unique locales to export: ${localesToExport.length}`, this.exportConfig.context);
235
246
  return localesToExport;
236
247
  }
248
+ isLocalePlanLimitationError(error) {
249
+ var _a, _b;
250
+ return ((error === null || error === void 0 ? void 0 : error.status) === 403 &&
251
+ ((_b = (_a = error === null || error === void 0 ? void 0 : error.errors) === null || _a === void 0 ? void 0 : _a.taxonomies) === null || _b === void 0 ? void 0 : _b.some((msg) => msg.toLowerCase().includes('taxonomy localization') &&
252
+ msg.toLowerCase().includes('not included in your plan'))));
253
+ }
237
254
  }
238
255
  exports.default = ExportTaxonomies;
@@ -240,7 +240,7 @@ module.exports = class ExportAssets {
240
240
  const assetVersionInfo = bucket || [];
241
241
  return new Promise((resolve, reject) => {
242
242
  if (self.assetDownloadRetry[uid + version] > self.assetDownloadRetryLimit) {
243
- console.log('Reached max', self.assetDownloadRetry[uid + version]);
243
+ console.log('Reached the maximum limit.', self.assetDownloadRetry[uid + version]);
244
244
  return reject(new Error('Asset Max download retry limit exceeded! ' + uid));
245
245
  }
246
246
  if (version <= 0) {
@@ -274,7 +274,7 @@ module.exports = class ExportAssets {
274
274
  .catch((error) => {
275
275
  log(self.config, error, 'error');
276
276
  if (error.status === 408) {
277
- console.log('retrying', uid);
277
+ console.log('Retrying...', uid);
278
278
  // retrying when timeout
279
279
  self.assetDownloadRetry[uid + version]
280
280
  ? ++self.assetDownloadRetry[uid + version]
@@ -313,7 +313,7 @@ module.exports = class ExportAssets {
313
313
  length: assetStreamRequest.headers['content-length'],
314
314
  });
315
315
  str.on('progress', (progressData) => {
316
- console.log(`${asset.filename}: ${Math.round(progressData.percentage)}%`);
316
+ console.log(`${asset.filename}: ${Math.round(progressData.percentage)}% complete`);
317
317
  });
318
318
  assetStreamRequest.pipe(str).pipe(assetFileStream);
319
319
  }
@@ -148,6 +148,12 @@ export default interface DefaultConfig {
148
148
  fileName: string;
149
149
  dependencies?: Modules[];
150
150
  };
151
+ 'composable-studio': {
152
+ dirName: string;
153
+ fileName: string;
154
+ apiBaseUrl: string;
155
+ apiVersion: string;
156
+ };
151
157
  masterLocale: {
152
158
  dirName: string;
153
159
  fileName: string;
@@ -26,7 +26,7 @@ export interface Region {
26
26
  cda: string;
27
27
  uiHost: string;
28
28
  }
29
- export type Modules = 'stack' | 'assets' | 'locales' | 'environments' | 'extensions' | 'webhooks' | 'global-fields' | 'entries' | 'content-types' | 'custom-roles' | 'workflows' | 'labels' | 'marketplace-apps' | 'taxonomies' | 'personalize';
29
+ export type Modules = 'stack' | 'assets' | 'locales' | 'environments' | 'extensions' | 'webhooks' | 'global-fields' | 'entries' | 'content-types' | 'custom-roles' | 'workflows' | 'labels' | 'marketplace-apps' | 'taxonomies' | 'personalize' | 'composable-studio';
30
30
  export type ModuleClassParams = {
31
31
  stackAPIClient: ReturnType<ContentstackClient['stack']>;
32
32
  exportConfig: ExportConfig;
@@ -96,6 +96,32 @@ export interface StackConfig {
96
96
  dependencies?: Modules[];
97
97
  limit?: number;
98
98
  }
99
+ export interface ComposableStudioConfig {
100
+ dirName: string;
101
+ fileName: string;
102
+ apiBaseUrl: string;
103
+ apiVersion: string;
104
+ }
105
+ export interface ComposableStudioProject {
106
+ name: string;
107
+ description: string;
108
+ canvasUrl: string;
109
+ connectedStackApiKey: string;
110
+ contentTypeUid: string;
111
+ organizationUid: string;
112
+ settings: {
113
+ configuration: {
114
+ environment: string;
115
+ locale: string;
116
+ };
117
+ };
118
+ createdBy: string;
119
+ updatedBy: string;
120
+ deletedAt: boolean;
121
+ createdAt: string;
122
+ updatedAt: string;
123
+ uid: string;
124
+ }
99
125
  export interface Context {
100
126
  command: string;
101
127
  module: string;
@@ -26,7 +26,7 @@ const login = async (config) => {
26
26
  return config;
27
27
  }
28
28
  else {
29
- cli_utilities_1.log.error(`Failed to login, Invalid credentials`, config.context);
29
+ cli_utilities_1.log.error(`Failed to log in!`, config.context);
30
30
  process.exit(1);
31
31
  }
32
32
  }
@@ -16,14 +16,14 @@ const setupConfig = async (exportCmdFlags) => {
16
16
  cli_utilities_1.log.debug('Setting up export configuration');
17
17
  // setup the config
18
18
  if (exportCmdFlags['config']) {
19
- cli_utilities_1.log.debug('Loading external configuration file', { configFile: exportCmdFlags['config'] });
19
+ cli_utilities_1.log.debug('Loading external configuration file...', { configFile: exportCmdFlags['config'] });
20
20
  const externalConfig = await (0, file_helper_1.readFile)(exportCmdFlags['config']);
21
21
  config = merge_1.default.recursive(config, externalConfig);
22
22
  }
23
23
  config.exportDir = (0, cli_utilities_1.sanitizePath)(exportCmdFlags['data'] || exportCmdFlags['data-dir'] || config.data || (await (0, interactive_1.askExportDir)()));
24
24
  const pattern = /[*$%#<>{}!&?]/g;
25
25
  if (pattern.test(config.exportDir)) {
26
- cli_utilities_1.cliux.print(`\nPlease add a directory path without any of the special characters: (*,&,{,},[,],$,%,<,>,?,!)`, {
26
+ cli_utilities_1.cliux.print(`\nPlease enter a directory path without any special characters: (*,&,{,},[,],$,%,<,>,?,!)`, {
27
27
  color: 'yellow',
28
28
  });
29
29
  config.exportDir = (0, cli_utilities_1.sanitizePath)(await (0, interactive_1.askExportDir)());
@@ -40,7 +40,7 @@ const setupConfig = async (exportCmdFlags) => {
40
40
  config.apiKey = apiKey;
41
41
  authenticationMethod = 'Management Token';
42
42
  if (!config.management_token) {
43
- cli_utilities_1.log.debug('Management token not found for alias', { alias: managementTokenAlias });
43
+ cli_utilities_1.log.debug('Management token not found for alias!', { alias: managementTokenAlias });
44
44
  throw new Error(`No management token found on given alias ${managementTokenAlias}`);
45
45
  }
46
46
  cli_utilities_1.log.debug('Management token configuration successful');
@@ -73,7 +73,7 @@ const setupConfig = async (exportCmdFlags) => {
73
73
  config.apiKey =
74
74
  exportCmdFlags['stack-uid'] || exportCmdFlags['stack-api-key'] || config.source_stack || (await (0, interactive_1.askAPIKey)());
75
75
  if (typeof config.apiKey !== 'string') {
76
- cli_utilities_1.log.debug('Invalid API key received', { apiKey: config.apiKey });
76
+ cli_utilities_1.log.debug('Invalid API key received!', { apiKey: config.apiKey });
77
77
  throw new Error('Invalid API key received');
78
78
  }
79
79
  }
@@ -121,7 +121,7 @@ const setupConfig = async (exportCmdFlags) => {
121
121
  }
122
122
  // Add authentication details to config for context tracking
123
123
  config.authenticationMethod = authenticationMethod;
124
- cli_utilities_1.log.debug('Export configuration setup completed', Object.assign({}, config));
124
+ cli_utilities_1.log.debug('Export configuration setup completed.', Object.assign({}, config));
125
125
  return config;
126
126
  };
127
127
  exports.default = setupConfig;
@@ -51,7 +51,7 @@ const readLargeFile = function (filePath, options = {}) {
51
51
  resolve(data);
52
52
  });
53
53
  parseStream.on('error', (error) => {
54
- console.log('error', error);
54
+ console.log('Error', error);
55
55
  reject(error);
56
56
  });
57
57
  readStream.pipe(parseStream);
@@ -1,69 +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
- "ENTRIES_EXPORT_COMPLETE": "Successfully exported entries (Content Type: %s, Locale: %s)",
61
- "ENTRIES_EXPORT_SUCCESS": "All entries exported successfully",
62
- "ENTRIES_VERSIONED_EXPORT_SUCCESS": "Successfully exported versioned entry (Content Type: %s, UID: %s, Locale: %s)",
63
- "ENTRIES_EXPORT_VERSIONS_FAILED": "Failed to export versions for content type '%s' (UID: %s)",
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",
64
65
 
65
- "BRANCH_EXPORT_FAILED": "Failed to export contents from branch (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)",
66
70
 
67
- "ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
68
- "ROLES_EXPORTING_ROLE": "Exporting role '%s'"
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
  }
@@ -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 taxonomies.",
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.21.0"
162
+ "version": "1.22.1"
163
163
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-export",
3
3
  "description": "Contentstack CLI plugin to export content from stack",
4
- "version": "1.21.0",
4
+ "version": "1.22.1",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-command": "~1.6.1",
9
- "@contentstack/cli-variants": "~1.3.4",
8
+ "@contentstack/cli-command": "~1.7.0",
10
9
  "@oclif/core": "^4.3.3",
11
- "@contentstack/cli-utilities": "~1.14.4",
10
+ "@contentstack/cli-variants": "~1.3.5",
11
+ "@contentstack/cli-utilities": "~1.15.0",
12
12
  "async": "^3.2.6",
13
13
  "big-json": "^3.2.0",
14
14
  "bluebird": "^3.7.2",
@@ -21,8 +21,8 @@
21
21
  "winston": "^3.17.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@contentstack/cli-auth": "~1.6.1",
25
- "@contentstack/cli-config": "~1.15.1",
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",