@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 +1 -1
- package/README.md +1 -1
- package/lib/commands/cm/stacks/import-setup.d.ts +0 -1
- package/lib/commands/cm/stacks/import-setup.js +3 -16
- package/lib/types/index.d.ts +0 -7
- package/lib/utils/logger.d.ts +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/login-handler.d.ts +1 -1
- package/lib/utils/login-handler.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
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.
|
|
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
|
|
@@ -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
|
-
|
|
16
|
-
importSetupConfig.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');
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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
|
}
|
package/lib/utils/logger.d.ts
CHANGED
package/lib/utils/logger.js
CHANGED
package/oclif.manifest.json
CHANGED
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.
|
|
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.
|
|
9
|
-
"@contentstack/cli-utilities": "~1.
|
|
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",
|