@contentstack/cli-cm-seed 1.1.0 → 1.1.1

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 CHANGED
@@ -40,7 +40,7 @@ EXAMPLES
40
40
  in given org uid
41
41
  ```
42
42
 
43
- _See code: [src/commands/cm/stacks/seed.ts](https://github.com/contentstack/cli/blob/v1.1.0/src/commands/cm/stacks/seed.ts)_
43
+ _See code: [src/commands/cm/stacks/seed.ts](https://github.com/contentstack/cli/blob/v1.1.1/src/commands/cm/stacks/seed.ts)_
44
44
  <!-- commandsstop -->
45
45
 
46
46
  ## Advanced Flags
@@ -25,7 +25,8 @@ class SeedCommand extends cli_command_1.Command {
25
25
  skipStackConfirmation: seedFlags['yes'],
26
26
  };
27
27
  const seeder = new seed_1.default(options);
28
- return await seeder.run();
28
+ const result = await seeder.run();
29
+ return result;
29
30
  }
30
31
  catch (error) {
31
32
  let errorObj = error;
package/lib/seed/index.js CHANGED
@@ -91,6 +91,7 @@ class ContentModelSeeder {
91
91
  }
92
92
  async createStack(organization, stackName) {
93
93
  cli_utilities_1.cliux.loader(`Creating Stack '${stackName}' within Organization '${organization.name}'`);
94
+ this.options.fetchLimit;
94
95
  const newStack = await this.csClient.createStack({
95
96
  name: stackName,
96
97
  description: '',
@@ -11,14 +11,15 @@ async function inquireRepo(repos) {
11
11
  const choices = repos.map((r) => {
12
12
  return { name: formatStackName(r.name), value: extractRepoName(r.html_url) };
13
13
  });
14
- return inquirer.prompt([
14
+ const response = await inquirer.prompt([
15
15
  {
16
16
  type: 'list',
17
17
  name: 'choice',
18
18
  message: 'Select a Stack to Import',
19
- choices
20
- }
19
+ choices,
20
+ },
21
21
  ]);
22
+ return response;
22
23
  }
23
24
  exports.inquireRepo = inquireRepo;
24
25
  async function inquireOrganization(organizations) {
@@ -1 +1 @@
1
- {"version":"1.1.0","commands":{"cm:stacks:seed":{"id":"cm:stacks:seed","description":"Create a stack from existing content types, entries, assets, etc","usage":"cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]","pluginName":"@contentstack/cli-cm-seed","pluginType":"core","aliases":["cm:seed"],"examples":["$ csdx cm:stacks:seed","$ csdx cm:stacks:seed --repo \"account\"","$ csdx cm:stacks:seed --repo \"account/repository\"","$ csdx cm:stacks:seed --repo \"account/repository\" --stack-api-key \"stack-api-key\" //seed content into specific stack","$ csdx cm:stacks:seed --repo \"account/repository\" --org \"your-org-uid\" --stack-name \"stack-name\" //create a new stack in given org uid"],"flags":{"repo":{"name":"repo","type":"option","char":"r","description":"GitHub account or GitHub account/repository","required":false},"org":{"name":"org","type":"option","char":"o","description":"Provide Organization UID to create a new stack","required":false},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"Provide stack api key to seed content to","required":false},"stack-name":{"name":"stack-name","type":"option","char":"n","description":"Name of a new stack that needs to be created.","required":false},"fetch-limit":{"name":"fetch-limit","type":"option","char":"l","description":"Limit for number of Organizations or stacks to be fetched","hidden":true,"required":false},"yes":{"name":"yes","type":"option","char":"y","required":false},"stack":{"name":"stack","type":"option","char":"s","description":"Provide stack UID to seed content to","required":false}},"args":[]}}}
1
+ {"version":"1.1.1","commands":{"cm:stacks:seed":{"id":"cm:stacks:seed","description":"Create a stack from existing content types, entries, assets, etc","usage":"cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]","pluginName":"@contentstack/cli-cm-seed","pluginType":"core","aliases":["cm:seed"],"examples":["$ csdx cm:stacks:seed","$ csdx cm:stacks:seed --repo \"account\"","$ csdx cm:stacks:seed --repo \"account/repository\"","$ csdx cm:stacks:seed --repo \"account/repository\" --stack-api-key \"stack-api-key\" //seed content into specific stack","$ csdx cm:stacks:seed --repo \"account/repository\" --org \"your-org-uid\" --stack-name \"stack-name\" //create a new stack in given org uid"],"flags":{"repo":{"name":"repo","type":"option","char":"r","description":"GitHub account or GitHub account/repository","required":false},"org":{"name":"org","type":"option","char":"o","description":"Provide Organization UID to create a new stack","required":false},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"Provide stack api key to seed content to","required":false},"stack-name":{"name":"stack-name","type":"option","char":"n","description":"Name of a new stack that needs to be created.","required":false},"fetch-limit":{"name":"fetch-limit","type":"option","char":"l","description":"Limit for number of Organizations or stacks to be fetched","hidden":true,"required":false},"yes":{"name":"yes","type":"option","char":"y","required":false},"stack":{"name":"stack","type":"option","char":"s","description":"Provide stack UID to seed content to","required":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-seed",
3
3
  "description": "create a Stack from existing content types, entries, assets, etc.",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-cm-import": "^1.0.0",
9
- "@contentstack/cli-command": "^1.0.0",
10
- "@contentstack/cli-utilities": "^1.0.0",
8
+ "@contentstack/cli-cm-import": "^1.1.0",
9
+ "@contentstack/cli-command": "^1.0.1",
10
+ "@contentstack/cli-utilities": "^1.0.2",
11
11
  "@oclif/command": "^1.8.16",
12
12
  "@oclif/config": "^1.18.3",
13
13
  "axios": "^0.21.1",