@contentstack/cli-cm-import 1.5.11 → 1.6.0

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 (110) hide show
  1. package/README.md +6 -14
  2. package/bin/dev +17 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +6 -0
  5. package/bin/run.cmd +3 -0
  6. package/lib/commands/cm/stacks/import.d.ts +10 -0
  7. package/lib/commands/cm/stacks/import.js +111 -0
  8. package/lib/config/index.d.ts +3 -0
  9. package/lib/config/index.js +372 -0
  10. package/lib/import/index.d.ts +1 -0
  11. package/lib/import/index.js +8 -0
  12. package/lib/import/module-importer.d.ts +13 -0
  13. package/lib/import/module-importer.js +70 -0
  14. package/lib/import/modules/assets.d.ts +63 -0
  15. package/lib/import/modules/assets.js +265 -0
  16. package/lib/import/modules/base-class.d.ts +69 -0
  17. package/lib/import/modules/base-class.js +165 -0
  18. package/lib/import/modules/index.d.ts +2 -0
  19. package/lib/import/modules/index.js +19 -0
  20. package/lib/import/modules/locales.d.ts +31 -0
  21. package/lib/import/modules/locales.js +152 -0
  22. package/lib/import/modules-js/assets.d.ts +33 -0
  23. package/lib/import/modules-js/assets.js +415 -0
  24. package/lib/import/modules-js/content-types.d.ts +33 -0
  25. package/lib/import/modules-js/content-types.js +176 -0
  26. package/lib/import/modules-js/custom-roles.d.ts +15 -0
  27. package/lib/import/modules-js/custom-roles.js +141 -0
  28. package/lib/import/modules-js/entries.d.ts +54 -0
  29. package/lib/import/modules-js/entries.js +1260 -0
  30. package/lib/import/modules-js/environments.d.ts +13 -0
  31. package/lib/import/modules-js/environments.js +85 -0
  32. package/lib/import/modules-js/extensions.d.ts +17 -0
  33. package/lib/import/modules-js/extensions.js +86 -0
  34. package/lib/import/modules-js/global-fields.d.ts +13 -0
  35. package/lib/import/modules-js/global-fields.js +109 -0
  36. package/lib/import/modules-js/index.d.ts +1 -0
  37. package/lib/import/modules-js/index.js +33 -0
  38. package/lib/import/modules-js/labels.d.ts +20 -0
  39. package/lib/import/modules-js/labels.js +148 -0
  40. package/lib/import/modules-js/locales.d.ts +24 -0
  41. package/lib/import/modules-js/locales.js +196 -0
  42. package/lib/import/modules-js/marketplace-apps.d.ts +60 -0
  43. package/lib/import/modules-js/marketplace-apps.js +409 -0
  44. package/lib/import/modules-js/webhooks.d.ts +17 -0
  45. package/lib/import/modules-js/webhooks.js +85 -0
  46. package/lib/import/modules-js/workflows.d.ts +18 -0
  47. package/lib/import/modules-js/workflows.js +132 -0
  48. package/lib/types/default-config.d.ts +130 -0
  49. package/lib/types/default-config.js +2 -0
  50. package/lib/types/import-config.d.ts +51 -0
  51. package/lib/types/import-config.js +2 -0
  52. package/lib/types/index.d.ts +30 -0
  53. package/lib/types/index.js +2 -0
  54. package/lib/utils/asset-helper.d.ts +4 -0
  55. package/lib/utils/asset-helper.js +387 -0
  56. package/lib/utils/backup-handler.d.ts +2 -0
  57. package/lib/utils/backup-handler.js +31 -0
  58. package/lib/utils/common-helper.d.ts +20 -0
  59. package/lib/utils/common-helper.js +244 -0
  60. package/lib/utils/content-type-helper.d.ts +49 -0
  61. package/lib/utils/content-type-helper.js +143 -0
  62. package/lib/utils/entries-helper.d.ts +4 -0
  63. package/lib/utils/entries-helper.js +252 -0
  64. package/lib/utils/extension-helper.d.ts +10 -0
  65. package/lib/utils/extension-helper.js +72 -0
  66. package/lib/utils/file-helper.d.ts +14 -0
  67. package/lib/utils/file-helper.js +140 -0
  68. package/lib/utils/import-config-handler.d.ts +3 -0
  69. package/lib/utils/import-config-handler.js +73 -0
  70. package/lib/utils/index.d.ts +12 -0
  71. package/lib/utils/index.js +29 -0
  72. package/lib/utils/interactive.d.ts +2 -0
  73. package/lib/utils/interactive.js +23 -0
  74. package/lib/utils/logger.d.ts +8 -0
  75. package/lib/utils/logger.js +154 -0
  76. package/lib/utils/login-handler.d.ts +8 -0
  77. package/lib/utils/login-handler.js +53 -0
  78. package/lib/utils/marketplace-app-helper.d.ts +4 -0
  79. package/lib/utils/marketplace-app-helper.js +31 -0
  80. package/messages/index.json +1 -7
  81. package/oclif.manifest.json +2 -2
  82. package/package.json +47 -21
  83. package/src/app.js +0 -217
  84. package/src/commands/cm/stacks/import.js +0 -161
  85. package/src/config/default.js +0 -352
  86. package/src/lib/import/assets.js +0 -495
  87. package/src/lib/import/content-types.js +0 -201
  88. package/src/lib/import/custom-roles.js +0 -169
  89. package/src/lib/import/entries.js +0 -1495
  90. package/src/lib/import/environments.js +0 -106
  91. package/src/lib/import/extensions.js +0 -108
  92. package/src/lib/import/global-fields.js +0 -135
  93. package/src/lib/import/labels.js +0 -175
  94. package/src/lib/import/locales.js +0 -216
  95. package/src/lib/import/marketplace-apps.js +0 -542
  96. package/src/lib/import/webhooks.js +0 -113
  97. package/src/lib/import/workflows.js +0 -166
  98. package/src/lib/util/extensionsUidReplace.js +0 -67
  99. package/src/lib/util/fs.js +0 -124
  100. package/src/lib/util/import-flags.js +0 -187
  101. package/src/lib/util/index.js +0 -222
  102. package/src/lib/util/log.js +0 -144
  103. package/src/lib/util/login.js +0 -58
  104. package/src/lib/util/lookupReplaceAssets.js +0 -366
  105. package/src/lib/util/lookupReplaceEntries.js +0 -250
  106. package/src/lib/util/marketplace-app-helper.js +0 -31
  107. package/src/lib/util/removeReferenceFields.js +0 -59
  108. package/src/lib/util/schemaTemplate.js +0 -38
  109. package/src/lib/util/supress-mandatory-fields.js +0 -34
  110. package/src/lib/util/upload.js +0 -56
@@ -0,0 +1,176 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const chalk = require('chalk');
4
+ const { cloneDeep, find, findIndex } = require('lodash');
5
+ const { fileHelper, log, executeTask, formatError, schemaTemplate, lookupExtension } = require('../../utils');
6
+ class ContentTypesImport {
7
+ constructor(importConfig, stackAPIClient) {
8
+ this.stackAPIClient = stackAPIClient;
9
+ this.importConfig = importConfig;
10
+ this.contentTypeConfig = importConfig.modules.content_types;
11
+ this.globalFieldConfig = importConfig.modules.globalfields;
12
+ this.importConcurrency = this.contentTypeConfig.importConcurrency || this.importConfig.importConcurrency;
13
+ this.writeConcurrency = this.contentTypeConfig.writeConcurrency || this.importConfig.writeConcurrency;
14
+ this.contentTypesFolderPath = path.join(this.importConfig.data, this.contentTypeConfig.dirName);
15
+ this.mapperFolderPath = path.join(this.importConfig.data, 'mapper', 'content_types');
16
+ this.existingContentTypesPath = path.join(this.mapperFolderPath, 'success.json');
17
+ this.globalFieldsFolderPath = path.resolve(this.importConfig.data, this.globalFieldConfig.dirName);
18
+ this.globalFieldMapperFolderPath = path.join(importConfig.data, 'mapper', 'global_fields', 'success.json');
19
+ this.globalFieldPendingPath = path.join(importConfig.data, 'mapper', 'global_fields', 'pending_global_fields.js');
20
+ this.ignoredFilesInContentTypesFolder = new Map([
21
+ ['__master.json', 'true'],
22
+ ['__priority.json', 'true'],
23
+ ['schema.json', 'true'],
24
+ ['.DS_Store', 'true'],
25
+ ]);
26
+ this.contentTypes = [];
27
+ this.existingContentTypesUIds = [];
28
+ this.titleToUIdMap = new Map();
29
+ this.requestOptions = {
30
+ json: {},
31
+ };
32
+ this.fieldRules = [];
33
+ this.installedExtensions = [];
34
+ this.globalFields = [];
35
+ this.existingGlobalFields = [];
36
+ this.pendingGlobalFields = [];
37
+ }
38
+ async start() {
39
+ try {
40
+ const appMapperPath = path.join(this.importConfig.data, 'mapper', 'marketplace_apps', 'uid-mapping.json');
41
+ this.installedExtensions = ((await fileHelper.readFileSync(appMapperPath)) || { extension_uid: {} }).extension_uid;
42
+ // read content types
43
+ // remove content types already existing
44
+ if (fs.existsSync(this.existingContentTypesPath)) {
45
+ this.existingContentTypesUIds = fileHelper.readFileSync(this.existingContentTypesPath) || [];
46
+ this.existingContentTypesUIds = new Map(this.existingContentTypesUIds.map((id) => [id, 'true']));
47
+ }
48
+ const contentTypeFiles = fileHelper.readdirSync(this.contentTypesFolderPath);
49
+ for (let contentTypeName of contentTypeFiles) {
50
+ if (!this.ignoredFilesInContentTypesFolder.has(contentTypeName)) {
51
+ const contentTypePath = path.join(this.contentTypesFolderPath, contentTypeName);
52
+ const contentType = await fileHelper.readFile(contentTypePath);
53
+ if (!this.existingContentTypesUIds.length || !this.existingContentTypesUIds.has(contentType.uid)) {
54
+ this.contentTypes.push(await fileHelper.readFile(contentTypePath));
55
+ }
56
+ }
57
+ }
58
+ // seed content type
59
+ log(this.importConfig, 'Started to seed content types', 'info');
60
+ await executeTask(this.contentTypes, this.seedContentType.bind(this), { concurrency: this.importConcurrency });
61
+ log(this.importConfig, 'Created content types', 'success');
62
+ log(this.importConfig, 'Started to update content types with references', 'info');
63
+ await executeTask(this.contentTypes, this.updateContentType.bind(this), { concurrency: this.importConcurrency });
64
+ log(this.importConfig, 'Updated content types with references', 'success');
65
+ // global field update
66
+ this.pendingGlobalFields = fileHelper.readFileSync(this.globalFieldPendingPath);
67
+ if (Array.isArray(this.pendingGlobalFields) && this.pendingGlobalFields.length > 0) {
68
+ this.globalFields = fileHelper.readFileSync(path.resolve(this.globalFieldsFolderPath, this.globalFieldConfig.fileName));
69
+ this.existingGlobalFields = fileHelper.readFileSync(this.globalFieldMapperFolderPath);
70
+ try {
71
+ log(this.importConfig, 'Started to update pending global field with content type references', 'info');
72
+ await executeTask(this.pendingGlobalFields, this.updateGlobalFields.bind(this), {
73
+ concurrency: this.importConcurrency,
74
+ });
75
+ log(this.importConfig, 'Updated pending global fields with content type with references', 'success');
76
+ }
77
+ catch (error) {
78
+ log(this.importConfig, `Failed to updates global fields with content type reference ${formatError(error)}`, 'error');
79
+ }
80
+ }
81
+ // write field rules
82
+ if (this.fieldRules.length > 0) {
83
+ try {
84
+ await fileHelper.writeFile(path.join(this.contentTypesFolderPath, 'field_rules_uid.json'), this.fieldRules);
85
+ }
86
+ catch (error) {
87
+ log(this.importConfig, `Failed to write field rules ${formatError(error)}`, 'success');
88
+ }
89
+ }
90
+ log(this.importConfig, chalk.green('Content types imported successfully'), 'success');
91
+ }
92
+ catch (error) {
93
+ let message_content_type = "";
94
+ if (error.request !== undefined && JSON.parse(error.request.data).content_type !== undefined) {
95
+ if (JSON.parse(error.request.data).content_type.uid) {
96
+ message_content_type =
97
+ ' Update the content type with content_type_uid - ' + JSON.parse(error.request.data).content_type.uid;
98
+ }
99
+ else if (JSON.parse(error.request.data).content_type.title) {
100
+ message_content_type =
101
+ ' Update the content type with content_type_title - ' + JSON.parse(error.request.data).content_type.title;
102
+ }
103
+ error.errorMessage = error.errorMessage + message_content_type;
104
+ }
105
+ log(this.importConfig, formatError(error.errorMessage), 'error');
106
+ log(this.importConfig, formatError(error), 'error');
107
+ throw new Error('Failed to import content types');
108
+ }
109
+ }
110
+ async seedContentType(contentType) {
111
+ const body = cloneDeep(schemaTemplate);
112
+ body.content_type.uid = contentType.uid;
113
+ body.content_type.title = contentType.title;
114
+ const requestObject = cloneDeep(this.requestOptions);
115
+ requestObject.json = body;
116
+ try {
117
+ await this.stackAPIClient.contentType().create(requestObject.json);
118
+ }
119
+ catch (error) {
120
+ if (error.errorCode === 115 && (error.errors.uid || error.errors.title)) {
121
+ // content type uid already exists
122
+ // _.remove(self.contentTypes, { uid: uid });
123
+ return true;
124
+ }
125
+ throw error;
126
+ }
127
+ }
128
+ async updateContentType(contentType) {
129
+ if (typeof contentType !== 'object')
130
+ return;
131
+ const requestObject = cloneDeep(this.requestOptions);
132
+ if (contentType.field_rules) {
133
+ this.fieldRules.push(contentType.uid);
134
+ delete contentType.field_rules;
135
+ }
136
+ lookupExtension(this.importConfig, contentType.schema, this.importConfig.preserveStackVersion, this.installedExtensions);
137
+ requestObject.json.content_type = contentType;
138
+ const contentTypeResponse = this.stackAPIClient.contentType(contentType.uid);
139
+ Object.assign(contentTypeResponse, cloneDeep(contentType));
140
+ await contentTypeResponse.update();
141
+ log(this.importConfig, contentType.uid + ' updated with references', 'success');
142
+ }
143
+ async updateGlobalFields(uid) {
144
+ const globalField = find(this.globalFields, { uid });
145
+ if (globalField) {
146
+ lookupExtension(this.importConfig, globalField.schema, this.importConfig.preserveStackVersion, this.installedExtensions);
147
+ let globalFieldObj = this.stackAPIClient.globalField(globalField.uid);
148
+ Object.assign(globalFieldObj, cloneDeep(globalField));
149
+ try {
150
+ const globalFieldResponse = await globalFieldObj.update();
151
+ const existingGlobalField = findIndex(this.existingGlobalFields, (existingGlobalFieldUId) => {
152
+ return globalFieldResponse.uid === existingGlobalFieldUId;
153
+ });
154
+ // Improve write the updated global fields once all updates are completed
155
+ this.existingGlobalFields.splice(existingGlobalField, 1, globalField);
156
+ await fileHelper.writeFile(this.globalFieldMapperFolderPath, this.existingGlobalFields).catch((error) => {
157
+ log(this.importConfig, `failed to write updated the global field ${uid} ${formatError(error)}`);
158
+ });
159
+ log(this.importConfig, `Updated the global field ${uid} with content type references `);
160
+ return true;
161
+ }
162
+ catch (error) {
163
+ log(this.importConfig, `failed to update the global field ${uid} ${formatError(error)}`);
164
+ }
165
+ }
166
+ else {
167
+ log(this.importConfig, `Global field ${uid} does not exist, and hence failed to update.`);
168
+ }
169
+ }
170
+ async mapUidToTitle() {
171
+ this.contentTypes.forEach((ct) => {
172
+ this.titleToUIdMap.set(ct.uid, ct.title);
173
+ });
174
+ }
175
+ }
176
+ module.exports = ContentTypesImport;
@@ -0,0 +1,15 @@
1
+ export = ImportCustomRoles;
2
+ declare class ImportCustomRoles {
3
+ constructor(importConfig: any, stackAPIClient: any);
4
+ fails: any[];
5
+ labelUids: any[];
6
+ customRolesUidMapper: {};
7
+ customRolesConfig: {
8
+ dirName: string;
9
+ fileName: string;
10
+ customRolesLocalesFileName: string;
11
+ };
12
+ config: any;
13
+ stackAPIClient: any;
14
+ start(): Promise<void>;
15
+ }
@@ -0,0 +1,141 @@
1
+ 'use strict';
2
+ const mkdirp = require('mkdirp');
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const chalk = require('chalk');
6
+ const { merge } = require('lodash');
7
+ const { fileHelper, log, formatError } = require('../../utils');
8
+ let { default: config } = require('../../config');
9
+ module.exports = class ImportCustomRoles {
10
+ constructor(importConfig, stackAPIClient) {
11
+ this.fails = [];
12
+ this.labelUids = [];
13
+ this.customRolesUidMapper = {};
14
+ this.customRolesConfig = config.modules.customRoles;
15
+ this.config = merge(config, importConfig);
16
+ this.stackAPIClient = stackAPIClient;
17
+ }
18
+ async start() {
19
+ const self = this;
20
+ log(this.config, chalk.white('Migrating custom-roles'), 'success');
21
+ let customRolesFolderPath = path.resolve(this.config.data, this.customRolesConfig.dirName);
22
+ let customRolesMapperPath = path.resolve(this.config.data, 'mapper', 'custom-roles');
23
+ let entriesUidMapperFolderPath = path.resolve(this.config.data, 'mapper', 'entries');
24
+ let customRolesFailsPath = path.resolve(this.config.data, 'custom-roles', 'fails.json');
25
+ let environmentsUidMapperFolderPath = path.resolve(this.config.data, 'mapper', 'environments');
26
+ let customRolesUidMapperPath = path.resolve(this.config.data, 'mapper', 'custom-roles', 'uid-mapping.json');
27
+ let customRolesLocalesFilePath = path.resolve(customRolesFolderPath, this.customRolesConfig.customRolesLocalesFileName);
28
+ try {
29
+ self.customRoles = fileHelper.readFileSync(path.resolve(customRolesFolderPath, this.customRolesConfig.fileName));
30
+ self.customRolesLocales = fileHelper.readFileSync(customRolesLocalesFilePath);
31
+ // Mapper file paths.
32
+ if (fs.existsSync(customRolesMapperPath)) {
33
+ this.customRolesUidMapper = fileHelper.readFileSync(customRolesUidMapperPath) || {};
34
+ }
35
+ mkdirp.sync(customRolesMapperPath);
36
+ if (!self.customRoles) {
37
+ log(self.config, chalk.white('No custom-roles found'), 'info');
38
+ return;
39
+ }
40
+ self.customRolesUids = Object.keys(self.customRoles);
41
+ self.localesUidMap = await getLocalesUidMap(self.stackAPIClient, self.config, self.customRolesLocales);
42
+ if (fs.existsSync(environmentsUidMapperFolderPath)) {
43
+ self.environmentsUidMap = fileHelper.readFileSync(path.resolve(environmentsUidMapperFolderPath, 'uid-mapping.json'));
44
+ }
45
+ if (fs.existsSync(entriesUidMapperFolderPath)) {
46
+ self.entriesUidMap = fileHelper.readFileSync(path.resolve(entriesUidMapperFolderPath, 'uid-mapping.json'));
47
+ }
48
+ for (const uid of self.customRolesUids) {
49
+ const customRole = self.customRoles[uid];
50
+ if (uid in self.customRolesUidMapper) {
51
+ log(self.config, chalk.white(`The custom-role '${customRole.name}' already exists. Skipping it to avoid duplicates!`), 'success');
52
+ continue;
53
+ }
54
+ try {
55
+ customRole.rules.forEach((rule) => {
56
+ const transformUids = getTransformUidsFactory(rule);
57
+ rule = transformUids(rule, self.environmentsUidMap, self.localesUidMap, self.entriesUidMap);
58
+ });
59
+ // rules.branch is required to create custom roles.
60
+ const branchRuleExists = customRole.rules.find((rule) => rule.module === 'branch');
61
+ if (!branchRuleExists) {
62
+ customRole.rules.push({
63
+ module: 'branch',
64
+ branches: ['main'],
65
+ acl: { read: true },
66
+ });
67
+ }
68
+ const role = await self.stackAPIClient.role().create({ role: customRole });
69
+ self.customRolesUidMapper[uid] = role;
70
+ fileHelper.writeFileSync(customRolesUidMapperPath, self.customRolesUidMapper);
71
+ }
72
+ catch (error) {
73
+ self.fails.push(customRole);
74
+ if (((error && error.errors && error.errors.name) || '').includes('is not a unique.')) {
75
+ log(self.config, `custom-role ${customRole.name} already exists`, 'info');
76
+ }
77
+ else {
78
+ if (!(error && error.errors && error.errors.name)) {
79
+ log(self.config, `custom-role: ${customRole.name} already exists`, 'error');
80
+ }
81
+ else {
82
+ log(self.config, `custom-role: ${customRole.name} failed`, 'error');
83
+ }
84
+ log(self.config, formatError(error), 'error');
85
+ }
86
+ }
87
+ }
88
+ log(self.config, chalk.green('Custom-roles have been imported successfully!'), 'success');
89
+ }
90
+ catch (error) {
91
+ fileHelper.writeFileSync(customRolesFailsPath, self.fails);
92
+ log(self.config, 'Custom-roles import failed', 'error');
93
+ log(self.config, formatError(error), 'error');
94
+ throw error;
95
+ }
96
+ }
97
+ };
98
+ const getTransformUidsFactory = (rule) => {
99
+ if (rule.module === 'environment') {
100
+ return environmentUidTransformer;
101
+ }
102
+ else if (rule.module === 'locale') {
103
+ return localeUidTransformer;
104
+ }
105
+ else if (rule.module === 'entry') {
106
+ return entryUidTransformer;
107
+ }
108
+ else {
109
+ return noopTransformer;
110
+ }
111
+ };
112
+ const environmentUidTransformer = (rule, environmentsUidMap) => {
113
+ rule.environments = rule.environments.map((env) => environmentsUidMap[env]);
114
+ return rule;
115
+ };
116
+ const localeUidTransformer = (rule, environmentsUidMap, localesUidMap) => {
117
+ rule.locales = rule.locales.map((locale) => localesUidMap[locale]);
118
+ return rule;
119
+ };
120
+ const entryUidTransformer = (rule, environmentsUidMap, localesUidMap, entriesUidMap) => {
121
+ rule.entries = rule.entries.map((entry) => entriesUidMap[entry]);
122
+ return rule;
123
+ };
124
+ const noopTransformer = (rule) => {
125
+ return rule;
126
+ };
127
+ const getLocalesUidMap = async (stackAPIClient, config, sourceLocales) => {
128
+ const { items } = await stackAPIClient.locale().query().find();
129
+ const [targetLocalesMap, sourceLocalesMap] = [{}, {}];
130
+ items.forEach((locale) => {
131
+ targetLocalesMap[locale.code] = locale.uid;
132
+ });
133
+ for (const key in sourceLocales) {
134
+ sourceLocalesMap[sourceLocales[key].code] = key;
135
+ }
136
+ const localesUidMap = {};
137
+ for (const key in sourceLocalesMap) {
138
+ localesUidMap[sourceLocalesMap[key]] = targetLocalesMap[key];
139
+ }
140
+ return localesUidMap;
141
+ };
@@ -0,0 +1,54 @@
1
+ export = ImportEntries;
2
+ declare class ImportEntries {
3
+ constructor(importConfig: any, stackAPIClient: any);
4
+ mappedAssetUidPath: string;
5
+ mappedAssetUrlPath: string;
6
+ entryMapperPath: string;
7
+ environmentPath: string;
8
+ entryUidMapperPath: string;
9
+ uniqueUidMapperPath: string;
10
+ modifiedSchemaPath: string;
11
+ createdEntriesWOUidPath: string;
12
+ failedWOPath: string;
13
+ masterLanguage: any;
14
+ reqConcurrency: any;
15
+ eConfig: any;
16
+ ePath: string;
17
+ ctPath: string;
18
+ lPath: string;
19
+ importConcurrency: any;
20
+ skipFiles: string[];
21
+ config: any;
22
+ stackAPIClient: any;
23
+ ctSchemas: {};
24
+ refSchemas: any[];
25
+ ctJsonRte: any[];
26
+ ctJsonRteWithEntryRefs: any[];
27
+ jsonRteEntryRefs: {};
28
+ createdEntriesWOUid: any[];
29
+ uniqueUids: {};
30
+ mappedUids: {};
31
+ success: any[];
32
+ fails: any[];
33
+ installedExtensions: any[];
34
+ environment: any;
35
+ start(): globalThis.Promise<any>;
36
+ createEntries(lang: any, mappedAssetUids: any, mappedAssetUrls: any): Promise<any>;
37
+ getCreatedEntriesWOUid(): Promise<any>;
38
+ repostEntries(lang: any): Promise<any>;
39
+ supressFields(): Promise<any>;
40
+ fetchEntry(query: any): Promise<any>;
41
+ unSuppressFields(): Promise<any>;
42
+ removeBuggedEntries(): Promise<any>;
43
+ field_rules_update(schema: any): Promise<any>;
44
+ publish(langs: any): Promise<any>;
45
+ removeEntryRefsFromJSONRTE(entry: any, ctSchema: any): any;
46
+ doEntryReferencesExist(element: any): any;
47
+ restoreJsonRteEntryRefs(entry: any, sourceStackEntry: any, ctSchema: any): any;
48
+ isEntryRef(element: any): boolean;
49
+ removeUidsFromJsonRteFields(entry: any, ctSchema: any): any;
50
+ removeUidsFromChildren(children: any): any;
51
+ setDirtyTrue(jsonRteChild: any): any;
52
+ resolveAssetRefsInEntryRefsForJsonRte(jsonRteChild: any, mappedAssetUids: any, mappedAssetUrls: any): any;
53
+ }
54
+ import Promise = require("bluebird");