@contentstack/cli-cm-export 1.10.3 → 1.10.5

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) 2023 Contentstack
3
+ Copyright (c) 2024 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
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
48
48
  $ csdx COMMAND
49
49
  running command...
50
50
  $ csdx (--version)
51
- @contentstack/cli-cm-export/1.10.3 linux-x64 node-v18.19.0
51
+ @contentstack/cli-cm-export/1.10.5 linux-x64 node-v18.19.0
52
52
  $ csdx --help [COMMAND]
53
53
  USAGE
54
54
  $ csdx COMMAND
@@ -85,14 +85,12 @@ ExportCommand.flags = {
85
85
  module: cli_utilities_1.flags.string({
86
86
  char: 'm',
87
87
  description: '[optional] specific module name',
88
- exclusive: ['content-types'],
89
88
  parse: (0, cli_utilities_1.printFlagDeprecation)(['-m'], ['--module']),
90
89
  }),
91
90
  'content-types': cli_utilities_1.flags.string({
92
91
  char: 't',
93
92
  description: '[optional] content type',
94
93
  multiple: true,
95
- exclusive: ['module'],
96
94
  parse: (0, cli_utilities_1.printFlagDeprecation)(['-t'], ['--content-types']),
97
95
  }),
98
96
  branch: cli_utilities_1.flags.string({
@@ -10,6 +10,7 @@ const config = {
10
10
  'https://eu-api.contentstack.com': 'https://eu-developerhub-api.contentstack.com',
11
11
  'https://azure-na-api.contentstack.com': 'https://azure-na-developerhub-api.contentstack.com',
12
12
  'https://azure-eu-api.contentstack.com': 'https://azure-eu-developerhub-api.contentstack.com',
13
+ 'https://gcp-na-api.contentstack.com': 'https://gcp-na-developerhub-api.contentstack.com',
13
14
  },
14
15
  // use below hosts for eu region
15
16
  // host:'https://eu-api.contentstack.com/v3',
@@ -17,6 +18,8 @@ const config = {
17
18
  // host:'https://azure-na-api.contentstack.com/v3',
18
19
  // use below hosts for azure-eu region
19
20
  // host:'https://azure-eu-api.contentstack.com/v3',
21
+ // use below hosts for gcp-na region
22
+ // host: 'https://gcp-na-api.contentstack.com'
20
23
  modules: {
21
24
  types: [
22
25
  'stack',
@@ -15,6 +15,10 @@ class ContentTypesExport extends base_class_1.default {
15
15
  limit: this.contentTypesConfig.limit,
16
16
  include_global_field_schema: true,
17
17
  };
18
+ // If content type id is provided then use it as part of query
19
+ if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.contentTypes.length > 0) {
20
+ this.qs.uid = { $in: this.exportConfig.contentTypes };
21
+ }
18
22
  this.contentTypesDirPath = path.resolve(exportConfig.data, exportConfig.branchName || '', this.contentTypesConfig.dirName);
19
23
  this.contentTypes = [];
20
24
  }
@@ -13,7 +13,7 @@ class ContentTypesExport {
13
13
  include_global_field_schema: true,
14
14
  };
15
15
  // If content type id is provided then use it as part of query
16
- if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.length > 0) {
16
+ if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.contentTypes.length > 0) {
17
17
  this.qs.uid = { $in: this.exportConfig.contentTypes };
18
18
  }
19
19
  this.contentTypesPath = path.resolve(exportConfig.data, exportConfig.branchName || '', this.contentTypesConfig.dirName);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.10.3",
2
+ "version": "1.10.5",
3
3
  "commands": {
4
4
  "cm:stacks:export": {
5
5
  "id": "cm:stacks:export",
@@ -85,20 +85,14 @@
85
85
  "type": "option",
86
86
  "char": "m",
87
87
  "description": "[optional] specific module name",
88
- "multiple": false,
89
- "exclusive": [
90
- "content-types"
91
- ]
88
+ "multiple": false
92
89
  },
93
90
  "content-types": {
94
91
  "name": "content-types",
95
92
  "type": "option",
96
93
  "char": "t",
97
94
  "description": "[optional] content type",
98
- "multiple": true,
99
- "exclusive": [
100
- "module"
101
- ]
95
+ "multiple": true
102
96
  },
103
97
  "branch": {
104
98
  "name": "branch",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-export",
3
3
  "description": "Contentstack CLI plugin to export content from stack",
4
- "version": "1.10.3",
4
+ "version": "1.10.5",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
8
  "@contentstack/cli-command": "~1.2.16",
9
- "@contentstack/cli-utilities": "~1.5.9",
9
+ "@contentstack/cli-utilities": "~1.5.11",
10
10
  "@oclif/core": "^2.9.3",
11
11
  "async": "^3.2.4",
12
12
  "big-json": "^3.2.0",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@contentstack/cli-auth": "~1.3.17",
28
- "@contentstack/cli-config": "~1.4.15",
28
+ "@contentstack/cli-config": "~1.6.1",
29
29
  "@contentstack/cli-dev-dependencies": "~1.2.4",
30
30
  "@oclif/plugin-help": "^5.1.19",
31
31
  "@oclif/test": "^2.5.6",