@contentstack/cli-cm-export-to-csv 1.12.4 → 1.12.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/README.md +100 -10
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,40 +1,130 @@
|
|
|
1
|
-
@contentstack/cli-cm-export-to-csv
|
|
2
|
-
=============
|
|
1
|
+
# @contentstack/cli-cm-export-to-csv
|
|
3
2
|
|
|
4
3
|
The cm:export-to-csv command allows you to export the following data into a CSV file:
|
|
5
|
-
* Multiple
|
|
6
|
-
* [Organization users
|
|
4
|
+
* Multiple stacks' content and structure (schema)
|
|
5
|
+
* [Organization users' details](https://www.contentstack.com/docs/owners-and-admins/organization-users/)
|
|
7
6
|
|
|
8
|
-
To be able to export the content of a stack, you need to have access to it. Likewise, to export an organization
|
|
7
|
+
To be able to export the content of a stack, you need to have access to it. Likewise, to export an organization's user data, you need to be the "[owner](https://www.contentstack.com/docs/owners-and-admins/organization-roles/#organization-owner)" or an "[admin](https://www.contentstack.com/docs/owners-and-admins/organization-roles/#organization-admin)" user of that organization.
|
|
9
8
|
|
|
10
9
|
Refer to the [Export Content to .CSV](https://www.contentstack.com/docs/developers/cli/export-content-to-csv-file/) file guide to learn more.
|
|
11
10
|
|
|
12
11
|
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
13
12
|
|
|
13
|
+
<!-- toc -->
|
|
14
|
+
* [@contentstack/cli-cm-export-to-csv](#contentstackcli-cm-export-to-csv)
|
|
14
15
|
* [Usage](#usage)
|
|
15
16
|
* [Commands](#commands)
|
|
17
|
+
<!-- tocstop -->
|
|
18
|
+
|
|
16
19
|
# Usage
|
|
20
|
+
<!-- usage -->
|
|
17
21
|
```sh-session
|
|
18
22
|
$ npm install -g @contentstack/cli-cm-export-to-csv
|
|
19
23
|
$ csdx COMMAND
|
|
20
24
|
running command...
|
|
21
|
-
$ csdx (
|
|
22
|
-
@contentstack/cli-cm-export-to-csv/
|
|
25
|
+
$ csdx (--version)
|
|
26
|
+
@contentstack/cli-cm-export-to-csv/1.12.5 linux-x64 node-v22.23.0
|
|
23
27
|
$ csdx --help [COMMAND]
|
|
24
28
|
USAGE
|
|
25
29
|
$ csdx COMMAND
|
|
26
30
|
...
|
|
27
31
|
```
|
|
32
|
+
<!-- usagestop -->
|
|
33
|
+
|
|
28
34
|
# Commands
|
|
35
|
+
<!-- commands -->
|
|
29
36
|
* [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
## `csdx cm:export-to-csv`
|
|
32
39
|
|
|
33
|
-
Export entries or organization users to csv using this command
|
|
40
|
+
Export entries, taxonomies, terms or organization users to csv using this command
|
|
34
41
|
|
|
35
42
|
```
|
|
36
43
|
USAGE
|
|
44
|
+
$ csdx cm:export-to-csv [--action entries|users|teams|taxonomies] [-a <value>] [--org <value>] [-n <value>] [-k
|
|
45
|
+
<value>] [--org-name <value>] [--locale <value>] [--content-type <value>] [--branch <value>] [--team-uid <value>]
|
|
46
|
+
[--taxonomy-uid <value>] [--include-fallback] [--fallback-locale <value>] [--delimiter <value>]
|
|
47
|
+
|
|
48
|
+
FLAGS
|
|
49
|
+
-a, --alias=<value> Alias of the management token.
|
|
50
|
+
-k, --stack-api-key=<value> API Key of the source stack.
|
|
51
|
+
-n, --stack-name=<value> Name of the stack that needs to be created as CSV filename.
|
|
52
|
+
--action=<option> Option to export data (entries, users, teams, taxonomies). <options:
|
|
53
|
+
entries|users|teams|taxonomies>
|
|
54
|
+
<options: entries|users|teams|taxonomies>
|
|
55
|
+
--branch=<value> Branch from which entries will be exported.
|
|
56
|
+
--content-type=<value> Content type of entries that will be exported.
|
|
57
|
+
--delimiter=<value> [default: ,] [optional] Provide a delimiter to separate individual data fields within
|
|
58
|
+
the CSV file. For example: cm:export-to-csv --delimiter '|'
|
|
59
|
+
--fallback-locale=<value> [Optional] Specify a specific fallback locale for taxonomy export. This locale will be
|
|
60
|
+
used when a taxonomy term doesn't exist in the primary locale. Takes priority over
|
|
61
|
+
branch fallback hierarchy when both are specified.
|
|
62
|
+
--include-fallback [Optional] Include fallback locale data when exporting taxonomies. When enabled, if a
|
|
63
|
+
taxonomy term doesn't exist in the specified locale, it will fallback to the hierarchy
|
|
64
|
+
defined in the branch settings.
|
|
65
|
+
--locale=<value> Locale of entries that will be exported.
|
|
66
|
+
--org=<value> Provide organization UID to clone org users.
|
|
67
|
+
--org-name=<value> Name of the organization that needs to be created as CSV filename.
|
|
68
|
+
--taxonomy-uid=<value> Provide the taxonomy UID of the related terms you want to export.
|
|
69
|
+
--team-uid=<value> Provide the UID of a specific team in an organization.
|
|
70
|
+
|
|
71
|
+
DESCRIPTION
|
|
72
|
+
Export entries, taxonomies, terms or organization users to csv using this command
|
|
73
|
+
|
|
74
|
+
ALIASES
|
|
37
75
|
$ csdx cm:export-to-csv
|
|
76
|
+
|
|
77
|
+
EXAMPLES
|
|
78
|
+
$ csdx cm:export-to-csv
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
Exporting entries to CSV
|
|
83
|
+
|
|
84
|
+
$ csdx cm:export-to-csv --action entries --locale <locale> --alias <management-token-alias> --content-type <content-type>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
Exporting entries to CSV with stack name and branch
|
|
89
|
+
|
|
90
|
+
$ csdx cm:export-to-csv --action entries --locale <locale> --alias <management-token-alias> --content-type <content-type> --stack-name <stack-name> --branch <branch-name>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Exporting organization users to CSV
|
|
95
|
+
|
|
96
|
+
$ csdx cm:export-to-csv --action users --org <org-uid>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
Exporting organization teams to CSV
|
|
101
|
+
|
|
102
|
+
$ csdx cm:export-to-csv --action teams --org <org-uid>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
Exporting teams with specific team UID
|
|
107
|
+
|
|
108
|
+
$ csdx cm:export-to-csv --action teams --org <org-uid> --team-uid <team-uid>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Exporting taxonomies to CSV
|
|
113
|
+
|
|
114
|
+
$ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
Exporting specific taxonomy with locale
|
|
119
|
+
|
|
120
|
+
$ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias> --taxonomy-uid <taxonomy-uid> --locale <locale>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
Exporting taxonomies with fallback locale
|
|
125
|
+
|
|
126
|
+
$ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias> --locale <locale> --include-fallback --fallback-locale <fallback-locale>
|
|
38
127
|
```
|
|
39
128
|
|
|
40
|
-
_See code: [src/commands/cm/export-to-csv.
|
|
129
|
+
_See code: [src/commands/cm/export-to-csv.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-export-to-csv/src/commands/cm/export-to-csv.ts)_
|
|
130
|
+
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-export-to-csv",
|
|
3
3
|
"description": "Export entries, taxonomies, terms, or organization users to CSV",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.5",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "~1.8.
|
|
9
|
-
"@contentstack/cli-utilities": "~1.18.
|
|
8
|
+
"@contentstack/cli-command": "~1.8.4",
|
|
9
|
+
"@contentstack/cli-utilities": "~1.18.5",
|
|
10
10
|
"@oclif/core": "^4.11.4",
|
|
11
11
|
"fast-csv": "^4.3.6",
|
|
12
12
|
"inquirer": "8.2.7",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/mocha": "^10.0.10",
|
|
20
20
|
"@types/node": "^20.17.50",
|
|
21
21
|
"chai": "^4.5.0",
|
|
22
|
-
"eslint": "^
|
|
22
|
+
"eslint": "^10.5.0",
|
|
23
23
|
"eslint-config-oclif": "^6.0.62",
|
|
24
24
|
"eslint-config-oclif-typescript": "^3.1.14",
|
|
25
25
|
"mocha": "^10.8.2",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"typescript": "^5.8.3"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
33
|
+
"node": ">=22.0.0"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"/bin",
|