@teambit/generator 0.0.751 → 0.0.754

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.
@@ -12,7 +12,6 @@ export declare class CreateCmd implements Command {
12
12
  private docsDomain;
13
13
  name: string;
14
14
  description: string;
15
- shortDescription: string;
16
15
  alias: string;
17
16
  loader: boolean;
18
17
  group: string;
@@ -37,7 +37,6 @@ class CreateCmd {
37
37
  this.docsDomain = docsDomain;
38
38
  (0, _defineProperty2().default)(this, "name", 'create <templateName> <componentNames...>');
39
39
  (0, _defineProperty2().default)(this, "description", 'create a new component from a template');
40
- (0, _defineProperty2().default)(this, "shortDescription", '');
41
40
  (0, _defineProperty2().default)(this, "alias", '');
42
41
  (0, _defineProperty2().default)(this, "loader", true);
43
42
  (0, _defineProperty2().default)(this, "group", 'development');
@@ -1 +1 @@
1
- {"version":3,"names":["CreateCmd","constructor","generator","docsDomain","report","templateName","componentNames","options","results","generateComponentTemplate","title","length","componentsData","map","result","chalk","bold","id","toString","dir","envId","envSetBy","join","footer","green"],"sources":["create.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type CreateOptions = {\n namespace?: string;\n aspect?: string;\n scope?: string;\n path?: string;\n env?: string;\n};\n\nexport class CreateCmd implements Command {\n name = 'create <templateName> <componentNames...>';\n description = 'create a new component from a template';\n shortDescription = '';\n alias = '';\n loader = true;\n group = 'development';\n options = [\n ['n', 'namespace <string>', `sets the component's namespace and nested dirs inside the scope`],\n ['s', 'scope <string>', `sets the component's scope-name. if not entered, the default-scope will be used`],\n ['a', 'aspect <string>', 'aspect-id of the template. helpful when multiple aspects use the same template name'],\n ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'],\n ['e', 'env <string>', \"set the component's environment. (overrides the env from variants and the template)\"],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain, private docsDomain: string) {}\n\n async report([templateName, componentNames]: [string, string[]], options: CreateOptions) {\n const results = await this.generator.generateComponentTemplate(componentNames, templateName, options);\n const title = `${results.length} component(s) were created`;\n\n const componentsData = results\n .map((result) => {\n return `${chalk.bold(result.id.toString())}\n location: ${result.dir}\n env: ${result.envId} (set by ${result.envSetBy})\n`;\n })\n .join('\\n');\n const footer = `env configuration is according to workspace variants, template config or --env flag. learn more at https://${this.docsDomain}/envs/using-envs`;\n\n return `${chalk.green(title)}\\n\\n${componentsData}\\n\\n${footer}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAWO,MAAMA,SAAN,CAAmC;EAexCC,WAAW,CAASC,SAAT,EAA2CC,UAA3C,EAA+D;IAAA,KAAtDD,SAAsD,GAAtDA,SAAsD;IAAA,KAApBC,UAAoB,GAApBA,UAAoB;IAAA,8CAdnE,2CAcmE;IAAA,qDAb5D,wCAa4D;IAAA,0DAZvD,EAYuD;IAAA,+CAXlE,EAWkE;IAAA,gDAVjE,IAUiE;IAAA,+CATlE,aASkE;IAAA,iDARhE,CACR,CAAC,GAAD,EAAM,oBAAN,EAA6B,iEAA7B,CADQ,EAER,CAAC,GAAD,EAAM,gBAAN,EAAyB,iFAAzB,CAFQ,EAGR,CAAC,GAAD,EAAM,iBAAN,EAAyB,qFAAzB,CAHQ,EAIR,CAAC,GAAD,EAAM,eAAN,EAAuB,qFAAvB,CAJQ,EAKR,CAAC,GAAD,EAAM,cAAN,EAAsB,qFAAtB,CALQ,CAQgE;EAAE;;EAEhE,MAANC,MAAM,CAAC,CAACC,YAAD,EAAeC,cAAf,CAAD,EAAqDC,OAArD,EAA6E;IACvF,MAAMC,OAAO,GAAG,MAAM,KAAKN,SAAL,CAAeO,yBAAf,CAAyCH,cAAzC,EAAyDD,YAAzD,EAAuEE,OAAvE,CAAtB;IACA,MAAMG,KAAK,GAAI,GAAEF,OAAO,CAACG,MAAO,4BAAhC;IAEA,MAAMC,cAAc,GAAGJ,OAAO,CAC3BK,GADoB,CACfC,MAAD,IAAY;MACf,OAAQ,GAAEC,gBAAA,CAAMC,IAAN,CAAWF,MAAM,CAACG,EAAP,CAAUC,QAAV,EAAX,CAAiC;AACnD,gBAAgBJ,MAAM,CAACK,GAAI;AAC3B,gBAAgBL,MAAM,CAACM,KAAM,YAAWN,MAAM,CAACO,QAAS;AACxD,CAHQ;IAID,CANoB,EAOpBC,IAPoB,CAOf,IAPe,CAAvB;IAQA,MAAMC,MAAM,GAAI,8GAA6G,KAAKpB,UAAW,kBAA7I;IAEA,OAAQ,GAAEY,gBAAA,CAAMS,KAAN,CAAYd,KAAZ,CAAmB,OAAME,cAAe,OAAMW,MAAO,EAA/D;EACD;;AAhCuC"}
1
+ {"version":3,"names":["CreateCmd","constructor","generator","docsDomain","report","templateName","componentNames","options","results","generateComponentTemplate","title","length","componentsData","map","result","chalk","bold","id","toString","dir","envId","envSetBy","join","footer","green"],"sources":["create.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type CreateOptions = {\n namespace?: string;\n aspect?: string;\n scope?: string;\n path?: string;\n env?: string;\n};\n\nexport class CreateCmd implements Command {\n name = 'create <templateName> <componentNames...>';\n description = 'create a new component from a template';\n alias = '';\n loader = true;\n group = 'development';\n options = [\n ['n', 'namespace <string>', `sets the component's namespace and nested dirs inside the scope`],\n ['s', 'scope <string>', `sets the component's scope-name. if not entered, the default-scope will be used`],\n ['a', 'aspect <string>', 'aspect-id of the template. helpful when multiple aspects use the same template name'],\n ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'],\n ['e', 'env <string>', \"set the component's environment. (overrides the env from variants and the template)\"],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain, private docsDomain: string) {}\n\n async report([templateName, componentNames]: [string, string[]], options: CreateOptions) {\n const results = await this.generator.generateComponentTemplate(componentNames, templateName, options);\n const title = `${results.length} component(s) were created`;\n\n const componentsData = results\n .map((result) => {\n return `${chalk.bold(result.id.toString())}\n location: ${result.dir}\n env: ${result.envId} (set by ${result.envSetBy})\n`;\n })\n .join('\\n');\n const footer = `env configuration is according to workspace variants, template config or --env flag. learn more at https://${this.docsDomain}/envs/using-envs`;\n\n return `${chalk.green(title)}\\n\\n${componentsData}\\n\\n${footer}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAWO,MAAMA,SAAN,CAAmC;EAcxCC,WAAW,CAASC,SAAT,EAA2CC,UAA3C,EAA+D;IAAA,KAAtDD,SAAsD,GAAtDA,SAAsD;IAAA,KAApBC,UAAoB,GAApBA,UAAoB;IAAA,8CAbnE,2CAamE;IAAA,qDAZ5D,wCAY4D;IAAA,+CAXlE,EAWkE;IAAA,gDAVjE,IAUiE;IAAA,+CATlE,aASkE;IAAA,iDARhE,CACR,CAAC,GAAD,EAAM,oBAAN,EAA6B,iEAA7B,CADQ,EAER,CAAC,GAAD,EAAM,gBAAN,EAAyB,iFAAzB,CAFQ,EAGR,CAAC,GAAD,EAAM,iBAAN,EAAyB,qFAAzB,CAHQ,EAIR,CAAC,GAAD,EAAM,eAAN,EAAuB,qFAAvB,CAJQ,EAKR,CAAC,GAAD,EAAM,cAAN,EAAsB,qFAAtB,CALQ,CAQgE;EAAE;;EAEhE,MAANC,MAAM,CAAC,CAACC,YAAD,EAAeC,cAAf,CAAD,EAAqDC,OAArD,EAA6E;IACvF,MAAMC,OAAO,GAAG,MAAM,KAAKN,SAAL,CAAeO,yBAAf,CAAyCH,cAAzC,EAAyDD,YAAzD,EAAuEE,OAAvE,CAAtB;IACA,MAAMG,KAAK,GAAI,GAAEF,OAAO,CAACG,MAAO,4BAAhC;IAEA,MAAMC,cAAc,GAAGJ,OAAO,CAC3BK,GADoB,CACfC,MAAD,IAAY;MACf,OAAQ,GAAEC,gBAAA,CAAMC,IAAN,CAAWF,MAAM,CAACG,EAAP,CAAUC,QAAV,EAAX,CAAiC;AACnD,gBAAgBJ,MAAM,CAACK,GAAI;AAC3B,gBAAgBL,MAAM,CAACM,KAAM,YAAWN,MAAM,CAACO,QAAS;AACxD,CAHQ;IAID,CANoB,EAOpBC,IAPoB,CAOf,IAPe,CAAvB;IAQA,MAAMC,MAAM,GAAI,8GAA6G,KAAKpB,UAAW,kBAA7I;IAEA,OAAQ,GAAEY,gBAAA,CAAMS,KAAN,CAAYd,KAAZ,CAAmB,OAAME,cAAe,OAAMW,MAAO,EAA/D;EACD;;AA/BuC"}
package/dist/new.cmd.d.ts CHANGED
@@ -11,7 +11,6 @@ export declare class NewCmd implements Command {
11
11
  private generator;
12
12
  name: string;
13
13
  description: string;
14
- shortDescription: string;
15
14
  alias: string;
16
15
  loader: boolean;
17
16
  group: string;
package/dist/new.cmd.js CHANGED
@@ -36,7 +36,6 @@ class NewCmd {
36
36
  this.generator = generator;
37
37
  (0, _defineProperty2().default)(this, "name", 'new <templateName> <workspaceName>');
38
38
  (0, _defineProperty2().default)(this, "description", 'Create a new workspace from a template');
39
- (0, _defineProperty2().default)(this, "shortDescription", '');
40
39
  (0, _defineProperty2().default)(this, "alias", '');
41
40
  (0, _defineProperty2().default)(this, "loader", true);
42
41
  (0, _defineProperty2().default)(this, "group", 'start');
@@ -1 +1 @@
1
- {"version":3,"names":["NewCmd","constructor","generator","report","templateName","workspaceName","options","skipGit","standalone","results","generateWorkspaceTemplate","chalk","white","green","yellow","bold"],"sources":["new.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type NewOptions = {\n aspect?: string;\n defaultScope?: string;\n skipGit?: boolean;\n loadFrom?: string;\n empty?: boolean;\n};\n\nexport class NewCmd implements Command {\n name = 'new <templateName> <workspaceName>';\n description = 'Create a new workspace from a template';\n shortDescription = '';\n alias = '';\n loader = true;\n group = 'start';\n options = [\n [\n 'a',\n 'aspect <string>',\n 'aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision',\n ],\n ['d', 'default-scope <string>', `set defaultScope in the new workspace.jsonc`],\n ['', 'standalone', 'DEPRECATED. use --skip-git instead'],\n ['s', 'skip-git', 'skip generation of Git repository'],\n ['e', 'empty', 'empty workspace with no components (relevant for templates that add components by default)'],\n [\n '',\n 'load-from <string>',\n 'path to the workspace containing the template. helpful during a development of a workspace-template',\n ],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n async report([templateName, workspaceName]: [string, string], options: NewOptions & { standalone: boolean }) {\n options.skipGit = options.skipGit ?? options.standalone;\n const results = await this.generator.generateWorkspaceTemplate(workspaceName, templateName, options);\n return chalk.white(\n `${chalk.green(`\n\nCongrats! A new workspace has been created successfully at '${results}'`)}\n\nInside the directory '${workspaceName}' you can run various commands including:\n\n ${chalk.yellow('bit start')}\n Starts the workspace in development mode\n\n ${chalk.yellow('bit install')}\n Installs any missing dependencies\n\n ${chalk.yellow('bit status')}\n Shows the status of the components\n\n ${chalk.yellow('bit compile')}\n Compiles the components\n\n ${chalk.yellow('bit test')}\n Runs the tests on all your components\n\n ${chalk.yellow('bit templates')}\n Shows all available component templates\n\n ${chalk.yellow('bit help')}\n Shows all available commands\n\n\n${chalk.green.bold(\"Let's get started!\")}\n\n ${chalk.yellow(`cd ${workspaceName}`)}\n ${chalk.yellow(`bit start`)}\n\n `\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAWO,MAAMA,MAAN,CAAgC;EAwBrCC,WAAW,CAASC,SAAT,EAAmC;IAAA,KAA1BA,SAA0B,GAA1BA,SAA0B;IAAA,8CAvBvC,oCAuBuC;IAAA,qDAtBhC,wCAsBgC;IAAA,0DArB3B,EAqB2B;IAAA,+CApBtC,EAoBsC;IAAA,gDAnBrC,IAmBqC;IAAA,+CAlBtC,OAkBsC;IAAA,iDAjBpC,CACR,CACE,GADF,EAEE,iBAFF,EAGE,iHAHF,CADQ,EAMR,CAAC,GAAD,EAAM,wBAAN,EAAiC,6CAAjC,CANQ,EAOR,CAAC,EAAD,EAAK,YAAL,EAAmB,oCAAnB,CAPQ,EAQR,CAAC,GAAD,EAAM,UAAN,EAAkB,mCAAlB,CARQ,EASR,CAAC,GAAD,EAAM,OAAN,EAAe,4FAAf,CATQ,EAUR,CACE,EADF,EAEE,oBAFF,EAGE,qGAHF,CAVQ,CAiBoC;EAAE;;EAEpC,MAANC,MAAM,CAAC,CAACC,YAAD,EAAeC,aAAf,CAAD,EAAkDC,OAAlD,EAAiG;IAAA;;IAC3GA,OAAO,CAACC,OAAR,uBAAkBD,OAAO,CAACC,OAA1B,+DAAqCD,OAAO,CAACE,UAA7C;IACA,MAAMC,OAAO,GAAG,MAAM,KAAKP,SAAL,CAAeQ,yBAAf,CAAyCL,aAAzC,EAAwDD,YAAxD,EAAsEE,OAAtE,CAAtB;IACA,OAAOK,gBAAA,CAAMC,KAAN,CACJ,GAAED,gBAAA,CAAME,KAAN,CAAa;AACtB;AACA,8DAA8DJ,OAAQ,GAF7D,CAEiE;AAC1E;AACA,wBAAwBJ,aAAc;AACtC;AACA,QAAQM,gBAAA,CAAMG,MAAN,CAAa,WAAb,CAA0B;AAClC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,aAAb,CAA4B;AACpC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,YAAb,CAA2B;AACnC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,aAAb,CAA4B;AACpC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,UAAb,CAAyB;AACjC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,eAAb,CAA8B;AACtC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,UAAb,CAAyB;AACjC;AACA;AACA;AACA,EAAEH,gBAAA,CAAME,KAAN,CAAYE,IAAZ,CAAiB,oBAAjB,CAAuC;AACzC;AACA,QAAQJ,gBAAA,CAAMG,MAAN,CAAc,MAAKT,aAAc,EAAjC,CAAoC;AAC5C,QAAQM,gBAAA,CAAMG,MAAN,CAAc,WAAd,CAA0B;AAClC;AACA,OAlCW,CAAP;EAoCD;;AAjEoC"}
1
+ {"version":3,"names":["NewCmd","constructor","generator","report","templateName","workspaceName","options","skipGit","standalone","results","generateWorkspaceTemplate","chalk","white","green","yellow","bold"],"sources":["new.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type NewOptions = {\n aspect?: string;\n defaultScope?: string;\n skipGit?: boolean;\n loadFrom?: string;\n empty?: boolean;\n};\n\nexport class NewCmd implements Command {\n name = 'new <templateName> <workspaceName>';\n description = 'Create a new workspace from a template';\n alias = '';\n loader = true;\n group = 'start';\n options = [\n [\n 'a',\n 'aspect <string>',\n 'aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision',\n ],\n ['d', 'default-scope <string>', `set defaultScope in the new workspace.jsonc`],\n ['', 'standalone', 'DEPRECATED. use --skip-git instead'],\n ['s', 'skip-git', 'skip generation of Git repository'],\n ['e', 'empty', 'empty workspace with no components (relevant for templates that add components by default)'],\n [\n '',\n 'load-from <string>',\n 'path to the workspace containing the template. helpful during a development of a workspace-template',\n ],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n async report([templateName, workspaceName]: [string, string], options: NewOptions & { standalone: boolean }) {\n options.skipGit = options.skipGit ?? options.standalone;\n const results = await this.generator.generateWorkspaceTemplate(workspaceName, templateName, options);\n return chalk.white(\n `${chalk.green(`\n\nCongrats! A new workspace has been created successfully at '${results}'`)}\n\nInside the directory '${workspaceName}' you can run various commands including:\n\n ${chalk.yellow('bit start')}\n Starts the workspace in development mode\n\n ${chalk.yellow('bit install')}\n Installs any missing dependencies\n\n ${chalk.yellow('bit status')}\n Shows the status of the components\n\n ${chalk.yellow('bit compile')}\n Compiles the components\n\n ${chalk.yellow('bit test')}\n Runs the tests on all your components\n\n ${chalk.yellow('bit templates')}\n Shows all available component templates\n\n ${chalk.yellow('bit help')}\n Shows all available commands\n\n\n${chalk.green.bold(\"Let's get started!\")}\n\n ${chalk.yellow(`cd ${workspaceName}`)}\n ${chalk.yellow(`bit start`)}\n\n `\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAWO,MAAMA,MAAN,CAAgC;EAuBrCC,WAAW,CAASC,SAAT,EAAmC;IAAA,KAA1BA,SAA0B,GAA1BA,SAA0B;IAAA,8CAtBvC,oCAsBuC;IAAA,qDArBhC,wCAqBgC;IAAA,+CApBtC,EAoBsC;IAAA,gDAnBrC,IAmBqC;IAAA,+CAlBtC,OAkBsC;IAAA,iDAjBpC,CACR,CACE,GADF,EAEE,iBAFF,EAGE,iHAHF,CADQ,EAMR,CAAC,GAAD,EAAM,wBAAN,EAAiC,6CAAjC,CANQ,EAOR,CAAC,EAAD,EAAK,YAAL,EAAmB,oCAAnB,CAPQ,EAQR,CAAC,GAAD,EAAM,UAAN,EAAkB,mCAAlB,CARQ,EASR,CAAC,GAAD,EAAM,OAAN,EAAe,4FAAf,CATQ,EAUR,CACE,EADF,EAEE,oBAFF,EAGE,qGAHF,CAVQ,CAiBoC;EAAE;;EAEpC,MAANC,MAAM,CAAC,CAACC,YAAD,EAAeC,aAAf,CAAD,EAAkDC,OAAlD,EAAiG;IAAA;;IAC3GA,OAAO,CAACC,OAAR,uBAAkBD,OAAO,CAACC,OAA1B,+DAAqCD,OAAO,CAACE,UAA7C;IACA,MAAMC,OAAO,GAAG,MAAM,KAAKP,SAAL,CAAeQ,yBAAf,CAAyCL,aAAzC,EAAwDD,YAAxD,EAAsEE,OAAtE,CAAtB;IACA,OAAOK,gBAAA,CAAMC,KAAN,CACJ,GAAED,gBAAA,CAAME,KAAN,CAAa;AACtB;AACA,8DAA8DJ,OAAQ,GAF7D,CAEiE;AAC1E;AACA,wBAAwBJ,aAAc;AACtC;AACA,QAAQM,gBAAA,CAAMG,MAAN,CAAa,WAAb,CAA0B;AAClC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,aAAb,CAA4B;AACpC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,YAAb,CAA2B;AACnC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,aAAb,CAA4B;AACpC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,UAAb,CAAyB;AACjC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,eAAb,CAA8B;AACtC;AACA;AACA,QAAQH,gBAAA,CAAMG,MAAN,CAAa,UAAb,CAAyB;AACjC;AACA;AACA;AACA,EAAEH,gBAAA,CAAME,KAAN,CAAYE,IAAZ,CAAiB,oBAAjB,CAAuC;AACzC;AACA,QAAQJ,gBAAA,CAAMG,MAAN,CAAc,MAAKT,aAAc,EAAjC,CAAoC;AAC5C,QAAQM,gBAAA,CAAMG,MAAN,CAAc,WAAd,CAA0B;AAClC;AACA,OAlCW,CAAP;EAoCD;;AAhEoC"}
@@ -7,7 +7,7 @@ export declare class TemplatesCmd implements Command {
7
7
  private generator;
8
8
  name: string;
9
9
  description: string;
10
- shortDescription: string;
10
+ extendedDescription: string;
11
11
  alias: string;
12
12
  loader: boolean;
13
13
  group: string;
@@ -45,8 +45,8 @@ class TemplatesCmd {
45
45
  constructor(generator) {
46
46
  this.generator = generator;
47
47
  (0, _defineProperty2().default)(this, "name", 'templates');
48
- (0, _defineProperty2().default)(this, "description", 'list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)');
49
- (0, _defineProperty2().default)(this, "shortDescription", 'list templates for "bit create" and "bit new"');
48
+ (0, _defineProperty2().default)(this, "description", 'list templates for "bit create" and "bit new"');
49
+ (0, _defineProperty2().default)(this, "extendedDescription", 'list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)');
50
50
  (0, _defineProperty2().default)(this, "alias", '');
51
51
  (0, _defineProperty2().default)(this, "loader", true);
52
52
  (0, _defineProperty2().default)(this, "group", 'development');
@@ -1 +1 @@
1
- {"version":3,"names":["TemplatesCmd","constructor","generator","report","args","templatesOptions","results","listTemplates","showAll","filter","template","hidden","grouped","groupBy","titleStr","isRunningInsideWorkspace","title","chalk","green","templateOutput","desc","description","name","dim","output","Object","keys","map","aspectId","names","join","blue","bold"],"sources":["templates.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { groupBy } from 'lodash';\nimport { GeneratorMain, TemplateDescriptor } from './generator.main.runtime';\n\nexport type TemplatesOptions = {\n showAll?: boolean;\n};\n\nexport class TemplatesCmd implements Command {\n name = 'templates';\n description =\n 'list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)';\n shortDescription = 'list templates for \"bit create\" and \"bit new\"';\n alias = '';\n loader = true;\n group = 'development';\n options = [['s', 'show-all', 'show hidden templates']] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [], templatesOptions: TemplatesOptions) {\n let results = await this.generator.listTemplates();\n\n // Make sure that we don't list hidden templates\n if (!templatesOptions.showAll) {\n results = results.filter((template) => !template.hidden);\n }\n\n const grouped = groupBy(results, 'aspectId');\n const titleStr = this.generator.isRunningInsideWorkspace()\n ? `The following template(s) are available with the command bit create: \\nExample - bit create <template-name> <component-name>`\n : `The following template(s) are available with the command bit new: \\nExample - bit new <template-name> <workspace-name>`;\n const title = chalk.green(`\\n${titleStr}\\n`);\n const templateOutput = (template: TemplateDescriptor) => {\n const desc = template.description ? ` (${template.description})` : '';\n return ` ${template.name}${chalk.dim(desc)}`;\n };\n const output = Object.keys(grouped)\n .map((aspectId) => {\n const names = grouped[aspectId].map(templateOutput).join('\\n');\n return `${chalk.blue.bold(aspectId)}\\n${names}\\n`;\n })\n .join('\\n');\n return title + output;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,MAAMA,YAAN,CAAsC;EAU3CC,WAAW,CAASC,SAAT,EAAmC;IAAA,KAA1BA,SAA0B,GAA1BA,SAA0B;IAAA,8CATvC,WASuC;IAAA,qDAP5C,yHAO4C;IAAA,0DAN3B,+CAM2B;IAAA,+CALtC,EAKsC;IAAA,gDAJrC,IAIqC;IAAA,+CAHtC,aAGsC;IAAA,iDAFpC,CAAC,CAAC,GAAD,EAAM,UAAN,EAAkB,uBAAlB,CAAD,CAEoC;EAAE,CAVL,CAY3C;;;EACY,MAANC,MAAM,CAACC,IAAD,EAAWC,gBAAX,EAA+C;IACzD,IAAIC,OAAO,GAAG,MAAM,KAAKJ,SAAL,CAAeK,aAAf,EAApB,CADyD,CAGzD;;IACA,IAAI,CAACF,gBAAgB,CAACG,OAAtB,EAA+B;MAC7BF,OAAO,GAAGA,OAAO,CAACG,MAAR,CAAgBC,QAAD,IAAc,CAACA,QAAQ,CAACC,MAAvC,CAAV;IACD;;IAED,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAQP,OAAR,EAAiB,UAAjB,CAAhB;IACA,MAAMQ,QAAQ,GAAG,KAAKZ,SAAL,CAAea,wBAAf,KACZ,+HADY,GAEZ,wHAFL;;IAGA,MAAMC,KAAK,GAAGC,gBAAA,CAAMC,KAAN,CAAa,KAAIJ,QAAS,IAA1B,CAAd;;IACA,MAAMK,cAAc,GAAIT,QAAD,IAAkC;MACvD,MAAMU,IAAI,GAAGV,QAAQ,CAACW,WAAT,GAAwB,KAAIX,QAAQ,CAACW,WAAY,GAAjD,GAAsD,EAAnE;MACA,OAAQ,OAAMX,QAAQ,CAACY,IAAK,GAAEL,gBAAA,CAAMM,GAAN,CAAUH,IAAV,CAAgB,EAA9C;IACD,CAHD;;IAIA,MAAMI,MAAM,GAAGC,MAAM,CAACC,IAAP,CAAYd,OAAZ,EACZe,GADY,CACPC,QAAD,IAAc;MACjB,MAAMC,KAAK,GAAGjB,OAAO,CAACgB,QAAD,CAAP,CAAkBD,GAAlB,CAAsBR,cAAtB,EAAsCW,IAAtC,CAA2C,IAA3C,CAAd;MACA,OAAQ,GAAEb,gBAAA,CAAMc,IAAN,CAAWC,IAAX,CAAgBJ,QAAhB,CAA0B,KAAIC,KAAM,IAA9C;IACD,CAJY,EAKZC,IALY,CAKP,IALO,CAAf;IAMA,OAAOd,KAAK,GAAGQ,MAAf;EACD;;AArC0C"}
1
+ {"version":3,"names":["TemplatesCmd","constructor","generator","report","args","templatesOptions","results","listTemplates","showAll","filter","template","hidden","grouped","groupBy","titleStr","isRunningInsideWorkspace","title","chalk","green","templateOutput","desc","description","name","dim","output","Object","keys","map","aspectId","names","join","blue","bold"],"sources":["templates.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { groupBy } from 'lodash';\nimport { GeneratorMain, TemplateDescriptor } from './generator.main.runtime';\n\nexport type TemplatesOptions = {\n showAll?: boolean;\n};\n\nexport class TemplatesCmd implements Command {\n name = 'templates';\n description = 'list templates for \"bit create\" and \"bit new\"';\n extendedDescription =\n 'list components templates when inside bit-workspace (for bit-create), otherwise, list workspace templates (for bit-new)';\n alias = '';\n loader = true;\n group = 'development';\n options = [['s', 'show-all', 'show hidden templates']] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [], templatesOptions: TemplatesOptions) {\n let results = await this.generator.listTemplates();\n\n // Make sure that we don't list hidden templates\n if (!templatesOptions.showAll) {\n results = results.filter((template) => !template.hidden);\n }\n\n const grouped = groupBy(results, 'aspectId');\n const titleStr = this.generator.isRunningInsideWorkspace()\n ? `The following template(s) are available with the command bit create: \\nExample - bit create <template-name> <component-name>`\n : `The following template(s) are available with the command bit new: \\nExample - bit new <template-name> <workspace-name>`;\n const title = chalk.green(`\\n${titleStr}\\n`);\n const templateOutput = (template: TemplateDescriptor) => {\n const desc = template.description ? ` (${template.description})` : '';\n return ` ${template.name}${chalk.dim(desc)}`;\n };\n const output = Object.keys(grouped)\n .map((aspectId) => {\n const names = grouped[aspectId].map(templateOutput).join('\\n');\n return `${chalk.blue.bold(aspectId)}\\n${names}\\n`;\n })\n .join('\\n');\n return title + output;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,MAAMA,YAAN,CAAsC;EAU3CC,WAAW,CAASC,SAAT,EAAmC;IAAA,KAA1BA,SAA0B,GAA1BA,SAA0B;IAAA,8CATvC,WASuC;IAAA,qDARhC,+CAQgC;IAAA,6DAN5C,yHAM4C;IAAA,+CALtC,EAKsC;IAAA,gDAJrC,IAIqC;IAAA,+CAHtC,aAGsC;IAAA,iDAFpC,CAAC,CAAC,GAAD,EAAM,UAAN,EAAkB,uBAAlB,CAAD,CAEoC;EAAE,CAVL,CAY3C;;;EACY,MAANC,MAAM,CAACC,IAAD,EAAWC,gBAAX,EAA+C;IACzD,IAAIC,OAAO,GAAG,MAAM,KAAKJ,SAAL,CAAeK,aAAf,EAApB,CADyD,CAGzD;;IACA,IAAI,CAACF,gBAAgB,CAACG,OAAtB,EAA+B;MAC7BF,OAAO,GAAGA,OAAO,CAACG,MAAR,CAAgBC,QAAD,IAAc,CAACA,QAAQ,CAACC,MAAvC,CAAV;IACD;;IAED,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAQP,OAAR,EAAiB,UAAjB,CAAhB;IACA,MAAMQ,QAAQ,GAAG,KAAKZ,SAAL,CAAea,wBAAf,KACZ,+HADY,GAEZ,wHAFL;;IAGA,MAAMC,KAAK,GAAGC,gBAAA,CAAMC,KAAN,CAAa,KAAIJ,QAAS,IAA1B,CAAd;;IACA,MAAMK,cAAc,GAAIT,QAAD,IAAkC;MACvD,MAAMU,IAAI,GAAGV,QAAQ,CAACW,WAAT,GAAwB,KAAIX,QAAQ,CAACW,WAAY,GAAjD,GAAsD,EAAnE;MACA,OAAQ,OAAMX,QAAQ,CAACY,IAAK,GAAEL,gBAAA,CAAMM,GAAN,CAAUH,IAAV,CAAgB,EAA9C;IACD,CAHD;;IAIA,MAAMI,MAAM,GAAGC,MAAM,CAACC,IAAP,CAAYd,OAAZ,EACZe,GADY,CACPC,QAAD,IAAc;MACjB,MAAMC,KAAK,GAAGjB,OAAO,CAACgB,QAAD,CAAP,CAAkBD,GAAlB,CAAsBR,cAAtB,EAAsCW,IAAtC,CAA2C,IAA3C,CAAd;MACA,OAAQ,GAAEb,gBAAA,CAAMc,IAAN,CAAWC,IAAX,CAAgBJ,QAAhB,CAA0B,KAAIC,KAAM,IAA9C;IACD,CAJY,EAKZC,IALY,CAKP,IALO,CAAf;IAMA,OAAOd,KAAK,GAAGQ,MAAf;EACD;;AArC0C"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/generator",
3
- "version": "0.0.751",
3
+ "version": "0.0.754",
4
4
  "homepage": "https://bit.dev/teambit/generator/generator",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.generator",
8
8
  "name": "generator",
9
- "version": "0.0.751"
9
+ "version": "0.0.754"
10
10
  },
11
11
  "dependencies": {
12
12
  "camelcase": "6.2.0",
@@ -22,20 +22,20 @@
22
22
  "@teambit/harmony": "0.3.3",
23
23
  "@teambit/bit-error": "0.0.394",
24
24
  "@teambit/component-id": "0.0.402",
25
- "@teambit/envs": "0.0.751",
26
- "@teambit/new-component-helper": "0.0.155",
27
- "@teambit/workspace": "0.0.751",
28
- "@teambit/cli": "0.0.496",
29
- "@teambit/graphql": "0.0.751",
30
- "@teambit/aspect-loader": "0.0.751",
31
- "@teambit/bit": "0.0.753",
32
- "@teambit/community": "0.0.44",
33
- "@teambit/component": "0.0.751",
34
- "@teambit/importer": "0.0.180",
35
- "@teambit/compiler": "0.0.751",
36
- "@teambit/forking": "0.0.155",
37
- "@teambit/logger": "0.0.589",
38
- "@teambit/ui": "0.0.751"
25
+ "@teambit/envs": "0.0.754",
26
+ "@teambit/new-component-helper": "0.0.158",
27
+ "@teambit/workspace": "0.0.754",
28
+ "@teambit/cli": "0.0.497",
29
+ "@teambit/graphql": "0.0.754",
30
+ "@teambit/aspect-loader": "0.0.754",
31
+ "@teambit/bit": "0.0.756",
32
+ "@teambit/community": "0.0.45",
33
+ "@teambit/component": "0.0.754",
34
+ "@teambit/importer": "0.0.183",
35
+ "@teambit/compiler": "0.0.754",
36
+ "@teambit/forking": "0.0.158",
37
+ "@teambit/logger": "0.0.590",
38
+ "@teambit/ui": "0.0.754"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/fs-extra": "9.0.7",
@@ -49,7 +49,7 @@
49
49
  "@teambit/generator.aspect-docs.generator": "0.0.142"
50
50
  },
51
51
  "peerDependencies": {
52
- "@teambit/legacy": "1.0.276",
52
+ "@teambit/legacy": "1.0.277",
53
53
  "react-dom": "^16.8.0 || ^17.0.0",
54
54
  "react": "^16.8.0 || ^17.0.0"
55
55
  },
@@ -77,7 +77,7 @@
77
77
  "react": "-"
78
78
  },
79
79
  "peerDependencies": {
80
- "@teambit/legacy": "1.0.276",
80
+ "@teambit/legacy": "1.0.277",
81
81
  "react-dom": "^16.8.0 || ^17.0.0",
82
82
  "react": "^16.8.0 || ^17.0.0"
83
83
  }
@@ -1,2 +1,2 @@
1
- export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.751/dist/generator.composition.js')]
2
- export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.751/dist/generator.docs.mdx')]
1
+ export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.754/dist/generator.composition.js')]
2
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.754/dist/generator.docs.mdx')]