@contentstack/cli-cm-export 1.5.8 → 1.6.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.
Files changed (97) hide show
  1. package/README.md +2 -2
  2. package/lib/commands/cm/stacks/export.d.ts +10 -0
  3. package/lib/commands/cm/stacks/export.js +108 -0
  4. package/lib/config/index.d.ts +3 -0
  5. package/lib/config/index.js +393 -0
  6. package/lib/export/index.d.ts +1 -0
  7. package/lib/export/index.js +8 -0
  8. package/lib/export/module-exporter.d.ts +15 -0
  9. package/lib/export/module-exporter.js +93 -0
  10. package/lib/export/modules/assets.d.ts +54 -0
  11. package/lib/export/modules/assets.js +303 -0
  12. package/lib/export/modules/base-class.d.ts +48 -0
  13. package/lib/export/modules/base-class.js +117 -0
  14. package/lib/export/modules/index.d.ts +3 -0
  15. package/lib/export/modules/index.js +38 -0
  16. package/lib/export/modules/locales.d.ts +16 -0
  17. package/lib/export/modules/locales.js +68 -0
  18. package/lib/export/modules-js/assets.d.ts +43 -0
  19. package/lib/export/modules-js/assets.js +391 -0
  20. package/lib/export/modules-js/content-types.d.ts +21 -0
  21. package/lib/export/modules-js/content-types.js +75 -0
  22. package/lib/export/modules-js/custom-roles.d.ts +21 -0
  23. package/lib/export/modules-js/custom-roles.js +76 -0
  24. package/lib/export/modules-js/entries.d.ts +18 -0
  25. package/lib/export/modules-js/entries.js +141 -0
  26. package/lib/export/modules-js/environments.d.ts +16 -0
  27. package/lib/export/modules-js/environments.js +62 -0
  28. package/lib/export/modules-js/extensions.d.ts +18 -0
  29. package/lib/export/modules-js/extensions.js +57 -0
  30. package/lib/export/modules-js/global-fields.d.ts +22 -0
  31. package/lib/export/modules-js/global-fields.js +107 -0
  32. package/lib/export/modules-js/index.d.ts +1 -0
  33. package/lib/export/modules-js/index.js +33 -0
  34. package/lib/export/modules-js/labels.d.ts +14 -0
  35. package/lib/export/modules-js/labels.js +56 -0
  36. package/lib/export/modules-js/locales.d.ts +23 -0
  37. package/lib/export/modules-js/locales.js +67 -0
  38. package/lib/export/modules-js/marketplace-apps.d.ts +21 -0
  39. package/lib/export/modules-js/marketplace-apps.js +144 -0
  40. package/lib/export/modules-js/stack.d.ts +18 -0
  41. package/lib/export/modules-js/stack.js +91 -0
  42. package/lib/export/modules-js/webhooks.d.ts +18 -0
  43. package/lib/export/modules-js/webhooks.js +60 -0
  44. package/lib/export/modules-js/workflows.d.ts +16 -0
  45. package/lib/export/modules-js/workflows.js +89 -0
  46. package/lib/types/default-config.d.ts +158 -0
  47. package/lib/types/default-config.js +2 -0
  48. package/lib/types/export-config.d.ts +34 -0
  49. package/lib/types/export-config.js +2 -0
  50. package/lib/types/index.d.ts +45 -0
  51. package/lib/types/index.js +2 -0
  52. package/lib/utils/basic-login.d.ts +8 -0
  53. package/lib/utils/basic-login.js +45 -0
  54. package/lib/utils/common-helper.d.ts +11 -0
  55. package/lib/utils/common-helper.js +78 -0
  56. package/lib/utils/export-config-handler.d.ts +3 -0
  57. package/lib/utils/export-config-handler.js +72 -0
  58. package/lib/utils/file-helper.d.ts +14 -0
  59. package/lib/utils/file-helper.js +120 -0
  60. package/lib/utils/index.d.ts +10 -0
  61. package/lib/utils/index.js +21 -0
  62. package/lib/utils/interactive.d.ts +6 -0
  63. package/lib/utils/interactive.js +71 -0
  64. package/lib/utils/logger.d.ts +8 -0
  65. package/lib/utils/logger.js +154 -0
  66. package/lib/utils/marketplace-app-helper.d.ts +1 -0
  67. package/lib/utils/marketplace-app-helper.js +23 -0
  68. package/lib/utils/setup-branches.d.ts +3 -0
  69. package/lib/utils/setup-branches.js +49 -0
  70. package/lib/utils/setup-export-dir.d.ts +2 -0
  71. package/lib/utils/setup-export-dir.js +12 -0
  72. package/messages/index.json +1 -7
  73. package/oclif.manifest.json +1 -1
  74. package/package.json +37 -23
  75. package/src/app.js +0 -161
  76. package/src/commands/cm/stacks/export.js +0 -202
  77. package/src/config/default.js +0 -360
  78. package/src/lib/export/assets.js +0 -451
  79. package/src/lib/export/content-types.js +0 -90
  80. package/src/lib/export/custom-roles.js +0 -93
  81. package/src/lib/export/entries.js +0 -200
  82. package/src/lib/export/environments.js +0 -74
  83. package/src/lib/export/extensions.js +0 -69
  84. package/src/lib/export/global-fields.js +0 -122
  85. package/src/lib/export/labels.js +0 -69
  86. package/src/lib/export/locales.js +0 -72
  87. package/src/lib/export/marketplace-apps.js +0 -184
  88. package/src/lib/export/stack.js +0 -99
  89. package/src/lib/export/webhooks.js +0 -76
  90. package/src/lib/export/workflows.js +0 -110
  91. package/src/lib/util/export-flags.js +0 -193
  92. package/src/lib/util/helper.js +0 -113
  93. package/src/lib/util/index.js +0 -80
  94. package/src/lib/util/log.js +0 -158
  95. package/src/lib/util/login.js +0 -79
  96. package/src/lib/util/marketplace-app-helper.js +0 -24
  97. package/src/lib/util/setup-branches.js +0 -56
@@ -1,360 +0,0 @@
1
- module.exports = {
2
- versioning: false,
3
- host: 'https://api.contentstack.io/v3',
4
- developerHubUrls: {
5
- // NOTE CDA url used as developer-hub url mapper to avoid conflict if user used any custom name
6
- 'https://api.contentstack.io': 'https://developerhub-api.contentstack.com',
7
- 'https://eu-api.contentstack.com': 'https://eu-developerhub-api.contentstack.com',
8
- 'https://azure-na-api.contentstack.com': 'https://azure-na-developerhub-api.contentstack.com',
9
- 'https://azure-eu-api.contentstack.com': 'https://azure-eu-developerhub-api.contentstack.com',
10
- 'https://stag-api.csnonprod.com': 'https://stag-developerhub-api.csnonprod.com',
11
- },
12
- // use below hosts for eu region
13
- // host:'https://eu-api.contentstack.com/v3',
14
- // use below hosts for azure-na region
15
- // host:'https://azure-na-api.contentstack.com/v3',
16
- // use below hosts for azure-eu region
17
- // host:'https://azure-eu-api.contentstack.com/v3',
18
- modules: {
19
- types: [
20
- 'stack',
21
- 'assets',
22
- 'locales',
23
- 'environments',
24
- 'extensions',
25
- 'webhooks',
26
- 'global-fields',
27
- 'content-types',
28
- 'custom-roles',
29
- 'workflows',
30
- 'entries',
31
- 'labels',
32
- 'marketplace-apps',
33
- ],
34
- locales: {
35
- dirName: 'locales',
36
- fileName: 'locales.json',
37
- requiredKeys: ['code', 'uid', 'name', 'fallback_locale'],
38
- },
39
- masterLocale: {
40
- dirName: 'locales',
41
- fileName: 'master-locale.json',
42
- requiredKeys: ['code', 'uid', 'name'],
43
- },
44
- customRoles: {
45
- dirName: 'custom-roles',
46
- fileName: 'custom-roles.json',
47
- customRolesLocalesFileName: 'custom-roles-locales.json',
48
- },
49
- environments: {
50
- dirName: 'environments',
51
- fileName: 'environments.json',
52
- },
53
- labels: {
54
- dirName: 'labels',
55
- fileName: 'labels.json',
56
- invalidKeys: ['stackHeaders', 'uid', 'urlPath', 'created_at', 'updated_at', 'created_by', 'updated_by'],
57
- },
58
- webhooks: {
59
- dirName: 'webhooks',
60
- fileName: 'webhooks.json',
61
- },
62
- releases: {
63
- dirName: 'releases',
64
- fileName: 'releases.json',
65
- releasesList: 'releasesList.json',
66
- invalidKeys: ['stackHeaders', 'urlPath', 'created_at', 'updated_at', 'created_by', 'updated_by'],
67
- },
68
- workflows: {
69
- dirName: 'workflows',
70
- fileName: 'workflows.json',
71
- invalidKeys: ['stackHeaders', 'urlPath', 'created_at', 'updated_at', 'created_by', 'updated_by'],
72
- },
73
- globalfields: {
74
- dirName: 'global_fields',
75
- fileName: 'globalfields.json',
76
- validKeys: ['title', 'uid', 'schema', 'options', 'singleton', 'description'],
77
- },
78
- assets: {
79
- dirName: 'assets',
80
- fileName: 'assets.json',
81
- // This is the total no. of asset objects fetched in each 'get assets' call
82
- batchLimit: 20,
83
- host: 'https://images.contentstack.io',
84
- invalidKeys: ['created_at', 'updated_at', 'created_by', 'updated_by', '_metadata', 'published'],
85
- // no of asset version files (of a single asset) that'll be downloaded parallelly
86
- downloadLimit: 3,
87
- enableDownloadStatus: false,
88
- },
89
- content_types: {
90
- dirName: 'content_types',
91
- fileName: 'content_types.json',
92
- validKeys: ['title', 'uid', 'field_rules', 'schema', 'options', 'singleton', 'description'],
93
- // total no of content types fetched in each 'get content types' call
94
- limit: 100,
95
- },
96
- entries: {
97
- dirName: 'entries',
98
- fileName: 'entries.json',
99
- invalidKeys: [
100
- 'stackHeaders',
101
- 'content_type_uid',
102
- 'urlPath',
103
- 'created_at',
104
- 'updated_at',
105
- 'created_by',
106
- 'updated_by',
107
- '_metadata',
108
- 'published',
109
- ],
110
- batchLimit: 20,
111
- downloadLimit: 5,
112
- // total no of entries fetched in each content type in a single call
113
- limit: 100,
114
- },
115
- extensions: {
116
- dirName: 'extensions',
117
- fileName: 'extensions.json',
118
- },
119
- stack: {
120
- dirName: 'stack',
121
- fileName: 'stack.json',
122
- },
123
- dependency: {
124
- entries: ['stack', 'locales', 'content-types'],
125
- },
126
- marketplace_apps: {
127
- dirName: 'marketplace_apps',
128
- fileName: 'marketplace_apps.json',
129
- },
130
- },
131
- languagesCode: [
132
- 'af-za',
133
- 'sq-al',
134
- 'ar',
135
- 'ar-dz',
136
- 'ar-bh',
137
- 'ar-eg',
138
- 'ar-iq',
139
- 'ar-jo',
140
- 'ar-kw',
141
- 'ar-lb',
142
- 'ar-ly',
143
- 'ar-ma',
144
- 'ar-om',
145
- 'ar-qa',
146
- 'ar-sa',
147
- 'ar-sy',
148
- 'ar-tn',
149
- 'ar-ae',
150
- 'ar-ye',
151
- 'hy-am',
152
- 'az',
153
- 'cy-az-az',
154
- 'lt-az-az',
155
- 'eu-es',
156
- 'be-by',
157
- 'bs',
158
- 'bg-bg',
159
- 'ca-es',
160
- 'zh',
161
- 'zh-au',
162
- 'zh-cn',
163
- 'zh-hk',
164
- 'zh-mo',
165
- 'zh-my',
166
- 'zh-sg',
167
- 'zh-tw',
168
- 'zh-chs',
169
- 'zh-cht',
170
- 'hr-hr',
171
- 'cs',
172
- 'cs-cz',
173
- 'da-dk',
174
- 'div-mv',
175
- 'nl',
176
- 'nl-be',
177
- 'nl-nl',
178
- 'en',
179
- 'en-au',
180
- 'en-at',
181
- 'en-be',
182
- 'en-bz',
183
- 'en-ca',
184
- 'en-cb',
185
- 'en-cn',
186
- 'en-cz',
187
- 'en-dk',
188
- 'en-do',
189
- 'en-ee',
190
- 'en-fi',
191
- 'en-fr',
192
- 'en-de',
193
- 'en-gr',
194
- 'en-hk',
195
- 'en-hu',
196
- 'en-in',
197
- 'en-id',
198
- 'en-ie',
199
- 'en-it',
200
- 'en-jm',
201
- 'en-jp',
202
- 'en-kr',
203
- 'en-lv',
204
- 'en-lt',
205
- 'en-lu',
206
- 'en-my',
207
- 'en-mx',
208
- 'en-nz',
209
- 'en-no',
210
- 'en-ph',
211
- 'en-pl',
212
- 'en-pt',
213
- 'en-pr',
214
- 'en-ru',
215
- 'en-sg',
216
- 'en-sk',
217
- 'en-si',
218
- 'en-za',
219
- 'en-es',
220
- 'en-se',
221
- 'en-ch',
222
- 'en-th',
223
- 'en-nl',
224
- 'en-tt',
225
- 'en-gb',
226
- 'en-us',
227
- 'en-zw',
228
- 'et-ee',
229
- 'fo-fo',
230
- 'fa-ir',
231
- 'fi',
232
- 'fi-fi',
233
- 'fr',
234
- 'fr-be',
235
- 'fr-ca',
236
- 'fr-fr',
237
- 'fr-lu',
238
- 'fr-mc',
239
- 'fr-ch',
240
- 'fr-us',
241
- 'gd',
242
- 'gl-es',
243
- 'ka-ge',
244
- 'de',
245
- 'de-at',
246
- 'de-de',
247
- 'de-li',
248
- 'de-lu',
249
- 'de-ch',
250
- 'el-gr',
251
- 'gu-in',
252
- 'he-il',
253
- 'hi-in',
254
- 'hu-hu',
255
- 'is-is',
256
- 'id-id',
257
- 'it',
258
- 'it-it',
259
- 'it-ch',
260
- 'ja',
261
- 'ja-jp',
262
- 'kn-in',
263
- 'kk-kz',
264
- 'km-kh',
265
- 'kok-in',
266
- 'ko',
267
- 'ko-kr',
268
- 'ky-kz',
269
- 'lv-lv',
270
- 'lt-lt',
271
- 'mk-mk',
272
- 'ms',
273
- 'ms-bn',
274
- 'ms-my',
275
- 'ms-sg',
276
- 'mt',
277
- 'mr-in',
278
- 'mn-mn',
279
- 'no',
280
- 'no-no',
281
- 'nb-no',
282
- 'nn-no',
283
- 'pl-pl',
284
- 'pt',
285
- 'pt-br',
286
- 'pt-pt',
287
- 'pa-in',
288
- 'ro-ro',
289
- 'ru',
290
- 'ru-kz',
291
- 'ru-ru',
292
- 'ru-ua',
293
- 'sa-in',
294
- 'cy-sr-sp',
295
- 'lt-sr-sp',
296
- 'sr-me',
297
- 'sk-sk',
298
- 'sl-si',
299
- 'es',
300
- 'es-ar',
301
- 'es-bo',
302
- 'es-cl',
303
- 'es-co',
304
- 'es-cr',
305
- 'es-do',
306
- 'es-ec',
307
- 'es-sv',
308
- 'es-gt',
309
- 'es-hn',
310
- 'es-419',
311
- 'es-mx',
312
- 'es-ni',
313
- 'es-pa',
314
- 'es-py',
315
- 'es-pe',
316
- 'es-pr',
317
- 'es-es',
318
- 'es-us',
319
- 'es-uy',
320
- 'es-ve',
321
- 'sw-ke',
322
- 'sv',
323
- 'sv-fi',
324
- 'sv-se',
325
- 'syr-sy',
326
- 'tl',
327
- 'ta-in',
328
- 'tt-ru',
329
- 'te-in',
330
- 'th-th',
331
- 'tr-tr',
332
- 'uk-ua',
333
- 'ur-pk',
334
- 'uz',
335
- 'cy-uz-uz',
336
- 'lt-uz-uz',
337
- 'vi-vn',
338
- 'xh',
339
- 'zu',
340
- ],
341
- apis: {
342
- userSession: '/user-session/',
343
- globalfields: '/global_fields/',
344
- locales: '/locales/',
345
- labels: '/labels/',
346
- environments: '/environments/',
347
- assets: '/assets/',
348
- content_types: '/content_types/',
349
- entries: '/entries/',
350
- users: '/stacks',
351
- extension: '/extensions',
352
- webhooks: '/webhooks/',
353
- stacks: '/stacks/',
354
- },
355
- preserveStackVersion: false,
356
- fetchConcurrency: 5,
357
- writeConcurrency: 5,
358
- developerHubBaseUrl: '',
359
- marketplaceAppEncryptionKey: 'nF2ejRQcTv',
360
- };