@contentstack/cli-cm-import-setup 1.7.2 → 2.0.0-beta.2

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 (36) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +4 -49
  3. package/lib/commands/cm/stacks/import-setup.d.ts +1 -0
  4. package/lib/commands/cm/stacks/import-setup.js +28 -11
  5. package/lib/import/import-setup.d.ts +19 -5
  6. package/lib/import/import-setup.js +27 -16
  7. package/lib/import/modules/assets.js +48 -16
  8. package/lib/import/modules/base-setup.d.ts +20 -7
  9. package/lib/import/modules/base-setup.js +48 -15
  10. package/lib/import/modules/content-types.js +27 -5
  11. package/lib/import/modules/entries.js +11 -4
  12. package/lib/import/modules/extensions.d.ts +3 -6
  13. package/lib/import/modules/extensions.js +39 -23
  14. package/lib/import/modules/global-fields.js +27 -5
  15. package/lib/import/modules/marketplace-apps.d.ts +3 -5
  16. package/lib/import/modules/marketplace-apps.js +40 -18
  17. package/lib/import/modules/taxonomies.d.ts +5 -7
  18. package/lib/import/modules/taxonomies.js +103 -61
  19. package/lib/types/import-config.d.ts +1 -1
  20. package/lib/types/index.d.ts +8 -1
  21. package/lib/utils/common-helper.d.ts +8 -1
  22. package/lib/utils/common-helper.js +6 -4
  23. package/lib/utils/constants.d.ts +39 -0
  24. package/lib/utils/constants.js +114 -0
  25. package/lib/utils/file-helper.d.ts +1 -1
  26. package/lib/utils/file-helper.js +4 -4
  27. package/lib/utils/import-config-handler.js +3 -8
  28. package/lib/utils/index.d.ts +1 -0
  29. package/lib/utils/index.js +6 -1
  30. package/lib/utils/log.js +1 -1
  31. package/lib/utils/logger.d.ts +1 -1
  32. package/lib/utils/logger.js +11 -16
  33. package/lib/utils/login-handler.d.ts +11 -2
  34. package/lib/utils/login-handler.js +12 -8
  35. package/oclif.manifest.json +3 -8
  36. package/package.json +5 -3
@@ -1,20 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const utils_1 = require("../../utils");
4
5
  const base_setup_1 = tslib_1.__importDefault(require("./base-setup"));
5
- const cli_utilities_1 = require("@contentstack/cli-utilities");
6
+ const utils_2 = require("../../utils");
6
7
  class EntriesImportSetup extends base_setup_1.default {
7
8
  constructor(options) {
8
9
  super(options);
9
- this.initializeContext('entries');
10
+ this.currentModuleName = utils_2.MODULE_NAMES[utils_2.MODULE_CONTEXTS.ENTRIES];
10
11
  }
11
12
  async start() {
13
+ var _a;
12
14
  try {
15
+ const progress = this.createSimpleProgress(this.currentModuleName, 1);
16
+ progress.updateStatus('Setting up dependencies...');
13
17
  await this.setupDependencies();
14
- cli_utilities_1.log.success(`The required setup files for entries have been generated successfully.`);
18
+ (_a = this.progressManager) === null || _a === void 0 ? void 0 : _a.tick(true, 'entries mapper setup', null);
19
+ this.completeProgress(true);
20
+ (0, utils_1.log)(this.config, `The required setup files for entries have been generated successfully.`, 'success');
15
21
  }
16
22
  catch (error) {
17
- (0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.config.context), 'Error occurred while generating the entry mapper');
23
+ this.completeProgress(false, (error === null || error === void 0 ? void 0 : error.message) || 'Entries mapper generation failed');
24
+ (0, utils_1.log)(this.config, `Error occurred while generating the entry mapper: ${error.message}.`, 'error');
18
25
  }
19
26
  }
20
27
  }
@@ -1,15 +1,12 @@
1
1
  import { ModuleClassParams } from '../../types';
2
- export default class ExtensionImportSetup {
3
- private config;
2
+ import BaseImportSetup from './base-setup';
3
+ export default class ExtensionImportSetup extends BaseImportSetup {
4
4
  private extensionsFilePath;
5
5
  private extensionMapper;
6
- private stackAPIClient;
7
- private dependencies;
8
6
  private extensionsConfig;
9
- private mapperDirPath;
10
7
  private extensionsFolderPath;
11
8
  private extUidMapperPath;
12
- constructor({ config, stackAPIClient, dependencies }: ModuleClassParams);
9
+ constructor({ config, stackAPIClient }: ModuleClassParams);
13
10
  /**
14
11
  * Start the extension import setup
15
12
  * This method reads the extensions from the content folder and generates a mapper file
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const utils_1 = require("../../utils");
4
5
  const path_1 = require("path");
5
6
  const lodash_1 = require("lodash");
6
7
  const cli_utilities_1 = require("@contentstack/cli-utilities");
7
- class ExtensionImportSetup {
8
- constructor({ config, stackAPIClient, dependencies }) {
9
- this.config = config;
10
- if (this.config.context) {
11
- this.config.context.module = 'extensions';
12
- }
13
- this.stackAPIClient = stackAPIClient;
8
+ const base_setup_1 = tslib_1.__importDefault(require("./base-setup"));
9
+ const utils_2 = require("../../utils");
10
+ class ExtensionImportSetup extends base_setup_1.default {
11
+ constructor({ config, stackAPIClient }) {
12
+ super({ config, stackAPIClient, dependencies: [] });
13
+ this.currentModuleName = utils_2.MODULE_NAMES[utils_2.MODULE_CONTEXTS.EXTENSIONS];
14
14
  this.extensionsFilePath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), 'extensions', 'extensions.json');
15
15
  this.extensionsConfig = config.modules.extensions;
16
16
  this.extUidMapperPath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.backupDir), 'mapper', 'extensions', 'uid-mapping.json');
@@ -22,33 +22,49 @@ class ExtensionImportSetup {
22
22
  * @returns {Promise<void>}
23
23
  */
24
24
  async start() {
25
+ var _a, _b, _c;
25
26
  try {
26
- if (!utils_1.fileHelper.fileExistsSync(this.extensionsFilePath)) {
27
- cli_utilities_1.log.info('No extensions found in the content folder.');
28
- return;
29
- }
30
- const extensions = await utils_1.fsUtil.readFile(this.extensionsFilePath);
27
+ const extensions = await this.withLoadingSpinner('EXTENSIONS: Analyzing import data...', async () => {
28
+ return await utils_1.fsUtil.readFile(this.extensionsFilePath);
29
+ });
31
30
  if (!(0, lodash_1.isEmpty)(extensions)) {
32
- // 2. Create mapper directory
31
+ const extensionsArray = Object.values(extensions);
32
+ const progress = this.createNestedProgress(this.currentModuleName);
33
+ // Add process
34
+ progress.addProcess(utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION, extensionsArray.length);
35
+ // Create mapper directory
33
36
  const mapperFilePath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.backupDir), 'mapper', 'extensions');
34
- utils_1.fsUtil.makeDirectory(mapperFilePath); // Use fsUtil
35
- for (const extension of Object.values(extensions)) {
36
- const targetExtension = await this.getExtension(extension);
37
- if (!targetExtension) {
38
- cli_utilities_1.log.info(`Extension with the title '${extension.title}' not found in the stack.`);
39
- continue;
37
+ utils_1.fsUtil.makeDirectory(mapperFilePath);
38
+ progress
39
+ .startProcess(utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION)
40
+ .updateStatus(utils_2.PROCESS_STATUS.EXTENSIONS_MAPPER_GENERATION.GENERATING, utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION);
41
+ for (const extension of extensionsArray) {
42
+ try {
43
+ const targetExtension = await this.getExtension(extension);
44
+ if (!targetExtension) {
45
+ (0, utils_1.log)(this.config, `Extension with the title '${extension.title}' not found in the stack.`, 'info');
46
+ (_a = this.progressManager) === null || _a === void 0 ? void 0 : _a.tick(false, `extension: ${extension.title}`, 'Not found in stack', utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION);
47
+ continue;
48
+ }
49
+ this.extensionMapper[extension.uid] = targetExtension.uid;
50
+ (_b = this.progressManager) === null || _b === void 0 ? void 0 : _b.tick(true, `extension: ${extension.title}`, null, utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION);
51
+ }
52
+ catch (error) {
53
+ (_c = this.progressManager) === null || _c === void 0 ? void 0 : _c.tick(false, `extension: ${extension.title}`, (0, cli_utilities_1.formatError)(error), utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION);
40
54
  }
41
- this.extensionMapper[extension.uid] = targetExtension.uid;
42
55
  }
43
56
  await utils_1.fsUtil.writeFile(this.extUidMapperPath, this.extensionMapper);
44
- cli_utilities_1.log.success(`The required setup files for extensions have been generated successfully.`);
57
+ progress.completeProcess(utils_2.PROCESS_NAMES.EXTENSIONS_MAPPER_GENERATION, true);
58
+ this.completeProgress(true);
59
+ (0, utils_1.log)(this.config, `The required setup files for extensions have been generated successfully.`, 'success');
45
60
  }
46
61
  else {
47
- cli_utilities_1.log.info('No extensions found in the content folder.');
62
+ (0, utils_1.log)(this.config, 'No extensions found in the content folder.', 'info');
48
63
  }
49
64
  }
50
65
  catch (error) {
51
- (0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.config.context), 'Error occurred while generating the extension mapper');
66
+ this.completeProgress(false, (error === null || error === void 0 ? void 0 : error.message) || 'Extensions mapper generation failed');
67
+ (0, utils_1.log)(this.config, `Error occurred while generating the extension mapper: ${(0, cli_utilities_1.formatError)(error)}.`, 'error');
52
68
  }
53
69
  }
54
70
  async getExtension(extension) {
@@ -1,20 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const utils_1 = require("../../utils");
4
5
  const base_setup_1 = tslib_1.__importDefault(require("./base-setup"));
5
- const cli_utilities_1 = require("@contentstack/cli-utilities");
6
+ const utils_2 = require("../../utils");
6
7
  class GlobalFieldsImportSetup extends base_setup_1.default {
7
8
  constructor(options) {
8
9
  super(options);
9
- this.initializeContext('global-fields');
10
+ this.currentModuleName = utils_2.MODULE_NAMES[utils_2.MODULE_CONTEXTS.GLOBAL_FIELDS];
10
11
  }
11
12
  async start() {
13
+ var _a, _b, _c;
12
14
  try {
13
- await this.setupDependencies();
14
- cli_utilities_1.log.success(`The required setup files for global fields have been generated successfully.`);
15
+ const progress = this.createNestedProgress(this.currentModuleName);
16
+ // Add processes
17
+ progress.addProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_DEPENDENCY_SETUP, ((_a = this.dependencies) === null || _a === void 0 ? void 0 : _a.length) || 0);
18
+ progress.addProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_MAPPER_GENERATION, 1);
19
+ // Setup dependencies
20
+ if (this.dependencies && this.dependencies.length > 0) {
21
+ progress
22
+ .startProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_DEPENDENCY_SETUP)
23
+ .updateStatus(utils_2.PROCESS_STATUS.GLOBAL_FIELDS_DEPENDENCY_SETUP.SETTING_UP, utils_2.PROCESS_NAMES.GLOBAL_FIELDS_DEPENDENCY_SETUP);
24
+ await this.setupDependencies();
25
+ (_b = this.progressManager) === null || _b === void 0 ? void 0 : _b.tick(true, 'dependencies setup', null, utils_2.PROCESS_NAMES.GLOBAL_FIELDS_DEPENDENCY_SETUP);
26
+ progress.completeProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_DEPENDENCY_SETUP, true);
27
+ }
28
+ // Mapper generation
29
+ progress
30
+ .startProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_MAPPER_GENERATION)
31
+ .updateStatus(utils_2.PROCESS_STATUS.GLOBAL_FIELDS_MAPPER_GENERATION.GENERATING, utils_2.PROCESS_NAMES.GLOBAL_FIELDS_MAPPER_GENERATION);
32
+ (_c = this.progressManager) === null || _c === void 0 ? void 0 : _c.tick(true, 'mapper generation', null, utils_2.PROCESS_NAMES.GLOBAL_FIELDS_MAPPER_GENERATION);
33
+ progress.completeProcess(utils_2.PROCESS_NAMES.GLOBAL_FIELDS_MAPPER_GENERATION, true);
34
+ this.completeProgress(true);
35
+ (0, utils_1.log)(this.config, `The required setup files for global fields have been generated successfully.`, 'success');
15
36
  }
16
37
  catch (error) {
17
- (0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.config.context), 'Error occurred while generating the global field mapper');
38
+ this.completeProgress(false, (error === null || error === void 0 ? void 0 : error.message) || 'Global fields mapper generation failed');
39
+ (0, utils_1.log)(this.config, `Error occurred while generating the global field mapper: ${error.message}.`, 'error');
18
40
  }
19
41
  }
20
42
  }
@@ -1,11 +1,9 @@
1
1
  import { ModuleClassParams } from '../../types';
2
2
  import { ContentstackMarketplaceClient, NodeCrypto } from '@contentstack/cli-utilities';
3
- export default class marketplaceAppImportSetup {
4
- private config;
3
+ import BaseImportSetup from './base-setup';
4
+ export default class marketplaceAppImportSetup extends BaseImportSetup {
5
5
  private marketplaceAppsFilePath;
6
6
  private marketplaceAppMapper;
7
- private stackAPIClient;
8
- private dependencies;
9
7
  private marketplaceAppsConfig;
10
8
  private mapperDirPath;
11
9
  private marketplaceAppsFolderPath;
@@ -14,7 +12,7 @@ export default class marketplaceAppImportSetup {
14
12
  marketplaceAppPath: string;
15
13
  nodeCrypto: NodeCrypto;
16
14
  appSdk: ContentstackMarketplaceClient;
17
- constructor({ config, stackAPIClient, dependencies }: ModuleClassParams);
15
+ constructor({ config, stackAPIClient }: ModuleClassParams);
18
16
  /**
19
17
  * Start the marketplaceApp import setup
20
18
  * This method reads the marketplaceApps from the content folder and generates a mapper file
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const utils_1 = require("../../utils");
4
5
  const path_1 = require("path");
5
6
  const lodash_1 = require("lodash");
6
7
  const cli_utilities_1 = require("@contentstack/cli-utilities");
7
- class marketplaceAppImportSetup {
8
- constructor({ config, stackAPIClient, dependencies }) {
9
- this.config = config;
10
- if (this.config.context) {
11
- this.config.context.module = 'marketplace-apps';
12
- }
13
- this.stackAPIClient = stackAPIClient;
8
+ const base_setup_1 = tslib_1.__importDefault(require("./base-setup"));
9
+ const utils_2 = require("../../utils");
10
+ class marketplaceAppImportSetup extends base_setup_1.default {
11
+ constructor({ config, stackAPIClient }) {
12
+ super({ config, stackAPIClient, dependencies: [] });
13
+ this.currentModuleName = utils_2.MODULE_NAMES[utils_2.MODULE_CONTEXTS.MARKETPLACE_APPS];
14
14
  this.marketplaceAppsFilePath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), 'marketplace_apps', 'marketplace_apps.json');
15
15
  this.marketplaceAppsConfig = config.modules['marketplace-apps'];
16
16
  this.marketplaceAppsUidMapperPath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.backupDir), 'mapper', 'marketplace_apps');
@@ -22,29 +22,47 @@ class marketplaceAppImportSetup {
22
22
  * @returns {Promise<void>}
23
23
  */
24
24
  async start() {
25
+ var _a, _b;
25
26
  try {
26
- if (!utils_1.fileHelper.fileExistsSync(this.marketplaceAppsFilePath)) {
27
- cli_utilities_1.log.info('No Marketplace apps found in the content folder.');
28
- return;
29
- }
30
- const sourceMarketplaceApps = await utils_1.fsUtil.readFile(this.marketplaceAppsFilePath);
27
+ const sourceMarketplaceApps = await this.withLoadingSpinner('MARKETPLACE APPS: Analyzing import data...', async () => {
28
+ return await utils_1.fsUtil.readFile(this.marketplaceAppsFilePath);
29
+ });
31
30
  if (!(0, lodash_1.isEmpty)(sourceMarketplaceApps)) {
32
- utils_1.fsUtil.makeDirectory(this.marketplaceAppsUidMapperPath); // Use fsUtil
31
+ const appsArray = Array.isArray(sourceMarketplaceApps) ? sourceMarketplaceApps : Object.values(sourceMarketplaceApps);
32
+ const progress = this.createNestedProgress(this.currentModuleName);
33
+ // Add processes
34
+ progress.addProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_MAPPER_GENERATION, 1);
35
+ progress.addProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH, appsArray.length);
36
+ // Create mapper directory
37
+ progress
38
+ .startProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_MAPPER_GENERATION)
39
+ .updateStatus(utils_2.PROCESS_STATUS.MARKETPLACE_APPS_MAPPER_GENERATION.GENERATING, utils_2.PROCESS_NAMES.MARKETPLACE_APPS_MAPPER_GENERATION);
40
+ utils_1.fsUtil.makeDirectory(this.marketplaceAppsUidMapperPath);
41
+ (_a = this.progressManager) === null || _a === void 0 ? void 0 : _a.tick(true, 'mapper directory created', null, utils_2.PROCESS_NAMES.MARKETPLACE_APPS_MAPPER_GENERATION);
42
+ progress.completeProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_MAPPER_GENERATION, true);
43
+ // Fetch marketplace apps
44
+ progress
45
+ .startProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH)
46
+ .updateStatus(utils_2.PROCESS_STATUS.MARKETPLACE_APPS_FETCH.FETCHING, utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH);
33
47
  this.developerHubBaseUrl = this.config.developerHubBaseUrl || (await (0, cli_utilities_1.createDeveloperHubUrl)(this.config.host));
34
48
  // NOTE init marketplace app sdk
35
49
  const host = this.developerHubBaseUrl.split('://').pop();
36
50
  this.appSdk = await (0, cli_utilities_1.marketplaceSDKClient)({ host });
37
51
  const targetMarketplaceApps = await this.getMarketplaceApps();
52
+ (_b = this.progressManager) === null || _b === void 0 ? void 0 : _b.tick(true, 'marketplace apps fetched', null, utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH);
38
53
  this.createMapper(sourceMarketplaceApps, targetMarketplaceApps);
39
54
  await utils_1.fsUtil.writeFile((0, path_1.join)(this.marketplaceAppsUidMapperPath, 'uid-mapping.json'), this.marketplaceAppMapper);
40
- cli_utilities_1.log.success(`The required setup files for Marketplace apps have been generated successfully.`);
55
+ progress.completeProcess(utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH, true);
56
+ this.completeProgress(true);
57
+ (0, utils_1.log)(this.config, `The required setup files for Marketplace apps have been generated successfully.`, 'success');
41
58
  }
42
59
  else {
43
- cli_utilities_1.log.info('No Marketplace apps found in the content folder.');
60
+ (0, utils_1.log)(this.config, 'No Marketplace apps found in the content folder.', 'info');
44
61
  }
45
62
  }
46
63
  catch (error) {
47
- (0, cli_utilities_1.handleAndLogError)(error, Object.assign({}, this.config.context), 'Error occurred while generating the Marketplace app mapper');
64
+ this.completeProgress(false, (error === null || error === void 0 ? void 0 : error.message) || 'Marketplace apps mapper generation failed');
65
+ (0, utils_1.log)(this.config, `Error occurred while generating the Marketplace app mapper: ${error.message}.`, 'error');
48
66
  }
49
67
  }
50
68
  async getMarketplaceApps() {
@@ -61,7 +79,9 @@ class marketplaceAppImportSetup {
61
79
  });
62
80
  }
63
81
  createMapper(sourceMarketplaceApps, targetMarketplaceApps) {
64
- sourceMarketplaceApps.forEach((sourceApp) => {
82
+ const appsArray = Array.isArray(sourceMarketplaceApps) ? sourceMarketplaceApps : Object.values(sourceMarketplaceApps);
83
+ appsArray.forEach((sourceApp) => {
84
+ var _a, _b;
65
85
  // Find matching target item based on manifest.name
66
86
  // TBD: This logic is not foolproof, need to find a better way to match source and target apps
67
87
  // Reason: While importing apps, if an app exist in the target with the same name, it will be a conflict and will not be imported
@@ -86,9 +106,11 @@ class marketplaceAppImportSetup {
86
106
  });
87
107
  }
88
108
  });
109
+ (_a = this.progressManager) === null || _a === void 0 ? void 0 : _a.tick(true, `app: ${sourceAppName}`, null, utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH);
89
110
  }
90
111
  else {
91
- cli_utilities_1.log.info(`No matching Marketplace app found in the target stack with name ${sourceAppName}`);
112
+ (_b = this.progressManager) === null || _b === void 0 ? void 0 : _b.tick(false, `app: ${sourceAppName}`, 'Not found in target stack', utils_2.PROCESS_NAMES.MARKETPLACE_APPS_FETCH);
113
+ (0, utils_1.log)(this.config, `No matching Marketplace app found in the target stack with name ${sourceAppName}`, 'info');
92
114
  }
93
115
  });
94
116
  }
@@ -1,11 +1,9 @@
1
1
  /// <reference types="lodash" />
2
2
  import { ModuleClassParams } from '../../types';
3
- export default class TaxonomiesImportSetup {
4
- private config;
3
+ import BaseImportSetup from './base-setup';
4
+ export default class TaxonomiesImportSetup extends BaseImportSetup {
5
5
  private taxonomiesFilePath;
6
6
  private taxonomiesFolderPath;
7
- private stackAPIClient;
8
- private dependencies;
9
7
  private taxonomiesConfig;
10
8
  private termsSuccessPath;
11
9
  private taxSuccessPath;
@@ -16,7 +14,7 @@ export default class TaxonomiesImportSetup {
16
14
  taxonomiesMapper: Record<string, unknown>;
17
15
  termsMapper: Record<string, unknown>;
18
16
  masterLocaleFilePath: string;
19
- constructor({ config, stackAPIClient, dependencies }: ModuleClassParams);
17
+ constructor({ config, stackAPIClient }: ModuleClassParams);
20
18
  /**
21
19
  * Start the taxonomies import setup
22
20
  * This method reads the taxonomies from the content folder and generates a mapper file
@@ -26,12 +24,12 @@ export default class TaxonomiesImportSetup {
26
24
  /**
27
25
  * Setup taxonomies using legacy format (root-level taxonomy files)
28
26
  */
29
- setupTaxonomiesLegacy(taxonomies: any): Promise<void>;
27
+ setupTaxonomiesLegacy(taxonomies: any, progress: any): Promise<void>;
30
28
  /**
31
29
  * Setup taxonomies using locale-based format (taxonomies organized by locale)
32
30
  * For locale-based structure, we query the target stack for each taxonomy+locale combination
33
31
  */
34
- setupTaxonomiesByLocale(taxonomies: any): Promise<void>;
32
+ setupTaxonomiesByLocale(taxonomies: any, progress: any): Promise<void>;
35
33
  /**
36
34
  * Detect if locale-based folder structure exists
37
35
  * @returns {boolean} true if locale-based structure detected, false otherwise