@contentstack/cli-cm-import-setup 1.7.1 → 1.7.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Contentstack
3
+ Copyright (c) 2026 Contentstack
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import-setup
47
47
  $ csdx COMMAND
48
48
  running command...
49
49
  $ csdx (--version)
50
- @contentstack/cli-cm-import-setup/1.7.1 linux-x64 node-v22.21.1
50
+ @contentstack/cli-cm-import-setup/1.7.2 linux-x64 node-v22.21.1
51
51
  $ csdx --help [COMMAND]
52
52
  USAGE
53
53
  $ csdx COMMAND
@@ -7,5 +7,4 @@ export default class ImportSetupCommand extends Command {
7
7
  static aliases: string[];
8
8
  static usage: string;
9
9
  run(): Promise<void>;
10
- private createImportSetupContext;
11
10
  }
@@ -8,12 +8,13 @@ const utils_1 = require("../../../utils");
8
8
  const import_1 = require("../../../import");
9
9
  class ImportSetupCommand extends cli_command_1.Command {
10
10
  async run() {
11
+ var _a, _b;
11
12
  try {
12
13
  const { flags } = await this.parse(ImportSetupCommand);
13
14
  let importSetupConfig = await (0, utils_1.setupImportConfig)(flags);
14
15
  // Prepare the context object
15
- const context = this.createImportSetupContext(importSetupConfig.apiKey, importSetupConfig.authenticationMethod);
16
- importSetupConfig.context = Object.assign({}, context);
16
+ (0, cli_utilities_1.createLogContext)(((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.command) || 'cm:stacks:import-setup', importSetupConfig.apiKey, cli_utilities_1.configHandler.get('authenticationMethod'));
17
+ importSetupConfig.context = { module: '' };
17
18
  // Note setting host to create cma client
18
19
  importSetupConfig.host = this.cmaHost;
19
20
  importSetupConfig.region = this.region;
@@ -28,20 +29,6 @@ class ImportSetupCommand extends cli_command_1.Command {
28
29
  (0, cli_utilities_1.handleAndLogError)(error);
29
30
  }
30
31
  }
31
- // Create import setup context object
32
- createImportSetupContext(apiKey, authenticationMethod, module) {
33
- var _a, _b, _c;
34
- return {
35
- command: ((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.command) || 'cm:stacks:import-setup',
36
- module: module || '',
37
- userId: cli_utilities_1.configHandler.get('userUid') || undefined,
38
- email: cli_utilities_1.configHandler.get('email') || undefined,
39
- sessionId: (_c = this.context) === null || _c === void 0 ? void 0 : _c.sessionId,
40
- apiKey: apiKey || '',
41
- orgId: cli_utilities_1.configHandler.get('oauthOrgUid') || '',
42
- authenticationMethod: authenticationMethod || 'Basic Auth',
43
- };
44
- }
45
32
  }
46
33
  exports.default = ImportSetupCommand;
47
34
  ImportSetupCommand.description = cli_utilities_1.messageHandler.parse('Helps to generate mappers and backup folder for importing (overwriting) specific modules');
@@ -115,12 +115,5 @@ export type TaxonomyQueryParams = {
115
115
  locale?: string;
116
116
  };
117
117
  export interface Context {
118
- command: string;
119
118
  module: string;
120
- userId: string | undefined;
121
- email: string | undefined;
122
- sessionId: string | undefined;
123
- apiKey: string;
124
- orgId: string;
125
- authenticationMethod?: string;
126
119
  }
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * Contentstack Export
3
- * Copyright (c) 2024 Contentstack LLC
3
+ * Copyright (c) 2026 Contentstack LLC
4
4
  * MIT Licensed
5
5
  */
6
6
  import { ImportConfig } from '../types';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*!
3
3
  * Contentstack Export
4
- * Copyright (c) 2024 Contentstack LLC
4
+ * Copyright (c) 2026 Contentstack LLC
5
5
  * MIT Licensed
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * Contentstack Import
3
- * Copyright (c) 2024 Contentstack LLC
3
+ * Copyright (c) 2026 Contentstack LLC
4
4
  * MIT Licensed
5
5
  */
6
6
  import { ImportConfig } from '../types';
@@ -4,7 +4,7 @@
4
4
  /* eslint-disable no-empty */
5
5
  /*!
6
6
  * Contentstack Import
7
- * Copyright (c) 2024 Contentstack LLC
7
+ * Copyright (c) 2026 Contentstack LLC
8
8
  * MIT Licensed
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -88,5 +88,5 @@
88
88
  ]
89
89
  }
90
90
  },
91
- "version": "1.7.1"
91
+ "version": "1.7.2"
92
92
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-import-setup",
3
3
  "description": "Contentstack CLI plugin to setup the mappers and configurations for the import command",
4
- "version": "1.7.1",
4
+ "version": "1.7.2",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-command": "~1.7.0",
9
- "@contentstack/cli-utilities": "~1.15.0",
8
+ "@contentstack/cli-command": "~1.7.1",
9
+ "@contentstack/cli-utilities": "~1.16.0",
10
10
  "@oclif/core": "^4.3.0",
11
11
  "big-json": "^3.2.0",
12
12
  "chalk": "^4.1.2",