@teambit/generator 0.0.888 → 0.0.890

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.
@@ -14,6 +14,7 @@ export declare class CreateCmd implements Command {
14
14
  description: string;
15
15
  alias: string;
16
16
  loader: boolean;
17
+ helpUrl: string;
17
18
  arguments: {
18
19
  name: string;
19
20
  description: string;
@@ -29,6 +29,7 @@ class CreateCmd {
29
29
  (0, _defineProperty2().default)(this, "description", 'create a new component (source files and config) using a template.');
30
30
  (0, _defineProperty2().default)(this, "alias", '');
31
31
  (0, _defineProperty2().default)(this, "loader", true);
32
+ (0, _defineProperty2().default)(this, "helpUrl", 'reference/starters/create-starter');
32
33
  (0, _defineProperty2().default)(this, "arguments", [{
33
34
  name: 'template-name',
34
35
  description: "the template for generating the component \n(run 'bit templates' for a list of available templates)"
@@ -1 +1 @@
1
- {"version":3,"names":["CreateCmd","constructor","generator","docsDomain","name","description","cmd","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 <template-name> <component-names...>';\n description = 'create a new component (source files and config) using a template.';\n alias = '';\n loader = true;\n arguments = [\n {\n name: 'template-name',\n description:\n \"the template for generating the component \\n(run 'bit templates' for a list of available templates)\",\n },\n {\n name: 'component-names...',\n description: 'a list of component names to generate',\n },\n ];\n examples = [\n {\n cmd: 'bit create react ui/button',\n description: \"creates a component named 'ui/button' using the 'react' template\",\n },\n {\n cmd: 'bit create react ui/button pages/register',\n description: \"creates two components, 'ui/button' and 'pages/register', using the 'react' template\",\n },\n {\n cmd: 'bit create react ui/button --scope my-org.my-scope',\n description:\n \"creates a component named 'ui/button' and sets it scope to 'my-org.my-scope'. \\nby default, the scope is the `defaultScope` value, configured in your `workspace.jsonc`.\",\n },\n {\n cmd: 'bit create react ui/button --env teambit.community/envs/community-react@1.95.13',\n description:\n \"creates a component named 'ui/button' and sets it to use the 'community-react' env. \\n(the template's default env is 'teambit.react/react').\",\n },\n ];\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,SAAS,CAAoB;EA6CxCC,WAAW,CAASC,SAAwB,EAAUC,UAAkB,EAAE;IAAA,KAAtDD,SAAwB,GAAxBA,SAAwB;IAAA,KAAUC,UAAkB,GAAlBA,UAAkB;IAAA,8CA5CjE,6CAA6C;IAAA,qDACtC,oEAAoE;IAAA,+CAC1E,EAAE;IAAA,gDACD,IAAI;IAAA,mDACD,CACV;MACEC,IAAI,EAAE,eAAe;MACrBC,WAAW,EACT;I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G,IAAI,CAACvB,UAAW,kBAAiB;IAE9J,OAAQ,GAAEe,gBAAK,CAACS,KAAK,CAACd,KAAK,CAAE,OAAME,cAAe,OAAMW,MAAO,EAAC;EAClE;AACF;AAAC"}
1
+ {"version":3,"names":["CreateCmd","constructor","generator","docsDomain","name","description","cmd","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 <template-name> <component-names...>';\n description = 'create a new component (source files and config) using a template.';\n alias = '';\n loader = true;\n helpUrl = 'reference/starters/create-starter';\n arguments = [\n {\n name: 'template-name',\n description:\n \"the template for generating the component \\n(run 'bit templates' for a list of available templates)\",\n },\n {\n name: 'component-names...',\n description: 'a list of component names to generate',\n },\n ];\n examples = [\n {\n cmd: 'bit create react ui/button',\n description: \"creates a component named 'ui/button' using the 'react' template\",\n },\n {\n cmd: 'bit create react ui/button pages/register',\n description: \"creates two components, 'ui/button' and 'pages/register', using the 'react' template\",\n },\n {\n cmd: 'bit create react ui/button --scope my-org.my-scope',\n description:\n \"creates a component named 'ui/button' and sets it scope to 'my-org.my-scope'. \\nby default, the scope is the `defaultScope` value, configured in your `workspace.jsonc`.\",\n },\n {\n cmd: 'bit create react ui/button --env teambit.community/envs/community-react@1.95.13',\n description:\n \"creates a component named 'ui/button' and sets it to use the 'community-react' env. \\n(the template's default env is 'teambit.react/react').\",\n },\n ];\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,SAAS,CAAoB;EA8CxCC,WAAW,CAASC,SAAwB,EAAUC,UAAkB,EAAE;IAAA,KAAtDD,SAAwB,GAAxBA,SAAwB;IAAA,KAAUC,UAAkB,GAAlBA,UAAkB;IAAA,8CA7CjE,6CAA6C;IAAA,qDACtC,oEAAoE;IAAA,+CAC1E,EAAE;IAAA,gDACD,IAAI;IAAA,iDACH,mCAAmC;IAAA,mDACjC,CACV;MACEC,IAAI,EAAE,eAAe;MACrBC,WAAW,EACT;IACJ,CAAC,EACD;MACED,IAAI,EAAE,oBAAoB;MAC1BC,WAAW,EAAE;IACf,CAAC,CACF;IAAA,kDACU,CACT;MACEC,GAAG,EAAE,4BAA4B;MACjCD,WAAW,EAAE;IACf,CAAC,EACD;MACEC,GAAG,EAAE,2CAA2C;MAChDD,WAAW,EAAE;IACf,CAAC,EACD;MACEC,GAAG,EAAE,oDAAoD;MACzDD,WAAW,EACT;IACJ,CAAC,EACD;MACEC,GAAG,EAAE,iFAAiF;MACtFD,WAAW,EACT;IACJ,CAAC,CACF;IAAA,+CACO,aAAa;IAAA,iDACX,CACR,CAAC,GAAG,EAAE,oBAAoB,EAAG,iEAAgE,CAAC,EAC9F,CAAC,GAAG,EAAE,gBAAgB,EAAG,iFAAgF,CAAC,EAC1G,CAAC,GAAG,EAAE,iBAAiB,EAAE,qFAAqF,CAAC,EAC/G,CAAC,GAAG,EAAE,eAAe,EAAE,qFAAqF,CAAC,EAC7G,CAAC,GAAG,EAAE,cAAc,EAAE,qFAAqF,CAAC,CAC7G;EAE0E;EAE3E,MAAME,MAAM,CAAC,CAACC,YAAY,EAAEC,cAAc,CAAqB,EAAEC,OAAsB,EAAE;IACvF,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACT,SAAS,CAACU,yBAAyB,CAACH,cAAc,EAAED,YAAY,EAAEE,OAAO,CAAC;IACrG,MAAMG,KAAK,GAAI,GAAEF,OAAO,CAACG,MAAO,4BAA2B;IAE3D,MAAMC,cAAc,GAAGJ,OAAO,CAC3BK,GAAG,CAAEC,MAAM,IAAK;MACf,OAAQ,GAAEC,gBAAK,CAACC,IAAI,CAACF,MAAM,CAACG,EAAE,CAACC,QAAQ,EAAE,CAAE;AACnD,gBAAgBJ,MAAM,CAACK,GAAI;AAC3B,gBAAgBL,MAAM,CAACM,KAAM,YAAWN,MAAM,CAACO,QAAS;AACxD,CAAC;IACK,CAAC,CAAC,CACDC,IAAI,CAAC,IAAI,CAAC;IACb,MAAMC,MAAM,GAAI,8GAA6G,IAAI,CAACvB,UAAW,kBAAiB;IAE9J,OAAQ,GAAEe,gBAAK,CAACS,KAAK,CAACd,KAAK,CAAE,OAAME,cAAe,OAAMW,MAAO,EAAC;EAClE;AACF;AAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/generator",
3
- "version": "0.0.888",
3
+ "version": "0.0.890",
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.888"
9
+ "version": "0.0.890"
10
10
  },
11
11
  "dependencies": {
12
12
  "camelcase": "6.2.0",
@@ -20,23 +20,23 @@
20
20
  "@babel/runtime": "7.20.0",
21
21
  "core-js": "^3.0.0",
22
22
  "@teambit/harmony": "0.3.3",
23
- "@teambit/bit-error": "0.0.401",
24
- "@teambit/component-id": "0.0.420",
25
- "@teambit/envs": "0.0.888",
26
- "@teambit/new-component-helper": "0.0.292",
27
- "@teambit/workspace": "0.0.888",
28
- "@teambit/cli": "0.0.595",
29
- "@teambit/graphql": "0.0.888",
30
- "@teambit/aspect-loader": "0.0.888",
31
- "@teambit/bit": "0.0.890",
32
- "@teambit/community": "0.0.143",
33
- "@teambit/component": "0.0.888",
34
- "@teambit/importer": "0.0.317",
35
- "@teambit/compiler": "0.0.888",
36
- "@teambit/forking": "0.0.292",
37
- "@teambit/install": "0.0.34",
38
- "@teambit/logger": "0.0.688",
39
- "@teambit/ui": "0.0.888"
23
+ "@teambit/bit-error": "0.0.402",
24
+ "@teambit/component-id": "0.0.422",
25
+ "@teambit/envs": "0.0.890",
26
+ "@teambit/new-component-helper": "0.0.294",
27
+ "@teambit/workspace": "0.0.890",
28
+ "@teambit/cli": "0.0.597",
29
+ "@teambit/graphql": "0.0.890",
30
+ "@teambit/aspect-loader": "0.0.890",
31
+ "@teambit/bit": "0.0.892",
32
+ "@teambit/community": "0.0.145",
33
+ "@teambit/component": "0.0.890",
34
+ "@teambit/importer": "0.0.319",
35
+ "@teambit/compiler": "0.0.890",
36
+ "@teambit/forking": "0.0.294",
37
+ "@teambit/install": "0.0.36",
38
+ "@teambit/logger": "0.0.690",
39
+ "@teambit/ui": "0.0.890"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/fs-extra": "9.0.7",
@@ -47,10 +47,10 @@
47
47
  "@types/jest": "^26.0.0",
48
48
  "@types/react-dom": "^17.0.5",
49
49
  "@types/node": "12.20.4",
50
- "@teambit/generator.aspect-docs.generator": "0.0.151"
50
+ "@teambit/generator.aspect-docs.generator": "0.0.152"
51
51
  },
52
52
  "peerDependencies": {
53
- "@teambit/legacy": "1.0.379",
53
+ "@teambit/legacy": "1.0.380",
54
54
  "react-dom": "^16.8.0 || ^17.0.0",
55
55
  "react": "^16.8.0 || ^17.0.0"
56
56
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.888/dist/generator.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.888/dist/generator.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.890/dist/generator.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.890/dist/generator.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];