@teambit/generator 1.0.333 → 1.0.335

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.333" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.generator/generator@1.0.335" 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={32734:(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.indexOf(n)>=0||{}.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.indexOf(a)>=0)continue;n[a]=e[a]}return n}l.__bit_component=a,m.__bit_component=a,p.__bit_component=a,i.__bit_component=a;var d={},s="wrapper";function c(e){var t=e.components,n=p(e,r);return(0,o.mdx)(s,m({},d,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},65838:(e,t,n)=>{Object.defineProperty(t,"W",{enumerable:!0,get:function(){return a.default}});var a=o(n(32734));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}},72184:(e,t,n)=>{var a={id:"teambit.generator/generator@1.0.333",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(72184),l=(n(41594),n(5016));const m=TeambitMdxUiMdxScopeContext;var p=n(65838),i=["components"];function d(){return d=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},d.apply(null,arguments)}var s={},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.indexOf(a)>=0)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.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,i);return(0,l.mdx)(c,d({},s,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={15826:(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.indexOf(n)>=0||{}.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.indexOf(a)>=0)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},32450:(e,t,n)=>{Object.defineProperty(t,"W",{enumerable:!0,get:function(){return a.default}});var a=o(n(15826));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}},80722:(e,t,n)=>{var a={id:"teambit.generator/generator@1.0.335",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(80722),l=(n(41594),n(5016));const m=TeambitMdxUiMdxScopeContext;var p=n(32450),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})()));
@@ -5711,7 +5711,7 @@
5711
5711
  "__schema": "TypeSchema",
5712
5712
  "location": {
5713
5713
  "filePath": "component-generator.ts",
5714
- "line": 24,
5714
+ "line": 23,
5715
5715
  "character": 1
5716
5716
  },
5717
5717
  "signature": "type GenerateResult = {\n id: ComponentID;\n dir: string;\n files: string[];\n envId: string;\n envSetBy: string;\n packageName: string;\n isApp?: boolean | undefined;\n isEnv?: boolean | undefined;\n dependencies?: string[] | undefined;\n installMissingDependencies?: boolean | undefined;\n}",
@@ -5720,7 +5720,7 @@
5720
5720
  "__schema": "TypeLiteralSchema",
5721
5721
  "location": {
5722
5722
  "filePath": "component-generator.ts",
5723
- "line": 24,
5723
+ "line": 23,
5724
5724
  "character": 30
5725
5725
  },
5726
5726
  "members": [
@@ -5728,7 +5728,7 @@
5728
5728
  "__schema": "VariableLikeSchema",
5729
5729
  "location": {
5730
5730
  "filePath": "component-generator.ts",
5731
- "line": 25,
5731
+ "line": 24,
5732
5732
  "character": 3
5733
5733
  },
5734
5734
  "signature": "(property) id: ComponentID",
@@ -5737,7 +5737,7 @@
5737
5737
  "__schema": "TypeRefSchema",
5738
5738
  "location": {
5739
5739
  "filePath": "component-generator.ts",
5740
- "line": 25,
5740
+ "line": 24,
5741
5741
  "character": 3
5742
5742
  },
5743
5743
  "name": "ComponentID",
@@ -5753,7 +5753,7 @@
5753
5753
  "__schema": "VariableLikeSchema",
5754
5754
  "location": {
5755
5755
  "filePath": "component-generator.ts",
5756
- "line": 26,
5756
+ "line": 25,
5757
5757
  "character": 3
5758
5758
  },
5759
5759
  "signature": "(property) dir: string",
@@ -5762,7 +5762,7 @@
5762
5762
  "__schema": "KeywordTypeSchema",
5763
5763
  "location": {
5764
5764
  "filePath": "component-generator.ts",
5765
- "line": 26,
5765
+ "line": 25,
5766
5766
  "character": 8
5767
5767
  },
5768
5768
  "name": "string"
@@ -5773,7 +5773,7 @@
5773
5773
  "__schema": "VariableLikeSchema",
5774
5774
  "location": {
5775
5775
  "filePath": "component-generator.ts",
5776
- "line": 27,
5776
+ "line": 26,
5777
5777
  "character": 3
5778
5778
  },
5779
5779
  "signature": "(property) files: string[]",
@@ -5782,14 +5782,14 @@
5782
5782
  "__schema": "TypeArraySchema",
5783
5783
  "location": {
5784
5784
  "filePath": "component-generator.ts",
5785
- "line": 27,
5785
+ "line": 26,
5786
5786
  "character": 10
5787
5787
  },
5788
5788
  "type": {
5789
5789
  "__schema": "KeywordTypeSchema",
5790
5790
  "location": {
5791
5791
  "filePath": "component-generator.ts",
5792
- "line": 27,
5792
+ "line": 26,
5793
5793
  "character": 10
5794
5794
  },
5795
5795
  "name": "string"
@@ -5801,7 +5801,7 @@
5801
5801
  "__schema": "VariableLikeSchema",
5802
5802
  "location": {
5803
5803
  "filePath": "component-generator.ts",
5804
- "line": 28,
5804
+ "line": 27,
5805
5805
  "character": 3
5806
5806
  },
5807
5807
  "signature": "(property) envId: string",
@@ -5810,7 +5810,7 @@
5810
5810
  "__schema": "KeywordTypeSchema",
5811
5811
  "location": {
5812
5812
  "filePath": "component-generator.ts",
5813
- "line": 28,
5813
+ "line": 27,
5814
5814
  "character": 10
5815
5815
  },
5816
5816
  "name": "string"
@@ -5821,7 +5821,7 @@
5821
5821
  "__schema": "VariableLikeSchema",
5822
5822
  "location": {
5823
5823
  "filePath": "component-generator.ts",
5824
- "line": 29,
5824
+ "line": 28,
5825
5825
  "character": 3
5826
5826
  },
5827
5827
  "signature": "(property) envSetBy: string",
@@ -5830,7 +5830,7 @@
5830
5830
  "__schema": "KeywordTypeSchema",
5831
5831
  "location": {
5832
5832
  "filePath": "component-generator.ts",
5833
- "line": 29,
5833
+ "line": 28,
5834
5834
  "character": 13
5835
5835
  },
5836
5836
  "name": "string"
@@ -5841,7 +5841,7 @@
5841
5841
  "__schema": "VariableLikeSchema",
5842
5842
  "location": {
5843
5843
  "filePath": "component-generator.ts",
5844
- "line": 30,
5844
+ "line": 29,
5845
5845
  "character": 3
5846
5846
  },
5847
5847
  "signature": "(property) packageName: string",
@@ -5850,7 +5850,7 @@
5850
5850
  "__schema": "KeywordTypeSchema",
5851
5851
  "location": {
5852
5852
  "filePath": "component-generator.ts",
5853
- "line": 30,
5853
+ "line": 29,
5854
5854
  "character": 16
5855
5855
  },
5856
5856
  "name": "string"
@@ -5861,7 +5861,7 @@
5861
5861
  "__schema": "VariableLikeSchema",
5862
5862
  "location": {
5863
5863
  "filePath": "component-generator.ts",
5864
- "line": 31,
5864
+ "line": 30,
5865
5865
  "character": 3
5866
5866
  },
5867
5867
  "signature": "(property) isApp?: boolean | undefined",
@@ -5870,7 +5870,7 @@
5870
5870
  "__schema": "KeywordTypeSchema",
5871
5871
  "location": {
5872
5872
  "filePath": "component-generator.ts",
5873
- "line": 31,
5873
+ "line": 30,
5874
5874
  "character": 11
5875
5875
  },
5876
5876
  "name": "boolean"
@@ -5881,7 +5881,7 @@
5881
5881
  "__schema": "VariableLikeSchema",
5882
5882
  "location": {
5883
5883
  "filePath": "component-generator.ts",
5884
- "line": 32,
5884
+ "line": 31,
5885
5885
  "character": 3
5886
5886
  },
5887
5887
  "signature": "(property) isEnv?: boolean | undefined",
@@ -5890,7 +5890,7 @@
5890
5890
  "__schema": "KeywordTypeSchema",
5891
5891
  "location": {
5892
5892
  "filePath": "component-generator.ts",
5893
- "line": 32,
5893
+ "line": 31,
5894
5894
  "character": 11
5895
5895
  },
5896
5896
  "name": "boolean"
@@ -5901,7 +5901,7 @@
5901
5901
  "__schema": "VariableLikeSchema",
5902
5902
  "location": {
5903
5903
  "filePath": "component-generator.ts",
5904
- "line": 33,
5904
+ "line": 32,
5905
5905
  "character": 3
5906
5906
  },
5907
5907
  "signature": "(property) dependencies?: string[] | undefined",
@@ -5910,14 +5910,14 @@
5910
5910
  "__schema": "TypeArraySchema",
5911
5911
  "location": {
5912
5912
  "filePath": "component-generator.ts",
5913
- "line": 33,
5913
+ "line": 32,
5914
5914
  "character": 18
5915
5915
  },
5916
5916
  "type": {
5917
5917
  "__schema": "KeywordTypeSchema",
5918
5918
  "location": {
5919
5919
  "filePath": "component-generator.ts",
5920
- "line": 33,
5920
+ "line": 32,
5921
5921
  "character": 18
5922
5922
  },
5923
5923
  "name": "string"
@@ -5929,7 +5929,7 @@
5929
5929
  "__schema": "VariableLikeSchema",
5930
5930
  "location": {
5931
5931
  "filePath": "component-generator.ts",
5932
- "line": 34,
5932
+ "line": 33,
5933
5933
  "character": 3
5934
5934
  },
5935
5935
  "signature": "(property) installMissingDependencies?: boolean | undefined",
@@ -5938,7 +5938,7 @@
5938
5938
  "__schema": "KeywordTypeSchema",
5939
5939
  "location": {
5940
5940
  "filePath": "component-generator.ts",
5941
- "line": 34,
5941
+ "line": 33,
5942
5942
  "character": 32
5943
5943
  },
5944
5944
  "name": "boolean"
@@ -12427,7 +12427,7 @@
12427
12427
  "__schema": "TypeSchema",
12428
12428
  "location": {
12429
12429
  "filePath": "component-generator.ts",
12430
- "line": 24,
12430
+ "line": 23,
12431
12431
  "character": 1
12432
12432
  },
12433
12433
  "signature": "type GenerateResult = {\n id: ComponentID;\n dir: string;\n files: string[];\n envId: string;\n envSetBy: string;\n packageName: string;\n isApp?: boolean | undefined;\n isEnv?: boolean | undefined;\n dependencies?: string[] | undefined;\n installMissingDependencies?: boolean | undefined;\n}",
@@ -12436,7 +12436,7 @@
12436
12436
  "__schema": "TypeLiteralSchema",
12437
12437
  "location": {
12438
12438
  "filePath": "component-generator.ts",
12439
- "line": 24,
12439
+ "line": 23,
12440
12440
  "character": 30
12441
12441
  },
12442
12442
  "members": [
@@ -12444,7 +12444,7 @@
12444
12444
  "__schema": "VariableLikeSchema",
12445
12445
  "location": {
12446
12446
  "filePath": "component-generator.ts",
12447
- "line": 25,
12447
+ "line": 24,
12448
12448
  "character": 3
12449
12449
  },
12450
12450
  "signature": "(property) id: ComponentID",
@@ -12453,7 +12453,7 @@
12453
12453
  "__schema": "TypeRefSchema",
12454
12454
  "location": {
12455
12455
  "filePath": "component-generator.ts",
12456
- "line": 25,
12456
+ "line": 24,
12457
12457
  "character": 3
12458
12458
  },
12459
12459
  "name": "ComponentID",
@@ -12469,7 +12469,7 @@
12469
12469
  "__schema": "VariableLikeSchema",
12470
12470
  "location": {
12471
12471
  "filePath": "component-generator.ts",
12472
- "line": 26,
12472
+ "line": 25,
12473
12473
  "character": 3
12474
12474
  },
12475
12475
  "signature": "(property) dir: string",
@@ -12478,7 +12478,7 @@
12478
12478
  "__schema": "KeywordTypeSchema",
12479
12479
  "location": {
12480
12480
  "filePath": "component-generator.ts",
12481
- "line": 26,
12481
+ "line": 25,
12482
12482
  "character": 8
12483
12483
  },
12484
12484
  "name": "string"
@@ -12489,7 +12489,7 @@
12489
12489
  "__schema": "VariableLikeSchema",
12490
12490
  "location": {
12491
12491
  "filePath": "component-generator.ts",
12492
- "line": 27,
12492
+ "line": 26,
12493
12493
  "character": 3
12494
12494
  },
12495
12495
  "signature": "(property) files: string[]",
@@ -12498,14 +12498,14 @@
12498
12498
  "__schema": "TypeArraySchema",
12499
12499
  "location": {
12500
12500
  "filePath": "component-generator.ts",
12501
- "line": 27,
12501
+ "line": 26,
12502
12502
  "character": 10
12503
12503
  },
12504
12504
  "type": {
12505
12505
  "__schema": "KeywordTypeSchema",
12506
12506
  "location": {
12507
12507
  "filePath": "component-generator.ts",
12508
- "line": 27,
12508
+ "line": 26,
12509
12509
  "character": 10
12510
12510
  },
12511
12511
  "name": "string"
@@ -12517,7 +12517,7 @@
12517
12517
  "__schema": "VariableLikeSchema",
12518
12518
  "location": {
12519
12519
  "filePath": "component-generator.ts",
12520
- "line": 28,
12520
+ "line": 27,
12521
12521
  "character": 3
12522
12522
  },
12523
12523
  "signature": "(property) envId: string",
@@ -12526,7 +12526,7 @@
12526
12526
  "__schema": "KeywordTypeSchema",
12527
12527
  "location": {
12528
12528
  "filePath": "component-generator.ts",
12529
- "line": 28,
12529
+ "line": 27,
12530
12530
  "character": 10
12531
12531
  },
12532
12532
  "name": "string"
@@ -12537,7 +12537,7 @@
12537
12537
  "__schema": "VariableLikeSchema",
12538
12538
  "location": {
12539
12539
  "filePath": "component-generator.ts",
12540
- "line": 29,
12540
+ "line": 28,
12541
12541
  "character": 3
12542
12542
  },
12543
12543
  "signature": "(property) envSetBy: string",
@@ -12546,7 +12546,7 @@
12546
12546
  "__schema": "KeywordTypeSchema",
12547
12547
  "location": {
12548
12548
  "filePath": "component-generator.ts",
12549
- "line": 29,
12549
+ "line": 28,
12550
12550
  "character": 13
12551
12551
  },
12552
12552
  "name": "string"
@@ -12557,7 +12557,7 @@
12557
12557
  "__schema": "VariableLikeSchema",
12558
12558
  "location": {
12559
12559
  "filePath": "component-generator.ts",
12560
- "line": 30,
12560
+ "line": 29,
12561
12561
  "character": 3
12562
12562
  },
12563
12563
  "signature": "(property) packageName: string",
@@ -12566,7 +12566,7 @@
12566
12566
  "__schema": "KeywordTypeSchema",
12567
12567
  "location": {
12568
12568
  "filePath": "component-generator.ts",
12569
- "line": 30,
12569
+ "line": 29,
12570
12570
  "character": 16
12571
12571
  },
12572
12572
  "name": "string"
@@ -12577,7 +12577,7 @@
12577
12577
  "__schema": "VariableLikeSchema",
12578
12578
  "location": {
12579
12579
  "filePath": "component-generator.ts",
12580
- "line": 31,
12580
+ "line": 30,
12581
12581
  "character": 3
12582
12582
  },
12583
12583
  "signature": "(property) isApp?: boolean | undefined",
@@ -12586,7 +12586,7 @@
12586
12586
  "__schema": "KeywordTypeSchema",
12587
12587
  "location": {
12588
12588
  "filePath": "component-generator.ts",
12589
- "line": 31,
12589
+ "line": 30,
12590
12590
  "character": 11
12591
12591
  },
12592
12592
  "name": "boolean"
@@ -12597,7 +12597,7 @@
12597
12597
  "__schema": "VariableLikeSchema",
12598
12598
  "location": {
12599
12599
  "filePath": "component-generator.ts",
12600
- "line": 32,
12600
+ "line": 31,
12601
12601
  "character": 3
12602
12602
  },
12603
12603
  "signature": "(property) isEnv?: boolean | undefined",
@@ -12606,7 +12606,7 @@
12606
12606
  "__schema": "KeywordTypeSchema",
12607
12607
  "location": {
12608
12608
  "filePath": "component-generator.ts",
12609
- "line": 32,
12609
+ "line": 31,
12610
12610
  "character": 11
12611
12611
  },
12612
12612
  "name": "boolean"
@@ -12617,7 +12617,7 @@
12617
12617
  "__schema": "VariableLikeSchema",
12618
12618
  "location": {
12619
12619
  "filePath": "component-generator.ts",
12620
- "line": 33,
12620
+ "line": 32,
12621
12621
  "character": 3
12622
12622
  },
12623
12623
  "signature": "(property) dependencies?: string[] | undefined",
@@ -12626,14 +12626,14 @@
12626
12626
  "__schema": "TypeArraySchema",
12627
12627
  "location": {
12628
12628
  "filePath": "component-generator.ts",
12629
- "line": 33,
12629
+ "line": 32,
12630
12630
  "character": 18
12631
12631
  },
12632
12632
  "type": {
12633
12633
  "__schema": "KeywordTypeSchema",
12634
12634
  "location": {
12635
12635
  "filePath": "component-generator.ts",
12636
- "line": 33,
12636
+ "line": 32,
12637
12637
  "character": 18
12638
12638
  },
12639
12639
  "name": "string"
@@ -12645,7 +12645,7 @@
12645
12645
  "__schema": "VariableLikeSchema",
12646
12646
  "location": {
12647
12647
  "filePath": "component-generator.ts",
12648
- "line": 34,
12648
+ "line": 33,
12649
12649
  "character": 3
12650
12650
  },
12651
12651
  "signature": "(property) installMissingDependencies?: boolean | undefined",
@@ -12654,7 +12654,7 @@
12654
12654
  "__schema": "KeywordTypeSchema",
12655
12655
  "location": {
12656
12656
  "filePath": "component-generator.ts",
12657
- "line": 34,
12657
+ "line": 33,
12658
12658
  "character": 32
12659
12659
  },
12660
12660
  "name": "boolean"
@@ -12668,7 +12668,7 @@
12668
12668
  "__schema": "TypeSchema",
12669
12669
  "location": {
12670
12670
  "filePath": "component-generator.ts",
12671
- "line": 37,
12671
+ "line": 36,
12672
12672
  "character": 1
12673
12673
  },
12674
12674
  "signature": "type OnComponentCreateFn = (generateResults: GenerateResult[]) => Promise<void>",
@@ -12677,7 +12677,7 @@
12677
12677
  "__schema": "FunctionLikeSchema",
12678
12678
  "location": {
12679
12679
  "filePath": "component-generator.ts",
12680
- "line": 37,
12680
+ "line": 36,
12681
12681
  "character": 35
12682
12682
  },
12683
12683
  "signature": "(generateResults: GenerateResult[]): Promise<void>",
@@ -12687,7 +12687,7 @@
12687
12687
  "__schema": "ParameterSchema",
12688
12688
  "location": {
12689
12689
  "filePath": "component-generator.ts",
12690
- "line": 37,
12690
+ "line": 36,
12691
12691
  "character": 36
12692
12692
  },
12693
12693
  "name": "generateResults",
@@ -12695,14 +12695,14 @@
12695
12695
  "__schema": "TypeArraySchema",
12696
12696
  "location": {
12697
12697
  "filePath": "component-generator.ts",
12698
- "line": 37,
12698
+ "line": 36,
12699
12699
  "character": 53
12700
12700
  },
12701
12701
  "type": {
12702
12702
  "__schema": "TypeRefSchema",
12703
12703
  "location": {
12704
12704
  "filePath": "component-generator.ts",
12705
- "line": 37,
12705
+ "line": 36,
12706
12706
  "character": 53
12707
12707
  },
12708
12708
  "name": "GenerateResult"
@@ -12716,7 +12716,7 @@
12716
12716
  "__schema": "TypeRefSchema",
12717
12717
  "location": {
12718
12718
  "filePath": "component-generator.ts",
12719
- "line": 37,
12719
+ "line": 36,
12720
12720
  "character": 74
12721
12721
  },
12722
12722
  "name": "Promise",
@@ -12725,7 +12725,7 @@
12725
12725
  "__schema": "KeywordTypeSchema",
12726
12726
  "location": {
12727
12727
  "filePath": "component-generator.ts",
12728
- "line": 37,
12728
+ "line": 36,
12729
12729
  "character": 82
12730
12730
  },
12731
12731
  "name": "void"
@@ -12739,7 +12739,7 @@
12739
12739
  "__schema": "ClassSchema",
12740
12740
  "location": {
12741
12741
  "filePath": "component-generator.ts",
12742
- "line": 39,
12742
+ "line": 38,
12743
12743
  "character": 1
12744
12744
  },
12745
12745
  "signature": "class ComponentGenerator",
@@ -12749,7 +12749,7 @@
12749
12749
  "__schema": "ConstructorSchema",
12750
12750
  "location": {
12751
12751
  "filePath": "component-generator.ts",
12752
- "line": 40,
12752
+ "line": 39,
12753
12753
  "character": 3
12754
12754
  },
12755
12755
  "signature": "constructor ComponentGenerator(workspace: Workspace, componentIds: ComponentID[], options: Partial<CreateOptions>, template: ComponentTemplate, envs: EnvsMain, newComponentHelper: NewComponentHelperMain, tracker: TrackerMain, wsConfigFiles: WorkspaceConfigFilesMain, logger: Logger, onComponentCreateSlot: OnComponentCreateSlot, aspectId: string, envId?: ComponentID): ComponentGenerator",
@@ -12759,7 +12759,7 @@
12759
12759
  "__schema": "ParameterSchema",
12760
12760
  "location": {
12761
12761
  "filePath": "component-generator.ts",
12762
- "line": 41,
12762
+ "line": 40,
12763
12763
  "character": 5
12764
12764
  },
12765
12765
  "name": "workspace",
@@ -12767,7 +12767,7 @@
12767
12767
  "__schema": "TypeRefSchema",
12768
12768
  "location": {
12769
12769
  "filePath": "component-generator.ts",
12770
- "line": 41,
12770
+ "line": 40,
12771
12771
  "character": 24
12772
12772
  },
12773
12773
  "name": "Workspace"
@@ -12779,7 +12779,7 @@
12779
12779
  "__schema": "ParameterSchema",
12780
12780
  "location": {
12781
12781
  "filePath": "component-generator.ts",
12782
- "line": 42,
12782
+ "line": 41,
12783
12783
  "character": 5
12784
12784
  },
12785
12785
  "name": "componentIds",
@@ -12787,14 +12787,14 @@
12787
12787
  "__schema": "TypeArraySchema",
12788
12788
  "location": {
12789
12789
  "filePath": "component-generator.ts",
12790
- "line": 42,
12790
+ "line": 41,
12791
12791
  "character": 27
12792
12792
  },
12793
12793
  "type": {
12794
12794
  "__schema": "TypeRefSchema",
12795
12795
  "location": {
12796
12796
  "filePath": "component-generator.ts",
12797
- "line": 42,
12797
+ "line": 41,
12798
12798
  "character": 27
12799
12799
  },
12800
12800
  "name": "ComponentID"
@@ -12807,7 +12807,7 @@
12807
12807
  "__schema": "ParameterSchema",
12808
12808
  "location": {
12809
12809
  "filePath": "component-generator.ts",
12810
- "line": 43,
12810
+ "line": 42,
12811
12811
  "character": 5
12812
12812
  },
12813
12813
  "name": "options",
@@ -12815,7 +12815,7 @@
12815
12815
  "__schema": "TypeRefSchema",
12816
12816
  "location": {
12817
12817
  "filePath": "component-generator.ts",
12818
- "line": 43,
12818
+ "line": 42,
12819
12819
  "character": 22
12820
12820
  },
12821
12821
  "name": "Partial",
@@ -12824,7 +12824,7 @@
12824
12824
  "__schema": "TypeRefSchema",
12825
12825
  "location": {
12826
12826
  "filePath": "component-generator.ts",
12827
- "line": 43,
12827
+ "line": 42,
12828
12828
  "character": 30
12829
12829
  },
12830
12830
  "name": "CreateOptions"
@@ -12838,7 +12838,7 @@
12838
12838
  "__schema": "ParameterSchema",
12839
12839
  "location": {
12840
12840
  "filePath": "component-generator.ts",
12841
- "line": 44,
12841
+ "line": 43,
12842
12842
  "character": 5
12843
12843
  },
12844
12844
  "name": "template",
@@ -12846,7 +12846,7 @@
12846
12846
  "__schema": "TypeRefSchema",
12847
12847
  "location": {
12848
12848
  "filePath": "component-generator.ts",
12849
- "line": 44,
12849
+ "line": 43,
12850
12850
  "character": 23
12851
12851
  },
12852
12852
  "name": "ComponentTemplate"
@@ -12858,7 +12858,7 @@
12858
12858
  "__schema": "ParameterSchema",
12859
12859
  "location": {
12860
12860
  "filePath": "component-generator.ts",
12861
- "line": 45,
12861
+ "line": 44,
12862
12862
  "character": 5
12863
12863
  },
12864
12864
  "name": "envs",
@@ -12866,7 +12866,7 @@
12866
12866
  "__schema": "TypeRefSchema",
12867
12867
  "location": {
12868
12868
  "filePath": "component-generator.ts",
12869
- "line": 45,
12869
+ "line": 44,
12870
12870
  "character": 19
12871
12871
  },
12872
12872
  "name": "EnvsMain"
@@ -12878,7 +12878,7 @@
12878
12878
  "__schema": "ParameterSchema",
12879
12879
  "location": {
12880
12880
  "filePath": "component-generator.ts",
12881
- "line": 46,
12881
+ "line": 45,
12882
12882
  "character": 5
12883
12883
  },
12884
12884
  "name": "newComponentHelper",
@@ -12886,7 +12886,7 @@
12886
12886
  "__schema": "TypeRefSchema",
12887
12887
  "location": {
12888
12888
  "filePath": "component-generator.ts",
12889
- "line": 46,
12889
+ "line": 45,
12890
12890
  "character": 33
12891
12891
  },
12892
12892
  "name": "NewComponentHelperMain"
@@ -12898,7 +12898,7 @@
12898
12898
  "__schema": "ParameterSchema",
12899
12899
  "location": {
12900
12900
  "filePath": "component-generator.ts",
12901
- "line": 47,
12901
+ "line": 46,
12902
12902
  "character": 5
12903
12903
  },
12904
12904
  "name": "tracker",
@@ -12906,7 +12906,7 @@
12906
12906
  "__schema": "TypeRefSchema",
12907
12907
  "location": {
12908
12908
  "filePath": "component-generator.ts",
12909
- "line": 47,
12909
+ "line": 46,
12910
12910
  "character": 22
12911
12911
  },
12912
12912
  "name": "TrackerMain"
@@ -12918,7 +12918,7 @@
12918
12918
  "__schema": "ParameterSchema",
12919
12919
  "location": {
12920
12920
  "filePath": "component-generator.ts",
12921
- "line": 48,
12921
+ "line": 47,
12922
12922
  "character": 5
12923
12923
  },
12924
12924
  "name": "wsConfigFiles",
@@ -12926,7 +12926,7 @@
12926
12926
  "__schema": "TypeRefSchema",
12927
12927
  "location": {
12928
12928
  "filePath": "component-generator.ts",
12929
- "line": 48,
12929
+ "line": 47,
12930
12930
  "character": 28
12931
12931
  },
12932
12932
  "name": "WorkspaceConfigFilesMain"
@@ -12938,7 +12938,7 @@
12938
12938
  "__schema": "ParameterSchema",
12939
12939
  "location": {
12940
12940
  "filePath": "component-generator.ts",
12941
- "line": 49,
12941
+ "line": 48,
12942
12942
  "character": 5
12943
12943
  },
12944
12944
  "name": "logger",
@@ -12946,7 +12946,7 @@
12946
12946
  "__schema": "TypeRefSchema",
12947
12947
  "location": {
12948
12948
  "filePath": "component-generator.ts",
12949
- "line": 49,
12949
+ "line": 48,
12950
12950
  "character": 21
12951
12951
  },
12952
12952
  "name": "Logger"
@@ -12958,7 +12958,7 @@
12958
12958
  "__schema": "ParameterSchema",
12959
12959
  "location": {
12960
12960
  "filePath": "component-generator.ts",
12961
- "line": 50,
12961
+ "line": 49,
12962
12962
  "character": 5
12963
12963
  },
12964
12964
  "name": "onComponentCreateSlot",
@@ -12966,7 +12966,7 @@
12966
12966
  "__schema": "TypeRefSchema",
12967
12967
  "location": {
12968
12968
  "filePath": "component-generator.ts",
12969
- "line": 50,
12969
+ "line": 49,
12970
12970
  "character": 36
12971
12971
  },
12972
12972
  "name": "OnComponentCreateSlot"
@@ -12978,7 +12978,7 @@
12978
12978
  "__schema": "ParameterSchema",
12979
12979
  "location": {
12980
12980
  "filePath": "component-generator.ts",
12981
- "line": 51,
12981
+ "line": 50,
12982
12982
  "character": 5
12983
12983
  },
12984
12984
  "name": "aspectId",
@@ -12986,7 +12986,7 @@
12986
12986
  "__schema": "KeywordTypeSchema",
12987
12987
  "location": {
12988
12988
  "filePath": "component-generator.ts",
12989
- "line": 51,
12989
+ "line": 50,
12990
12990
  "character": 23
12991
12991
  },
12992
12992
  "name": "string"
@@ -12998,7 +12998,7 @@
12998
12998
  "__schema": "ParameterSchema",
12999
12999
  "location": {
13000
13000
  "filePath": "component-generator.ts",
13001
- "line": 52,
13001
+ "line": 51,
13002
13002
  "character": 5
13003
13003
  },
13004
13004
  "name": "envId",
@@ -13006,7 +13006,7 @@
13006
13006
  "__schema": "TypeRefSchema",
13007
13007
  "location": {
13008
13008
  "filePath": "component-generator.ts",
13009
- "line": 52,
13009
+ "line": 51,
13010
13010
  "character": 21
13011
13011
  },
13012
13012
  "name": "ComponentID"
@@ -13019,7 +13019,7 @@
13019
13019
  "__schema": "ThisTypeSchema",
13020
13020
  "location": {
13021
13021
  "filePath": "component-generator.ts",
13022
- "line": 39,
13022
+ "line": 38,
13023
13023
  "character": 1
13024
13024
  },
13025
13025
  "name": "ComponentGenerator"
@@ -13030,7 +13030,7 @@
13030
13030
  "__schema": "FunctionLikeSchema",
13031
13031
  "location": {
13032
13032
  "filePath": "component-generator.ts",
13033
- "line": 55,
13033
+ "line": 54,
13034
13034
  "character": 3
13035
13035
  },
13036
13036
  "signature": "(method) ComponentGenerator.generate(force?: boolean): Promise<GenerateResult[]>",
@@ -13040,7 +13040,7 @@
13040
13040
  "__schema": "ParameterSchema",
13041
13041
  "location": {
13042
13042
  "filePath": "component-generator.ts",
13043
- "line": 55,
13043
+ "line": 54,
13044
13044
  "character": 18
13045
13045
  },
13046
13046
  "name": "force",
@@ -13048,7 +13048,7 @@
13048
13048
  "__schema": "InferenceTypeSchema",
13049
13049
  "location": {
13050
13050
  "filePath": "component-generator.ts",
13051
- "line": 55,
13051
+ "line": 54,
13052
13052
  "character": 18
13053
13053
  },
13054
13054
  "type": "boolean"
@@ -13062,7 +13062,7 @@
13062
13062
  "__schema": "TypeRefSchema",
13063
13063
  "location": {
13064
13064
  "filePath": "component-generator.ts",
13065
- "line": 55,
13065
+ "line": 54,
13066
13066
  "character": 34
13067
13067
  },
13068
13068
  "name": "Promise",
@@ -13071,14 +13071,14 @@
13071
13071
  "__schema": "TypeArraySchema",
13072
13072
  "location": {
13073
13073
  "filePath": "component-generator.ts",
13074
- "line": 55,
13074
+ "line": 54,
13075
13075
  "character": 42
13076
13076
  },
13077
13077
  "type": {
13078
13078
  "__schema": "TypeRefSchema",
13079
13079
  "location": {
13080
13080
  "filePath": "component-generator.ts",
13081
- "line": 55,
13081
+ "line": 54,
13082
13082
  "character": 42
13083
13083
  },
13084
13084
  "name": "GenerateResult"
@@ -13101,7 +13101,7 @@
13101
13101
  "componentId": {
13102
13102
  "scope": "teambit.generator",
13103
13103
  "name": "generator",
13104
- "version": "1.0.333"
13104
+ "version": "1.0.335"
13105
13105
  },
13106
13106
  "taggedModuleExports": []
13107
13107
  }
@@ -67,16 +67,9 @@ function _pkgModules() {
67
67
  };
68
68
  return data;
69
69
  }
70
- function _sources() {
71
- const data = require("@teambit/legacy/dist/consumer/component/sources");
72
- _sources = function () {
73
- return data;
74
- };
75
- return data;
76
- }
77
- function _dataToPersist() {
78
- const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component/sources/data-to-persist"));
79
- _dataToPersist = function () {
70
+ function _component() {
71
+ const data = require("@teambit/component.sources");
72
+ _component = function () {
80
73
  return data;
81
74
  };
82
75
  return data;
@@ -301,14 +294,14 @@ class ComponentGenerator {
301
294
  * writes the generated template files to the default directory set in the workspace config
302
295
  */
303
296
  async writeComponentFiles(componentPath, templateFiles) {
304
- const dataToPersist = new (_dataToPersist().default)();
297
+ const dataToPersist = new (_component().DataToPersist)();
305
298
  const vinylFiles = templateFiles.map(templateFile => {
306
299
  const templateFileVinyl = new (_vinyl().default)({
307
300
  base: componentPath,
308
301
  path: _path().default.join(componentPath, templateFile.relativePath),
309
302
  contents: Buffer.from(templateFile.content)
310
303
  });
311
- return _sources().AbstractVinyl.fromVinyl(templateFileVinyl);
304
+ return _component().AbstractVinyl.fromVinyl(templateFileVinyl);
312
305
  });
313
306
  const results = vinylFiles.map(v => v.path);
314
307
  dataToPersist.addManyFiles(vinylFiles);
@@ -1 +1 @@
1
- {"version":3,"names":["_vinyl","data","_interopRequireDefault","require","_fsExtra","_pMapSeries","_path","_envs","_camelcase","_bitError","_workspaceModules","_pkgModules","_sources","_dataToPersist","_componentId","e","__esModule","default","ComponentGenerator","constructor","workspace","componentIds","options","template","envs","newComponentHelper","tracker","wsConfigFiles","logger","onComponentCreateSlot","aspectId","envId","generate","force","dirsToDeleteIfFailed","generateResults","pMapSeries","componentId","componentPath","getNewComponentPath","pathFromUser","path","componentsToCreate","length","fs","existsSync","join","BitError","push","generateOneComponent","err","deleteGeneratedComponents","bitMap","write","ids","map","r","id","tryLinkToNodeModules","runOnComponentCreateHook","tryWriteConfigFiles","linkToNodeModulesByIds","consoleFailure","message","fns","values","Promise","all","fn","shouldWrite","isWorkspaceConfigWriteEnabled","clearComponentCache","writeConfigFiles","clean","silent","dedupe","throw","dirs","dir","absoluteDir","remove","code","name","namePascalCase","camelcase","pascalCase","nameCamelCase","ComponentID","fromString","files","generateFiles","mainFile","find","file","isMain","writeComponentFiles","addResults","track","rootDir","relativePath","componentName","fullName","defaultScope","scope","component","get","hasEnvConfiguredOriginally","hasEnvConfigured","isApp","use","toString","envBeforeConfigChanges","getEnv","config","boundConfig","bind","userEnv","env","isInWorkspace","exists","toStringWithoutVersion","templateEnv","EnvsAspect","Object","keys","undefined","configWithEnv","addEnvIfProvidedByFlag","setEntireConfig","getEnvData","envFromFlag","envFromTemplate","setBy","isSameAsThisEnvId","packageName","componentIdToPackageName","state","_consumer","envSetBy","isEnv","dependencies","installMissingDependencies","addEnvToConfig","templateFiles","dataToPersist","DataToPersist","vinylFiles","templateFile","templateFileVinyl","Vinyl","base","contents","Buffer","from","content","AbstractVinyl","fromVinyl","results","v","addManyFiles","addBasePath","persistAllToFS","exports"],"sources":["component-generator.ts"],"sourcesContent":["import Vinyl from 'vinyl';\nimport fs from 'fs-extra';\nimport pMapSeries from 'p-map-series';\nimport path from 'path';\nimport { Workspace } from '@teambit/workspace';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport camelcase from 'camelcase';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TrackerMain } from '@teambit/tracker';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathOsBasedRelative } from '@teambit/toolbox.path.path';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { ComponentID } from '@teambit/component-id';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\n\nimport { ComponentTemplate, ComponentFile, ComponentConfig } from './component-template';\nimport { CreateOptions } from './create.cmd';\nimport { OnComponentCreateSlot } from './generator.main.runtime';\n\nexport type GenerateResult = {\n id: ComponentID;\n dir: string;\n files: string[];\n envId: string;\n envSetBy: string;\n packageName: string;\n isApp?: boolean;\n isEnv?: boolean;\n dependencies?: string[];\n installMissingDependencies?: boolean;\n};\n\nexport type OnComponentCreateFn = (generateResults: GenerateResult[]) => Promise<void>;\n\nexport class ComponentGenerator {\n constructor(\n private workspace: Workspace,\n private componentIds: ComponentID[],\n private options: Partial<CreateOptions>,\n private template: ComponentTemplate,\n private envs: EnvsMain,\n private newComponentHelper: NewComponentHelperMain,\n private tracker: TrackerMain,\n private wsConfigFiles: WorkspaceConfigFilesMain,\n private logger: Logger,\n private onComponentCreateSlot: OnComponentCreateSlot,\n private aspectId: string,\n private envId?: ComponentID\n ) {}\n\n async generate(force = false): Promise<GenerateResult[]> {\n const dirsToDeleteIfFailed: string[] = [];\n const generateResults = await pMapSeries(this.componentIds, async (componentId) => {\n try {\n const componentPath = this.newComponentHelper.getNewComponentPath(componentId, {\n pathFromUser: this.options.path,\n componentsToCreate: this.componentIds.length,\n });\n if (!force && fs.existsSync(path.join(this.workspace.path, componentPath))) {\n throw new BitError(\n `unable to create a component at \"${componentPath}\", this path already exists, please use \"--path\" to create the component in a different path`\n );\n }\n dirsToDeleteIfFailed.push(componentPath);\n return await this.generateOneComponent(componentId, componentPath);\n } catch (err: any) {\n await this.deleteGeneratedComponents(dirsToDeleteIfFailed);\n throw err;\n }\n });\n\n await this.workspace.bitMap.write(`create (${this.componentIds.length} components)`);\n\n const ids = generateResults.map((r) => r.id);\n await this.tryLinkToNodeModules(ids);\n await this.runOnComponentCreateHook(generateResults);\n // We are running this after the runOnComponentCreateHook as it require\n // the env to be installed to work properly, and the hook might install\n // the env.\n await this.tryWriteConfigFiles(ids);\n\n return generateResults;\n }\n\n private async tryLinkToNodeModules(ids: ComponentID[]) {\n try {\n await linkToNodeModulesByIds(\n this.workspace,\n ids.map((id) => id)\n );\n } catch (err: any) {\n this.logger.consoleFailure(\n `failed linking the new components to node_modules, please run \"bit link\" manually. error: ${err.message}`\n );\n }\n }\n\n private async runOnComponentCreateHook(generateResults: GenerateResult[]) {\n const fns = this.onComponentCreateSlot.values();\n if (!fns.length) return;\n await Promise.all(fns.map((fn) => fn(generateResults)));\n }\n\n /**\n * The function `tryWriteConfigFiles` attempts to write workspace config files, and if it fails, it logs an error\n * message.\n * @returns If the condition `!shouldWrite` is true, then nothing is being returned. Otherwise, if the `writeConfigFiles`\n * function is successfully executed, nothing is being returned. If an error occurs during the execution of\n * `writeConfigFiles`, an error message is being returned.\n */\n private async tryWriteConfigFiles(ids: ComponentID[]) {\n const shouldWrite = this.wsConfigFiles.isWorkspaceConfigWriteEnabled();\n if (!shouldWrite) return;\n ids.map((id) => this.workspace.clearComponentCache(id));\n const { err } = await this.wsConfigFiles.writeConfigFiles({\n clean: true,\n silent: true,\n dedupe: true,\n throw: false,\n });\n if (err) {\n this.logger.consoleFailure(\n `failed generating workspace config files, please run \"bit ws-config write\" manually. error: ${err.message}`\n );\n }\n }\n\n private async deleteGeneratedComponents(dirs: string[]) {\n await Promise.all(\n dirs.map(async (dir) => {\n const absoluteDir = path.join(this.workspace.path, dir);\n try {\n await fs.remove(absoluteDir);\n } catch (err: any) {\n if (err.code !== 'ENOENT') {\n // if not exist, it's fine\n throw err;\n }\n }\n })\n );\n }\n\n private async generateOneComponent(componentId: ComponentID, componentPath: string): Promise<GenerateResult> {\n const name = componentId.name;\n const namePascalCase = camelcase(name, { pascalCase: true });\n const nameCamelCase = camelcase(name);\n const aspectId = ComponentID.fromString(this.aspectId);\n\n const files = await this.template.generateFiles({\n name,\n namePascalCase,\n nameCamelCase,\n componentId,\n aspectId,\n envId: this.envId,\n });\n const mainFile = files.find((file) => file.isMain);\n await this.writeComponentFiles(componentPath, files);\n const addResults = await this.tracker.track({\n rootDir: componentPath,\n mainFile: mainFile?.relativePath,\n componentName: componentId.fullName,\n defaultScope: this.options.scope,\n });\n const component = await this.workspace.get(componentId);\n const hasEnvConfiguredOriginally = this.envs.hasEnvConfigured(component);\n if (this.template.isApp) {\n await this.workspace.use(componentId.toString());\n }\n const envBeforeConfigChanges = this.envs.getEnv(component);\n let config = this.template.config;\n if (config && typeof config === 'function') {\n const boundConfig = this.template.config?.bind(this.template);\n config = boundConfig({ aspectId: this.aspectId });\n }\n\n const userEnv = this.options.env;\n\n if (!config && this.envId && !userEnv) {\n const isInWorkspace = this.workspace.exists(this.envId);\n config = {\n [isInWorkspace ? this.envId.toStringWithoutVersion() : this.envId.toString()]: {},\n 'teambit.envs/envs': {\n env: this.envId.toStringWithoutVersion(),\n },\n };\n }\n\n const templateEnv = config?.[EnvsAspect.id]?.env;\n\n if (config && templateEnv && hasEnvConfiguredOriginally) {\n // remove the env we got from the template.\n delete config[templateEnv];\n delete config[EnvsAspect.id].env;\n if (Object.keys(config[EnvsAspect.id]).length === 0) delete config[EnvsAspect.id];\n if (Object.keys(config).length === 0) config = undefined;\n }\n\n const configWithEnv = await this.addEnvIfProvidedByFlag(config);\n if (configWithEnv) this.workspace.bitMap.setEntireConfig(component.id, configWithEnv);\n\n const getEnvData = () => {\n const envFromFlag = this.options.env; // env entered by the user when running `bit create --env`\n const envFromTemplate = config?.[EnvsAspect.id]?.env;\n if (envFromFlag) {\n return {\n envId: envFromFlag,\n setBy: '--env flag',\n };\n }\n if (envFromTemplate) {\n return {\n envId: envFromTemplate,\n setBy: 'template',\n };\n }\n return {\n envId: envBeforeConfigChanges.id,\n setBy: hasEnvConfiguredOriginally ? 'workspace variants' : '<default>',\n };\n };\n // eslint-disable-next-line prefer-const\n let { envId, setBy } = getEnvData();\n if (envId) {\n const isInWorkspace = this.workspace.exists(envId);\n const isSameAsThisEnvId = envId === this.envId?.toString() || envId === this.envId?.toStringWithoutVersion();\n if (isSameAsThisEnvId && this.envId) {\n envId = isInWorkspace ? this.envId.toStringWithoutVersion() : this.envId.toString();\n }\n }\n return {\n id: componentId,\n dir: componentPath,\n files: addResults.files,\n packageName: componentIdToPackageName(component.state._consumer),\n envId,\n envSetBy: setBy,\n isApp: this.template.isApp,\n isEnv: this.template.isEnv,\n dependencies: this.template.dependencies,\n installMissingDependencies: this.template.installMissingDependencies,\n };\n }\n\n private async addEnvIfProvidedByFlag(config?: ComponentConfig): Promise<ComponentConfig | undefined> {\n const userEnv = this.options.env; // env entered by the user when running `bit create --env`\n const templateEnv = config?.[EnvsAspect.id]?.env;\n if (!userEnv || userEnv === templateEnv) {\n return config;\n }\n config = config || {};\n if (templateEnv) {\n // the component template has an env and the user wants a different env.\n delete config[templateEnv];\n }\n await this.tracker.addEnvToConfig(userEnv, config);\n\n return config;\n }\n\n /**\n * writes the generated template files to the default directory set in the workspace config\n */\n private async writeComponentFiles(\n componentPath: string,\n templateFiles: ComponentFile[]\n ): Promise<PathOsBasedRelative[]> {\n const dataToPersist = new DataToPersist();\n const vinylFiles = templateFiles.map((templateFile) => {\n const templateFileVinyl = new Vinyl({\n base: componentPath,\n path: path.join(componentPath, templateFile.relativePath),\n contents: Buffer.from(templateFile.content),\n });\n return AbstractVinyl.fromVinyl(templateFileVinyl);\n });\n const results = vinylFiles.map((v) => v.path);\n dataToPersist.addManyFiles(vinylFiles);\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n return results;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA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a,CAACgB,WAAW,CAAC,IAAI,CAAC5I,SAAS,CAACqB,IAAI,CAAC;IAC9C,MAAMuG,aAAa,CAACiB,cAAc,CAAC,CAAC;IACpC,OAAOJ,OAAO;EAChB;AACF;AAACK,OAAA,CAAAhJ,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_vinyl","data","_interopRequireDefault","require","_fsExtra","_pMapSeries","_path","_envs","_camelcase","_bitError","_workspaceModules","_pkgModules","_component","_componentId","e","__esModule","default","ComponentGenerator","constructor","workspace","componentIds","options","template","envs","newComponentHelper","tracker","wsConfigFiles","logger","onComponentCreateSlot","aspectId","envId","generate","force","dirsToDeleteIfFailed","generateResults","pMapSeries","componentId","componentPath","getNewComponentPath","pathFromUser","path","componentsToCreate","length","fs","existsSync","join","BitError","push","generateOneComponent","err","deleteGeneratedComponents","bitMap","write","ids","map","r","id","tryLinkToNodeModules","runOnComponentCreateHook","tryWriteConfigFiles","linkToNodeModulesByIds","consoleFailure","message","fns","values","Promise","all","fn","shouldWrite","isWorkspaceConfigWriteEnabled","clearComponentCache","writeConfigFiles","clean","silent","dedupe","throw","dirs","dir","absoluteDir","remove","code","name","namePascalCase","camelcase","pascalCase","nameCamelCase","ComponentID","fromString","files","generateFiles","mainFile","find","file","isMain","writeComponentFiles","addResults","track","rootDir","relativePath","componentName","fullName","defaultScope","scope","component","get","hasEnvConfiguredOriginally","hasEnvConfigured","isApp","use","toString","envBeforeConfigChanges","getEnv","config","boundConfig","bind","userEnv","env","isInWorkspace","exists","toStringWithoutVersion","templateEnv","EnvsAspect","Object","keys","undefined","configWithEnv","addEnvIfProvidedByFlag","setEntireConfig","getEnvData","envFromFlag","envFromTemplate","setBy","isSameAsThisEnvId","packageName","componentIdToPackageName","state","_consumer","envSetBy","isEnv","dependencies","installMissingDependencies","addEnvToConfig","templateFiles","dataToPersist","DataToPersist","vinylFiles","templateFile","templateFileVinyl","Vinyl","base","contents","Buffer","from","content","AbstractVinyl","fromVinyl","results","v","addManyFiles","addBasePath","persistAllToFS","exports"],"sources":["component-generator.ts"],"sourcesContent":["import Vinyl from 'vinyl';\nimport fs from 'fs-extra';\nimport pMapSeries from 'p-map-series';\nimport path from 'path';\nimport { Workspace } from '@teambit/workspace';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport camelcase from 'camelcase';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TrackerMain } from '@teambit/tracker';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathOsBasedRelative } from '@teambit/toolbox.path.path';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport { AbstractVinyl, DataToPersist } from '@teambit/component.sources';\nimport { NewComponentHelperMain } from '@teambit/new-component-helper';\nimport { ComponentID } from '@teambit/component-id';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\n\nimport { ComponentTemplate, ComponentFile, ComponentConfig } from './component-template';\nimport { CreateOptions } from './create.cmd';\nimport { OnComponentCreateSlot } from './generator.main.runtime';\n\nexport type GenerateResult = {\n id: ComponentID;\n dir: string;\n files: string[];\n envId: string;\n envSetBy: string;\n packageName: string;\n isApp?: boolean;\n isEnv?: boolean;\n dependencies?: string[];\n installMissingDependencies?: boolean;\n};\n\nexport type OnComponentCreateFn = (generateResults: GenerateResult[]) => Promise<void>;\n\nexport class ComponentGenerator {\n constructor(\n private workspace: Workspace,\n private componentIds: ComponentID[],\n private options: Partial<CreateOptions>,\n private template: ComponentTemplate,\n private envs: EnvsMain,\n private newComponentHelper: NewComponentHelperMain,\n private tracker: TrackerMain,\n private wsConfigFiles: WorkspaceConfigFilesMain,\n private logger: Logger,\n private onComponentCreateSlot: OnComponentCreateSlot,\n private aspectId: string,\n private envId?: ComponentID\n ) {}\n\n async generate(force = false): Promise<GenerateResult[]> {\n const dirsToDeleteIfFailed: string[] = [];\n const generateResults = await pMapSeries(this.componentIds, async (componentId) => {\n try {\n const componentPath = this.newComponentHelper.getNewComponentPath(componentId, {\n pathFromUser: this.options.path,\n componentsToCreate: this.componentIds.length,\n });\n if (!force && fs.existsSync(path.join(this.workspace.path, componentPath))) {\n throw new BitError(\n `unable to create a component at \"${componentPath}\", this path already exists, please use \"--path\" to create the component in a different path`\n );\n }\n dirsToDeleteIfFailed.push(componentPath);\n return await this.generateOneComponent(componentId, componentPath);\n } catch (err: any) {\n await this.deleteGeneratedComponents(dirsToDeleteIfFailed);\n throw err;\n }\n });\n\n await this.workspace.bitMap.write(`create (${this.componentIds.length} components)`);\n\n const ids = generateResults.map((r) => r.id);\n await this.tryLinkToNodeModules(ids);\n await this.runOnComponentCreateHook(generateResults);\n // We are running this after the runOnComponentCreateHook as it require\n // the env to be installed to work properly, and the hook might install\n // the env.\n await this.tryWriteConfigFiles(ids);\n\n return generateResults;\n }\n\n private async tryLinkToNodeModules(ids: ComponentID[]) {\n try {\n await linkToNodeModulesByIds(\n this.workspace,\n ids.map((id) => id)\n );\n } catch (err: any) {\n this.logger.consoleFailure(\n `failed linking the new components to node_modules, please run \"bit link\" manually. error: ${err.message}`\n );\n }\n }\n\n private async runOnComponentCreateHook(generateResults: GenerateResult[]) {\n const fns = this.onComponentCreateSlot.values();\n if (!fns.length) return;\n await Promise.all(fns.map((fn) => fn(generateResults)));\n }\n\n /**\n * The function `tryWriteConfigFiles` attempts to write workspace config files, and if it fails, it logs an error\n * message.\n * @returns If the condition `!shouldWrite` is true, then nothing is being returned. Otherwise, if the `writeConfigFiles`\n * function is successfully executed, nothing is being returned. If an error occurs during the execution of\n * `writeConfigFiles`, an error message is being returned.\n */\n private async tryWriteConfigFiles(ids: ComponentID[]) {\n const shouldWrite = this.wsConfigFiles.isWorkspaceConfigWriteEnabled();\n if (!shouldWrite) return;\n ids.map((id) => this.workspace.clearComponentCache(id));\n const { err } = await this.wsConfigFiles.writeConfigFiles({\n clean: true,\n silent: true,\n dedupe: true,\n throw: false,\n });\n if (err) {\n this.logger.consoleFailure(\n `failed generating workspace config files, please run \"bit ws-config write\" manually. error: ${err.message}`\n );\n }\n }\n\n private async deleteGeneratedComponents(dirs: string[]) {\n await Promise.all(\n dirs.map(async (dir) => {\n const absoluteDir = path.join(this.workspace.path, dir);\n try {\n await fs.remove(absoluteDir);\n } catch (err: any) {\n if (err.code !== 'ENOENT') {\n // if not exist, it's fine\n throw err;\n }\n }\n })\n );\n }\n\n private async generateOneComponent(componentId: ComponentID, componentPath: string): Promise<GenerateResult> {\n const name = componentId.name;\n const namePascalCase = camelcase(name, { pascalCase: true });\n const nameCamelCase = camelcase(name);\n const aspectId = ComponentID.fromString(this.aspectId);\n\n const files = await this.template.generateFiles({\n name,\n namePascalCase,\n nameCamelCase,\n componentId,\n aspectId,\n envId: this.envId,\n });\n const mainFile = files.find((file) => file.isMain);\n await this.writeComponentFiles(componentPath, files);\n const addResults = await this.tracker.track({\n rootDir: componentPath,\n mainFile: mainFile?.relativePath,\n componentName: componentId.fullName,\n defaultScope: this.options.scope,\n });\n const component = await this.workspace.get(componentId);\n const hasEnvConfiguredOriginally = this.envs.hasEnvConfigured(component);\n if (this.template.isApp) {\n await this.workspace.use(componentId.toString());\n }\n const envBeforeConfigChanges = this.envs.getEnv(component);\n let config = this.template.config;\n if (config && typeof config === 'function') {\n const boundConfig = this.template.config?.bind(this.template);\n config = boundConfig({ aspectId: this.aspectId });\n }\n\n const userEnv = this.options.env;\n\n if (!config && this.envId && !userEnv) {\n const isInWorkspace = this.workspace.exists(this.envId);\n config = {\n [isInWorkspace ? this.envId.toStringWithoutVersion() : this.envId.toString()]: {},\n 'teambit.envs/envs': {\n env: this.envId.toStringWithoutVersion(),\n },\n };\n }\n\n const templateEnv = config?.[EnvsAspect.id]?.env;\n\n if (config && templateEnv && hasEnvConfiguredOriginally) {\n // remove the env we got from the template.\n delete config[templateEnv];\n delete config[EnvsAspect.id].env;\n if (Object.keys(config[EnvsAspect.id]).length === 0) delete config[EnvsAspect.id];\n if (Object.keys(config).length === 0) config = undefined;\n }\n\n const configWithEnv = await this.addEnvIfProvidedByFlag(config);\n if (configWithEnv) this.workspace.bitMap.setEntireConfig(component.id, configWithEnv);\n\n const getEnvData = () => {\n const envFromFlag = this.options.env; // env entered by the user when running `bit create --env`\n const envFromTemplate = config?.[EnvsAspect.id]?.env;\n if (envFromFlag) {\n return {\n envId: envFromFlag,\n setBy: '--env flag',\n };\n }\n if (envFromTemplate) {\n return {\n envId: envFromTemplate,\n setBy: 'template',\n };\n }\n return {\n envId: envBeforeConfigChanges.id,\n setBy: hasEnvConfiguredOriginally ? 'workspace variants' : '<default>',\n };\n };\n // eslint-disable-next-line prefer-const\n let { envId, setBy } = getEnvData();\n if (envId) {\n const isInWorkspace = this.workspace.exists(envId);\n const isSameAsThisEnvId = envId === this.envId?.toString() || envId === this.envId?.toStringWithoutVersion();\n if (isSameAsThisEnvId && this.envId) {\n envId = isInWorkspace ? this.envId.toStringWithoutVersion() : this.envId.toString();\n }\n }\n return {\n id: componentId,\n dir: componentPath,\n files: addResults.files,\n packageName: componentIdToPackageName(component.state._consumer),\n envId,\n envSetBy: setBy,\n isApp: this.template.isApp,\n isEnv: this.template.isEnv,\n dependencies: this.template.dependencies,\n installMissingDependencies: this.template.installMissingDependencies,\n };\n }\n\n private async addEnvIfProvidedByFlag(config?: ComponentConfig): Promise<ComponentConfig | undefined> {\n const userEnv = this.options.env; // env entered by the user when running `bit create --env`\n const templateEnv = config?.[EnvsAspect.id]?.env;\n if (!userEnv || userEnv === templateEnv) {\n return config;\n }\n config = config || {};\n if (templateEnv) {\n // the component template has an env and the user wants a different env.\n delete config[templateEnv];\n }\n await this.tracker.addEnvToConfig(userEnv, config);\n\n return config;\n }\n\n /**\n * writes the generated template files to the default directory set in the workspace config\n */\n private async writeComponentFiles(\n componentPath: string,\n templateFiles: ComponentFile[]\n ): Promise<PathOsBasedRelative[]> {\n const dataToPersist = new DataToPersist();\n const vinylFiles = templateFiles.map((templateFile) => {\n const templateFileVinyl = new Vinyl({\n base: componentPath,\n path: path.join(componentPath, templateFile.relativePath),\n contents: Buffer.from(templateFile.content),\n });\n return AbstractVinyl.fromVinyl(templateFileVinyl);\n });\n const results = vinylFiles.map((v) => v.path);\n dataToPersist.addManyFiles(vinylFiles);\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n return results;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAS,kBAAA;EAAA,MAAAT,IAAA,GAAAE,O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List":[]}
@@ -17,8 +17,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
17
17
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
20
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
22
22
  function generatorSchema(generator) {
23
23
  return {
24
24
  typeDefs: (0, _graphqlTag().gql)`
@@ -1 +1 @@
1
- {"version":3,"names":["_graphqlTag","data","require","_excluded","ownKeys","e","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","_objectWithoutProperties","_objectWithoutPropertiesLoose","n","indexOf","propertyIsEnumerable","hasOwnProperty","generatorSchema","generator","typeDefs","gql","resolvers","Mutation","createComponent","req","_ref","name","templateName","options","res","generateComponentTemplate","map","component","id","toString","dir","files","Generator","templates","listTemplates","Query"],"sources":["generator.graphql.ts"],"sourcesContent":["import { Schema } from '@teambit/graphql';\nimport { gql } from 'graphql-tag';\nimport { GeneratorMain } from './generator.main.runtime';\nimport { CreateOptions } from './create.cmd';\n\nexport type CreateQueryOptions = CreateOptions & { templateName: string };\n\nexport function generatorSchema(generator: GeneratorMain): Schema {\n return {\n typeDefs: gql`\n type GenerateResult {\n id: String\n dir: String\n files: [String]\n }\n\n type Mutation {\n # create Component by template\n createComponent(\n name: String!\n templateName: String!\n scope: String\n namespace: String\n aspect: String\n ): [GenerateResult]\n }\n\n type TemplateDescriptor {\n aspectId: String!\n name: String!\n }\n\n type Generator {\n templates: [TemplateDescriptor]\n }\n\n type Query {\n generator: Generator\n }\n `,\n resolvers: {\n Mutation: {\n createComponent: async (req: any, { name, templateName, ...options }: CreateQueryOptions) => {\n const res = await generator.generateComponentTemplate([name], templateName, { name, ...options });\n return res.map((component) => ({\n id: component.id.toString(),\n dir: component.dir,\n files: component.files,\n }));\n },\n },\n Generator: {\n templates: async () => {\n return generator.listTemplates();\n },\n },\n Query: {\n generator: () => generator,\n },\n },\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,MAAAE,SAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CA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SAAwB,EAAU;EAChE,OAAO;IACLC,QAAQ,EAAE,IAAAC,iBAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,QAAQ,EAAE;QACRC,eAAe,EAAE,MAAAA,CAAOC,GAAQ,EAAAC,IAAA,KAA6D;UAAA,IAA3D;cAAEC,IAAI;cAAEC;YAA6C,CAAC,GAAAF,IAAA;YAA7BG,OAAO,GAAAjB,wBAAA,CAAAc,IAAA,EAAAhD,SAAA;UAChE,MAAMoD,GAAG,GAAG,MAAMX,SAAS,CAACY,yBAAyB,CAAC,CAACJ,IAAI,CAAC,EAAEC,YAAY,EAAApC,aAAA;YAAImC;UAAI,GAAKE,OAAO,CAAE,CAAC;UACjG,OAAOC,GAAG,CAACE,GAAG,CAAEC,SAAS,KAAM;YAC7BC,EAAE,EAAED,SAAS,CAACC,EAAE,CAACC,QAAQ,CAAC,CAAC;YAC3BC,GAAG,EAAEH,SAAS,CAACG,GAAG;YAClBC,KAAK,EAAEJ,SAAS,CAACI;UACnB,CAAC,CAAC,CAAC;QACL;MACF,CAAC;MACDC,SAAS,EAAE;QACTC,SAAS,EAAE,MAAAA,CAAA,KAAY;UACrB,OAAOpB,SAAS,CAACqB,aAAa,CAAC,CAAC;QAClC;MACF,CAAC;MACDC,KAAK,EAAE;QACLtB,SAAS,EAAEA,CAAA,KAAMA;MACnB;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_graphqlTag","data","require","_excluded","ownKeys","e","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","_objectWithoutProperties","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","n","hasOwnProperty","generatorSchema","generator","typeDefs","gql","resolvers","Mutation","createComponent","req","_ref","name","templateName","options","res","generateComponentTemplate","map","component","id","toString","dir","files","Generator","templates","listTemplates","Query"],"sources":["generator.graphql.ts"],"sourcesContent":["import { Schema } from '@teambit/graphql';\nimport { gql } from 'graphql-tag';\nimport { GeneratorMain } from './generator.main.runtime';\nimport { CreateOptions } from './create.cmd';\n\nexport type CreateQueryOptions = CreateOptions & { templateName: string };\n\nexport function generatorSchema(generator: GeneratorMain): Schema {\n return {\n typeDefs: gql`\n type GenerateResult {\n id: String\n dir: String\n files: [String]\n }\n\n type Mutation {\n # create Component by template\n createComponent(\n name: String!\n templateName: String!\n scope: String\n namespace: String\n aspect: String\n ): [GenerateResult]\n }\n\n type TemplateDescriptor {\n aspectId: String!\n name: String!\n }\n\n type Generator {\n templates: [TemplateDescriptor]\n }\n\n type Query {\n generator: Generator\n }\n `,\n resolvers: {\n Mutation: {\n createComponent: async (req: any, { name, templateName, ...options }: CreateQueryOptions) => {\n const res = await generator.generateComponentTemplate([name], templateName, { name, ...options });\n return res.map((component) => ({\n id: component.id.toString(),\n dir: component.dir,\n files: component.files,\n }));\n },\n },\n Generator: {\n templates: async () => {\n return generator.listTemplates();\n },\n },\n Query: {\n generator: () => generator,\n },\n },\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,MAAAE,SAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,QAAQ,EAAE;QACRC,eAAe,EAAE,MAAAA,CAAOC,GAAQ,EAAAC,IAAA,KAA6D;UAAA,IAA3D;cAAEC,IAAI;cAAEC;YAA6C,CAAC,GAAAF,IAAA;YAA7BG,OAAO,GAAAlB,wBAAA,CAAAe,IAAA,EAAAjD,SAAA;UAChE,MAAMqD,GAAG,GAAG,MAAMX,SAAS,CAACY,yBAAyB,CAAC,CAACJ,IAAI,CAAC,EAAEC,YAAY,EAAArC,aAAA;YAAIoC;UAAI,GAAKE,OAAO,CAAE,CAAC;UACjG,OAAOC,GAAG,CAACE,GAAG,CAAEC,SAAS,KAAM;YAC7BC,EAAE,EAAED,SAAS,CAACC,EAAE,CAACC,QAAQ,CAAC,CAAC;YAC3BC,GAAG,EAAEH,SAAS,CAACG,GAAG;YAClBC,KAAK,EAAEJ,SAAS,CAACI;UACnB,CAAC,CAAC,CAAC;QACL;MACF,CAAC;MACDC,SAAS,EAAE;QACTC,SAAS,EAAE,MAAAA,CAAA,KAAY;UACrB,OAAOpB,SAAS,CAACqB,aAAa,CAAC,CAAC;QAClC;MACF,CAAC;MACDC,KAAK,EAAE;QACLtB,SAAS,EAAEA,CAAA,KAAMA;MACnB;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.333/dist/generator.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.333/dist/generator.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.335/dist/generator.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.335/dist/generator.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/generator",
3
- "version": "1.0.333",
3
+ "version": "1.0.335",
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.333"
9
+ "version": "1.0.335"
10
10
  },
11
11
  "dependencies": {
12
12
  "camelcase": "6.2.0",
@@ -21,29 +21,30 @@
21
21
  "@teambit/component-id": "1.2.0",
22
22
  "@teambit/harmony": "0.4.6",
23
23
  "@teambit/git.modules.git-ignore": "1.0.2",
24
- "@teambit/envs": "1.0.332",
25
- "@teambit/logger": "0.0.1002",
26
- "@teambit/new-component-helper": "1.0.332",
27
- "@teambit/pkg.modules.component-package-name": "0.0.2",
24
+ "@teambit/component.sources": "0.0.3",
25
+ "@teambit/envs": "1.0.334",
26
+ "@teambit/logger": "0.0.1004",
27
+ "@teambit/new-component-helper": "1.0.334",
28
+ "@teambit/pkg.modules.component-package-name": "0.0.3",
28
29
  "@teambit/toolbox.path.path": "0.0.2",
29
- "@teambit/tracker": "1.0.332",
30
- "@teambit/workspace-config-files": "1.0.332",
31
- "@teambit/workspace.modules.node-modules-linker": "0.0.176",
32
- "@teambit/workspace": "1.0.332",
33
- "@teambit/component": "1.0.332",
34
- "@teambit/cli": "0.0.909",
35
- "@teambit/graphql": "1.0.332",
36
- "@teambit/aspect-loader": "1.0.332",
37
- "@teambit/bit": "1.7.43",
38
- "@teambit/git": "1.0.332",
39
- "@teambit/compiler": "1.0.332",
40
- "@teambit/forking": "1.0.332",
30
+ "@teambit/tracker": "1.0.334",
31
+ "@teambit/workspace-config-files": "1.0.334",
32
+ "@teambit/workspace.modules.node-modules-linker": "0.0.178",
33
+ "@teambit/workspace": "1.0.334",
34
+ "@teambit/component": "1.0.334",
35
+ "@teambit/cli": "0.0.911",
36
+ "@teambit/graphql": "1.0.334",
37
+ "@teambit/aspect-loader": "1.0.334",
38
+ "@teambit/bit": "1.7.45",
39
+ "@teambit/git": "1.0.334",
40
+ "@teambit/compiler": "1.0.334",
41
+ "@teambit/forking": "1.0.334",
41
42
  "@teambit/git.modules.git-executable": "0.0.1",
42
- "@teambit/host-initializer": "0.0.45",
43
- "@teambit/importer": "1.0.332",
44
- "@teambit/install": "1.0.332",
45
- "@teambit/ui": "1.0.332",
46
- "@teambit/config": "0.0.1083"
43
+ "@teambit/host-initializer": "0.0.47",
44
+ "@teambit/importer": "1.0.334",
45
+ "@teambit/install": "1.0.334",
46
+ "@teambit/ui": "1.0.334",
47
+ "@teambit/config": "0.0.1085"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/fs-extra": "9.0.7",