@contentstack/cli-cm-seed 2.0.0-beta.2 → 2.0.0-beta.4

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
@@ -10,69 +10,28 @@ To import content to your stack, you can choose from the following two sources:
10
10
  <!-- usagestop -->
11
11
  ## Commands
12
12
  <!-- commands -->
13
- * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value)
14
- * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value)
13
+ * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value---stack-api-key-value---stack-name-value---yes-value---alias-value---locale-value)
15
14
 
16
- ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`
15
+ ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`
17
16
 
18
17
  Create a stack from existing content types, entries, assets, etc
19
18
 
20
19
  ```
21
20
  USAGE
22
- $ csdx cm:seed cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s
23
- <value>] [--locale <value>]
21
+ $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes
22
+ <value>] [--alias <value>] [--locale <value>]
24
23
 
25
24
  FLAGS
26
25
  -a, --alias=<value> Alias of the management token
27
26
  -k, --stack-api-key=<value> Provide stack API key to seed content to
28
27
  -n, --stack-name=<value> Name of a new stack that needs to be created.
29
- -o, --org=<value> Provide Organization UID to create a new stack
30
- -r, --repo=<value> GitHub organization name or GitHub user name/repository name.
31
- -s, --stack=<value> Provide the stack UID to seed content.
32
28
  -y, --yes=<value> [Optional] Skip the stack confirmation.
29
+ --org=<value> Provide Organization UID to create a new stack
30
+ --repo=<value> GitHub organization name or GitHub user name/repository name.
33
31
 
34
32
  DESCRIPTION
35
33
  Create a stack from existing content types, entries, assets, etc
36
34
 
37
- ALIASES
38
- $ csdx cm:seed
39
-
40
- EXAMPLES
41
- $ csdx cm:stacks:seed
42
-
43
- $ csdx cm:stacks:seed --repo "account"
44
-
45
- $ csdx cm:stacks:seed --repo "account/repository"
46
-
47
- $ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack
48
-
49
- $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid
50
- ```
51
-
52
- ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`
53
-
54
- Create a stack from existing content types, entries, assets, etc
55
-
56
- ```
57
- USAGE
58
- $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]
59
- [--locale <value>]
60
-
61
- FLAGS
62
- -a, --alias=<value> Alias of the management token
63
- -k, --stack-api-key=<value> Provide stack API key to seed content to
64
- -n, --stack-name=<value> Name of a new stack that needs to be created.
65
- -o, --org=<value> Provide Organization UID to create a new stack
66
- -r, --repo=<value> GitHub organization name or GitHub user name/repository name.
67
- -s, --stack=<value> Provide the stack UID to seed content.
68
- -y, --yes=<value> [Optional] Skip the stack confirmation.
69
-
70
- DESCRIPTION
71
- Create a stack from existing content types, entries, assets, etc
72
-
73
- ALIASES
74
- $ csdx cm:seed
75
-
76
35
  EXAMPLES
77
36
  $ csdx cm:stacks:seed
78
37
 
@@ -5,7 +5,6 @@ export default class SeedCommand extends Command {
5
5
  static examples: string[];
6
6
  static usage: string;
7
7
  static flags: FlagInput;
8
- static aliases: string[];
9
8
  run(): Promise<{
10
9
  api_key: string;
11
10
  } | undefined>;
@@ -20,7 +20,7 @@ class SeedCommand extends cli_command_1.Command {
20
20
  cmaHost: this.cmaHost,
21
21
  gitHubPath: seedFlags.repo,
22
22
  orgUid: seedFlags.org,
23
- stackUid: seedFlags['stack-api-key'] || seedFlags.stack,
23
+ stackUid: seedFlags['stack-api-key'],
24
24
  stackName: seedFlags['stack-name'],
25
25
  fetchLimit: seedFlags['fetch-limit'],
26
26
  skipStackConfirmation: seedFlags['yes'],
@@ -57,36 +57,32 @@ SeedCommand.examples = [
57
57
  '$ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack',
58
58
  '$ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid',
59
59
  ];
60
- SeedCommand.usage = 'cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]';
60
+ SeedCommand.usage = 'cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]';
61
61
  SeedCommand.flags = {
62
62
  repo: cli_utilities_1.flags.string({
63
- char: 'r',
64
63
  description: 'GitHub organization name or GitHub user name/repository name.',
65
64
  multiple: false,
66
65
  required: false,
67
- parse: (0, cli_utilities_1.printFlagDeprecation)(['-r'], ['--repo']),
68
66
  }),
69
67
  org: cli_utilities_1.flags.string({
70
- char: 'o',
71
68
  description: 'Provide Organization UID to create a new stack',
72
69
  multiple: false,
73
70
  required: false,
74
- exclusive: ['stack'],
75
- parse: (0, cli_utilities_1.printFlagDeprecation)(['-o'], ['--org']),
71
+ exclusive: ['stack-api-key'],
76
72
  }),
77
73
  'stack-api-key': cli_utilities_1.flags.string({
78
74
  char: 'k',
79
75
  description: 'Provide stack API key to seed content to',
80
76
  multiple: false,
81
77
  required: false,
82
- exclusive: ['org'],
78
+ exclusive: ['org', 'stack-name'],
83
79
  }),
84
80
  'stack-name': cli_utilities_1.flags.string({
85
81
  char: 'n',
86
82
  description: 'Name of a new stack that needs to be created.',
87
83
  multiple: false,
88
84
  required: false,
89
- exclusive: ['stack'],
85
+ exclusive: ['stack-api-key'],
90
86
  }),
91
87
  'fetch-limit': cli_utilities_1.flags.string({
92
88
  char: 'l',
@@ -100,15 +96,6 @@ SeedCommand.flags = {
100
96
  required: false,
101
97
  description: '[Optional] Skip the stack confirmation.',
102
98
  }),
103
- //To be deprecated
104
- stack: cli_utilities_1.flags.string({
105
- char: 's',
106
- description: 'Provide the stack UID to seed content.',
107
- multiple: false,
108
- required: false,
109
- exclusive: ['org', 'name'],
110
- parse: (0, cli_utilities_1.printFlagDeprecation)(['s', 'stack'], ['-k', 'stack-api-key']),
111
- }),
112
99
  alias: cli_utilities_1.flags.string({
113
100
  char: 'a',
114
101
  description: 'Alias of the management token',
@@ -118,4 +105,3 @@ SeedCommand.flags = {
118
105
  hidden: true,
119
106
  }),
120
107
  };
121
- SeedCommand.aliases = ['cm:seed'];
@@ -95,7 +95,7 @@ class GitHubClient {
95
95
  return response.statusCode === 200;
96
96
  }
97
97
  catch (error) {
98
- console.log(error);
98
+ console.log('Error', error);
99
99
  // do nothing
100
100
  }
101
101
  return false;
@@ -1,9 +1,7 @@
1
1
  {
2
2
  "commands": {
3
3
  "cm:stacks:seed": {
4
- "aliases": [
5
- "cm:seed"
6
- ],
4
+ "aliases": [],
7
5
  "args": {},
8
6
  "description": "Create a stack from existing content types, entries, assets, etc",
9
7
  "examples": [
@@ -15,7 +13,6 @@
15
13
  ],
16
14
  "flags": {
17
15
  "repo": {
18
- "char": "r",
19
16
  "description": "GitHub organization name or GitHub user name/repository name.",
20
17
  "name": "repo",
21
18
  "required": false,
@@ -24,10 +21,9 @@
24
21
  "type": "option"
25
22
  },
26
23
  "org": {
27
- "char": "o",
28
24
  "description": "Provide Organization UID to create a new stack",
29
25
  "exclusive": [
30
- "stack"
26
+ "stack-api-key"
31
27
  ],
32
28
  "name": "org",
33
29
  "required": false,
@@ -39,7 +35,8 @@
39
35
  "char": "k",
40
36
  "description": "Provide stack API key to seed content to",
41
37
  "exclusive": [
42
- "org"
38
+ "org",
39
+ "stack-name"
43
40
  ],
44
41
  "name": "stack-api-key",
45
42
  "required": false,
@@ -51,7 +48,7 @@
51
48
  "char": "n",
52
49
  "description": "Name of a new stack that needs to be created.",
53
50
  "exclusive": [
54
- "stack"
51
+ "stack-api-key"
55
52
  ],
56
53
  "name": "stack-name",
57
54
  "required": false,
@@ -78,19 +75,6 @@
78
75
  "multiple": false,
79
76
  "type": "option"
80
77
  },
81
- "stack": {
82
- "char": "s",
83
- "description": "Provide the stack UID to seed content.",
84
- "exclusive": [
85
- "org",
86
- "name"
87
- ],
88
- "name": "stack",
89
- "required": false,
90
- "hasDynamicHelp": false,
91
- "multiple": false,
92
- "type": "option"
93
- },
94
78
  "alias": {
95
79
  "char": "a",
96
80
  "description": "Alias of the management token",
@@ -115,7 +99,7 @@
115
99
  "pluginName": "@contentstack/cli-cm-seed",
116
100
  "pluginType": "core",
117
101
  "strict": true,
118
- "usage": "cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]",
102
+ "usage": "cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]",
119
103
  "isESM": false,
120
104
  "relativePath": [
121
105
  "lib",
@@ -126,5 +110,5 @@
126
110
  ]
127
111
  }
128
112
  },
129
- "version": "2.0.0-beta.2"
113
+ "version": "2.0.0-beta.4"
130
114
  }
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-seed",
3
3
  "description": "create a Stack from existing content types, entries, assets, etc.",
4
- "version": "2.0.0-beta.2",
4
+ "version": "2.0.0-beta.4",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-cm-import": "~2.0.0-beta.2",
9
- "@contentstack/cli-command": "~1.6.1",
10
- "@contentstack/cli-utilities": "~1.15.0",
11
- "@contentstack/management": "~1.22.0",
8
+ "@contentstack/cli-cm-import": "~2.0.0-beta.4",
9
+ "@contentstack/cli-command": "~1.7.2",
10
+ "@contentstack/cli-utilities": "~1.17.0",
11
+ "@contentstack/management": "~1.27.3",
12
12
  "inquirer": "8.2.7",
13
13
  "mkdirp": "^1.0.4",
14
- "tar": "^6.2.1",
14
+ "tar": "^7.5.4",
15
15
  "tmp": "^0.2.3"
16
16
  },
17
17
  "devDependencies": {
@@ -53,12 +53,8 @@
53
53
  "repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-seed/<%- commandPath %>"
54
54
  },
55
55
  "csdxConfig": {
56
- "expiredCommands": {
57
- "cm:seed": "csdx cm:stacks:seed"
58
- },
59
56
  "shortCommandName": {
60
- "cm:stacks:seed": "SEED",
61
- "cm:seed": "O-SEED"
57
+ "cm:stacks:seed": "SEED"
62
58
  }
63
59
  },
64
60
  "repository": "contentstack/cli",
@@ -66,9 +62,8 @@
66
62
  "test": "jest",
67
63
  "pack": "npm pack --dry-run",
68
64
  "postpack": "rm -f oclif.manifest.json",
69
- "posttest": "eslint . --ext .ts --config .eslintrc",
70
65
  "prepack": "rm -rf lib && tsc -b && oclif manifest && oclif readme",
71
66
  "version": "oclif readme && git add README.md",
72
67
  "clean": "rm -rf ./node_modules tsconfig.build.tsbuildinfo"
73
68
  }
74
- }
69
+ }