Skip to content

Commit 18b938c

Browse files
committed
Removed deprecated code from export plugin
1 parent 8edf021 commit 18b938c

File tree

10 files changed

+3969
-5618
lines changed

10 files changed

+3969
-5618
lines changed

.talismanrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
fileignoreconfig:
22
- filename: package-lock.json
3-
checksum: 648c8b938cf0536e479231c214b493b30dab92da4f2497a96c43fa4f65f5b5aa
3+
checksum: 7ab88b768020473414a7322e16c04b5b5a73b0122742b79b57f6e48bf39ae511
44
- filename: pnpm-lock.yaml
5-
checksum: 96a03383a1814bce7e81bc398630b400d0030a1d8680222000c6c2c1b72ad3d8
5+
checksum: 1f9e4ddfd5db6a7677515bb1af1373d75bc83dbc755a99515808394df5d593d5
6+
- filename: packages/contentstack-export/src/commands/cm/stacks/export.ts
7+
checksum: a6cc98499a304a63f520e713c85ff707ca904044e15f095fa7498a5f602d57c5
8+
- filename: packages/contentstack-export/README.md
9+
checksum: 8b9f38642faa3b8fb5b2a35a6fe79b74862aeb32c318a1346a117fefea1291cd
610
- filename: packages/contentstack/README.md
7-
checksum: de405506f162ba7ea116f04092bd51ae98808161768b7754e3ae893a7f0e79cb
11+
checksum: b746ebdb433947d6117694d33739b56d679d3fe1e18bc0a177f60b6a1f553ac9
812
version: '1.0'

package-lock.json

Lines changed: 1110 additions & 847 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-clone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
1616
$ csdx COMMAND
1717
running command...
1818
$ csdx (--version)
19-
@contentstack/cli-cm-clone/2.0.0-beta.2 darwin-arm64 node-v24.11.1
19+
@contentstack/cli-cm-clone/2.0.0-beta.3 darwin-arm64 node-v24.11.1
2020
$ csdx --help [COMMAND]
2121
USAGE
2222
$ csdx COMMAND

packages/contentstack-clone/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@contentstack/cli-cm-clone",
33
"description": "Contentstack stack clone plugin",
4-
"version": "2.0.0-beta.2",
4+
"version": "2.0.0-beta.3",
55
"author": "Contentstack",
66
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
77
"dependencies": {
88
"@colors/colors": "^1.6.0",
9-
"@contentstack/cli-cm-export": "~2.0.0-beta.2",
9+
"@contentstack/cli-cm-export": "~2.0.0-beta.3",
1010
"@contentstack/cli-cm-import": "~2.0.0-beta.2",
1111
"@contentstack/cli-command": "~1.6.1",
1212
"@contentstack/cli-utilities": "~1.15.0",

packages/contentstack-export/README.md

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
4848
$ csdx COMMAND
4949
running command...
5050
$ csdx (--version)
51-
@contentstack/cli-cm-export/2.0.0-beta.2 darwin-arm64 node-v24.11.1
51+
@contentstack/cli-cm-export/2.0.0-beta.3 darwin-arm64 node-v24.11.1
5252
$ csdx --help [COMMAND]
5353
USAGE
5454
$ csdx COMMAND
@@ -59,93 +59,39 @@ USAGE
5959
# Commands
6060

6161
<!-- commands -->
62-
* [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets)
63-
* [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets)
62+
* [`csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport---config-value---stack-api-key-value---data-dir-value---alias-value---module-value---content-types-value---branch-value---secured-assets)
6463

65-
## `csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
64+
## `csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
6665

6766
Export content from a stack
6867

6968
```
7069
USAGE
71-
$ csdx cm:export cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>]
72-
[--content-types <value>] [--branch <value>] [--secured-assets]
70+
$ csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>]
71+
[--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]
7372
7473
FLAGS
75-
-B, --branch=<value> [optional] The name of the branch where you want to export your content. If you don't
76-
mention the branch name, then by default the content will be exported from all the
77-
branches of your stack.
7874
-a, --alias=<value> The management token alias of the source stack from which you will export content.
7975
-c, --config=<value> [optional] Path of the config
8076
-d, --data-dir=<value> The path or the location in your file system to store the exported content. For e.g.,
8177
./content
8278
-k, --stack-api-key=<value> API Key of the source stack
83-
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
84-
the modules to the stack. The available modules are assets, content-types, entries,
85-
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
86-
workflows, custom-roles, and taxonomies.
87-
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
88-
of multiple content types, specify the IDs separated by spaces.
8979
-y, --yes [optional] Force override all Marketplace prompts.
90-
--branch-alias=<value> (Optional) The alias of the branch from which you want to export content.
91-
--secured-assets [optional] Use this flag for assets that are secured.
92-
93-
DESCRIPTION
94-
Export content from a stack
95-
96-
ALIASES
97-
$ csdx cm:export
98-
99-
EXAMPLES
100-
$ csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
101-
102-
$ csdx cm:stacks:export --config <path/to/config/dir>
103-
104-
$ csdx cm:stacks:export --alias <management_token_alias>
105-
106-
$ csdx cm:stacks:export --alias <management_token_alias> --data-dir <path/to/export/destination/dir>
107-
108-
$ csdx cm:stacks:export --alias <management_token_alias> --config <path/to/config/file>
109-
110-
$ csdx cm:stacks:export --module <single module name>
111-
112-
$ csdx cm:stacks:export --branch [optional] branch name
113-
```
114-
115-
## `csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
116-
117-
Export content from a stack
118-
119-
```
120-
USAGE
121-
$ csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types
122-
<value>] [--branch <value>] [--secured-assets]
123-
124-
FLAGS
125-
-B, --branch=<value> [optional] The name of the branch where you want to export your content. If you don't
80+
--branch=<value> [optional] The name of the branch where you want to export your content. If you don't
12681
mention the branch name, then by default the content will be exported from all the
12782
branches of your stack.
128-
-a, --alias=<value> The management token alias of the source stack from which you will export content.
129-
-c, --config=<value> [optional] Path of the config
130-
-d, --data-dir=<value> The path or the location in your file system to store the exported content. For e.g.,
131-
./content
132-
-k, --stack-api-key=<value> API Key of the source stack
133-
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
83+
--branch-alias=<value> (Optional) The alias of the branch from which you want to export content.
84+
--content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
85+
of multiple content types, specify the IDs separated by spaces.
86+
--module=<value> [optional] Specific module name. If not specified, the export command will export all
13487
the modules to the stack. The available modules are assets, content-types, entries,
13588
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
13689
workflows, custom-roles, and taxonomies.
137-
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
138-
of multiple content types, specify the IDs separated by spaces.
139-
-y, --yes [optional] Force override all Marketplace prompts.
140-
--branch-alias=<value> (Optional) The alias of the branch from which you want to export content.
14190
--secured-assets [optional] Use this flag for assets that are secured.
14291
14392
DESCRIPTION
14493
Export content from a stack
14594
146-
ALIASES
147-
$ csdx cm:export
148-
14995
EXAMPLES
15096
$ csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
15197

packages/contentstack-export/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-export",
33
"description": "Contentstack CLI plugin to export content from stack",
4-
"version": "2.0.0-beta.2",
4+
"version": "2.0.0-beta.3",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
@@ -89,12 +89,8 @@
8989
"repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-export/<%- commandPath %>"
9090
},
9191
"csdxConfig": {
92-
"expiredCommands": {
93-
"cm:export": "csdx cm:stacks:export"
94-
},
9592
"shortCommandName": {
96-
"cm:stacks:export": "EXPRT",
97-
"cm:export": "O-EXPRT"
93+
"cm:stacks:export": "EXPRT"
9894
}
9995
},
10096
"repository": "https://github.com/contentstack/cli"

packages/contentstack-export/src/commands/cm/stacks/export.ts

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Command } from '@contentstack/cli-command';
22
import {
33
cliux,
44
messageHandler,
5-
printFlagDeprecation,
65
managementSDKClient,
76
flags,
87
ContentstackClient,
@@ -35,28 +34,17 @@ export default class ExportCommand extends Command {
3534
];
3635

3736
static usage: string =
38-
'cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]';
37+
'cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]';
3938

4039
static flags: FlagInput = {
4140
config: flags.string({
4241
char: 'c',
4342
description: '[optional] Path of the config',
4443
}),
45-
'stack-uid': flags.string({
46-
char: 's',
47-
description: 'API key of the source stack',
48-
hidden: true,
49-
parse: printFlagDeprecation(['-s', '--stack-uid'], ['-k', '--stack-api-key']),
50-
}),
5144
'stack-api-key': flags.string({
5245
char: 'k',
5346
description: 'API Key of the source stack',
5447
}),
55-
data: flags.string({
56-
description: 'path or location to store the data',
57-
hidden: true,
58-
parse: printFlagDeprecation(['--data'], ['--data-dir']),
59-
}),
6048
'data-dir': flags.string({
6149
char: 'd',
6250
description: 'The path or the location in your file system to store the exported content. For e.g., ./content',
@@ -65,36 +53,19 @@ export default class ExportCommand extends Command {
6553
char: 'a',
6654
description: 'The management token alias of the source stack from which you will export content.',
6755
}),
68-
'management-token-alias': flags.string({
69-
description: 'alias of the management token',
70-
hidden: true,
71-
parse: printFlagDeprecation(['--management-token-alias'], ['-a', '--alias']),
72-
}),
73-
'auth-token': flags.boolean({
74-
char: 'A',
75-
description: 'to use auth token',
76-
hidden: true,
77-
parse: printFlagDeprecation(['-A', '--auth-token']),
78-
}),
7956
module: flags.string({
80-
char: 'm',
8157
description:
8258
'[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, and taxonomies.',
83-
parse: printFlagDeprecation(['-m'], ['--module']),
8459
}),
8560
'content-types': flags.string({
86-
char: 't',
8761
description:
8862
'[optional] The UID of the content type(s) whose content you want to export. In case of multiple content types, specify the IDs separated by spaces.',
8963
multiple: true,
90-
parse: printFlagDeprecation(['-t'], ['--content-types']),
9164
}),
9265
branch: flags.string({
93-
char: 'B',
9466
// default: 'main',
9567
description:
9668
"[optional] The name of the branch where you want to export your content. If you don't mention the branch name, then by default the content will be exported from all the branches of your stack.",
97-
parse: printFlagDeprecation(['-B'], ['--branch']),
9869
exclusive: ['branch-alias'],
9970
}),
10071
'branch-alias': flags.string({
@@ -115,8 +86,6 @@ export default class ExportCommand extends Command {
11586
}),
11687
};
11788

118-
static aliases: string[] = ['cm:export'];
119-
12089
async run(): Promise<void> {
12190
let exportDir: string = pathValidator('logs');
12291
try {
@@ -125,7 +94,6 @@ export default class ExportCommand extends Command {
12594
// Prepare the context object
12695
const context = this.createExportContext(exportConfig.apiKey, exportConfig.authenticationMethod);
12796
exportConfig.context = { ...context };
128-
//log.info(`Using Cli Version: ${this.context?.cliVersion}`, exportConfig.context);
12997

13098
// Assign exportConfig variables
13199
this.assignExportConfig(exportConfig);

0 commit comments

Comments
 (0)