@teambit/generator 1.0.426 → 1.0.427

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.generator/generator@1.0.426" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.generator/generator@1.0.427" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.generator/generator-preview"]=t():e["teambit.generator/generator-preview"]=t()}(self,(()=>(()=>{"use strict";var e={14335:(e,t,n)=>{var a={id:"teambit.generator/aspect-docs/generator@0.0.172",homepage:"https://bit.cloud/teambit/generator/aspect-docs/generator",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,l(n(41594));var o=n(5016),r=["components"];function l(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}function p(e,t){if(null==e)return{};var n,a,o=i(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}l.__bit_component=a,m.__bit_component=a,p.__bit_component=a,i.__bit_component=a;var s={},d="wrapper";function c(e){var t=e.components,n=p(e,r);return(0,o.mdx)(d,m({},s,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)("p",null,"Generator extension enable generating new components by pre-defined templates"),(0,o.mdx)("h3",null,"Component location"),(0,o.mdx)("p",null,"Component location in the workspace directory tree is defined with the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit create")," command (see below). For example, a component named ",(0,o.mdx)("inlineCode",{parentName:"p"},"ShoppingCart")," created in the ",(0,o.mdx)("inlineCode",{parentName:"p"},"acme.shopper")," and the namespace ",(0,o.mdx)("inlineCode",{parentName:"p"},"ui")," will be generated in the following directory:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre"},"acme.shopper/ui/shopping-cart\n")),(0,o.mdx)("h3",null,"Component name"),(0,o.mdx)("p",null,"When using templates Bit will use CamelCasing for passing the component-name to the template, but generated file structure should be in kebab-case, for better cross-operating-system compatibility of the component."),(0,o.mdx)("h3",null,"Automatically ",(0,o.mdx)("inlineCode",{parentName:"h3"},"add")," component"),(0,o.mdx)("p",null,"Bit should automatically register the new component to the ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file with a symmetrical name to the component-location in the workspace."),(0,o.mdx)("h2",null,"Register a template"),(0,o.mdx)("p",null,"Any aspect (include envs) can register templates. Each template should have a name and a list of files. Each file has a relative-path to the component-dir and template content. See the ",(0,o.mdx)("inlineCode",{parentName:"p"},"component-template.ts")," file for more info about the exact API."),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"Component name should be available as a param for the file-content-template."),(0,o.mdx)("li",{parentName:"ul"},"TBD: An environment must have a default template (if not set, use first template in array?).")),(0,o.mdx)("p",null,"To register a template, use the Generator API: ",(0,o.mdx)("inlineCode",{parentName:"p"},"registerComponentTemplate(templates: ComponentTemplate[])"),"."),(0,o.mdx)("p",null,"To make the templates of an aspect available on a workspace, they need to be added to the workspace.jsonc. For example:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'"teambit.generator/generator": {\n "aspects": [\n "teambit.harmony/aspect"\n ]\n },\n')),(0,o.mdx)("p",null,"In the example above, the aspect ",(0,o.mdx)("inlineCode",{parentName:"p"},"teambit.harmony/aspect")," is configured to be available for the generator."),(0,o.mdx)("h2",null,"Show all available templates"),(0,o.mdx)("p",null,"Introduce a new command ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit templates"),", which groups all available templates by aspects."),(0,o.mdx)("h2",null,"Hide core templates"),(0,o.mdx)("p",null,"Configure the Generator aspect to hide core templates when running ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit templates"),". They'll be only shown when using ",(0,o.mdx)("inlineCode",{parentName:"p"},"--show-all")," flag."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'"teambit.generator/generator": {\n "hideCoreTemplates": true\n },\n')),(0,o.mdx)("h2",null,"Generate a template from CLI"),(0,o.mdx)("p",null,"Introduce a ",(0,o.mdx)("inlineCode",{parentName:"p"},"create")," command to use templates."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-sh"},"bit create <template-name> <component-name...> [--scope | -s] [--namespace | -n] [--aspect | -a]\n")),(0,o.mdx)("h3",null,"Args"),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"<component name>")),(0,o.mdx)("p",null,"Name of the component to create. Will be used as the component's dir name and fed to the component template."),(0,o.mdx)("p",null,(0,o.mdx)("strong",{parentName:"p"},"generated file structure should use kebab-case, while the template itself be in camel case"),"."),(0,o.mdx)("h3",null,"Options"),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--scope | -s]")),(0,o.mdx)("p",null,"Sets the component's scope and base directory. If not defined, use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"defaultScope")," from ",(0,o.mdx)("inlineCode",{parentName:"p"},"teambit.workspace/workspace")," config."),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--namespace | -n]")),(0,o.mdx)("p",null,"Sets the component's namespace and nested dirs inside the scope. If not define, use empty string."),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--aspect | -a]")),(0,o.mdx)("p",null,"Aspect ID that registered this template, required only if there are two templates with the same name from several aspects in the workspace."),(0,o.mdx)("h2",null,"Creating a custom template generator"),(0,o.mdx)("p",null,"See our ",(0,o.mdx)("a",{parentName:"p",href:"https://harmony-docs.bit.dev/extending-bit/creating-a-custom-generator"},"tutorial")," on how to Create your own custom component generator."))}c.__bit_component=a,c.isMDXComponent=!0},72771:(e,t,n)=>{Object.defineProperty(t,"W",{enumerable:!0,get:function(){return a.default}});var a=o(n(14335));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.generator/aspect-docs/generator@0.0.172",homepage:"https://bit.cloud/teambit/generator/aspect-docs/generator",exported:!0}},1364:(e,t,n)=>{var a={id:"teambit.generator/generator@1.0.426",homepage:"https://bit.cloud/teambit/generator/generator",exported:!0};function o(){const e=r(n(41594));return o=function(){return e},e}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,r.__bit_component=a;const l=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/generator-new.svg"}));l.__bit_component=a,t.Logo=l},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>h,compositions_metadata:()=>x,overview:()=>f});var o={};n.r(o),n.d(o,{default:()=>u});var r=n(1364),l=(n(41594),n(5016));const m=TeambitMdxUiMdxScopeContext;var p=n(72771),i=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(null,arguments)}var d={},c="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,i);return(0,l.mdx)(c,s({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.mdx)(m.MDXScopeProvider,{components:{Generator:p.W},mdxType:"MDXScopeProvider"},(0,l.mdx)(p.W,{mdxType:"Generator"})))}u.isMDXComponent=!0;const h=[r],f=[o],x={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.generator/generator-preview"]=t():e["teambit.generator/generator-preview"]=t()}(self,(()=>(()=>{"use strict";var e={14335:(e,t,n)=>{var a={id:"teambit.generator/aspect-docs/generator@0.0.172",homepage:"https://bit.cloud/teambit/generator/aspect-docs/generator",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,l(n(41594));var o=n(5016),r=["components"];function l(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}function p(e,t){if(null==e)return{};var n,a,o=i(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}l.__bit_component=a,m.__bit_component=a,p.__bit_component=a,i.__bit_component=a;var s={},d="wrapper";function c(e){var t=e.components,n=p(e,r);return(0,o.mdx)(d,m({},s,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)("p",null,"Generator extension enable generating new components by pre-defined templates"),(0,o.mdx)("h3",null,"Component location"),(0,o.mdx)("p",null,"Component location in the workspace directory tree is defined with the ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit create")," command (see below). For example, a component named ",(0,o.mdx)("inlineCode",{parentName:"p"},"ShoppingCart")," created in the ",(0,o.mdx)("inlineCode",{parentName:"p"},"acme.shopper")," and the namespace ",(0,o.mdx)("inlineCode",{parentName:"p"},"ui")," will be generated in the following directory:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre"},"acme.shopper/ui/shopping-cart\n")),(0,o.mdx)("h3",null,"Component name"),(0,o.mdx)("p",null,"When using templates Bit will use CamelCasing for passing the component-name to the template, but generated file structure should be in kebab-case, for better cross-operating-system compatibility of the component."),(0,o.mdx)("h3",null,"Automatically ",(0,o.mdx)("inlineCode",{parentName:"h3"},"add")," component"),(0,o.mdx)("p",null,"Bit should automatically register the new component to the ",(0,o.mdx)("inlineCode",{parentName:"p"},".bitmap")," file with a symmetrical name to the component-location in the workspace."),(0,o.mdx)("h2",null,"Register a template"),(0,o.mdx)("p",null,"Any aspect (include envs) can register templates. Each template should have a name and a list of files. Each file has a relative-path to the component-dir and template content. See the ",(0,o.mdx)("inlineCode",{parentName:"p"},"component-template.ts")," file for more info about the exact API."),(0,o.mdx)("ul",null,(0,o.mdx)("li",{parentName:"ul"},"Component name should be available as a param for the file-content-template."),(0,o.mdx)("li",{parentName:"ul"},"TBD: An environment must have a default template (if not set, use first template in array?).")),(0,o.mdx)("p",null,"To register a template, use the Generator API: ",(0,o.mdx)("inlineCode",{parentName:"p"},"registerComponentTemplate(templates: ComponentTemplate[])"),"."),(0,o.mdx)("p",null,"To make the templates of an aspect available on a workspace, they need to be added to the workspace.jsonc. For example:"),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'"teambit.generator/generator": {\n "aspects": [\n "teambit.harmony/aspect"\n ]\n },\n')),(0,o.mdx)("p",null,"In the example above, the aspect ",(0,o.mdx)("inlineCode",{parentName:"p"},"teambit.harmony/aspect")," is configured to be available for the generator."),(0,o.mdx)("h2",null,"Show all available templates"),(0,o.mdx)("p",null,"Introduce a new command ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit templates"),", which groups all available templates by aspects."),(0,o.mdx)("h2",null,"Hide core templates"),(0,o.mdx)("p",null,"Configure the Generator aspect to hide core templates when running ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit templates"),". They'll be only shown when using ",(0,o.mdx)("inlineCode",{parentName:"p"},"--show-all")," flag."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-json"},'"teambit.generator/generator": {\n "hideCoreTemplates": true\n },\n')),(0,o.mdx)("h2",null,"Generate a template from CLI"),(0,o.mdx)("p",null,"Introduce a ",(0,o.mdx)("inlineCode",{parentName:"p"},"create")," command to use templates."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-sh"},"bit create <template-name> <component-name...> [--scope | -s] [--namespace | -n] [--aspect | -a]\n")),(0,o.mdx)("h3",null,"Args"),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"<component name>")),(0,o.mdx)("p",null,"Name of the component to create. Will be used as the component's dir name and fed to the component template."),(0,o.mdx)("p",null,(0,o.mdx)("strong",{parentName:"p"},"generated file structure should use kebab-case, while the template itself be in camel case"),"."),(0,o.mdx)("h3",null,"Options"),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--scope | -s]")),(0,o.mdx)("p",null,"Sets the component's scope and base directory. If not defined, use the ",(0,o.mdx)("inlineCode",{parentName:"p"},"defaultScope")," from ",(0,o.mdx)("inlineCode",{parentName:"p"},"teambit.workspace/workspace")," config."),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--namespace | -n]")),(0,o.mdx)("p",null,"Sets the component's namespace and nested dirs inside the scope. If not define, use empty string."),(0,o.mdx)("h4",null,(0,o.mdx)("inlineCode",{parentName:"h4"},"[--aspect | -a]")),(0,o.mdx)("p",null,"Aspect ID that registered this template, required only if there are two templates with the same name from several aspects in the workspace."),(0,o.mdx)("h2",null,"Creating a custom template generator"),(0,o.mdx)("p",null,"See our ",(0,o.mdx)("a",{parentName:"p",href:"https://harmony-docs.bit.dev/extending-bit/creating-a-custom-generator"},"tutorial")," on how to Create your own custom component generator."))}c.__bit_component=a,c.isMDXComponent=!0},72771:(e,t,n)=>{Object.defineProperty(t,"W",{enumerable:!0,get:function(){return a.default}});var a=o(n(14335));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.generator/aspect-docs/generator@0.0.172",homepage:"https://bit.cloud/teambit/generator/aspect-docs/generator",exported:!0}},66609:(e,t,n)=>{var a={id:"teambit.generator/generator@1.0.427",homepage:"https://bit.cloud/teambit/generator/generator",exported:!0};function o(){const e=r(n(41594));return o=function(){return e},e}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,r.__bit_component=a;const l=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/generator-new.svg"}));l.__bit_component=a,t.Logo=l},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>h,compositions_metadata:()=>x,overview:()=>f});var o={};n.r(o),n.d(o,{default:()=>u});var r=n(66609),l=(n(41594),n(5016));const m=TeambitMdxUiMdxScopeContext;var p=n(72771),i=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(null,arguments)}var d={},c="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,i);return(0,l.mdx)(c,s({},d,n,{components:t,mdxType:"MDXLayout"}),(0,l.mdx)(m.MDXScopeProvider,{components:{Generator:p.W},mdxType:"MDXScopeProvider"},(0,l.mdx)(p.W,{mdxType:"Generator"})))}u.isMDXComponent=!0;const h=[r],f=[o],x={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
@@ -5636,16 +5636,16 @@
5636
5636
  "__schema": "ParameterSchema",
5637
5637
  "location": {
5638
5638
  "filePath": "template-list.ts",
5639
- "line": 9,
5640
- "character": 15
5639
+ "line": 10,
5640
+ "character": 5
5641
5641
  },
5642
5642
  "name": "name",
5643
5643
  "type": {
5644
5644
  "__schema": "KeywordTypeSchema",
5645
5645
  "location": {
5646
5646
  "filePath": "template-list.ts",
5647
- "line": 9,
5648
- "character": 30
5647
+ "line": 10,
5648
+ "character": 20
5649
5649
  },
5650
5650
  "name": "string"
5651
5651
  },
@@ -5656,23 +5656,23 @@
5656
5656
  "__schema": "ParameterSchema",
5657
5657
  "location": {
5658
5658
  "filePath": "template-list.ts",
5659
- "line": 9,
5660
- "character": 38
5659
+ "line": 11,
5660
+ "character": 5
5661
5661
  },
5662
5662
  "name": "templates",
5663
5663
  "type": {
5664
5664
  "__schema": "TypeArraySchema",
5665
5665
  "location": {
5666
5666
  "filePath": "template-list.ts",
5667
- "line": 9,
5668
- "character": 57
5667
+ "line": 11,
5668
+ "character": 24
5669
5669
  },
5670
5670
  "type": {
5671
5671
  "__schema": "TypeRefSchema",
5672
5672
  "location": {
5673
5673
  "filePath": "template-list.ts",
5674
- "line": 9,
5675
- "character": 57
5674
+ "line": 11,
5675
+ "character": 24
5676
5676
  },
5677
5677
  "name": "EnvHandler",
5678
5678
  "componentId": {
@@ -5684,8 +5684,8 @@
5684
5684
  "__schema": "TypeRefSchema",
5685
5685
  "location": {
5686
5686
  "filePath": "template-list.ts",
5687
- "line": 9,
5688
- "character": 68
5687
+ "line": 11,
5688
+ "character": 35
5689
5689
  },
5690
5690
  "name": "ComponentTemplate"
5691
5691
  }
@@ -5699,16 +5699,16 @@
5699
5699
  "__schema": "ParameterSchema",
5700
5700
  "location": {
5701
5701
  "filePath": "template-list.ts",
5702
- "line": 9,
5703
- "character": 90
5702
+ "line": 12,
5703
+ "character": 5
5704
5704
  },
5705
5705
  "name": "context",
5706
5706
  "type": {
5707
5707
  "__schema": "TypeRefSchema",
5708
5708
  "location": {
5709
5709
  "filePath": "template-list.ts",
5710
- "line": 9,
5711
- "character": 107
5710
+ "line": 12,
5711
+ "character": 22
5712
5712
  },
5713
5713
  "name": "EnvContext",
5714
5714
  "componentId": {
@@ -5735,7 +5735,7 @@
5735
5735
  "__schema": "FunctionLikeSchema",
5736
5736
  "location": {
5737
5737
  "filePath": "template-list.ts",
5738
- "line": 11,
5738
+ "line": 15,
5739
5739
  "character": 3
5740
5740
  },
5741
5741
  "signature": "(method) TemplateList.compute(): ComponentTemplate[]",
@@ -5745,14 +5745,14 @@
5745
5745
  "__schema": "TypeArraySchema",
5746
5746
  "location": {
5747
5747
  "filePath": "template-list.ts",
5748
- "line": 11,
5748
+ "line": 15,
5749
5749
  "character": 14
5750
5750
  },
5751
5751
  "type": {
5752
5752
  "__schema": "TypeRefSchema",
5753
5753
  "location": {
5754
5754
  "filePath": "template-list.ts",
5755
- "line": 11,
5755
+ "line": 15,
5756
5756
  "character": 14
5757
5757
  },
5758
5758
  "name": "ComponentTemplate"
@@ -5764,7 +5764,7 @@
5764
5764
  "__schema": "FunctionLikeSchema",
5765
5765
  "location": {
5766
5766
  "filePath": "template-list.ts",
5767
- "line": 15,
5767
+ "line": 19,
5768
5768
  "character": 3
5769
5769
  },
5770
5770
  "signature": "(method) TemplateList.from(templates: EnvHandler<ComponentTemplate>[], options?: TemplateListOptions): (context: EnvContext) => TemplateList",
@@ -5774,7 +5774,7 @@
5774
5774
  "__schema": "ParameterSchema",
5775
5775
  "location": {
5776
5776
  "filePath": "template-list.ts",
5777
- "line": 15,
5777
+ "line": 19,
5778
5778
  "character": 15
5779
5779
  },
5780
5780
  "name": "templates",
@@ -5782,14 +5782,14 @@
5782
5782
  "__schema": "TypeArraySchema",
5783
5783
  "location": {
5784
5784
  "filePath": "template-list.ts",
5785
- "line": 15,
5785
+ "line": 19,
5786
5786
  "character": 26
5787
5787
  },
5788
5788
  "type": {
5789
5789
  "__schema": "TypeRefSchema",
5790
5790
  "location": {
5791
5791
  "filePath": "template-list.ts",
5792
- "line": 15,
5792
+ "line": 19,
5793
5793
  "character": 26
5794
5794
  },
5795
5795
  "name": "EnvHandler",
@@ -5802,7 +5802,7 @@
5802
5802
  "__schema": "TypeRefSchema",
5803
5803
  "location": {
5804
5804
  "filePath": "template-list.ts",
5805
- "line": 15,
5805
+ "line": 19,
5806
5806
  "character": 37
5807
5807
  },
5808
5808
  "name": "ComponentTemplate"
@@ -5817,7 +5817,7 @@
5817
5817
  "__schema": "ParameterSchema",
5818
5818
  "location": {
5819
5819
  "filePath": "template-list.ts",
5820
- "line": 15,
5820
+ "line": 19,
5821
5821
  "character": 59
5822
5822
  },
5823
5823
  "name": "options",
@@ -5825,7 +5825,7 @@
5825
5825
  "__schema": "TypeRefSchema",
5826
5826
  "location": {
5827
5827
  "filePath": "template-list.ts",
5828
- "line": 15,
5828
+ "line": 19,
5829
5829
  "character": 68
5830
5830
  },
5831
5831
  "name": "TemplateListOptions",
@@ -5840,7 +5840,7 @@
5840
5840
  "__schema": "InferenceTypeSchema",
5841
5841
  "location": {
5842
5842
  "filePath": "template-list.ts",
5843
- "line": 15,
5843
+ "line": 19,
5844
5844
  "character": 3
5845
5845
  },
5846
5846
  "type": "(context: EnvContext) => TemplateList"
@@ -5887,16 +5887,16 @@
5887
5887
  "__schema": "ParameterSchema",
5888
5888
  "location": {
5889
5889
  "filePath": "starter-list.ts",
5890
- "line": 9,
5891
- "character": 15
5890
+ "line": 10,
5891
+ "character": 5
5892
5892
  },
5893
5893
  "name": "name",
5894
5894
  "type": {
5895
5895
  "__schema": "KeywordTypeSchema",
5896
5896
  "location": {
5897
5897
  "filePath": "starter-list.ts",
5898
- "line": 9,
5899
- "character": 30
5898
+ "line": 10,
5899
+ "character": 20
5900
5900
  },
5901
5901
  "name": "string"
5902
5902
  },
@@ -5907,23 +5907,23 @@
5907
5907
  "__schema": "ParameterSchema",
5908
5908
  "location": {
5909
5909
  "filePath": "starter-list.ts",
5910
- "line": 9,
5911
- "character": 38
5910
+ "line": 11,
5911
+ "character": 5
5912
5912
  },
5913
5913
  "name": "starters",
5914
5914
  "type": {
5915
5915
  "__schema": "TypeArraySchema",
5916
5916
  "location": {
5917
5917
  "filePath": "starter-list.ts",
5918
- "line": 9,
5919
- "character": 56
5918
+ "line": 11,
5919
+ "character": 23
5920
5920
  },
5921
5921
  "type": {
5922
5922
  "__schema": "TypeRefSchema",
5923
5923
  "location": {
5924
5924
  "filePath": "starter-list.ts",
5925
- "line": 9,
5926
- "character": 56
5925
+ "line": 11,
5926
+ "character": 23
5927
5927
  },
5928
5928
  "name": "EnvHandler",
5929
5929
  "componentId": {
@@ -5935,8 +5935,8 @@
5935
5935
  "__schema": "TypeRefSchema",
5936
5936
  "location": {
5937
5937
  "filePath": "starter-list.ts",
5938
- "line": 9,
5939
- "character": 67
5938
+ "line": 11,
5939
+ "character": 34
5940
5940
  },
5941
5941
  "name": "WorkspaceTemplate"
5942
5942
  }
@@ -5950,16 +5950,16 @@
5950
5950
  "__schema": "ParameterSchema",
5951
5951
  "location": {
5952
5952
  "filePath": "starter-list.ts",
5953
- "line": 9,
5954
- "character": 89
5953
+ "line": 12,
5954
+ "character": 5
5955
5955
  },
5956
5956
  "name": "context",
5957
5957
  "type": {
5958
5958
  "__schema": "TypeRefSchema",
5959
5959
  "location": {
5960
5960
  "filePath": "starter-list.ts",
5961
- "line": 9,
5962
- "character": 106
5961
+ "line": 12,
5962
+ "character": 22
5963
5963
  },
5964
5964
  "name": "EnvContext",
5965
5965
  "componentId": {
@@ -5986,7 +5986,7 @@
5986
5986
  "__schema": "FunctionLikeSchema",
5987
5987
  "location": {
5988
5988
  "filePath": "starter-list.ts",
5989
- "line": 11,
5989
+ "line": 15,
5990
5990
  "character": 3
5991
5991
  },
5992
5992
  "signature": "(method) StarterList.compute(): WorkspaceTemplate[]",
@@ -5996,14 +5996,14 @@
5996
5996
  "__schema": "TypeArraySchema",
5997
5997
  "location": {
5998
5998
  "filePath": "starter-list.ts",
5999
- "line": 11,
5999
+ "line": 15,
6000
6000
  "character": 14
6001
6001
  },
6002
6002
  "type": {
6003
6003
  "__schema": "TypeRefSchema",
6004
6004
  "location": {
6005
6005
  "filePath": "starter-list.ts",
6006
- "line": 11,
6006
+ "line": 15,
6007
6007
  "character": 14
6008
6008
  },
6009
6009
  "name": "WorkspaceTemplate"
@@ -6015,7 +6015,7 @@
6015
6015
  "__schema": "FunctionLikeSchema",
6016
6016
  "location": {
6017
6017
  "filePath": "starter-list.ts",
6018
- "line": 15,
6018
+ "line": 19,
6019
6019
  "character": 3
6020
6020
  },
6021
6021
  "signature": "(method) StarterList.from(starters: EnvHandler<WorkspaceTemplate>[], options?: StarterListOptions): (context: EnvContext) => StarterList",
@@ -6025,7 +6025,7 @@
6025
6025
  "__schema": "ParameterSchema",
6026
6026
  "location": {
6027
6027
  "filePath": "starter-list.ts",
6028
- "line": 15,
6028
+ "line": 19,
6029
6029
  "character": 15
6030
6030
  },
6031
6031
  "name": "starters",
@@ -6033,14 +6033,14 @@
6033
6033
  "__schema": "TypeArraySchema",
6034
6034
  "location": {
6035
6035
  "filePath": "starter-list.ts",
6036
- "line": 15,
6036
+ "line": 19,
6037
6037
  "character": 25
6038
6038
  },
6039
6039
  "type": {
6040
6040
  "__schema": "TypeRefSchema",
6041
6041
  "location": {
6042
6042
  "filePath": "starter-list.ts",
6043
- "line": 15,
6043
+ "line": 19,
6044
6044
  "character": 25
6045
6045
  },
6046
6046
  "name": "EnvHandler",
@@ -6053,7 +6053,7 @@
6053
6053
  "__schema": "TypeRefSchema",
6054
6054
  "location": {
6055
6055
  "filePath": "starter-list.ts",
6056
- "line": 15,
6056
+ "line": 19,
6057
6057
  "character": 36
6058
6058
  },
6059
6059
  "name": "WorkspaceTemplate"
@@ -6068,7 +6068,7 @@
6068
6068
  "__schema": "ParameterSchema",
6069
6069
  "location": {
6070
6070
  "filePath": "starter-list.ts",
6071
- "line": 15,
6071
+ "line": 19,
6072
6072
  "character": 58
6073
6073
  },
6074
6074
  "name": "options",
@@ -6076,7 +6076,7 @@
6076
6076
  "__schema": "TypeRefSchema",
6077
6077
  "location": {
6078
6078
  "filePath": "starter-list.ts",
6079
- "line": 15,
6079
+ "line": 19,
6080
6080
  "character": 67
6081
6081
  },
6082
6082
  "name": "StarterListOptions",
@@ -6091,7 +6091,7 @@
6091
6091
  "__schema": "InferenceTypeSchema",
6092
6092
  "location": {
6093
6093
  "filePath": "starter-list.ts",
6094
- "line": 15,
6094
+ "line": 19,
6095
6095
  "character": 3
6096
6096
  },
6097
6097
  "type": "(context: EnvContext) => StarterList"
@@ -12842,16 +12842,16 @@
12842
12842
  "__schema": "ParameterSchema",
12843
12843
  "location": {
12844
12844
  "filePath": "template-list.ts",
12845
- "line": 9,
12846
- "character": 15
12845
+ "line": 10,
12846
+ "character": 5
12847
12847
  },
12848
12848
  "name": "name",
12849
12849
  "type": {
12850
12850
  "__schema": "KeywordTypeSchema",
12851
12851
  "location": {
12852
12852
  "filePath": "template-list.ts",
12853
- "line": 9,
12854
- "character": 30
12853
+ "line": 10,
12854
+ "character": 20
12855
12855
  },
12856
12856
  "name": "string"
12857
12857
  },
@@ -12862,23 +12862,23 @@
12862
12862
  "__schema": "ParameterSchema",
12863
12863
  "location": {
12864
12864
  "filePath": "template-list.ts",
12865
- "line": 9,
12866
- "character": 38
12865
+ "line": 11,
12866
+ "character": 5
12867
12867
  },
12868
12868
  "name": "templates",
12869
12869
  "type": {
12870
12870
  "__schema": "TypeArraySchema",
12871
12871
  "location": {
12872
12872
  "filePath": "template-list.ts",
12873
- "line": 9,
12874
- "character": 57
12873
+ "line": 11,
12874
+ "character": 24
12875
12875
  },
12876
12876
  "type": {
12877
12877
  "__schema": "TypeRefSchema",
12878
12878
  "location": {
12879
12879
  "filePath": "template-list.ts",
12880
- "line": 9,
12881
- "character": 57
12880
+ "line": 11,
12881
+ "character": 24
12882
12882
  },
12883
12883
  "name": "EnvHandler",
12884
12884
  "componentId": {
@@ -12890,8 +12890,8 @@
12890
12890
  "__schema": "TypeRefSchema",
12891
12891
  "location": {
12892
12892
  "filePath": "template-list.ts",
12893
- "line": 9,
12894
- "character": 68
12893
+ "line": 11,
12894
+ "character": 35
12895
12895
  },
12896
12896
  "name": "ComponentTemplate"
12897
12897
  }
@@ -12905,16 +12905,16 @@
12905
12905
  "__schema": "ParameterSchema",
12906
12906
  "location": {
12907
12907
  "filePath": "template-list.ts",
12908
- "line": 9,
12909
- "character": 90
12908
+ "line": 12,
12909
+ "character": 5
12910
12910
  },
12911
12911
  "name": "context",
12912
12912
  "type": {
12913
12913
  "__schema": "TypeRefSchema",
12914
12914
  "location": {
12915
12915
  "filePath": "template-list.ts",
12916
- "line": 9,
12917
- "character": 107
12916
+ "line": 12,
12917
+ "character": 22
12918
12918
  },
12919
12919
  "name": "EnvContext",
12920
12920
  "componentId": {
@@ -12941,7 +12941,7 @@
12941
12941
  "__schema": "FunctionLikeSchema",
12942
12942
  "location": {
12943
12943
  "filePath": "template-list.ts",
12944
- "line": 11,
12944
+ "line": 15,
12945
12945
  "character": 3
12946
12946
  },
12947
12947
  "signature": "(method) TemplateList.compute(): ComponentTemplate[]",
@@ -12951,14 +12951,14 @@
12951
12951
  "__schema": "TypeArraySchema",
12952
12952
  "location": {
12953
12953
  "filePath": "template-list.ts",
12954
- "line": 11,
12954
+ "line": 15,
12955
12955
  "character": 14
12956
12956
  },
12957
12957
  "type": {
12958
12958
  "__schema": "TypeRefSchema",
12959
12959
  "location": {
12960
12960
  "filePath": "template-list.ts",
12961
- "line": 11,
12961
+ "line": 15,
12962
12962
  "character": 14
12963
12963
  },
12964
12964
  "name": "ComponentTemplate"
@@ -12970,7 +12970,7 @@
12970
12970
  "__schema": "FunctionLikeSchema",
12971
12971
  "location": {
12972
12972
  "filePath": "template-list.ts",
12973
- "line": 15,
12973
+ "line": 19,
12974
12974
  "character": 3
12975
12975
  },
12976
12976
  "signature": "(method) TemplateList.from(templates: EnvHandler<ComponentTemplate>[], options?: TemplateListOptions): (context: EnvContext) => TemplateList",
@@ -12980,7 +12980,7 @@
12980
12980
  "__schema": "ParameterSchema",
12981
12981
  "location": {
12982
12982
  "filePath": "template-list.ts",
12983
- "line": 15,
12983
+ "line": 19,
12984
12984
  "character": 15
12985
12985
  },
12986
12986
  "name": "templates",
@@ -12988,14 +12988,14 @@
12988
12988
  "__schema": "TypeArraySchema",
12989
12989
  "location": {
12990
12990
  "filePath": "template-list.ts",
12991
- "line": 15,
12991
+ "line": 19,
12992
12992
  "character": 26
12993
12993
  },
12994
12994
  "type": {
12995
12995
  "__schema": "TypeRefSchema",
12996
12996
  "location": {
12997
12997
  "filePath": "template-list.ts",
12998
- "line": 15,
12998
+ "line": 19,
12999
12999
  "character": 26
13000
13000
  },
13001
13001
  "name": "EnvHandler",
@@ -13008,7 +13008,7 @@
13008
13008
  "__schema": "TypeRefSchema",
13009
13009
  "location": {
13010
13010
  "filePath": "template-list.ts",
13011
- "line": 15,
13011
+ "line": 19,
13012
13012
  "character": 37
13013
13013
  },
13014
13014
  "name": "ComponentTemplate"
@@ -13023,7 +13023,7 @@
13023
13023
  "__schema": "ParameterSchema",
13024
13024
  "location": {
13025
13025
  "filePath": "template-list.ts",
13026
- "line": 15,
13026
+ "line": 19,
13027
13027
  "character": 59
13028
13028
  },
13029
13029
  "name": "options",
@@ -13031,7 +13031,7 @@
13031
13031
  "__schema": "TypeRefSchema",
13032
13032
  "location": {
13033
13033
  "filePath": "template-list.ts",
13034
- "line": 15,
13034
+ "line": 19,
13035
13035
  "character": 68
13036
13036
  },
13037
13037
  "name": "TemplateListOptions",
@@ -13046,7 +13046,7 @@
13046
13046
  "__schema": "InferenceTypeSchema",
13047
13047
  "location": {
13048
13048
  "filePath": "template-list.ts",
13049
- "line": 15,
13049
+ "line": 19,
13050
13050
  "character": 3
13051
13051
  },
13052
13052
  "type": "(context: EnvContext) => TemplateList"
@@ -13134,16 +13134,16 @@
13134
13134
  "__schema": "ParameterSchema",
13135
13135
  "location": {
13136
13136
  "filePath": "starter-list.ts",
13137
- "line": 9,
13138
- "character": 15
13137
+ "line": 10,
13138
+ "character": 5
13139
13139
  },
13140
13140
  "name": "name",
13141
13141
  "type": {
13142
13142
  "__schema": "KeywordTypeSchema",
13143
13143
  "location": {
13144
13144
  "filePath": "starter-list.ts",
13145
- "line": 9,
13146
- "character": 30
13145
+ "line": 10,
13146
+ "character": 20
13147
13147
  },
13148
13148
  "name": "string"
13149
13149
  },
@@ -13154,23 +13154,23 @@
13154
13154
  "__schema": "ParameterSchema",
13155
13155
  "location": {
13156
13156
  "filePath": "starter-list.ts",
13157
- "line": 9,
13158
- "character": 38
13157
+ "line": 11,
13158
+ "character": 5
13159
13159
  },
13160
13160
  "name": "starters",
13161
13161
  "type": {
13162
13162
  "__schema": "TypeArraySchema",
13163
13163
  "location": {
13164
13164
  "filePath": "starter-list.ts",
13165
- "line": 9,
13166
- "character": 56
13165
+ "line": 11,
13166
+ "character": 23
13167
13167
  },
13168
13168
  "type": {
13169
13169
  "__schema": "TypeRefSchema",
13170
13170
  "location": {
13171
13171
  "filePath": "starter-list.ts",
13172
- "line": 9,
13173
- "character": 56
13172
+ "line": 11,
13173
+ "character": 23
13174
13174
  },
13175
13175
  "name": "EnvHandler",
13176
13176
  "componentId": {
@@ -13182,8 +13182,8 @@
13182
13182
  "__schema": "TypeRefSchema",
13183
13183
  "location": {
13184
13184
  "filePath": "starter-list.ts",
13185
- "line": 9,
13186
- "character": 67
13185
+ "line": 11,
13186
+ "character": 34
13187
13187
  },
13188
13188
  "name": "WorkspaceTemplate"
13189
13189
  }
@@ -13197,16 +13197,16 @@
13197
13197
  "__schema": "ParameterSchema",
13198
13198
  "location": {
13199
13199
  "filePath": "starter-list.ts",
13200
- "line": 9,
13201
- "character": 89
13200
+ "line": 12,
13201
+ "character": 5
13202
13202
  },
13203
13203
  "name": "context",
13204
13204
  "type": {
13205
13205
  "__schema": "TypeRefSchema",
13206
13206
  "location": {
13207
13207
  "filePath": "starter-list.ts",
13208
- "line": 9,
13209
- "character": 106
13208
+ "line": 12,
13209
+ "character": 22
13210
13210
  },
13211
13211
  "name": "EnvContext",
13212
13212
  "componentId": {
@@ -13233,7 +13233,7 @@
13233
13233
  "__schema": "FunctionLikeSchema",
13234
13234
  "location": {
13235
13235
  "filePath": "starter-list.ts",
13236
- "line": 11,
13236
+ "line": 15,
13237
13237
  "character": 3
13238
13238
  },
13239
13239
  "signature": "(method) StarterList.compute(): WorkspaceTemplate[]",
@@ -13243,14 +13243,14 @@
13243
13243
  "__schema": "TypeArraySchema",
13244
13244
  "location": {
13245
13245
  "filePath": "starter-list.ts",
13246
- "line": 11,
13246
+ "line": 15,
13247
13247
  "character": 14
13248
13248
  },
13249
13249
  "type": {
13250
13250
  "__schema": "TypeRefSchema",
13251
13251
  "location": {
13252
13252
  "filePath": "starter-list.ts",
13253
- "line": 11,
13253
+ "line": 15,
13254
13254
  "character": 14
13255
13255
  },
13256
13256
  "name": "WorkspaceTemplate"
@@ -13262,7 +13262,7 @@
13262
13262
  "__schema": "FunctionLikeSchema",
13263
13263
  "location": {
13264
13264
  "filePath": "starter-list.ts",
13265
- "line": 15,
13265
+ "line": 19,
13266
13266
  "character": 3
13267
13267
  },
13268
13268
  "signature": "(method) StarterList.from(starters: EnvHandler<WorkspaceTemplate>[], options?: StarterListOptions): (context: EnvContext) => StarterList",
@@ -13272,7 +13272,7 @@
13272
13272
  "__schema": "ParameterSchema",
13273
13273
  "location": {
13274
13274
  "filePath": "starter-list.ts",
13275
- "line": 15,
13275
+ "line": 19,
13276
13276
  "character": 15
13277
13277
  },
13278
13278
  "name": "starters",
@@ -13280,14 +13280,14 @@
13280
13280
  "__schema": "TypeArraySchema",
13281
13281
  "location": {
13282
13282
  "filePath": "starter-list.ts",
13283
- "line": 15,
13283
+ "line": 19,
13284
13284
  "character": 25
13285
13285
  },
13286
13286
  "type": {
13287
13287
  "__schema": "TypeRefSchema",
13288
13288
  "location": {
13289
13289
  "filePath": "starter-list.ts",
13290
- "line": 15,
13290
+ "line": 19,
13291
13291
  "character": 25
13292
13292
  },
13293
13293
  "name": "EnvHandler",
@@ -13300,7 +13300,7 @@
13300
13300
  "__schema": "TypeRefSchema",
13301
13301
  "location": {
13302
13302
  "filePath": "starter-list.ts",
13303
- "line": 15,
13303
+ "line": 19,
13304
13304
  "character": 36
13305
13305
  },
13306
13306
  "name": "WorkspaceTemplate"
@@ -13315,7 +13315,7 @@
13315
13315
  "__schema": "ParameterSchema",
13316
13316
  "location": {
13317
13317
  "filePath": "starter-list.ts",
13318
- "line": 15,
13318
+ "line": 19,
13319
13319
  "character": 58
13320
13320
  },
13321
13321
  "name": "options",
@@ -13323,7 +13323,7 @@
13323
13323
  "__schema": "TypeRefSchema",
13324
13324
  "location": {
13325
13325
  "filePath": "starter-list.ts",
13326
- "line": 15,
13326
+ "line": 19,
13327
13327
  "character": 67
13328
13328
  },
13329
13329
  "name": "StarterListOptions",
@@ -13338,7 +13338,7 @@
13338
13338
  "__schema": "InferenceTypeSchema",
13339
13339
  "location": {
13340
13340
  "filePath": "starter-list.ts",
13341
- "line": 15,
13341
+ "line": 19,
13342
13342
  "character": 3
13343
13343
  },
13344
13344
  "type": "(context: EnvContext) => StarterList"
@@ -14159,7 +14159,7 @@
14159
14159
  "componentId": {
14160
14160
  "scope": "teambit.generator",
14161
14161
  "name": "generator",
14162
- "version": "1.0.426"
14162
+ "version": "1.0.427"
14163
14163
  },
14164
14164
  "taggedModuleExports": []
14165
14165
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_camelcase","_path","_graphql","_cli","_workspace","_envs","_config","_workspaceConfigFiles","_component","_bit","_harmony","_git","_bitError","_aspectLoader","_tracker","_newComponentHelper","_lodash","_logger","_deprecation","_generator","_create","_templates","_generator2","_componentGenerator","_workspaceGenerator","_new","_templates2","_basic","_starter","_generator3","_workspacePathExists","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GeneratorMain","constructor","componentTemplateSlot","workspaceTemplateSlot","onComponentCreateSlot","config","workspace","envs","aspectLoader","newComponentHelper","componentAspect","tracker","logger","git","wsConfigFiles","deprecation","id","template","shouldBeHidden","hidden","hideCoreTemplates","isCoreAspect","aspectId","name","description","registerComponentTemplate","templates","register","registerWorkspaceTemplate","registerOnComponentCreate","fn","listTemplates","aspect","isRunningInsideWorkspace","getAllComponentTemplatesDescriptorsFlattened","getAllWorkspaceTemplatesDescriptorFlattened","listComponentTemplates","opts","Boolean","getComponentTemplateByAspect","get","getComponentTemplate","fromEnv","listEnvComponentTemplates","found","findTemplateByAspectIdAndName","getAllComponentTemplatesFlattened","find","idWithoutVersion","split","getGlobalGeneratorEnvs","globalScopeHarmony","components","legacyGlobalsSnapshot","loadAspectsFromGlobalScope","remoteGenerator","GeneratorAspect","remoteEnvsAspect","EnvsAspect","fullAspectId","toString","restoreGlobalsFromSnapshot","findWorkspaceTemplateInGlobalScope","fromGlobal","searchRegisteredWorkspaceTemplate","workspaceTemplate","findTemplateInOtherWorkspace","workspacePath","BitError","harmony","loadBit","WorkspaceAspect","err","Error","aspectComponentId","resolveComponentId","loadAspects","aspectComponent","aspectFullId","generator","getWorkspaceTemplate","registeredTemplate","listEnvWorkspaceTemplates","getAllWorkspaceTemplatesFlattened","tpl","generateComponentTemplate","componentNames","templateName","options","installOptions","OutsideWorkspaceError","namespace","componentConfigLoadingRegistry","ComponentConfig","templateWithId","componentIds","map","componentName","getNewComponentId","scope","componentNameSameAsTemplateName","componentId","compNamePascal","camelCase","pascalCase","envId","getEnvIdFromTemplateWithId","componentGenerator","ComponentGenerator","generate","force","envIdFromTemplate","env","parsedFromTemplate","ComponentID","tryFromString","resolvedId","resolveEnvIdWithPotentialVersionForConfig","fromString","envName","Promise","resolve","undefined","generateWorkspaceTemplate","workspaceName","currentDir","process","cwd","fs","existsSync","WorkspacePathExists","loadFrom","workspaceGenerator","WorkspaceGenerator","warnAboutDeprecation","appName","deprecationInfo","getDeprecationInfo","isDeprecate","newStarterMsg","newId","consoleWarning","envTemplates","listEnvComponentTemplateDescriptors","filtered","flattened","getTemplateDescriptor","templatesByAspects","toArray","flatMap","componentTemplates","workspaceTemplates","loadEnvs","getGeneratorStarters","envStarters","starter","compact","ids","envTemplate","toStringWithoutVersion","titlePrefix","getConfiguredEnvs","configEnvs","includes","globals","allIds","uniq","concat","getGeneratorTemplates","tpls","host","getHost","envsAspect","potentialEnvs","getEnvDefinition","aspectLoaded","aspects","provider","cli","graphql","loggerMain","createLogger","commands","CreateCmd","TemplatesCmd","NewCmd","generatorSchema","registerPlugins","StarterPlugin","registerService","GeneratorService","componentGeneratorTemplate","componentGeneratorTemplateStandalone","starterTemplate","starterTemplateStandalone","BasicWorkspaceStarter","exports","Slot","withType","CLIAspect","GraphqlAspect","AspectLoaderAspect","NewComponentHelperAspect","ComponentAspect","TrackerAspect","LoggerAspect","GitAspect","WorkspaceConfigFilesAspect","DeprecationAspect","MainRuntime","addRuntime"],"sources":["generator.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport camelCase from 'camelcase';\nimport { resolve } from 'path';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { EnvDefinition, EnvsAspect, EnvsMain } from '@teambit/envs';\nimport ComponentConfig from '@teambit/legacy/dist/consumer/config';\nimport { WorkspaceConfigFilesAspect, WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { ComponentAspect, ComponentID } from '@teambit/component';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { isCoreAspect, loadBit, restoreGlobalsFromSnapshot } from '@teambit/bit';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { GitAspect, GitMain } from '@teambit/git';\nimport { BitError } from '@teambit/bit-error';\nimport { AspectLoaderAspect, AspectLoaderMain } from '@teambit/aspect-loader';\nimport { TrackerAspect, TrackerMain } from '@teambit/tracker';\nimport { NewComponentHelperAspect, NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { compact, uniq } from 'lodash';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DeprecationAspect, DeprecationMain } from '@teambit/deprecation';\nimport { ComponentTemplate } from './component-template';\nimport { GeneratorAspect } from './generator.aspect';\nimport { CreateCmd, CreateOptions } from './create.cmd';\nimport { TemplatesCmd } from './templates.cmd';\nimport { generatorSchema } from './generator.graphql';\nimport { ComponentGenerator, GenerateResult, InstallOptions, OnComponentCreateFn } from './component-generator';\nimport { WorkspaceGenerator } from './workspace-generator';\nimport { WorkspaceTemplate } from './workspace-template';\nimport { NewCmd, NewOptions } from './new.cmd';\nimport {\n componentGeneratorTemplate,\n componentGeneratorTemplateStandalone,\n starterTemplate,\n starterTemplateStandalone,\n} from './templates';\nimport { BasicWorkspaceStarter } from './templates/basic';\nimport { StarterPlugin } from './starter.plugin';\nimport { GeneratorService } from './generator.service';\nimport { WorkspacePathExists } from './exceptions/workspace-path-exists';\n\nexport type ComponentTemplateSlot = SlotRegistry<ComponentTemplate[]>;\nexport type WorkspaceTemplateSlot = SlotRegistry<WorkspaceTemplate[]>;\nexport type OnComponentCreateSlot = SlotRegistry<OnComponentCreateFn>;\n\nexport type TemplateDescriptor = {\n aspectId: string;\n titlePrefix?: string;\n name: string;\n description?: string;\n hidden?: boolean;\n};\n\ntype TemplateWithId = { id: string; envName?: string };\ntype WorkspaceTemplateWithId = TemplateWithId & { template: WorkspaceTemplate };\ntype ComponentTemplateWithId = TemplateWithId & { template: ComponentTemplate };\ntype AnyTemplateWithId = TemplateWithId & { template: ComponentTemplate | WorkspaceTemplate };\n\nexport type GenerateWorkspaceTemplateResult = { workspacePath: string; appName?: string };\n\nexport type GeneratorConfig = {\n /**\n * array of aspects to include in the list of templates.\n */\n aspects: string[];\n\n /**\n * by default core templates are shown.\n * use this to hide them unless `--show-all` flag of `bit templates` was used\n */\n hideCoreTemplates: boolean;\n\n /**\n * default envs.\n */\n envs?: string[];\n};\n\nexport class GeneratorMain {\n private aspectLoaded = false;\n constructor(\n private componentTemplateSlot: ComponentTemplateSlot,\n private workspaceTemplateSlot: WorkspaceTemplateSlot,\n private onComponentCreateSlot: OnComponentCreateSlot,\n private config: GeneratorConfig,\n private workspace: Workspace,\n private envs: EnvsMain,\n private aspectLoader: AspectLoaderMain,\n private newComponentHelper: NewComponentHelperMain,\n private componentAspect: ComponentMain,\n private tracker: TrackerMain,\n private logger: Logger,\n private git: GitMain,\n private wsConfigFiles: WorkspaceConfigFilesMain,\n private deprecation: DeprecationMain\n ) {}\n\n /**\n * register a new component template.\n */\n registerComponentTemplate(templates: ComponentTemplate[]) {\n this.componentTemplateSlot.register(templates);\n return this;\n }\n\n /**\n * register a new workspace starter.\n */\n registerWorkspaceTemplate(templates: WorkspaceTemplate[]) {\n this.workspaceTemplateSlot.register(templates);\n return this;\n }\n\n registerOnComponentCreate(fn: OnComponentCreateFn) {\n this.onComponentCreateSlot.register(fn);\n return this;\n }\n\n /**\n * list all component templates registered in the workspace or workspace templates in case the\n * workspace is not available\n */\n async listTemplates({ aspect }: { aspect?: string } = {}): Promise<TemplateDescriptor[]> {\n if (this.isRunningInsideWorkspace()) {\n return this.getAllComponentTemplatesDescriptorsFlattened(aspect);\n }\n return this.getAllWorkspaceTemplatesDescriptorFlattened(aspect);\n }\n\n private getTemplateDescriptor = ({ id, template }: AnyTemplateWithId): TemplateDescriptor => {\n const shouldBeHidden = () => {\n if (template.hidden) return true;\n if (this.config.hideCoreTemplates && isCoreAspect(id)) return true;\n return false;\n };\n return {\n aspectId: id,\n name: template.name,\n description: template.description,\n hidden: shouldBeHidden(),\n };\n };\n\n /**\n * @deprecated use this.listTemplates()\n */\n async listComponentTemplates(opts: { aspect?: string }): Promise<TemplateDescriptor[]> {\n return this.listTemplates(opts);\n }\n\n isRunningInsideWorkspace(): boolean {\n return Boolean(this.workspace);\n }\n\n /**\n * get all component templates registered by a specific aspect ID.\n */\n getComponentTemplateByAspect(aspectId: string): ComponentTemplate[] {\n return this.componentTemplateSlot.get(aspectId) || [];\n }\n\n /**\n * returns a specific component template.\n */\n async getComponentTemplate(name: string, aspectId?: string): Promise<ComponentTemplateWithId | undefined> {\n const fromEnv = await this.listEnvComponentTemplates([], aspectId);\n if (fromEnv && fromEnv.length) {\n const found = this.findTemplateByAspectIdAndName<ComponentTemplateWithId>(aspectId, name, fromEnv);\n if (found) return found;\n }\n // fallback to aspect id not from env if provided\n const templates = await this.getAllComponentTemplatesFlattened();\n const found = this.findTemplateByAspectIdAndName<ComponentTemplateWithId>(aspectId, name, templates);\n return found;\n }\n\n private findTemplateByAspectIdAndName<T>(\n aspectId: string | undefined,\n name: string,\n templates: Array<T>\n ): T | undefined {\n // @ts-ignore (should set T to be extends ComponentTemplateWithId or WorkspaceTemplateWithId)\n const found = templates.find(({ id, template }) => {\n // When doing something like:\n // bit create react-env my-env --aspect teambit.react/react-env\n // we will get the aspectId without version\n // but the env might be loaded from the global scope then it will be with a version\n // so it won't found if we don't look for it like this\n const idWithoutVersion = id.split('@')[0];\n if (aspectId && id !== aspectId && idWithoutVersion !== aspectId) return false;\n return template.name === name;\n });\n return found;\n }\n\n /**\n * Get the generator aspect and the envs aspect from an harmony instance of the global scope\n */\n private async getGlobalGeneratorEnvs(\n aspectId: string\n ): Promise<{ remoteGenerator: GeneratorMain; fullAspectId: string; remoteEnvsAspect: EnvsMain; aspect: any }> {\n const { globalScopeHarmony, components, legacyGlobalsSnapshot } =\n await this.aspectLoader.loadAspectsFromGlobalScope([aspectId]);\n const remoteGenerator = globalScopeHarmony.get<GeneratorMain>(GeneratorAspect.id);\n const remoteEnvsAspect = globalScopeHarmony.get<EnvsMain>(EnvsAspect.id);\n const aspect = components[0];\n const fullAspectId = aspect.id.toString();\n restoreGlobalsFromSnapshot(legacyGlobalsSnapshot);\n\n return { remoteGenerator, fullAspectId, remoteEnvsAspect, aspect };\n }\n\n /**\n * in the case the aspect-id is given and this aspect doesn't exist locally, import it to the\n * global scope and load it from the capsule\n */\n async findWorkspaceTemplateInGlobalScope(\n aspectId: string,\n name?: string\n ): Promise<{ workspaceTemplate?: WorkspaceTemplate; aspect?: Component }> {\n const { remoteGenerator, fullAspectId, remoteEnvsAspect, aspect } = await this.getGlobalGeneratorEnvs(aspectId);\n const fromGlobal = await remoteGenerator.searchRegisteredWorkspaceTemplate.call(\n remoteGenerator,\n name,\n fullAspectId,\n remoteEnvsAspect\n );\n return { workspaceTemplate: fromGlobal, aspect };\n }\n\n async findTemplateInOtherWorkspace(workspacePath: string, name: string, aspectId?: string) {\n if (!aspectId)\n throw new BitError(\n `to load a template from a different workspace, please provide the aspect-id using --aspect flag`\n );\n const harmony = await loadBit(workspacePath);\n let workspace: Workspace;\n try {\n workspace = harmony.get<Workspace>(WorkspaceAspect.id);\n } catch (err: any) {\n throw new Error(`fatal: \"${workspacePath}\" is not a valid Bit workspace, make sure the path is correct`);\n }\n const aspectComponentId = await workspace.resolveComponentId(aspectId);\n await workspace.loadAspects([aspectId], true);\n const aspectComponent = await workspace.get(aspectComponentId);\n const aspectFullId = aspectComponentId.toString();\n const generator = harmony.get<GeneratorMain>(GeneratorAspect.id);\n const workspaceTemplate = await generator.searchRegisteredWorkspaceTemplate(name, aspectFullId);\n return { workspaceTemplate, aspect: aspectComponent };\n }\n\n /**\n * returns a specific workspace template.\n */\n async getWorkspaceTemplate(\n name: string,\n aspectId?: string\n ): Promise<{ workspaceTemplate: WorkspaceTemplate; aspect?: Component }> {\n const registeredTemplate = await this.searchRegisteredWorkspaceTemplate(name, aspectId);\n if (registeredTemplate) {\n return { workspaceTemplate: registeredTemplate };\n }\n if (!aspectId) {\n throw new BitError(\n `template \"${name}\" was not found, please use --aspect flag to load from an env i.e --aspect teambit.react/react-env\\n Learn more about component templates here: https://bit.dev/reference/generator/create-generator`\n );\n }\n\n const { workspaceTemplate, aspect } = await this.findWorkspaceTemplateInGlobalScope(aspectId, name);\n if (workspaceTemplate) {\n return { workspaceTemplate, aspect };\n }\n throw new BitError(\n `template \"${name}\" was not found, please use --aspect flag to load from an env i.e --aspect teambit.react/react-env\\n Learn more about component templates here: https://bit.dev/reference/generator/create-generator`\n );\n }\n\n async searchRegisteredWorkspaceTemplate(\n name?: string,\n aspectId?: string,\n remoteEnvsAspect?: EnvsMain\n ): Promise<WorkspaceTemplate | undefined> {\n let fromEnv;\n\n if (aspectId) {\n fromEnv = await this.listEnvWorkspaceTemplates(aspectId, remoteEnvsAspect);\n }\n const templates = fromEnv && fromEnv.length ? fromEnv : this.getAllWorkspaceTemplatesFlattened();\n const found = templates.find(({ id, template: tpl }) => {\n if (aspectId && name) return aspectId === id && name === tpl.name;\n if (aspectId) return aspectId === id;\n if (name) return name === tpl.name;\n throw new Error(`searchRegisteredWorkspaceTemplate expects to get \"name\" or \"aspectId\"`);\n });\n\n return found?.template;\n }\n\n async generateComponentTemplate(\n componentNames: string[],\n templateName: string,\n options: Partial<CreateOptions>,\n installOptions?: InstallOptions\n ): Promise<GenerateResult[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n await this.loadAspects();\n const { namespace, aspect } = options;\n\n const componentConfigLoadingRegistry = ComponentConfig.componentConfigLoadingRegistry;\n\n const templateWithId = await this.getComponentTemplate(templateName, aspect);\n\n ComponentConfig.componentConfigLoadingRegistry = componentConfigLoadingRegistry;\n\n if (!templateWithId) throw new BitError(`template \"${templateName}\" was not found`);\n\n const componentIds = componentNames.map((componentName) =>\n this.newComponentHelper.getNewComponentId(componentName, namespace, options.scope)\n );\n\n const componentNameSameAsTemplateName = componentIds.find((componentId) => componentId.name === templateName);\n if (componentNameSameAsTemplateName) {\n const compNamePascal = camelCase(templateName, { pascalCase: true });\n throw new BitError(\n `unable to create a component with the same name as the template \"${templateName}\", please use a different name.\nthe reason is that after refactoring, the code will have this invalid class: \"class ${compNamePascal} extends ${compNamePascal} {}\"`\n );\n }\n\n const envId = await this.getEnvIdFromTemplateWithId(templateWithId);\n\n const componentGenerator = new ComponentGenerator(\n this.workspace,\n componentIds,\n options,\n templateWithId.template,\n this.envs,\n this.newComponentHelper,\n this.tracker,\n this.wsConfigFiles,\n this.logger,\n this.onComponentCreateSlot,\n templateWithId.id,\n envId,\n installOptions\n );\n return componentGenerator.generate(options.force);\n }\n\n private async getEnvIdFromTemplateWithId(templateWithId: ComponentTemplateWithId): Promise<ComponentID | undefined> {\n const envIdFromTemplate = templateWithId.template.env;\n if (envIdFromTemplate) {\n const parsedFromTemplate = ComponentID.tryFromString(envIdFromTemplate);\n if (!parsedFromTemplate) {\n throw new BitError(\n `Error: unable to parse envId from template. template name: ${templateWithId.template.name}, envId: ${envIdFromTemplate}`\n );\n }\n const resolvedId = await this.workspace.resolveEnvIdWithPotentialVersionForConfig(parsedFromTemplate);\n return ComponentID.fromString(resolvedId);\n }\n if (templateWithId.envName) {\n return ComponentID.fromString(templateWithId.id);\n }\n return Promise.resolve(undefined);\n }\n\n async generateWorkspaceTemplate(\n workspaceName: string,\n templateName: string,\n options: NewOptions & { aspect?: string; currentDir?: boolean }\n ): Promise<GenerateWorkspaceTemplateResult> {\n if (this.workspace) {\n throw new BitError('Error: unable to generate a new workspace inside of an existing workspace');\n }\n const workspacePath = options.currentDir ? process.cwd() : resolve(workspaceName);\n if (!options.currentDir && fs.existsSync(workspacePath)) {\n throw new WorkspacePathExists(workspacePath);\n }\n const { aspect: aspectId, loadFrom } = options;\n const { workspaceTemplate, aspect } = loadFrom\n ? await this.findTemplateInOtherWorkspace(loadFrom, templateName, aspectId)\n : await this.getWorkspaceTemplate(templateName, aspectId);\n\n if (!workspaceTemplate) throw new BitError(`template \"${templateName}\" was not found`);\n const workspaceGenerator = new WorkspaceGenerator(workspaceName, workspacePath, options, workspaceTemplate, aspect);\n await this.warnAboutDeprecation(aspect);\n await workspaceGenerator.generate();\n return { workspacePath, appName: workspaceTemplate.appName };\n }\n\n private async warnAboutDeprecation(aspect?: Component) {\n if (!aspect) return;\n const deprecationInfo = await this.deprecation.getDeprecationInfo(aspect);\n if (deprecationInfo.isDeprecate) {\n const newStarterMsg = deprecationInfo.newId ? `, use \"${deprecationInfo.newId.toString()}\" instead` : '';\n this.logger.consoleWarning(`the starter \"${aspect?.id.toString()}\" is deprecated${newStarterMsg}`);\n }\n }\n\n private async getAllComponentTemplatesDescriptorsFlattened(aspectId?: string): Promise<Array<TemplateDescriptor>> {\n const envTemplates = await this.listEnvComponentTemplateDescriptors([], aspectId);\n if (envTemplates && envTemplates.length) {\n if (!aspectId) return envTemplates;\n const filtered = envTemplates.filter((template) => template.aspectId === aspectId);\n if (filtered.length) return filtered;\n }\n\n const flattened = this.getAllComponentTemplatesFlattened();\n const filtered = aspectId ? flattened.filter((template) => template.id === aspectId) : flattened;\n return filtered.map((template) => this.getTemplateDescriptor(template));\n }\n\n private getAllComponentTemplatesFlattened(): Array<{ id: string; template: ComponentTemplate }> {\n const templatesByAspects = this.componentTemplateSlot.toArray();\n const flattened = templatesByAspects.flatMap(([id, componentTemplates]) => {\n return componentTemplates.map((template) => ({\n id,\n template,\n }));\n });\n return flattened;\n }\n\n private async getAllWorkspaceTemplatesDescriptorFlattened(aspectId?: string): Promise<Array<TemplateDescriptor>> {\n let envTemplates;\n if (aspectId) {\n envTemplates = await this.listEnvWorkspaceTemplates(aspectId);\n }\n\n const templates = envTemplates && envTemplates.length ? envTemplates : this.getAllWorkspaceTemplatesFlattened();\n return templates.map((template) => this.getTemplateDescriptor(template));\n }\n\n private getAllWorkspaceTemplatesFlattened(): Array<{ id: string; template: WorkspaceTemplate }> {\n const templatesByAspects = this.workspaceTemplateSlot.toArray();\n return templatesByAspects.flatMap(([id, workspaceTemplates]) => {\n return workspaceTemplates.map((template) => ({\n id,\n template,\n }));\n });\n }\n\n /**\n * list all starter templates registered by an env.\n */\n async listEnvWorkspaceTemplates(envId: string, remoteEnvsAspect?: EnvsMain): Promise<Array<WorkspaceTemplateWithId>> {\n const envs = await this.loadEnvs([envId], remoteEnvsAspect);\n const workspaceTemplates = envs.flatMap((env) => {\n if (!env.env.getGeneratorStarters) return undefined;\n const envStarters = env.env.getGeneratorStarters();\n return envStarters.map((starter) => {\n const componentId = ComponentID.fromString(env.id);\n return {\n id: componentId.toString(),\n envName: env.name,\n template: starter,\n };\n });\n });\n\n return compact(workspaceTemplates);\n }\n\n /**\n * list all component templates registered by an env.\n */\n async listEnvComponentTemplateDescriptors(ids: string[] = [], aspectId?: string): Promise<TemplateDescriptor[]> {\n const envTemplates = await this.listEnvComponentTemplates(ids, aspectId);\n const templates: TemplateDescriptor[] = envTemplates.map((envTemplate) => {\n const componentId = ComponentID.fromString(envTemplate.id);\n return {\n aspectId: componentId.toStringWithoutVersion(),\n titlePrefix: envTemplate.envName,\n ...envTemplate.template,\n };\n });\n\n return templates;\n }\n\n getConfiguredEnvs(): string[] {\n return this.config.envs ?? [];\n }\n\n async listEnvComponentTemplates(ids: string[] = [], aspectId?: string): Promise<Array<ComponentTemplateWithId>> {\n const configEnvs = this.config.envs || [];\n let remoteEnvsAspect;\n let fullAspectId;\n if (aspectId && !configEnvs.includes(aspectId)) {\n const globals = await this.getGlobalGeneratorEnvs(aspectId);\n remoteEnvsAspect = globals.remoteEnvsAspect;\n fullAspectId = globals.fullAspectId;\n }\n const allIds = uniq(configEnvs?.concat(ids).concat([aspectId, fullAspectId]).filter(Boolean));\n const envs = await this.loadEnvs(allIds, remoteEnvsAspect);\n const templates = envs.flatMap((env) => {\n if (!env.env.getGeneratorTemplates) return [];\n const tpls = env.env.getGeneratorTemplates() || [];\n const componentId = ComponentID.fromString(env.id);\n return tpls.map((template) => {\n return {\n id: componentId.toString(),\n envName: env.name,\n template,\n };\n });\n });\n\n return templates;\n }\n\n async loadEnvs(ids: string[] = this.config.envs || [], remoteEnvsAspect?: EnvsMain): Promise<EnvDefinition[]> {\n // In case we have remoteEnvsAspect it means that we are running from the global scope\n // in that case the aspect / env were already loaded before to the global scope harmony instance\n // so no reason to load it here\n if (!remoteEnvsAspect) {\n const host = this.componentAspect.getHost();\n if (!host) return [];\n await host.loadAspects(ids);\n }\n\n const envsAspect = remoteEnvsAspect || this.envs;\n\n const potentialEnvs = ids.map((id) => {\n const componentId = ComponentID.fromString(id);\n return envsAspect.getEnvDefinition(componentId);\n });\n\n return compact(potentialEnvs);\n }\n\n async loadAspects() {\n if (this.aspectLoaded) return;\n await this.workspace.loadAspects(this.config.aspects);\n this.aspectLoaded = true;\n }\n\n static slots = [\n Slot.withType<ComponentTemplate[]>(),\n Slot.withType<WorkspaceTemplate[]>(),\n Slot.withType<OnComponentCreateFn>(),\n ];\n\n static dependencies = [\n WorkspaceAspect,\n CLIAspect,\n GraphqlAspect,\n EnvsAspect,\n AspectLoaderAspect,\n NewComponentHelperAspect,\n ComponentAspect,\n TrackerAspect,\n LoggerAspect,\n GitAspect,\n WorkspaceConfigFilesAspect,\n DeprecationAspect,\n ];\n\n static runtime = MainRuntime;\n\n static async provider(\n [\n workspace,\n cli,\n graphql,\n envs,\n aspectLoader,\n newComponentHelper,\n componentAspect,\n tracker,\n loggerMain,\n git,\n wsConfigFiles,\n deprecation,\n ]: [\n Workspace,\n CLIMain,\n GraphqlMain,\n EnvsMain,\n AspectLoaderMain,\n NewComponentHelperMain,\n ComponentMain,\n TrackerMain,\n LoggerMain,\n GitMain,\n WorkspaceConfigFilesMain,\n DeprecationMain\n ],\n config: GeneratorConfig,\n [componentTemplateSlot, workspaceTemplateSlot, onComponentCreateSlot]: [\n ComponentTemplateSlot,\n WorkspaceTemplateSlot,\n OnComponentCreateSlot\n ]\n ) {\n const logger = loggerMain.createLogger(GeneratorAspect.id);\n const generator = new GeneratorMain(\n componentTemplateSlot,\n workspaceTemplateSlot,\n onComponentCreateSlot,\n config,\n workspace,\n envs,\n aspectLoader,\n newComponentHelper,\n componentAspect,\n tracker,\n logger,\n git,\n wsConfigFiles,\n deprecation\n );\n const commands = [new CreateCmd(generator), new TemplatesCmd(generator), new NewCmd(generator)];\n cli.register(...commands);\n graphql.register(generatorSchema(generator));\n aspectLoader.registerPlugins([new StarterPlugin(generator)]);\n envs.registerService(new GeneratorService());\n\n if (generator)\n generator.registerComponentTemplate([\n componentGeneratorTemplate,\n componentGeneratorTemplateStandalone,\n starterTemplate,\n starterTemplateStandalone,\n ]);\n generator.registerWorkspaceTemplate([BasicWorkspaceStarter]);\n\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9I,kBAAU,EACV+I,kCAAkB,EAClBC,8CAAwB,EACxBC,4BAAe,EACfC,wBAAa,EACbC,sBAAY,EACZC,gBAAS,EACTC,kDAA0B,EAC1BC,gCAAiB,CAClB;AAAAhO,eAAA,CAheUgB,aAAa,aAkePiN,kBAAW;AAyE9BzJ,4BAAe,CAAC0J,UAAU,CAAClN,aAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_camelcase","_path","_graphql","_cli","_workspace","_envs","_config","_workspaceConfigFiles","_component","_bit","_harmony","_git","_bitError","_aspectLoader","_tracker","_newComponentHelper","_lodash","_logger","_deprecation","_generator","_create","_templates","_generator2","_componentGenerator","_workspaceGenerator","_new","_templates2","_basic","_starter","_generator3","_workspacePathExists","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GeneratorMain","constructor","componentTemplateSlot","workspaceTemplateSlot","onComponentCreateSlot","config","workspace","envs","aspectLoader","newComponentHelper","componentAspect","tracker","logger","git","wsConfigFiles","deprecation","id","template","shouldBeHidden","hidden","hideCoreTemplates","isCoreAspect","aspectId","name","description","registerComponentTemplate","templates","register","registerWorkspaceTemplate","registerOnComponentCreate","fn","listTemplates","aspect","isRunningInsideWorkspace","getAllComponentTemplatesDescriptorsFlattened","getAllWorkspaceTemplatesDescriptorFlattened","listComponentTemplates","opts","Boolean","getComponentTemplateByAspect","get","getComponentTemplate","fromEnv","listEnvComponentTemplates","found","findTemplateByAspectIdAndName","getAllComponentTemplatesFlattened","find","idWithoutVersion","split","getGlobalGeneratorEnvs","globalScopeHarmony","components","legacyGlobalsSnapshot","loadAspectsFromGlobalScope","remoteGenerator","GeneratorAspect","remoteEnvsAspect","EnvsAspect","fullAspectId","toString","restoreGlobalsFromSnapshot","findWorkspaceTemplateInGlobalScope","fromGlobal","searchRegisteredWorkspaceTemplate","workspaceTemplate","findTemplateInOtherWorkspace","workspacePath","BitError","harmony","loadBit","WorkspaceAspect","err","Error","aspectComponentId","resolveComponentId","loadAspects","aspectComponent","aspectFullId","generator","getWorkspaceTemplate","registeredTemplate","listEnvWorkspaceTemplates","getAllWorkspaceTemplatesFlattened","tpl","generateComponentTemplate","componentNames","templateName","options","installOptions","OutsideWorkspaceError","namespace","componentConfigLoadingRegistry","ComponentConfig","templateWithId","componentIds","map","componentName","getNewComponentId","scope","componentNameSameAsTemplateName","componentId","compNamePascal","camelCase","pascalCase","envId","getEnvIdFromTemplateWithId","componentGenerator","ComponentGenerator","generate","force","envIdFromTemplate","env","parsedFromTemplate","ComponentID","tryFromString","resolvedId","resolveEnvIdWithPotentialVersionForConfig","fromString","envName","Promise","resolve","undefined","generateWorkspaceTemplate","workspaceName","currentDir","process","cwd","fs","existsSync","WorkspacePathExists","loadFrom","workspaceGenerator","WorkspaceGenerator","warnAboutDeprecation","appName","deprecationInfo","getDeprecationInfo","isDeprecate","newStarterMsg","newId","consoleWarning","envTemplates","listEnvComponentTemplateDescriptors","filtered","flattened","getTemplateDescriptor","templatesByAspects","toArray","flatMap","componentTemplates","workspaceTemplates","loadEnvs","getGeneratorStarters","envStarters","starter","compact","ids","envTemplate","toStringWithoutVersion","titlePrefix","getConfiguredEnvs","configEnvs","includes","globals","allIds","uniq","concat","getGeneratorTemplates","tpls","host","getHost","envsAspect","potentialEnvs","getEnvDefinition","aspectLoaded","aspects","provider","cli","graphql","loggerMain","createLogger","commands","CreateCmd","TemplatesCmd","NewCmd","generatorSchema","registerPlugins","StarterPlugin","registerService","GeneratorService","componentGeneratorTemplate","componentGeneratorTemplateStandalone","starterTemplate","starterTemplateStandalone","BasicWorkspaceStarter","exports","Slot","withType","CLIAspect","GraphqlAspect","AspectLoaderAspect","NewComponentHelperAspect","ComponentAspect","TrackerAspect","LoggerAspect","GitAspect","WorkspaceConfigFilesAspect","DeprecationAspect","MainRuntime","addRuntime"],"sources":["generator.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport camelCase from 'camelcase';\nimport { resolve } from 'path';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { EnvDefinition, EnvsAspect, EnvsMain } from '@teambit/envs';\nimport ComponentConfig from '@teambit/legacy/dist/consumer/config';\nimport { WorkspaceConfigFilesAspect, WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { ComponentAspect, ComponentID } from '@teambit/component';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { isCoreAspect, loadBit, restoreGlobalsFromSnapshot } from '@teambit/bit';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { GitAspect, GitMain } from '@teambit/git';\nimport { BitError } from '@teambit/bit-error';\nimport { AspectLoaderAspect, AspectLoaderMain } from '@teambit/aspect-loader';\nimport { TrackerAspect, TrackerMain } from '@teambit/tracker';\nimport { NewComponentHelperAspect, NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { compact, uniq } from 'lodash';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DeprecationAspect, DeprecationMain } from '@teambit/deprecation';\nimport { ComponentTemplate } from './component-template';\nimport { GeneratorAspect } from './generator.aspect';\nimport { CreateCmd, CreateOptions } from './create.cmd';\nimport { TemplatesCmd } from './templates.cmd';\nimport { generatorSchema } from './generator.graphql';\nimport { ComponentGenerator, GenerateResult, InstallOptions, OnComponentCreateFn } from './component-generator';\nimport { WorkspaceGenerator } from './workspace-generator';\nimport { WorkspaceTemplate } from './workspace-template';\nimport { NewCmd, NewOptions } from './new.cmd';\nimport {\n componentGeneratorTemplate,\n componentGeneratorTemplateStandalone,\n starterTemplate,\n starterTemplateStandalone,\n} from './templates';\nimport { BasicWorkspaceStarter } from './templates/basic';\nimport { StarterPlugin } from './starter.plugin';\nimport { GeneratorService } from './generator.service';\nimport { WorkspacePathExists } from './exceptions/workspace-path-exists';\n\nexport type ComponentTemplateSlot = SlotRegistry<ComponentTemplate[]>;\nexport type WorkspaceTemplateSlot = SlotRegistry<WorkspaceTemplate[]>;\nexport type OnComponentCreateSlot = SlotRegistry<OnComponentCreateFn>;\n\nexport type TemplateDescriptor = {\n aspectId: string;\n titlePrefix?: string;\n name: string;\n description?: string;\n hidden?: boolean;\n};\n\ntype TemplateWithId = { id: string; envName?: string };\ntype WorkspaceTemplateWithId = TemplateWithId & { template: WorkspaceTemplate };\ntype ComponentTemplateWithId = TemplateWithId & { template: ComponentTemplate };\ntype AnyTemplateWithId = TemplateWithId & { template: ComponentTemplate | WorkspaceTemplate };\n\nexport type GenerateWorkspaceTemplateResult = { workspacePath: string; appName?: string };\n\nexport type GeneratorConfig = {\n /**\n * array of aspects to include in the list of templates.\n */\n aspects: string[];\n\n /**\n * by default core templates are shown.\n * use this to hide them unless `--show-all` flag of `bit templates` was used\n */\n hideCoreTemplates: boolean;\n\n /**\n * default envs.\n */\n envs?: string[];\n};\n\nexport class GeneratorMain {\n private aspectLoaded = false;\n constructor(\n private componentTemplateSlot: ComponentTemplateSlot,\n private workspaceTemplateSlot: WorkspaceTemplateSlot,\n private onComponentCreateSlot: OnComponentCreateSlot,\n private config: GeneratorConfig,\n private workspace: Workspace,\n private envs: EnvsMain,\n private aspectLoader: AspectLoaderMain,\n private newComponentHelper: NewComponentHelperMain,\n private componentAspect: ComponentMain,\n private tracker: TrackerMain,\n private logger: Logger,\n private git: GitMain,\n private wsConfigFiles: WorkspaceConfigFilesMain,\n private deprecation: DeprecationMain\n ) {}\n\n /**\n * register a new component template.\n */\n registerComponentTemplate(templates: ComponentTemplate[]) {\n this.componentTemplateSlot.register(templates);\n return this;\n }\n\n /**\n * register a new workspace starter.\n */\n registerWorkspaceTemplate(templates: WorkspaceTemplate[]) {\n this.workspaceTemplateSlot.register(templates);\n return this;\n }\n\n registerOnComponentCreate(fn: OnComponentCreateFn) {\n this.onComponentCreateSlot.register(fn);\n return this;\n }\n\n /**\n * list all component templates registered in the workspace or workspace templates in case the\n * workspace is not available\n */\n async listTemplates({ aspect }: { aspect?: string } = {}): Promise<TemplateDescriptor[]> {\n if (this.isRunningInsideWorkspace()) {\n return this.getAllComponentTemplatesDescriptorsFlattened(aspect);\n }\n return this.getAllWorkspaceTemplatesDescriptorFlattened(aspect);\n }\n\n private getTemplateDescriptor = ({ id, template }: AnyTemplateWithId): TemplateDescriptor => {\n const shouldBeHidden = () => {\n if (template.hidden) return true;\n if (this.config.hideCoreTemplates && isCoreAspect(id)) return true;\n return false;\n };\n return {\n aspectId: id,\n name: template.name,\n description: template.description,\n hidden: shouldBeHidden(),\n };\n };\n\n /**\n * @deprecated use this.listTemplates()\n */\n async listComponentTemplates(opts: { aspect?: string }): Promise<TemplateDescriptor[]> {\n return this.listTemplates(opts);\n }\n\n isRunningInsideWorkspace(): boolean {\n return Boolean(this.workspace);\n }\n\n /**\n * get all component templates registered by a specific aspect ID.\n */\n getComponentTemplateByAspect(aspectId: string): ComponentTemplate[] {\n return this.componentTemplateSlot.get(aspectId) || [];\n }\n\n /**\n * returns a specific component template.\n */\n async getComponentTemplate(name: string, aspectId?: string): Promise<ComponentTemplateWithId | undefined> {\n const fromEnv = await this.listEnvComponentTemplates([], aspectId);\n if (fromEnv && fromEnv.length) {\n const found = this.findTemplateByAspectIdAndName<ComponentTemplateWithId>(aspectId, name, fromEnv);\n if (found) return found;\n }\n // fallback to aspect id not from env if provided\n const templates = await this.getAllComponentTemplatesFlattened();\n const found = this.findTemplateByAspectIdAndName<ComponentTemplateWithId>(aspectId, name, templates);\n return found;\n }\n\n private findTemplateByAspectIdAndName<T>(\n aspectId: string | undefined,\n name: string,\n templates: Array<T>\n ): T | undefined {\n // @ts-ignore (should set T to be extends ComponentTemplateWithId or WorkspaceTemplateWithId)\n const found = templates.find(({ id, template }) => {\n // When doing something like:\n // bit create react-env my-env --aspect teambit.react/react-env\n // we will get the aspectId without version\n // but the env might be loaded from the global scope then it will be with a version\n // so it won't found if we don't look for it like this\n const idWithoutVersion = id.split('@')[0];\n if (aspectId && id !== aspectId && idWithoutVersion !== aspectId) return false;\n return template.name === name;\n });\n return found;\n }\n\n /**\n * Get the generator aspect and the envs aspect from an harmony instance of the global scope\n */\n private async getGlobalGeneratorEnvs(\n aspectId: string\n ): Promise<{ remoteGenerator: GeneratorMain; fullAspectId: string; remoteEnvsAspect: EnvsMain; aspect: any }> {\n const { globalScopeHarmony, components, legacyGlobalsSnapshot } =\n await this.aspectLoader.loadAspectsFromGlobalScope([aspectId]);\n const remoteGenerator = globalScopeHarmony.get<GeneratorMain>(GeneratorAspect.id);\n const remoteEnvsAspect = globalScopeHarmony.get<EnvsMain>(EnvsAspect.id);\n const aspect = components[0];\n const fullAspectId = aspect.id.toString();\n restoreGlobalsFromSnapshot(legacyGlobalsSnapshot);\n\n return { remoteGenerator, fullAspectId, remoteEnvsAspect, aspect };\n }\n\n /**\n * in the case the aspect-id is given and this aspect doesn't exist locally, import it to the\n * global scope and load it from the capsule\n */\n async findWorkspaceTemplateInGlobalScope(\n aspectId: string,\n name?: string\n ): Promise<{ workspaceTemplate?: WorkspaceTemplate; aspect?: Component }> {\n const { remoteGenerator, fullAspectId, remoteEnvsAspect, aspect } = await this.getGlobalGeneratorEnvs(aspectId);\n const fromGlobal = await remoteGenerator.searchRegisteredWorkspaceTemplate.call(\n remoteGenerator,\n name,\n fullAspectId,\n remoteEnvsAspect\n );\n return { workspaceTemplate: fromGlobal, aspect };\n }\n\n async findTemplateInOtherWorkspace(workspacePath: string, name: string, aspectId?: string) {\n if (!aspectId)\n throw new BitError(\n `to load a template from a different workspace, please provide the aspect-id using --aspect flag`\n );\n const harmony = await loadBit(workspacePath);\n let workspace: Workspace;\n try {\n workspace = harmony.get<Workspace>(WorkspaceAspect.id);\n } catch (err: any) {\n throw new Error(`fatal: \"${workspacePath}\" is not a valid Bit workspace, make sure the path is correct`);\n }\n const aspectComponentId = await workspace.resolveComponentId(aspectId);\n await workspace.loadAspects([aspectId], true);\n const aspectComponent = await workspace.get(aspectComponentId);\n const aspectFullId = aspectComponentId.toString();\n const generator = harmony.get<GeneratorMain>(GeneratorAspect.id);\n const workspaceTemplate = await generator.searchRegisteredWorkspaceTemplate(name, aspectFullId);\n return { workspaceTemplate, aspect: aspectComponent };\n }\n\n /**\n * returns a specific workspace template.\n */\n async getWorkspaceTemplate(\n name: string,\n aspectId?: string\n ): Promise<{ workspaceTemplate: WorkspaceTemplate; aspect?: Component }> {\n const registeredTemplate = await this.searchRegisteredWorkspaceTemplate(name, aspectId);\n if (registeredTemplate) {\n return { workspaceTemplate: registeredTemplate };\n }\n if (!aspectId) {\n throw new BitError(\n `template \"${name}\" was not found, please use --aspect flag to load from an env i.e --aspect teambit.react/react-env\\n Learn more about component templates here: https://bit.dev/reference/generator/create-generator`\n );\n }\n\n const { workspaceTemplate, aspect } = await this.findWorkspaceTemplateInGlobalScope(aspectId, name);\n if (workspaceTemplate) {\n return { workspaceTemplate, aspect };\n }\n throw new BitError(\n `template \"${name}\" was not found, please use --aspect flag to load from an env i.e --aspect teambit.react/react-env\\n Learn more about component templates here: https://bit.dev/reference/generator/create-generator`\n );\n }\n\n async searchRegisteredWorkspaceTemplate(\n name?: string,\n aspectId?: string,\n remoteEnvsAspect?: EnvsMain\n ): Promise<WorkspaceTemplate | undefined> {\n let fromEnv;\n\n if (aspectId) {\n fromEnv = await this.listEnvWorkspaceTemplates(aspectId, remoteEnvsAspect);\n }\n const templates = fromEnv && fromEnv.length ? fromEnv : this.getAllWorkspaceTemplatesFlattened();\n const found = templates.find(({ id, template: tpl }) => {\n if (aspectId && name) return aspectId === id && name === tpl.name;\n if (aspectId) return aspectId === id;\n if (name) return name === tpl.name;\n throw new Error(`searchRegisteredWorkspaceTemplate expects to get \"name\" or \"aspectId\"`);\n });\n\n return found?.template;\n }\n\n async generateComponentTemplate(\n componentNames: string[],\n templateName: string,\n options: Partial<CreateOptions>,\n installOptions?: InstallOptions\n ): Promise<GenerateResult[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n await this.loadAspects();\n const { namespace, aspect } = options;\n\n const componentConfigLoadingRegistry = ComponentConfig.componentConfigLoadingRegistry;\n\n const templateWithId = await this.getComponentTemplate(templateName, aspect);\n\n ComponentConfig.componentConfigLoadingRegistry = componentConfigLoadingRegistry;\n\n if (!templateWithId) throw new BitError(`template \"${templateName}\" was not found`);\n\n const componentIds = componentNames.map((componentName) =>\n this.newComponentHelper.getNewComponentId(componentName, namespace, options.scope)\n );\n\n const componentNameSameAsTemplateName = componentIds.find((componentId) => componentId.name === templateName);\n if (componentNameSameAsTemplateName) {\n const compNamePascal = camelCase(templateName, { pascalCase: true });\n throw new BitError(\n `unable to create a component with the same name as the template \"${templateName}\", please use a different name.\nthe reason is that after refactoring, the code will have this invalid class: \"class ${compNamePascal} extends ${compNamePascal} {}\"`\n );\n }\n\n const envId = await this.getEnvIdFromTemplateWithId(templateWithId);\n\n const componentGenerator = new ComponentGenerator(\n this.workspace,\n componentIds,\n options,\n templateWithId.template,\n this.envs,\n this.newComponentHelper,\n this.tracker,\n this.wsConfigFiles,\n this.logger,\n this.onComponentCreateSlot,\n templateWithId.id,\n envId,\n installOptions\n );\n return componentGenerator.generate(options.force);\n }\n\n private async getEnvIdFromTemplateWithId(templateWithId: ComponentTemplateWithId): Promise<ComponentID | undefined> {\n const envIdFromTemplate = templateWithId.template.env;\n if (envIdFromTemplate) {\n const parsedFromTemplate = ComponentID.tryFromString(envIdFromTemplate);\n if (!parsedFromTemplate) {\n throw new BitError(\n `Error: unable to parse envId from template. template name: ${templateWithId.template.name}, envId: ${envIdFromTemplate}`\n );\n }\n const resolvedId = await this.workspace.resolveEnvIdWithPotentialVersionForConfig(parsedFromTemplate);\n return ComponentID.fromString(resolvedId);\n }\n if (templateWithId.envName) {\n return ComponentID.fromString(templateWithId.id);\n }\n return Promise.resolve(undefined);\n }\n\n async generateWorkspaceTemplate(\n workspaceName: string,\n templateName: string,\n options: NewOptions & { aspect?: string; currentDir?: boolean }\n ): Promise<GenerateWorkspaceTemplateResult> {\n if (this.workspace) {\n throw new BitError('Error: unable to generate a new workspace inside of an existing workspace');\n }\n const workspacePath = options.currentDir ? process.cwd() : resolve(workspaceName);\n if (!options.currentDir && fs.existsSync(workspacePath)) {\n throw new WorkspacePathExists(workspacePath);\n }\n const { aspect: aspectId, loadFrom } = options;\n const { workspaceTemplate, aspect } = loadFrom\n ? await this.findTemplateInOtherWorkspace(loadFrom, templateName, aspectId)\n : await this.getWorkspaceTemplate(templateName, aspectId);\n\n if (!workspaceTemplate) throw new BitError(`template \"${templateName}\" was not found`);\n const workspaceGenerator = new WorkspaceGenerator(workspaceName, workspacePath, options, workspaceTemplate, aspect);\n await this.warnAboutDeprecation(aspect);\n await workspaceGenerator.generate();\n return { workspacePath, appName: workspaceTemplate.appName };\n }\n\n private async warnAboutDeprecation(aspect?: Component) {\n if (!aspect) return;\n const deprecationInfo = await this.deprecation.getDeprecationInfo(aspect);\n if (deprecationInfo.isDeprecate) {\n const newStarterMsg = deprecationInfo.newId ? `, use \"${deprecationInfo.newId.toString()}\" instead` : '';\n this.logger.consoleWarning(`the starter \"${aspect?.id.toString()}\" is deprecated${newStarterMsg}`);\n }\n }\n\n private async getAllComponentTemplatesDescriptorsFlattened(aspectId?: string): Promise<Array<TemplateDescriptor>> {\n const envTemplates = await this.listEnvComponentTemplateDescriptors([], aspectId);\n if (envTemplates && envTemplates.length) {\n if (!aspectId) return envTemplates;\n const filtered = envTemplates.filter((template) => template.aspectId === aspectId);\n if (filtered.length) return filtered;\n }\n\n const flattened = this.getAllComponentTemplatesFlattened();\n const filtered = aspectId ? flattened.filter((template) => template.id === aspectId) : flattened;\n return filtered.map((template) => this.getTemplateDescriptor(template));\n }\n\n private getAllComponentTemplatesFlattened(): Array<{ id: string; template: ComponentTemplate }> {\n const templatesByAspects = this.componentTemplateSlot.toArray();\n const flattened = templatesByAspects.flatMap(([id, componentTemplates]) => {\n return componentTemplates.map((template) => ({\n id,\n template,\n }));\n });\n return flattened;\n }\n\n private async getAllWorkspaceTemplatesDescriptorFlattened(aspectId?: string): Promise<Array<TemplateDescriptor>> {\n let envTemplates;\n if (aspectId) {\n envTemplates = await this.listEnvWorkspaceTemplates(aspectId);\n }\n\n const templates = envTemplates && envTemplates.length ? envTemplates : this.getAllWorkspaceTemplatesFlattened();\n return templates.map((template) => this.getTemplateDescriptor(template));\n }\n\n private getAllWorkspaceTemplatesFlattened(): Array<{ id: string; template: WorkspaceTemplate }> {\n const templatesByAspects = this.workspaceTemplateSlot.toArray();\n return templatesByAspects.flatMap(([id, workspaceTemplates]) => {\n return workspaceTemplates.map((template) => ({\n id,\n template,\n }));\n });\n }\n\n /**\n * list all starter templates registered by an env.\n */\n async listEnvWorkspaceTemplates(envId: string, remoteEnvsAspect?: EnvsMain): Promise<Array<WorkspaceTemplateWithId>> {\n const envs = await this.loadEnvs([envId], remoteEnvsAspect);\n const workspaceTemplates = envs.flatMap((env) => {\n if (!env.env.getGeneratorStarters) return undefined;\n const envStarters = env.env.getGeneratorStarters();\n return envStarters.map((starter) => {\n const componentId = ComponentID.fromString(env.id);\n return {\n id: componentId.toString(),\n envName: env.name,\n template: starter,\n };\n });\n });\n\n return compact(workspaceTemplates);\n }\n\n /**\n * list all component templates registered by an env.\n */\n async listEnvComponentTemplateDescriptors(ids: string[] = [], aspectId?: string): Promise<TemplateDescriptor[]> {\n const envTemplates = await this.listEnvComponentTemplates(ids, aspectId);\n const templates: TemplateDescriptor[] = envTemplates.map((envTemplate) => {\n const componentId = ComponentID.fromString(envTemplate.id);\n return {\n aspectId: componentId.toStringWithoutVersion(),\n titlePrefix: envTemplate.envName,\n ...envTemplate.template,\n };\n });\n\n return templates;\n }\n\n getConfiguredEnvs(): string[] {\n return this.config.envs ?? [];\n }\n\n async listEnvComponentTemplates(ids: string[] = [], aspectId?: string): Promise<Array<ComponentTemplateWithId>> {\n const configEnvs = this.config.envs || [];\n let remoteEnvsAspect;\n let fullAspectId;\n if (aspectId && !configEnvs.includes(aspectId)) {\n const globals = await this.getGlobalGeneratorEnvs(aspectId);\n remoteEnvsAspect = globals.remoteEnvsAspect;\n fullAspectId = globals.fullAspectId;\n }\n const allIds = uniq(configEnvs?.concat(ids).concat([aspectId, fullAspectId]).filter(Boolean));\n const envs = await this.loadEnvs(allIds, remoteEnvsAspect);\n const templates = envs.flatMap((env) => {\n if (!env.env.getGeneratorTemplates) return [];\n const tpls = env.env.getGeneratorTemplates() || [];\n const componentId = ComponentID.fromString(env.id);\n return tpls.map((template) => {\n return {\n id: componentId.toString(),\n envName: env.name,\n template,\n };\n });\n });\n\n return templates;\n }\n\n async loadEnvs(ids: string[] = this.config.envs || [], remoteEnvsAspect?: EnvsMain): Promise<EnvDefinition[]> {\n // In case we have remoteEnvsAspect it means that we are running from the global scope\n // in that case the aspect / env were already loaded before to the global scope harmony instance\n // so no reason to load it here\n if (!remoteEnvsAspect) {\n const host = this.componentAspect.getHost();\n if (!host) return [];\n await host.loadAspects(ids);\n }\n\n const envsAspect = remoteEnvsAspect || this.envs;\n\n const potentialEnvs = ids.map((id) => {\n const componentId = ComponentID.fromString(id);\n return envsAspect.getEnvDefinition(componentId);\n });\n\n return compact(potentialEnvs);\n }\n\n async loadAspects() {\n if (this.aspectLoaded) return;\n await this.workspace.loadAspects(this.config.aspects);\n this.aspectLoaded = true;\n }\n\n static slots = [\n Slot.withType<ComponentTemplate[]>(),\n Slot.withType<WorkspaceTemplate[]>(),\n Slot.withType<OnComponentCreateFn>(),\n ];\n\n static dependencies = [\n WorkspaceAspect,\n CLIAspect,\n GraphqlAspect,\n EnvsAspect,\n AspectLoaderAspect,\n NewComponentHelperAspect,\n ComponentAspect,\n TrackerAspect,\n LoggerAspect,\n GitAspect,\n WorkspaceConfigFilesAspect,\n DeprecationAspect,\n ];\n\n static runtime = MainRuntime;\n\n static async provider(\n [\n workspace,\n cli,\n graphql,\n envs,\n aspectLoader,\n newComponentHelper,\n componentAspect,\n tracker,\n loggerMain,\n git,\n wsConfigFiles,\n deprecation,\n ]: [\n Workspace,\n CLIMain,\n GraphqlMain,\n EnvsMain,\n AspectLoaderMain,\n NewComponentHelperMain,\n ComponentMain,\n TrackerMain,\n LoggerMain,\n GitMain,\n WorkspaceConfigFilesMain,\n DeprecationMain,\n ],\n config: GeneratorConfig,\n [componentTemplateSlot, workspaceTemplateSlot, onComponentCreateSlot]: [\n ComponentTemplateSlot,\n WorkspaceTemplateSlot,\n OnComponentCreateSlot,\n ]\n ) {\n const logger = loggerMain.createLogger(GeneratorAspect.id);\n const generator = new GeneratorMain(\n componentTemplateSlot,\n workspaceTemplateSlot,\n onComponentCreateSlot,\n config,\n workspace,\n envs,\n aspectLoader,\n newComponentHelper,\n componentAspect,\n tracker,\n logger,\n git,\n wsConfigFiles,\n deprecation\n );\n const commands = [new CreateCmd(generator), new TemplatesCmd(generator), new NewCmd(generator)];\n cli.register(...commands);\n graphql.register(generatorSchema(generator));\n aspectLoader.registerPlugins([new StarterPlugin(generator)]);\n envs.registerService(new GeneratorService());\n\n if (generator)\n generator.registerComponentTemplate([\n componentGeneratorTemplate,\n componentGeneratorTemplateStandalone,\n starterTemplate,\n starterTemplateStandalone,\n ]);\n generator.registerWorkspaceTemplate([BasicWorkspaceStarter]);\n\n return generator;\n }\n}\n\nGeneratorAspect.addRuntime(GeneratorMain);\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,S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AAY,EAACzG,SAAS,CAAC,EAAE,KAAI0G,aAAM,EAAC1G,SAAS,CAAC,CAAC;IAC/FmG,GAAG,CAACvJ,QAAQ,CAAC,GAAG2J,QAAQ,CAAC;IACzBH,OAAO,CAACxJ,QAAQ,CAAC,IAAA+J,6BAAe,EAAC3G,SAAS,CAAC,CAAC;IAC5CvE,YAAY,CAACmL,eAAe,CAAC,CAAC,KAAIC,wBAAa,EAAC7G,SAAS,CAAC,CAAC,CAAC;IAC5DxE,IAAI,CAACsL,eAAe,CAAC,KAAIC,8BAAgB,EAAC,CAAC,CAAC;IAE5C,IAAI/G,SAAS,EACXA,SAAS,CAACtD,yBAAyB,CAAC,CAClCsK,wCAA0B,EAC1BC,kDAAoC,EACpCC,6BAAe,EACfC,uCAAyB,CAC1B,CAAC;IACJnH,SAAS,CAACnD,yBAAyB,CAAC,CAACuK,8BAAqB,CAAC,CAAC;IAE5D,OAAOpH,SAAS;EAClB;AACF;AAACqH,OAAA,CAAApM,aAAA,GAAAA,aAAA;AAAAhB,eAAA,CAziBYgB,aAAa,WA6cT,CACbqM,eAAI,CAACC,QAAQ,CAAsB,CAAC,EACpCD,eAAI,CAACC,QAAQ,CAAsB,CAAC,EACpCD,eAAI,CAACC,QAAQ,CAAsB,CAAC,CACrC;AAAAtN,eAAA,CAjdUgB,aAAa,kBAmdF,CACpBuE,4BAAe,EACfgI,gBAAS,EACTC,wBAAa,EACb9I,kBAAU,EACV+I,kCAAkB,EAClBC,8CAAwB,EACxBC,4BAAe,EACfC,wBAAa,EACbC,sBAAY,EACZC,gBAAS,EACTC,kDAA0B,EAC1BC,gCAAiB,CAClB;AAAAhO,eAAA,CAheUgB,aAAa,aAkePiN,kBAAW;AAyE9BzJ,4BAAe,CAAC0J,UAAU,CAAClN,aAAa,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.426/dist/generator.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.426/dist/generator.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.427/dist/generator.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.427/dist/generator.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1 +1 @@
1
- {"version":3,"names":["StarterList","constructor","name","starters","context","compute","map","starter","from","options","exports"],"sources":["starter-list.ts"],"sourcesContent":["import { EnvContext, EnvHandler } from '@teambit/envs';\nimport { WorkspaceTemplate } from './workspace-template';\n\nexport type StarterListOptions = {\n name?: string;\n};\n\nexport class StarterList {\n constructor(readonly name: string, private starters: EnvHandler<WorkspaceTemplate>[], private context: EnvContext) {}\n\n compute(): WorkspaceTemplate[] {\n return this.starters.map((starter) => starter(this.context));\n }\n\n static from(starters: EnvHandler<WorkspaceTemplate>[], options: StarterListOptions = {}) {\n return (context: EnvContext) => {\n const name = options.name || 'starter-list';\n return new StarterList(name, starters, context);\n };\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,WAAW,CAAC;EACvBC,WAAWA,CAAUC,IAAY,EAAUC,QAAyC,EAAUC,OAAmB,EAAE;IAAA,KAA9FF,IAAY,GAAZA,IAAY;IAAA,KAAUC,QAAyC,GAAzCA,QAAyC;IAAA,KAAUC,OAAmB,GAAnBA,OAAmB;EAAG;EAEpHC,OAAOA,CAAA,EAAwB;IAC7B,OAAO,IAAI,CAACF,QAAQ,CAACG,GAAG,CAAEC,OAAO,IAAKA,OAAO,CAAC,IAAI,CAACH,OAAO,CAAC,CAAC;EAC9D;EAEA,OAAOI,IAAIA,CAACL,QAAyC,EAAEM,OAA2B,GAAG,CAAC,CAAC,EAAE;IACvF,OAAQL,OAAmB,IAAK;MAC9B,MAAMF,IAAI,GAAGO,OAAO,CAACP,IAAI,IAAI,cAAc;MAC3C,OAAO,IAAIF,WAAW,CAACE,IAAI,EAAEC,QAAQ,EAAEC,OAAO,CAAC;IACjD,CAAC;EACH;AACF;AAACM,OAAA,CAAAV,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["StarterList","constructor","name","starters","context","compute","map","starter","from","options","exports"],"sources":["starter-list.ts"],"sourcesContent":["import { EnvContext, EnvHandler } from '@teambit/envs';\nimport { WorkspaceTemplate } from './workspace-template';\n\nexport type StarterListOptions = {\n name?: string;\n};\n\nexport class StarterList {\n constructor(\n readonly name: string,\n private starters: EnvHandler<WorkspaceTemplate>[],\n private context: EnvContext\n ) {}\n\n compute(): WorkspaceTemplate[] {\n return this.starters.map((starter) => starter(this.context));\n }\n\n static from(starters: EnvHandler<WorkspaceTemplate>[], options: StarterListOptions = {}) {\n return (context: EnvContext) => {\n const name = options.name || 'starter-list';\n return new StarterList(name, starters, context);\n };\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,WAAW,CAAC;EACvBC,WAAWA,CACAC,IAAY,EACbC,QAAyC,EACzCC,OAAmB,EAC3B;IAAA,KAHSF,IAAY,GAAZA,IAAY;IAAA,KACbC,QAAyC,GAAzCA,QAAyC;IAAA,KACzCC,OAAmB,GAAnBA,OAAmB;EAC1B;EAEHC,OAAOA,CAAA,EAAwB;IAC7B,OAAO,IAAI,CAACF,QAAQ,CAACG,GAAG,CAAEC,OAAO,IAAKA,OAAO,CAAC,IAAI,CAACH,OAAO,CAAC,CAAC;EAC9D;EAEA,OAAOI,IAAIA,CAACL,QAAyC,EAAEM,OAA2B,GAAG,CAAC,CAAC,EAAE;IACvF,OAAQL,OAAmB,IAAK;MAC9B,MAAMF,IAAI,GAAGO,OAAO,CAACP,IAAI,IAAI,cAAc;MAC3C,OAAO,IAAIF,WAAW,CAACE,IAAI,EAAEC,QAAQ,EAAEC,OAAO,CAAC;IACjD,CAAC;EACH;AACF;AAACM,OAAA,CAAAV,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TemplateList","constructor","name","templates","context","compute","map","template","from","options","exports"],"sources":["template-list.ts"],"sourcesContent":["import { EnvContext, EnvHandler } from '@teambit/envs';\nimport { ComponentTemplate } from './component-template';\n\nexport type TemplateListOptions = {\n name?: string;\n};\n\nexport class TemplateList {\n constructor(readonly name: string, private templates: EnvHandler<ComponentTemplate>[], private context: EnvContext) {}\n\n compute(): ComponentTemplate[] {\n return this.templates.map((template) => template(this.context));\n }\n\n static from(templates: EnvHandler<ComponentTemplate>[], options: TemplateListOptions = {}) {\n return (context: EnvContext) => {\n const name = options.name || 'template-list';\n return new TemplateList(name, templates, context);\n };\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,YAAY,CAAC;EACxBC,WAAWA,CAAUC,IAAY,EAAUC,SAA0C,EAAUC,OAAmB,EAAE;IAAA,KAA/FF,IAAY,GAAZA,IAAY;IAAA,KAAUC,SAA0C,GAA1CA,SAA0C;IAAA,KAAUC,OAAmB,GAAnBA,OAAmB;EAAG;EAErHC,OAAOA,CAAA,EAAwB;IAC7B,OAAO,IAAI,CAACF,SAAS,CAACG,GAAG,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,IAAI,CAACH,OAAO,CAAC,CAAC;EACjE;EAEA,OAAOI,IAAIA,CAACL,SAA0C,EAAEM,OAA4B,GAAG,CAAC,CAAC,EAAE;IACzF,OAAQL,OAAmB,IAAK;MAC9B,MAAMF,IAAI,GAAGO,OAAO,CAACP,IAAI,IAAI,eAAe;MAC5C,OAAO,IAAIF,YAAY,CAACE,IAAI,EAAEC,SAAS,EAAEC,OAAO,CAAC;IACnD,CAAC;EACH;AACF;AAACM,OAAA,CAAAV,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["TemplateList","constructor","name","templates","context","compute","map","template","from","options","exports"],"sources":["template-list.ts"],"sourcesContent":["import { EnvContext, EnvHandler } from '@teambit/envs';\nimport { ComponentTemplate } from './component-template';\n\nexport type TemplateListOptions = {\n name?: string;\n};\n\nexport class TemplateList {\n constructor(\n readonly name: string,\n private templates: EnvHandler<ComponentTemplate>[],\n private context: EnvContext\n ) {}\n\n compute(): ComponentTemplate[] {\n return this.templates.map((template) => template(this.context));\n }\n\n static from(templates: EnvHandler<ComponentTemplate>[], options: TemplateListOptions = {}) {\n return (context: EnvContext) => {\n const name = options.name || 'template-list';\n return new TemplateList(name, templates, context);\n };\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,YAAY,CAAC;EACxBC,WAAWA,CACAC,IAAY,EACbC,SAA0C,EAC1CC,OAAmB,EAC3B;IAAA,KAHSF,IAAY,GAAZA,IAAY;IAAA,KACbC,SAA0C,GAA1CA,SAA0C;IAAA,KAC1CC,OAAmB,GAAnBA,OAAmB;EAC1B;EAEHC,OAAOA,CAAA,EAAwB;IAC7B,OAAO,IAAI,CAACF,SAAS,CAACG,GAAG,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,IAAI,CAACH,OAAO,CAAC,CAAC;EACjE;EAEA,OAAOI,IAAIA,CAACL,SAA0C,EAAEM,OAA4B,GAAG,CAAC,CAAC,EAAE;IACzF,OAAQL,OAAmB,IAAK;MAC9B,MAAMF,IAAI,GAAGO,OAAO,CAACP,IAAI,IAAI,eAAe;MAC5C,OAAO,IAAIF,YAAY,CAACE,IAAI,EAAEC,SAAS,EAAEC,OAAO,CAAC;IACnD,CAAC;EACH;AACF;AAACM,OAAA,CAAAV,YAAA,GAAAA,YAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/generator",
3
- "version": "1.0.426",
3
+ "version": "1.0.427",
4
4
  "homepage": "https://bit.cloud/teambit/generator/generator",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.generator",
8
8
  "name": "generator",
9
- "version": "1.0.426"
9
+ "version": "1.0.427"
10
10
  },
11
11
  "dependencies": {
12
12
  "camelcase": "6.2.0",
@@ -21,31 +21,31 @@
21
21
  "@teambit/component-id": "1.2.2",
22
22
  "@teambit/harmony": "0.4.6",
23
23
  "@teambit/git.modules.git-ignore": "1.0.2",
24
- "@teambit/component.sources": "0.0.33",
25
- "@teambit/envs": "1.0.425",
26
- "@teambit/logger": "0.0.1095",
27
- "@teambit/new-component-helper": "1.0.425",
24
+ "@teambit/component.sources": "0.0.34",
25
+ "@teambit/envs": "1.0.426",
26
+ "@teambit/logger": "0.0.1096",
27
+ "@teambit/new-component-helper": "1.0.426",
28
28
  "@teambit/pkg.modules.component-package-name": "0.0.5",
29
29
  "@teambit/toolbox.path.path": "0.0.4",
30
- "@teambit/tracker": "1.0.425",
31
- "@teambit/workspace-config-files": "1.0.425",
32
- "@teambit/workspace.modules.node-modules-linker": "0.0.208",
33
- "@teambit/workspace": "1.0.425",
34
- "@teambit/component": "1.0.425",
35
- "@teambit/cli": "0.0.1002",
36
- "@teambit/graphql": "1.0.425",
37
- "@teambit/aspect-loader": "1.0.425",
38
- "@teambit/bit": "1.8.76",
39
- "@teambit/deprecation": "1.0.425",
40
- "@teambit/git": "1.0.425",
41
- "@teambit/compiler": "1.0.425",
42
- "@teambit/forking": "1.0.425",
30
+ "@teambit/tracker": "1.0.426",
31
+ "@teambit/workspace-config-files": "1.0.426",
32
+ "@teambit/workspace.modules.node-modules-linker": "0.0.209",
33
+ "@teambit/workspace": "1.0.426",
34
+ "@teambit/component": "1.0.426",
35
+ "@teambit/cli": "0.0.1003",
36
+ "@teambit/graphql": "1.0.426",
37
+ "@teambit/aspect-loader": "1.0.426",
38
+ "@teambit/bit": "1.8.77",
39
+ "@teambit/deprecation": "1.0.426",
40
+ "@teambit/git": "1.0.426",
41
+ "@teambit/compiler": "1.0.426",
42
+ "@teambit/forking": "1.0.426",
43
43
  "@teambit/git.modules.git-executable": "0.0.1",
44
- "@teambit/host-initializer": "0.0.138",
45
- "@teambit/importer": "1.0.425",
46
- "@teambit/install": "1.0.425",
47
- "@teambit/ui": "1.0.425",
48
- "@teambit/config": "0.0.1176"
44
+ "@teambit/host-initializer": "0.0.139",
45
+ "@teambit/importer": "1.0.426",
46
+ "@teambit/install": "1.0.426",
47
+ "@teambit/ui": "1.0.426",
48
+ "@teambit/config": "0.0.1177"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/fs-extra": "9.0.7",