@teambit/aspect 0.0.1132 → 0.0.1134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
1
  {
2
+ "213.71d0783a894e0ccdd154.js": "213.71d0783a894e0ccdd154.js",
2
3
  "244.23981efc3a92f81df93b.js": "244.23981efc3a92f81df93b.js",
3
- "330.09ce33c831287e2581f6.js": "330.09ce33c831287e2581f6.js",
4
4
  "924.89512771e869b7cc63a3.js": "924.89512771e869b7cc63a3.js",
5
5
  "compositions.css": "static/css/compositions.e163efe5.css",
6
6
  "compositions.html": "compositions.html",
7
- "compositions.js": "compositions.d896ff7c233a1f9aa1c2.js",
7
+ "compositions.js": "compositions.a5eb0af44b4c4aef46a5.js",
8
8
  "entrypoints": {
9
9
  "peers": {
10
10
  "assets": {
11
11
  "js": [
12
12
  "244.23981efc3a92f81df93b.js",
13
- "peers.469d9d2d94dcabbaf5b7.js"
13
+ "peers.92c12d52651db4df6ec6.js"
14
14
  ]
15
15
  }
16
16
  },
17
17
  "preview-root": {
18
18
  "assets": {
19
19
  "js": [
20
- "330.09ce33c831287e2581f6.js",
21
- "preview-root.09ccaabbeb848be6cd94.js"
20
+ "213.71d0783a894e0ccdd154.js",
21
+ "preview-root.b5e3470996128a167dd2.js"
22
22
  ],
23
23
  "css": [
24
24
  "static/css/preview-root.120a1d04.css"
@@ -28,7 +28,7 @@
28
28
  "compositions": {
29
29
  "assets": {
30
30
  "js": [
31
- "compositions.d896ff7c233a1f9aa1c2.js"
31
+ "compositions.a5eb0af44b4c4aef46a5.js"
32
32
  ],
33
33
  "css": [
34
34
  "static/css/compositions.e163efe5.css"
@@ -39,7 +39,7 @@
39
39
  "assets": {
40
40
  "js": [
41
41
  "924.89512771e869b7cc63a3.js",
42
- "overview.e3031294643b44e2b338.js"
42
+ "overview.e9a5bc9784464d981d93.js"
43
43
  ],
44
44
  "css": [
45
45
  "static/css/924.a758a929.css"
@@ -48,9 +48,9 @@
48
48
  }
49
49
  },
50
50
  "overview.html": "overview.html",
51
- "overview.js": "overview.e3031294643b44e2b338.js",
52
- "peers.js": "peers.469d9d2d94dcabbaf5b7.js",
51
+ "overview.js": "overview.e9a5bc9784464d981d93.js",
52
+ "peers.js": "peers.92c12d52651db4df6ec6.js",
53
53
  "preview-root.css": "static/css/preview-root.120a1d04.css",
54
- "preview-root.js": "preview-root.09ccaabbeb848be6cd94.js",
54
+ "preview-root.js": "preview-root.b5e3470996128a167dd2.js",
55
55
  "static/css/924.a758a929.css": "static/css/924.a758a929.css"
56
56
  }
@@ -5,4 +5,4 @@
5
5
  */(function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(!!arg){var argType=typeof arg;if(argType==="string"||argType==="number")classes.push(arg);else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);inner&&classes.push(inner)}}else if(argType==="object")if(arg.toString===Object.prototype.toString)for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key);else classes.push(arg.toString())}}return classes.join(" ")}module.exports?(classNames.default=classNames,module.exports=classNames):(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))})()},99884:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;var loader_ribbon_1=__webpack_require__(24353);Object.defineProperty(exports,"LoaderRibbon",{enumerable:!0,get:function(){return loader_ribbon_1.LoaderRibbon}})},24353:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoaderRibbon=void 0;const classnames_1=__importDefault(__webpack_require__(94184)),react_1=__importDefault(__webpack_require__(67294)),loader_ribbon_module_scss_1=__importDefault(__webpack_require__(80719));function LoaderRibbon(_a){var{active,className}=_a,rest=__rest(_a,["active","className"]);return react_1.default.createElement("div",Object.assign({},rest,{className:classnames_1.default(className,loader_ribbon_module_scss_1.default.loader,active&&loader_ribbon_module_scss_1.default.loading)}),react_1.default.createElement("div",{className:loader_ribbon_module_scss_1.default.progress}))}exports.LoaderRibbon=LoaderRibbon},29094:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;const url_parse_1=__importDefault(__webpack_require__(92614));function compareUrl(baseUrl,toMatchUrl,{exact,strict}={}){if(baseUrl===toMatchUrl)return!0;strict||(baseUrl=baseUrl.replace(/\/(?=[?#]|$)/,""),toMatchUrl=toMatchUrl.replace(/\/(?=[?#]|$)/,""));const base=url_parse_1.default(baseUrl),match=url_parse_1.default(toMatchUrl),subUrl=isSubUrl(base,match),exactMatch=!exact||isExactMatch(base,match),strictMatch=!strict||isStrictMatch(base,match);return subUrl&&exactMatch&&strictMatch}exports.compareUrl=compareUrl;function isSubUrl(base,match){return(!match.protocol||match.protocol===base.protocol)&&(!match.hostname||match.hostname===base.hostname)&&(!match.port||match.port===base.port)&&(!match.pathname||base.pathname.startsWith(match.pathname))&&(!match.query||isSubObject(match.query,base.query))&&(!match.hash||match.hash===base.hash)&&(!match.password||match.password===base.password)&&(!match.username||match.username===base.username)}function isExactMatch(base,match){return(!match.pathname||base.pathname===match.pathname)&&(!match.query||isSubObject(base.query,match.query))}function isStrictMatch(base,match){return!match.pathname||base.pathname.endsWith("/")===match.pathname.endsWith("/")}function isSubObject(source,target){return Object.keys(source).every(key=>source[key]===target[key])}},76783:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareUrl=void 0;var compare_url_1=__webpack_require__(29094);Object.defineProperty(exports,"compareUrl",{enumerable:!0,get:function(){return compare_url_1.compareUrl}})},92614:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var required=__webpack_require__(47418),qs=__webpack_require__(57129),slashes=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,protocolre=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,whitespace="[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]",left=new RegExp("^"+whitespace+"+");function trimLeft(str){return(str||"").toString().replace(left,"")}var rules=[["#","hash"],["?","query"],function(address){return address.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(loc){var globalVar;typeof window<"u"?globalVar=window:typeof __webpack_require__.g<"u"?globalVar=__webpack_require__.g:typeof self<"u"?globalVar=self:globalVar={};var location=globalVar.location||{};loc=loc||location;var finaldestination={},type=typeof loc,key;if(loc.protocol==="blob:")finaldestination=new Url(unescape(loc.pathname),{});else if(type==="string"){finaldestination=new Url(loc,{});for(key in ignore)delete finaldestination[key]}else if(type==="object"){for(key in loc)key in ignore||(finaldestination[key]=loc[key]);finaldestination.slashes===void 0&&(finaldestination.slashes=slashes.test(loc.href))}return finaldestination}function extractProtocol(address){address=trimLeft(address);var match=protocolre.exec(address),protocol=match[1]?match[1].toLowerCase():"",slashes2=!!(match[2]&&match[2].length>=2),rest=match[2]&&match[2].length===1?"/"+match[3]:match[3];return{protocol,slashes:slashes2,rest}}function resolve(relative,base){if(relative==="")return base;for(var path=(base||"/").split("/").slice(0,-1).concat(relative.split("/")),i=path.length,last=path[i-1],unshift=!1,up=0;i--;)path[i]==="."?path.splice(i,1):path[i]===".."?(path.splice(i,1),up++):up&&(i===0&&(unshift=!0),path.splice(i,1),up--);return unshift&&path.unshift(""),(last==="."||last==="..")&&path.push(""),path.join("/")}function Url(address,location,parser){if(address=trimLeft(address),!(this instanceof Url))return new Url(address,location,parser);var relative,extracted,parse,instruction,index,key,instructions=rules.slice(),type=typeof location,url=this,i=0;for(type!=="object"&&type!=="string"&&(parser=location,location=null),parser&&typeof parser!="function"&&(parser=qs.parse),location=lolcation(location),extracted=extractProtocol(address||""),relative=!extracted.protocol&&!extracted.slashes,url.slashes=extracted.slashes||relative&&location.slashes,url.protocol=extracted.protocol||location.protocol||"",address=extracted.rest,extracted.slashes||(instructions[3]=[/(.*)/,"pathname"]);i<instructions.length;i++){if(instruction=instructions[i],typeof instruction=="function"){address=instruction(address);continue}parse=instruction[0],key=instruction[1],parse!==parse?url[key]=address:typeof parse=="string"?~(index=address.indexOf(parse))&&(typeof instruction[2]=="number"?(url[key]=address.slice(0,index),address=address.slice(index+instruction[2])):(url[key]=address.slice(index),address=address.slice(0,index))):(index=parse.exec(address))&&(url[key]=index[1],address=address.slice(0,index.index)),url[key]=url[key]||relative&&instruction[3]&&location[key]||"",instruction[4]&&(url[key]=url[key].toLowerCase())}parser&&(url.query=parser(url.query)),relative&&location.slashes&&url.pathname.charAt(0)!=="/"&&(url.pathname!==""||location.pathname!=="")&&(url.pathname=resolve(url.pathname,location.pathname)),url.pathname.charAt(0)!=="/"&&url.hostname&&(url.pathname="/"+url.pathname),required(url.port,url.protocol)||(url.host=url.hostname,url.port=""),url.username=url.password="",url.auth&&(instruction=url.auth.split(":"),url.username=instruction[0]||"",url.password=instruction[1]||""),url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString()}function set(part,value,fn){var url=this;switch(part){case"query":typeof value=="string"&&value.length&&(value=(fn||qs.parse)(value)),url[part]=value;break;case"port":url[part]=value,required(value,url.protocol)?value&&(url.host=url.hostname+":"+value):(url.host=url.hostname,url[part]="");break;case"hostname":url[part]=value,url.port&&(value+=":"+url.port),url.host=value;break;case"host":url[part]=value,/:\d+$/.test(value)?(value=value.split(":"),url.port=value.pop(),url.hostname=value.join(":")):(url.hostname=value,url.port="");break;case"protocol":url.protocol=value.toLowerCase(),url.slashes=!fn;break;case"pathname":case"hash":if(value){var char=part==="pathname"?"/":"#";url[part]=value.charAt(0)!==char?char+value:value}else url[part]=value;break;default:url[part]=value}for(var i=0;i<rules.length;i++){var ins=rules[i];ins[4]&&(url[ins[1]]=url[ins[1]].toLowerCase())}return url.origin=url.protocol&&url.host&&url.protocol!=="file:"?url.protocol+"//"+url.host:"null",url.href=url.toString(),url}function toString(stringify){(!stringify||typeof stringify!="function")&&(stringify=qs.stringify);var query,url=this,protocol=url.protocol;protocol&&protocol.charAt(protocol.length-1)!==":"&&(protocol+=":");var result=protocol+(url.slashes?"//":"");return url.username&&(result+=url.username,url.password&&(result+=":"+url.password),result+="@"),result+=url.host+url.pathname,query=typeof url.query=="object"?stringify(url.query):url.query,query&&(result+=query.charAt(0)!=="?"?"?"+query:query),url.hash&&(result+=url.hash),result}Url.prototype={set,toString},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=qs,module.exports=Url},67494:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;const react_1=__importDefault(__webpack_require__(67294));function Composer(props){const{components=[],children}=props,arrayified=components.map(tuple=>Array.isArray(tuple)?tuple:[tuple,void 0]);return react_1.default.createElement(react_1.default.Fragment,null,arrayified.reduceRight((acc,[Comp,forwardProps])=>react_1.default.createElement(Comp,Object.assign({},forwardProps),acc),children))}exports.Composer=Composer},57166:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Composer=void 0;var composer_1=__webpack_require__(67494);Object.defineProperty(exports,"Composer",{enumerable:!0,get:function(){return composer_1.Composer}})},14524:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0;var links_1=__webpack_require__(3064);Object.defineProperty(exports,"links",{enumerable:!0,get:function(){return links_1.links}})},3064:(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.links=void 0,exports.links={docs:"https://bit.dev/docs",github:"https://github.com/teambit/bit",slack:"https://join.slack.com/t/bit-dev-community/shared_invite/zt-1el4b4sb5-FpgRefqUiZbUH9lvnHgwRg",blog:"https://bit.cloud/blog",twitter:"https://twitter.com/bitdev_",linkedin:"https://www.linkedin.com/company/bit-dev",bitRegistry:"https://node.bit.cloud",youtube:"https://www.youtube.com/c/Bitdev/videos",careers:"https://bit.breezy.hr"}},38100:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_react_navigation_link_1=__webpack_require__(22576),community_constants_links_1=__webpack_require__(14524),styles={link:{textDecoration:"none",lineHeight:"inherit",color:"unset"},logo:{width:"24px",height:"24px",margin:"0 13px"}};function ContactIcons(props){return react_1.default.createElement("div",Object.assign({style:Object.assign(Object.assign({},styles.iconLine),props.style)},props),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.slack},react_1.default.createElement("img",{alt:"slack",style:styles.logo,src:"https://static.bit.dev/harmony/slack-round-icon.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.github},react_1.default.createElement("img",{alt:"github",style:styles.logo,src:"https://static.bit.dev/harmony/github.svg"})),react_1.default.createElement(base_react_navigation_link_1.Link,{external:!0,style:styles.link,href:community_constants_links_1.links.docs},react_1.default.createElement("img",{alt:"bit docs",style:styles.logo,src:"https://static.bit.dev/bit-logo.svg"})))}exports.ContactIcons=ContactIcons},13555:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),styles={errorPage:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"auto",padding:"24px",textAlign:"center"},title:{fontWeight:"bold",margin:"0 0 24px 0"},img:{maxWidth:"700px",marginBottom:"24px",width:"100%"}},inlineStyles=`
6
6
  .bit-error-page-title { font-size: 36px; }
7
7
  @media screen and (max-width: 480px) { .bit-error-page-title { font-size: 24px; } }
8
- `;function ErrorPage(_a){var{code,title,style,children}=_a,rest=__rest(_a,["code","title","style","children"]);return react_1.default.createElement("div",Object.assign({},rest,{style:Object.assign(Object.assign({},styles.errorPage),style)}),react_1.default.createElement("style",null,inlineStyles),react_1.default.createElement("h1",{style:styles.title,className:"bit-error-page-title"},title),react_1.default.createElement("img",{alt:"error-image",style:styles.img,src:`https://static.bit.dev/harmony/${code}.svg`}),children)}exports.ErrorPage=ErrorPage},31948:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0,__exportStar(__webpack_require__(13555),exports);var contact_footer_1=__webpack_require__(38100);Object.defineProperty(exports,"ContactIcons",{enumerable:!0,get:function(){return contact_footer_1.ContactIcons}})},13794:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;var not_found_page_1=__webpack_require__(29917);Object.defineProperty(exports,"NotFoundPage",{enumerable:!0,get:function(){return not_found_page_1.NotFoundPage}})},29917:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_error_page_1=__webpack_require__(31948);function NotFoundPage(_a){var rest=__rest(_a,[]);return react_1.default.createElement(design_ui_error_page_1.ErrorPage,Object.assign({},rest,{code:404,title:"Page not found"}),react_1.default.createElement(design_ui_error_page_1.ContactIcons,null))}exports.NotFoundPage=NotFoundPage},31047:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(94891),exports)},94891:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandaloneNotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_pages_not_found_1=__webpack_require__(13794);function StandaloneNotFoundPage(){return react_1.default.createElement(design_ui_pages_not_found_1.NotFoundPage,{style:{fontFamily:'"Helvetica Neue",Helvetica, sans-serif'}})}exports.StandaloneNotFoundPage=StandaloneNotFoundPage},51166:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsApp=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_ui_utils_composer_1=__webpack_require__(57166),design_ui_pages_standalone_not_found_page_1=__webpack_require__(31047),react_ui_loader_fallback_1=__webpack_require__(4603),hideScrollbars="body::-webkit-scrollbar {display: none;}";function CompositionsApp({Composition,previewContext}){const{providers=[]}=previewContext?.get("teambit.react/react")||{},safeComposition=(0,react_ui_loader_fallback_1.useFallback)(Composition&&react_1.default.createElement(Composition,null),react_1.default.createElement(design_ui_pages_standalone_not_found_page_1.StandaloneNotFoundPage,null));return react_1.default.createElement(base_ui_utils_composer_1.Composer,{components:providers},react_1.default.createElement("style",null,hideScrollbars),safeComposition)}exports.CompositionsApp=CompositionsApp},40105:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importDefault(__webpack_require__(67294)),react_dom_1=__importDefault(__webpack_require__(73935)),compositions_app_1=__webpack_require__(51166);exports.default=(Composition,previewContext)=>{react_dom_1.default.render(react_1.default.createElement(compositions_app_1.CompositionsApp,{Composition,previewContext}),document.getElementById("root"))}},5659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CompositionsApp=void 0;var compositions_app_1=__webpack_require__(51166);Object.defineProperty(exports,"CompositionsApp",{enumerable:!0,get:function(){return compositions_app_1.CompositionsApp}});var compositions_app_root_1=__webpack_require__(40105);Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return __importDefault(compositions_app_root_1).default}})},4603:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;var loader_fallback_1=__webpack_require__(48767);Object.defineProperty(exports,"LoaderFallback",{enumerable:!0,get:function(){return loader_fallback_1.LoaderFallback}}),Object.defineProperty(exports,"useFallback",{enumerable:!0,get:function(){return loader_fallback_1.useFallback}})},48767:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;const react_1=__importStar(__webpack_require__(67294)),base_ui_loaders_loader_ribbon_1=__webpack_require__(99884);function LoaderFallback({Target,Loader=LoaderComponent,DefaultComponent,timeout=15e3}){return useFallback(Target&&react_1.default.createElement(Target,null),react_1.default.createElement(DefaultComponent,null),{timeout,loader:react_1.default.createElement(Loader,null)})}exports.LoaderFallback=LoaderFallback;function useFallback(target,fallback,{timeout=15e3,loader=react_1.default.createElement(LoaderComponent,null)}={}){const[working,setWorking]=(0,react_1.useState)(!!target),hasTarget=!!target;return(0,react_1.useEffect)(()=>{if(timeout<=0)return()=>{};if(hasTarget)return setWorking(!0),()=>{};const tmId=setTimeout(()=>setWorking(!1),timeout);return()=>clearTimeout(tmId)},[hasTarget,timeout]),target||(working&&timeout>0?loader:fallback)}exports.useFallback=useFallback;function LoaderComponent(){return react_1.default.createElement(base_ui_loaders_loader_ribbon_1.LoaderRibbon,{active:!0,style:{position:"fixed",top:0,left:0,right:0}})}},62179:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(5659),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!1,componentMap:{}})},80719:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={loader:"loader-ribbon_loader__2GCaR",loading:"loader-ribbon_loading__3uSHa",progress:"loader-ribbon_progress__12zF8",completed:"loader-ribbon_completed__33Bjc"}},57129:(__unused_webpack_module,exports)=>{"use strict";var has=Object.prototype.hasOwnProperty,undef;function decode(input){try{return decodeURIComponent(input.replace(/\+/g," "))}catch{return null}}function encode(input){try{return encodeURIComponent(input)}catch{return null}}function querystring(query){for(var parser=/([^=?#&]+)=?([^&]*)/g,result={},part;part=parser.exec(query);){var key=decode(part[1]),value=decode(part[2]);key===null||value===null||key in result||(result[key]=value)}return result}function querystringify(obj,prefix){prefix=prefix||"";var pairs=[],value,key;typeof prefix!="string"&&(prefix="?");for(key in obj)if(has.call(obj,key)){if(value=obj[key],!value&&(value===null||value===undef||isNaN(value))&&(value=""),key=encode(key),value=encode(value),key===null||value===null)continue;pairs.push(key+"="+value)}return pairs.length?prefix+pairs.join("&"):""}exports.stringify=querystringify,exports.parse=querystring},47418:module=>{"use strict";module.exports=function(port,protocol){if(protocol=protocol.split(":")[0],port=+port,!port)return!1;switch(protocol){case"http":case"ws":return port!==80;case"https":case"wss":return port!==443;case"ftp":return port!==21;case"gopher":return port!==70;case"file":return!1}return port!==0}}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[244,330,629],()=>__webpack_exec__(62179));var __webpack_exports__=__webpack_require__.O()}]);
8
+ `;function ErrorPage(_a){var{code,title,style,children}=_a,rest=__rest(_a,["code","title","style","children"]);return react_1.default.createElement("div",Object.assign({},rest,{style:Object.assign(Object.assign({},styles.errorPage),style)}),react_1.default.createElement("style",null,inlineStyles),react_1.default.createElement("h1",{style:styles.title,className:"bit-error-page-title"},title),react_1.default.createElement("img",{alt:"error-image",style:styles.img,src:`https://static.bit.dev/harmony/${code}.svg`}),children)}exports.ErrorPage=ErrorPage},31948:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContactIcons=void 0,__exportStar(__webpack_require__(13555),exports);var contact_footer_1=__webpack_require__(38100);Object.defineProperty(exports,"ContactIcons",{enumerable:!0,get:function(){return contact_footer_1.ContactIcons}})},13794:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;var not_found_page_1=__webpack_require__(29917);Object.defineProperty(exports,"NotFoundPage",{enumerable:!0,get:function(){return not_found_page_1.NotFoundPage}})},29917:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_error_page_1=__webpack_require__(31948);function NotFoundPage(_a){var rest=__rest(_a,[]);return react_1.default.createElement(design_ui_error_page_1.ErrorPage,Object.assign({},rest,{code:404,title:"Page not found"}),react_1.default.createElement(design_ui_error_page_1.ContactIcons,null))}exports.NotFoundPage=NotFoundPage},31047:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(__webpack_require__(94891),exports)},94891:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandaloneNotFoundPage=void 0;const react_1=__importDefault(__webpack_require__(67294)),design_ui_pages_not_found_1=__webpack_require__(13794);function StandaloneNotFoundPage(){return react_1.default.createElement(design_ui_pages_not_found_1.NotFoundPage,{style:{fontFamily:'"Helvetica Neue",Helvetica, sans-serif'}})}exports.StandaloneNotFoundPage=StandaloneNotFoundPage},51166:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CompositionsApp=void 0;const react_1=__importDefault(__webpack_require__(67294)),base_ui_utils_composer_1=__webpack_require__(57166),design_ui_pages_standalone_not_found_page_1=__webpack_require__(31047),react_ui_loader_fallback_1=__webpack_require__(4603),hideScrollbars="body::-webkit-scrollbar {display: none;}";function CompositionsApp({Composition,previewContext}){const{providers=[]}=previewContext?.get("teambit.react/react")||{},safeComposition=(0,react_ui_loader_fallback_1.useFallback)(Composition&&react_1.default.createElement(Composition,null),react_1.default.createElement(design_ui_pages_standalone_not_found_page_1.StandaloneNotFoundPage,null));return react_1.default.createElement(base_ui_utils_composer_1.Composer,{components:providers},react_1.default.createElement("style",null,hideScrollbars),safeComposition)}exports.CompositionsApp=CompositionsApp},40105:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importDefault(__webpack_require__(67294)),react_dom_1=__importDefault(__webpack_require__(73935)),compositions_app_1=__webpack_require__(51166);exports.default=(Composition,previewContext)=>{react_dom_1.default.render(react_1.default.createElement(compositions_app_1.CompositionsApp,{Composition,previewContext}),document.getElementById("root"))}},5659:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CompositionsApp=void 0;var compositions_app_1=__webpack_require__(51166);Object.defineProperty(exports,"CompositionsApp",{enumerable:!0,get:function(){return compositions_app_1.CompositionsApp}});var compositions_app_root_1=__webpack_require__(40105);Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return __importDefault(compositions_app_root_1).default}})},4603:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;var loader_fallback_1=__webpack_require__(48767);Object.defineProperty(exports,"LoaderFallback",{enumerable:!0,get:function(){return loader_fallback_1.LoaderFallback}}),Object.defineProperty(exports,"useFallback",{enumerable:!0,get:function(){return loader_fallback_1.useFallback}})},48767:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFallback=exports.LoaderFallback=void 0;const react_1=__importStar(__webpack_require__(67294)),base_ui_loaders_loader_ribbon_1=__webpack_require__(99884);function LoaderFallback({Target,Loader=LoaderComponent,DefaultComponent,timeout=15e3}){return useFallback(Target&&react_1.default.createElement(Target,null),react_1.default.createElement(DefaultComponent,null),{timeout,loader:react_1.default.createElement(Loader,null)})}exports.LoaderFallback=LoaderFallback;function useFallback(target,fallback,{timeout=15e3,loader=react_1.default.createElement(LoaderComponent,null)}={}){const[working,setWorking]=(0,react_1.useState)(!!target),hasTarget=!!target;return(0,react_1.useEffect)(()=>{if(timeout<=0)return()=>{};if(hasTarget)return setWorking(!0),()=>{};const tmId=setTimeout(()=>setWorking(!1),timeout);return()=>clearTimeout(tmId)},[hasTarget,timeout]),target||(working&&timeout>0?loader:fallback)}exports.useFallback=useFallback;function LoaderComponent(){return react_1.default.createElement(base_ui_loaders_loader_ribbon_1.LoaderRibbon,{active:!0,style:{position:"fixed",top:0,left:0,right:0}})}},23812:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(5659),_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("compositions",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_compositions_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!1,componentMap:{}})},80719:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={loader:"loader-ribbon_loader__2GCaR",loading:"loader-ribbon_loading__3uSHa",progress:"loader-ribbon_progress__12zF8",completed:"loader-ribbon_completed__33Bjc"}},57129:(__unused_webpack_module,exports)=>{"use strict";var has=Object.prototype.hasOwnProperty,undef;function decode(input){try{return decodeURIComponent(input.replace(/\+/g," "))}catch{return null}}function encode(input){try{return encodeURIComponent(input)}catch{return null}}function querystring(query){for(var parser=/([^=?#&]+)=?([^&]*)/g,result={},part;part=parser.exec(query);){var key=decode(part[1]),value=decode(part[2]);key===null||value===null||key in result||(result[key]=value)}return result}function querystringify(obj,prefix){prefix=prefix||"";var pairs=[],value,key;typeof prefix!="string"&&(prefix="?");for(key in obj)if(has.call(obj,key)){if(value=obj[key],!value&&(value===null||value===undef||isNaN(value))&&(value=""),key=encode(key),value=encode(value),key===null||value===null)continue;pairs.push(key+"="+value)}return pairs.length?prefix+pairs.join("&"):""}exports.stringify=querystringify,exports.parse=querystring},47418:module=>{"use strict";module.exports=function(port,protocol){if(protocol=protocol.split(":")[0],port=+port,!port)return!1;switch(protocol){case"http":case"ws":return port!==80;case"https":case"wss":return port!==443;case"ftp":return port!==21;case"gopher":return port!==70;case"file":return!1}return port!==0}}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[244,213,629],()=>__webpack_exec__(23812));var __webpack_exports__=__webpack_require__.O()}]);
@@ -1,2 +1,2 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Preview</title><script>// Allow to use react dev-tools inside the examples
2
- try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.469d9d2d94dcabbaf5b7.js"></script><script defer="defer" src="330.09ce33c831287e2581f6.js"></script><script defer="defer" src="preview-root.09ccaabbeb848be6cd94.js"></script><script defer="defer" src="compositions.d896ff7c233a1f9aa1c2.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
2
+ try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.92c12d52651db4df6ec6.js"></script><script defer="defer" src="213.71d0783a894e0ccdd154.js"></script><script defer="defer" src="preview-root.b5e3470996128a167dd2.js"></script><script defer="defer" src="compositions.a5eb0af44b4c4aef46a5.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -2,4 +2,4 @@
2
2
  `:`
3
3
  `,newline=/\r\n|\r|\n/g;function converts(text,to){if(Buffer.isBuffer(text)){if((0,_isbinaryfile().isBinaryFileSync)(text))return text;const str=text.toString(),strReplaced=str.replace(newline,to);return str!==strReplaced?Buffer.from(strReplaced):text}return text.toString().replace(newline,to)}function lf(text){return converts(text,`
4
4
  `)}function auto(text){return converts(text,lineBreak)}function cr(text){return converts(text,"\r")}function crlf(text){return converts(text,`\r
5
- `)}},30755:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLatestVersion=getLatestVersion,exports.getValidVersionOrReleaseType=getValidVersionOrReleaseType,exports.isReleaseTypeSupported=isReleaseTypeSupported,exports.isStrReleaseType=isStrReleaseType,exports.throwForUnsupportedReleaseType=throwForUnsupportedReleaseType,exports.validateVersion=validateVersion;function _semver(){const data=__webpack_require__(81249);return _semver=function(){return data},data}function _componentVersion(){const data=__webpack_require__(8886);return _componentVersion=function(){return data},data}function isStrReleaseType(str){return["major","premajor","minor","preminor","patch","prepatch","prerelease"].includes(str)}function isReleaseTypeSupported(str){return["patch","minor","major","prerelease"].includes(str)}function throwForUnsupportedReleaseType(str){if(!isReleaseTypeSupported(str))throw new Error(`the release-type "${str}" is not supported`)}function validateVersion(version){if(version){const validVersion=(0,_semver().valid)(version);if(!validVersion)throw new(_componentVersion()).InvalidVersion(version);return validVersion}}function getValidVersionOrReleaseType(str){if(isStrReleaseType(str)){const releaseType=str;return throwForUnsupportedReleaseType(releaseType),{releaseType}}return{exactVersion:validateVersion(str)}}function getLatestVersion(versions){const max=(0,_semver().maxSatisfying)(versions,"*",{includePrerelease:!0});if(!max)throw new Error(`unable to find the latest version from ${versions.join(", ")}`);return max}},57745:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(79022),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!1,componentMap:{}})},591:()=>{},74112:()=>{},52361:()=>{},94616:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[924,244,330,629,384],()=>__webpack_exec__(57745));var __webpack_exports__=__webpack_require__.O()}]);
5
+ `)}},30755:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLatestVersion=getLatestVersion,exports.getValidVersionOrReleaseType=getValidVersionOrReleaseType,exports.isReleaseTypeSupported=isReleaseTypeSupported,exports.isStrReleaseType=isStrReleaseType,exports.throwForUnsupportedReleaseType=throwForUnsupportedReleaseType,exports.validateVersion=validateVersion;function _semver(){const data=__webpack_require__(81249);return _semver=function(){return data},data}function _componentVersion(){const data=__webpack_require__(8886);return _componentVersion=function(){return data},data}function isStrReleaseType(str){return["major","premajor","minor","preminor","patch","prepatch","prerelease"].includes(str)}function isReleaseTypeSupported(str){return["patch","minor","major","prerelease"].includes(str)}function throwForUnsupportedReleaseType(str){if(!isReleaseTypeSupported(str))throw new Error(`the release-type "${str}" is not supported`)}function validateVersion(version){if(version){const validVersion=(0,_semver().valid)(version);if(!validVersion)throw new(_componentVersion()).InvalidVersion(version);return validVersion}}function getValidVersionOrReleaseType(str){if(isStrReleaseType(str)){const releaseType=str;return throwForUnsupportedReleaseType(releaseType),{releaseType}}return{exactVersion:validateVersion(str)}}function getLatestVersion(versions){const max=(0,_semver().maxSatisfying)(versions,"*",{includePrerelease:!0});if(!max)throw new Error(`unable to find the latest version from ${versions.join(", ")}`);return max}},88891:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(79022),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("overview",{modulesMap:{default:_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__},isSplitComponentBundle:!1,componentMap:{}})},591:()=>{},74112:()=>{},52361:()=>{},94616:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[924,244,213,629,384],()=>__webpack_exec__(88891));var __webpack_exports__=__webpack_require__.O()}]);
@@ -1,2 +1,2 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Preview</title><script>// Allow to use react dev-tools inside the examples
2
- try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.469d9d2d94dcabbaf5b7.js"></script><script defer="defer" src="330.09ce33c831287e2581f6.js"></script><script defer="defer" src="preview-root.09ccaabbeb848be6cd94.js"></script><script defer="defer" src="compositions.d896ff7c233a1f9aa1c2.js"></script><script defer="defer" src="924.89512771e869b7cc63a3.js"></script><script defer="defer" src="overview.e3031294643b44e2b338.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"><link href="static/css/924.a758a929.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
2
+ try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}</script><style>body { margin: 0; }</style><script defer="defer" src="244.23981efc3a92f81df93b.js"></script><script defer="defer" src="peers.92c12d52651db4df6ec6.js"></script><script defer="defer" src="213.71d0783a894e0ccdd154.js"></script><script defer="defer" src="preview-root.b5e3470996128a167dd2.js"></script><script defer="defer" src="compositions.a5eb0af44b4c4aef46a5.js"></script><script defer="defer" src="924.89512771e869b7cc63a3.js"></script><script defer="defer" src="overview.e9a5bc9784464d981d93.js"></script><link href="static/css/preview-root.120a1d04.css" rel="stylesheet"><link href="static/css/compositions.e163efe5.css" rel="stylesheet"><link href="static/css/924.a758a929.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
@@ -1 +1 @@
1
- (()=>{"use strict";var __webpack_modules__={74545:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(38168),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(3905),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(67294),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(73935);const globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={703:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[244],()=>__webpack_require__(74545));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
1
+ (()=>{"use strict";var __webpack_modules__={13307:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(38168),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(3905),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(67294),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(73935);const globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={703:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[244],()=>__webpack_require__(13307));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
@@ -1 +1 @@
1
- "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[629],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[330,244],()=>__webpack_exec__(35330));var __webpack_exports__=__webpack_require__.O()}]);
1
+ "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[629],{},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[213,244],()=>__webpack_exec__(74213));var __webpack_exports__=__webpack_require__.O()}]);
@@ -28,6 +28,13 @@ function _chalk() {
28
28
  };
29
29
  return data;
30
30
  }
31
+ function _constants() {
32
+ const data = require("@teambit/legacy/dist/constants");
33
+ _constants = function () {
34
+ return data;
35
+ };
36
+ return data;
37
+ }
31
38
  // eslint-disable-next-line max-classes-per-file
32
39
 
33
40
  class ListAspectCmd {
@@ -37,9 +44,9 @@ class ListAspectCmd {
37
44
  (0, _defineProperty2().default)(this, "description", 'list all aspects configured on component(s)');
38
45
  (0, _defineProperty2().default)(this, "arguments", [{
39
46
  name: 'pattern',
40
- description: 'component name, component id, or component pattern. use component pattern to select multiple components. \nuse comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"\nwrap the pattern with quotes'
47
+ description: _constants().COMPONENT_PATTERN_HELP
41
48
  }]);
42
- (0, _defineProperty2().default)(this, "options", [['d', 'debug', 'show the origins were the aspects were taken from']]);
49
+ (0, _defineProperty2().default)(this, "options", [['d', 'debug', 'show the origins where the aspects were taken from']]);
43
50
  (0, _defineProperty2().default)(this, "group", 'development');
44
51
  }
45
52
  async report([name], {
@@ -67,7 +74,7 @@ class SetAspectCmd {
67
74
  (0, _defineProperty2().default)(this, "description", 'set components with an aspect to extend their development tools, metadata and (possibly) artifacts');
68
75
  (0, _defineProperty2().default)(this, "arguments", [{
69
76
  name: 'pattern',
70
- description: 'the components to extend. use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button". wrap the pattern with quotes'
77
+ description: `the components to extend. ${_constants().COMPONENT_PATTERN_HELP}`
71
78
  }, {
72
79
  name: 'aspect-id',
73
80
  description: "the aspect's component id"
@@ -75,13 +82,13 @@ class SetAspectCmd {
75
82
  name: 'config',
76
83
  description: `the aspect config. enter the config as a stringified JSON (e.g. '{"foo":"bar"}' ). when no config is provided, an aspect is set with an empty config ({}).`
77
84
  }]);
78
- (0, _defineProperty2().default)(this, "options", [['m', 'merge', 'merge with an existing config if exits. (by default, it replaces the config)']]);
85
+ (0, _defineProperty2().default)(this, "options", [['m', 'merge', 'merge with an existing config if exits. (by default, it replaces overlapping existing configs)']]);
79
86
  (0, _defineProperty2().default)(this, "group", 'development');
80
87
  }
81
88
  async report([pattern, aspectId, config], options) {
82
89
  const configParsed = config ? JSON.parse(config) : {};
83
90
  const results = await this.aspect.setAspectsToComponents(pattern, aspectId, configParsed, options);
84
- if (!results.length) return _chalk().default.yellow(`unable to find any matching for ${_chalk().default.bold(pattern)} pattern`);
91
+ if (!results.length) return _chalk().default.yellow(`unable to find any matching components for ${_chalk().default.bold(pattern)} pattern`);
85
92
  return _chalk().default.green(`the following component(s) have been successfully updated:\n${results.join('\n')}`);
86
93
  }
87
94
  }
@@ -90,20 +97,20 @@ class UpdateAspectCmd {
90
97
  constructor(aspect) {
91
98
  this.aspect = aspect;
92
99
  (0, _defineProperty2().default)(this, "name", 'update <aspect-id> [pattern]');
93
- (0, _defineProperty2().default)(this, "description", 'update a version of an aspect');
100
+ (0, _defineProperty2().default)(this, "description", 'update a version of an aspect for all or specified components');
94
101
  (0, _defineProperty2().default)(this, "arguments", [{
95
102
  name: 'aspect-id',
96
- description: "the aspect's component id. optionally, add a version (id@version), otherwise, it finds the latest version on the remote"
103
+ description: "the aspect's component id. optionally, add a version (id@version), otherwise will use the latest version from the remote"
97
104
  }, {
98
105
  name: 'pattern',
99
- description: 'the components to update (defaults to all components). use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button". wrap the pattern with quotes'
106
+ description: `the components to update (defaults to all components). ${_constants().COMPONENT_PATTERN_HELP}`
100
107
  }]);
101
108
  (0, _defineProperty2().default)(this, "examples", [{
102
- cmd: "update scope.org/aspect '**/ui/**'",
103
- description: 'update "ui" components that use scope.org/aspect to use its latest version'
109
+ cmd: "bit aspect update scope.org/aspect '**/ui/**'",
110
+ description: 'update all components with the "ui" namespace that use scope.org/aspect, to use its latest version'
104
111
  }, {
105
112
  cmd: 'bit aspect update scope.org/aspect@2.0.0',
106
- description: 'update all components that use scope.org/aspect to version 2.0.0 (of this aspect).'
113
+ description: 'update version of scope.org/aspect to version 2.0.0 for all components configured with that aspect.'
107
114
  }]);
108
115
  (0, _defineProperty2().default)(this, "options", []);
109
116
  (0, _defineProperty2().default)(this, "group", 'development');
@@ -119,7 +126,7 @@ class UpdateAspectCmd {
119
126
  if (alreadyUpToDate.length) {
120
127
  return _chalk().default.green(`all ${alreadyUpToDate.length} component(s) that use this aspect are already up to date. nothing to update`);
121
128
  }
122
- return _chalk().default.yellow(`unable to find any component that use ${_chalk().default.bold(aspectId)}`);
129
+ return _chalk().default.yellow(`unable to find any components in this workspace that use ${_chalk().default.bold(aspectId)}`);
123
130
  }
124
131
  }
125
132
  exports.UpdateAspectCmd = UpdateAspectCmd;
@@ -130,7 +137,7 @@ class UnsetAspectCmd {
130
137
  (0, _defineProperty2().default)(this, "description", `unset an aspect from component(s).`);
131
138
  (0, _defineProperty2().default)(this, "arguments", [{
132
139
  name: 'pattern',
133
- description: 'the components to target. use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button". wrap the pattern with quotes'
140
+ description: `the components to target. ${_constants().COMPONENT_PATTERN_HELP}`
134
141
  }, {
135
142
  name: 'aspect-id',
136
143
  description: "the aspect's component id"
@@ -140,7 +147,7 @@ class UnsetAspectCmd {
140
147
  }
141
148
  async report([pattern, aspectId]) {
142
149
  const results = await this.aspect.unsetAspectsFromComponents(pattern, aspectId);
143
- if (!results.length) return _chalk().default.yellow(`unable to find any matching for ${_chalk().default.bold(pattern)} pattern`);
150
+ if (!results.length) return _chalk().default.yellow(`unable to find any matching components for ${_chalk().default.bold(pattern)} pattern`);
144
151
  return _chalk().default.green(`the following component(s) have been successfully updated:\n${results.join('\n')}`);
145
152
  }
146
153
  }
@@ -149,12 +156,12 @@ class GetAspectCmd {
149
156
  constructor(aspect) {
150
157
  this.aspect = aspect;
151
158
  (0, _defineProperty2().default)(this, "name", 'get <component-name>');
152
- (0, _defineProperty2().default)(this, "description", 'list the aspects set on a component, as well as their config and data');
159
+ (0, _defineProperty2().default)(this, "description", 'list the aspects set on a component, as well as their configs and data');
153
160
  (0, _defineProperty2().default)(this, "arguments", [{
154
161
  name: 'component-name',
155
- description: 'the component name or component id'
162
+ description: 'the component name or component id to fetch aspects for'
156
163
  }]);
157
- (0, _defineProperty2().default)(this, "options", [['d', 'debug', 'show the origins were the aspects were taken from'], ['j', 'json', 'format as json']]);
164
+ (0, _defineProperty2().default)(this, "options", [['d', 'debug', 'show the origins where the aspects were taken from'], ['j', 'json', 'format as json']]);
158
165
  (0, _defineProperty2().default)(this, "group", 'development');
159
166
  }
160
167
  async report([componentName], {
@@ -190,7 +197,7 @@ ${_chalk().default.bold('data:')} ${JSON.stringify(data, undefined, 2)}
190
197
  }).join('\n\n');
191
198
  const afterMergeTitle = _chalk().default.green.bold('After merging the origins above');
192
199
  const afterMergeOutput = `${afterMergeTitle}\n${extensionsDetailsToString(mergedExtensions)}`;
193
- const afterFinalMergeTitle = _chalk().default.green.bold('Final - After merging the origin above and the loaded data');
200
+ const afterFinalMergeTitle = _chalk().default.green.bold('Final - After merging the origins above and the loaded data');
194
201
  const afterFinalMergeOutput = `${afterFinalMergeTitle}\n${extensionsDetailsToString(aspects.toLegacy())}`;
195
202
  return `${beforeMergeOutput}\n\n${afterMergeOutput}\n\n\n${afterFinalMergeOutput}`;
196
203
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_cliTable","data","require","_chalk","_interopRequireDefault","ListAspectCmd","constructor","aspect","_defineProperty2","default","name","description","report","debug","listAspectsResults","listAspectsOfComponent","rows","Object","keys","map","componentId","longestAspectName","Math","max","_","aspectName","length","aspects","aspectSource","origin","source","padEnd","level","join","table","CLITable","render","exports","SetAspectCmd","pattern","aspectId","config","options","configParsed","JSON","parse","results","setAspectsToComponents","chalk","yellow","bold","green","UpdateAspectCmd","cmd","updated","alreadyUpToDate","updateAspectsToComponents","UnsetAspectCmd","unsetAspectsFromComponents","GetAspectCmd","componentName","extensionsDetailsToString","extensions","e","extensionId","toComponentObject","toString","stringify","undefined","mergedExtensions","beforeMerge","getAspectsOfComponentForDebugging","beforeMergeOutput","extraData","title","details","moreData","afterMergeTitle","afterMergeOutput","afterFinalMergeTitle","afterFinalMergeOutput","toLegacy","getAspectsOfComponent","extensionDataList","json","extensionsDetailsToObject","reduce","acc","current","jsonObj","forEach","AfterMerge","FinalAfterMergeIncludeLoad","AspectCmd","unrecognizedSubcommand","red"],"sources":["aspect.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { CLITable } from '@teambit/cli-table';\nimport chalk from 'chalk';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config';\nimport { AspectMain } from './aspect.main.runtime';\n\nexport class ListAspectCmd implements Command {\n name = 'list [pattern]';\n description = 'list all aspects configured on component(s)';\n arguments = [\n {\n name: 'pattern',\n description:\n 'component name, component id, or component pattern. use component pattern to select multiple components. \\nuse comma to separate patterns and \"!\" to exclude. e.g. \"ui/**, !ui/button\"\\nwrap the pattern with quotes',\n },\n ];\n options = [['d', 'debug', 'show the origins were the aspects were taken from']] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([name]: [string], { debug }: { debug: boolean }) {\n const listAspectsResults = await this.aspect.listAspectsOfComponent(name);\n const rows = Object.keys(listAspectsResults).map((componentId) => {\n const longestAspectName = Math.max(...listAspectsResults[componentId].map((_) => _.aspectName.length));\n const aspects = listAspectsResults[componentId]\n .map((aspectSource) => {\n const origin = debug ? ` (origin: ${aspectSource.source})` : '';\n const aspectName = aspectSource.aspectName.padEnd(longestAspectName);\n return `${aspectName} (level: ${aspectSource.level})${origin}`;\n })\n .join('\\n');\n\n return [componentId, aspects];\n });\n const table = new CLITable([], rows);\n return table.render();\n }\n}\n\nexport type SetAspectOptions = { merge?: boolean };\n\nexport class SetAspectCmd implements Command {\n name = 'set <pattern> <aspect-id> [config]';\n description = 'set components with an aspect to extend their development tools, metadata and (possibly) artifacts';\n arguments = [\n {\n name: 'pattern',\n description:\n 'the components to extend. use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and \"!\" to exclude. e.g. \"ui/**, !ui/button\". wrap the pattern with quotes',\n },\n {\n name: 'aspect-id',\n description: \"the aspect's component id\",\n },\n {\n name: 'config',\n description: `the aspect config. enter the config as a stringified JSON (e.g. '{\"foo\":\"bar\"}' ). when no config is provided, an aspect is set with an empty config ({}).`,\n },\n ];\n options = [\n ['m', 'merge', 'merge with an existing config if exits. (by default, it replaces the config)'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([pattern, aspectId, config]: [string, string, string], options: SetAspectOptions) {\n const configParsed = config ? JSON.parse(config) : {};\n const results = await this.aspect.setAspectsToComponents(pattern, aspectId, configParsed, options);\n if (!results.length) return chalk.yellow(`unable to find any matching for ${chalk.bold(pattern)} pattern`);\n return chalk.green(`the following component(s) have been successfully updated:\\n${results.join('\\n')}`);\n }\n}\n\nexport class UpdateAspectCmd implements Command {\n name = 'update <aspect-id> [pattern]';\n description = 'update a version of an aspect';\n arguments = [\n {\n name: 'aspect-id',\n description:\n \"the aspect's component id. optionally, add a version (id@version), otherwise, it finds the latest version on the remote\",\n },\n {\n name: 'pattern',\n description:\n 'the components to update (defaults to all components). use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and \"!\" to exclude. e.g. \"ui/**, !ui/button\". wrap the pattern with quotes',\n },\n ];\n examples = [\n {\n cmd: \"update scope.org/aspect '**/ui/**'\",\n description: 'update \"ui\" components that use scope.org/aspect to use its latest version',\n },\n {\n cmd: 'bit aspect update scope.org/aspect@2.0.0',\n description: 'update all components that use scope.org/aspect to version 2.0.0 (of this aspect).',\n },\n ];\n options = [];\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([aspectId, pattern]: [string, string]) {\n const { updated, alreadyUpToDate } = await this.aspect.updateAspectsToComponents(aspectId, pattern);\n if (updated.length) {\n return chalk.green(`the following component(s) have been successfully updated:\\n${updated.join('\\n')}`);\n }\n if (alreadyUpToDate.length) {\n return chalk.green(\n `all ${alreadyUpToDate.length} component(s) that use this aspect are already up to date. nothing to update`\n );\n }\n return chalk.yellow(`unable to find any component that use ${chalk.bold(aspectId)}`);\n }\n}\n\nexport class UnsetAspectCmd implements Command {\n name = 'unset <pattern> <aspect-id>';\n description = `unset an aspect from component(s).`;\n arguments = [\n {\n name: 'pattern',\n description:\n 'the components to target. use component name, component id, or component pattern. use component pattern to select multiple components. use comma to separate patterns and \"!\" to exclude. e.g. \"ui/**, !ui/button\". wrap the pattern with quotes',\n },\n {\n name: 'aspect-id',\n description: \"the aspect's component id\",\n },\n ];\n options = [];\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([pattern, aspectId]: [string, string]) {\n const results = await this.aspect.unsetAspectsFromComponents(pattern, aspectId);\n if (!results.length) return chalk.yellow(`unable to find any matching for ${chalk.bold(pattern)} pattern`);\n return chalk.green(`the following component(s) have been successfully updated:\\n${results.join('\\n')}`);\n }\n}\n\nexport class GetAspectCmd implements Command {\n name = 'get <component-name>';\n description = 'list the aspects set on a component, as well as their config and data';\n arguments = [\n {\n name: 'component-name',\n description: 'the component name or component id',\n },\n ];\n options = [\n ['d', 'debug', 'show the origins were the aspects were taken from'],\n ['j', 'json', 'format as json'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([componentName]: [string], { debug }: { debug: boolean }) {\n const extensionsDetailsToString = (extensions: ExtensionDataList) =>\n extensions\n .map((e) => {\n const { name, data, config, extensionId } = e.toComponentObject();\n return `${chalk.bold('name:')} ${name || extensionId?.toString()}\n${chalk.bold('config:')} ${JSON.stringify(config, undefined, 2)}\n${chalk.bold('data:')} ${JSON.stringify(data, undefined, 2)}\n`;\n })\n .join('\\n');\n\n if (debug) {\n const {\n aspects,\n extensions: mergedExtensions,\n beforeMerge,\n } = await this.aspect.getAspectsOfComponentForDebugging(componentName);\n const beforeMergeOutput = beforeMerge\n .map(({ origin, extensions, extraData }) => {\n const title = chalk.green.bold(`Origin: ${origin}`);\n const details = extensionsDetailsToString(extensions);\n const moreData = extraData ? `\\n${chalk.bold('Extra Data:')} ${JSON.stringify(extraData, undefined, 2)}` : '';\n return `${title}\\n${details}${moreData}`;\n })\n .join('\\n\\n');\n\n const afterMergeTitle = chalk.green.bold('After merging the origins above');\n const afterMergeOutput = `${afterMergeTitle}\\n${extensionsDetailsToString(mergedExtensions)}`;\n\n const afterFinalMergeTitle = chalk.green.bold('Final - After merging the origin above and the loaded data');\n const afterFinalMergeOutput = `${afterFinalMergeTitle}\\n${extensionsDetailsToString(aspects.toLegacy())}`;\n\n return `${beforeMergeOutput}\\n\\n${afterMergeOutput}\\n\\n\\n${afterFinalMergeOutput}`;\n }\n const aspects = await this.aspect.getAspectsOfComponent(componentName);\n const extensionDataList = aspects.toLegacy();\n return extensionsDetailsToString(extensionDataList);\n }\n\n async json([componentName]: [string], { debug }: { debug: boolean }) {\n const extensionsDetailsToObject = (extensions: ExtensionDataList) =>\n extensions.reduce((acc, current) => {\n const { name, data, config, extensionId } = current.toComponentObject();\n const aspectName = name || extensionId?.toString() || '<no-name>';\n acc[aspectName] = {\n name: aspectName,\n config,\n data,\n };\n return acc;\n }, {});\n\n if (debug) {\n const {\n aspects,\n extensions: mergedExtensions,\n beforeMerge,\n } = await this.aspect.getAspectsOfComponentForDebugging(componentName);\n const jsonObj: Record<string, any> = {};\n beforeMerge.forEach(({ origin, extensions, extraData }) => {\n jsonObj[origin] = {\n extensions: extensionsDetailsToObject(extensions),\n extraData,\n };\n });\n\n jsonObj.AfterMerge = { extensions: extensionsDetailsToObject(mergedExtensions) };\n jsonObj.FinalAfterMergeIncludeLoad = { extensions: extensionsDetailsToObject(aspects.toLegacy()) };\n return jsonObj;\n }\n\n const aspects = await this.aspect.getAspectsOfComponent(componentName);\n\n return extensionsDetailsToObject(aspects.toLegacy());\n }\n}\n\nexport class AspectCmd implements Command {\n name = 'aspect <sub-command>';\n alias = '';\n description = 'manage aspects';\n options = [];\n group = 'development';\n commands: Command[] = [];\n\n async report([unrecognizedSubcommand]: [string]) {\n return chalk.red(\n `\"${unrecognizedSubcommand}\" is not a subcommand of \"aspect\", please run \"bit aspect --help\" to list the subcommands`\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAHA;;AAOO,MAAMI,aAAa,CAAoB;EAa5CC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAZ/B,gBAAgB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACT,6CAA6C;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBAC/C,CACV;MACEC,IAAI,EAAE,SAAS;MACfC,WAAW,EACT;IACJ,CAAC,CACF;IAAA,IAAAH,gBAAA,GAAAC,OAAA,mBACS,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,mDAAmD,CAAC,CAAC;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACvE,aAAa;EAEoB;EAEzC,MAAMG,MAAMA,CAAC,CAACF,IAAI,CAAW,EAAE;IAAEG;EAA0B,CAAC,EAAE;IAC5D,MAAMC,kBAAkB,GAAG,MAAM,IAAI,CAACP,MAAM,CAACQ,sBAAsB,CAACL,IAAI,CAAC;IACzE,MAAMM,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACJ,kBAAkB,CAAC,CAACK,GAAG,CAAEC,WAAW,IAAK;MAChE,MAAMC,iBAAiB,GAAGC,IAAI,CAACC,GAAG,CAAC,GAAGT,kBAAkB,CAACM,WAAW,CAAC,CAACD,GAAG,C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7D,MAAM;QAAEiC,UAAU;QAAEW;MAAU,CAAC,KAAK;QACzDgB,OAAO,CAAC5D,MAAM,CAAC,GAAG;UAChBiC,UAAU,EAAEuB,yBAAyB,CAACvB,UAAU,CAAC;UACjDW;QACF,CAAC;MACH,CAAC,CAAC;MAEFgB,OAAO,CAACE,UAAU,GAAG;QAAE7B,UAAU,EAAEuB,yBAAyB,CAAChB,gBAAgB;MAAE,CAAC;MAChFoB,OAAO,CAACG,0BAA0B,GAAG;QAAE9B,UAAU,EAAEuB,yBAAyB,CAAC1D,OAAO,CAACsD,QAAQ,CAAC,CAAC;MAAE,CAAC;MAClG,OAAOQ,OAAO;IAChB;IAEA,MAAM9D,OAAO,GAAG,MAAM,IAAI,CAACpB,MAAM,CAAC2E,qBAAqB,CAACtB,aAAa,CAAC;IAEtE,OAAOyB,yBAAyB,CAAC1D,OAAO,CAACsD,QAAQ,CAAC,CAAC,CAAC;EACtD;AACF;AAAC5C,OAAA,CAAAsB,YAAA,GAAAA,YAAA;AAEM,MAAMkC,SAAS,CAAoB;EAAAvF,YAAA;IAAA,IAAAE,gBAAA,GAAAC,OAAA,gBACjC,sBAAsB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACrB,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACI,gBAAgB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACpB,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACJ,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,oBACC,EAAE;EAAA;EAExB,MAAMG,MAAMA,CAAC,CAACkF,sBAAsB,CAAW,EAAE;IAC/C,OAAO9C,gBAAK,CAAC+C,GAAG,CACb,IAAGD,sBAAuB,2FAC7B,CAAC;EACH;AACF;AAACzD,OAAA,CAAAwD,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"names":["_cliTable","data","require","_chalk","_interopRequireDefault","_constants","ListAspectCmd","constructor","aspect","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","report","debug","listAspectsResults","listAspectsOfComponent","rows","Object","keys","map","componentId","longestAspectName","Math","max","_","aspectName","length","aspects","aspectSource","origin","source","padEnd","level","join","table","CLITable","render","exports","SetAspectCmd","pattern","aspectId","config","options","configParsed","JSON","parse","results","setAspectsToComponents","chalk","yellow","bold","green","UpdateAspectCmd","cmd","updated","alreadyUpToDate","updateAspectsToComponents","UnsetAspectCmd","unsetAspectsFromComponents","GetAspectCmd","componentName","extensionsDetailsToString","extensions","e","extensionId","toComponentObject","toString","stringify","undefined","mergedExtensions","beforeMerge","getAspectsOfComponentForDebugging","beforeMergeOutput","extraData","title","details","moreData","afterMergeTitle","afterMergeOutput","afterFinalMergeTitle","afterFinalMergeOutput","toLegacy","getAspectsOfComponent","extensionDataList","json","extensionsDetailsToObject","reduce","acc","current","jsonObj","forEach","AfterMerge","FinalAfterMergeIncludeLoad","AspectCmd","unrecognizedSubcommand","red"],"sources":["aspect.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { CLITable } from '@teambit/cli-table';\nimport chalk from 'chalk';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { AspectMain } from './aspect.main.runtime';\n\nexport class ListAspectCmd implements Command {\n name = 'list [pattern]';\n description = 'list all aspects configured on component(s)';\n arguments = [\n {\n name: 'pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n options = [['d', 'debug', 'show the origins where the aspects were taken from']] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([name]: [string], { debug }: { debug: boolean }) {\n const listAspectsResults = await this.aspect.listAspectsOfComponent(name);\n const rows = Object.keys(listAspectsResults).map((componentId) => {\n const longestAspectName = Math.max(...listAspectsResults[componentId].map((_) => _.aspectName.length));\n const aspects = listAspectsResults[componentId]\n .map((aspectSource) => {\n const origin = debug ? ` (origin: ${aspectSource.source})` : '';\n const aspectName = aspectSource.aspectName.padEnd(longestAspectName);\n return `${aspectName} (level: ${aspectSource.level})${origin}`;\n })\n .join('\\n');\n\n return [componentId, aspects];\n });\n const table = new CLITable([], rows);\n return table.render();\n }\n}\n\nexport type SetAspectOptions = { merge?: boolean };\n\nexport class SetAspectCmd implements Command {\n name = 'set <pattern> <aspect-id> [config]';\n description = 'set components with an aspect to extend their development tools, metadata and (possibly) artifacts';\n arguments = [\n {\n name: 'pattern',\n description: `the components to extend. ${COMPONENT_PATTERN_HELP}`,\n },\n {\n name: 'aspect-id',\n description: \"the aspect's component id\",\n },\n {\n name: 'config',\n description: `the aspect config. enter the config as a stringified JSON (e.g. '{\"foo\":\"bar\"}' ). when no config is provided, an aspect is set with an empty config ({}).`,\n },\n ];\n options = [\n ['m', 'merge', 'merge with an existing config if exits. (by default, it replaces overlapping existing configs)'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([pattern, aspectId, config]: [string, string, string], options: SetAspectOptions) {\n const configParsed = config ? JSON.parse(config) : {};\n const results = await this.aspect.setAspectsToComponents(pattern, aspectId, configParsed, options);\n if (!results.length)\n return chalk.yellow(`unable to find any matching components for ${chalk.bold(pattern)} pattern`);\n return chalk.green(`the following component(s) have been successfully updated:\\n${results.join('\\n')}`);\n }\n}\n\nexport class UpdateAspectCmd implements Command {\n name = 'update <aspect-id> [pattern]';\n description = 'update a version of an aspect for all or specified components';\n arguments = [\n {\n name: 'aspect-id',\n description:\n \"the aspect's component id. optionally, add a version (id@version), otherwise will use the latest version from the remote\",\n },\n {\n name: 'pattern',\n description: `the components to update (defaults to all components). ${COMPONENT_PATTERN_HELP}`,\n },\n ];\n examples = [\n {\n cmd: \"bit aspect update scope.org/aspect '**/ui/**'\",\n description: 'update all components with the \"ui\" namespace that use scope.org/aspect, to use its latest version',\n },\n {\n cmd: 'bit aspect update scope.org/aspect@2.0.0',\n description:\n 'update version of scope.org/aspect to version 2.0.0 for all components configured with that aspect.',\n },\n ];\n options = [];\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([aspectId, pattern]: [string, string]) {\n const { updated, alreadyUpToDate } = await this.aspect.updateAspectsToComponents(aspectId, pattern);\n if (updated.length) {\n return chalk.green(`the following component(s) have been successfully updated:\\n${updated.join('\\n')}`);\n }\n if (alreadyUpToDate.length) {\n return chalk.green(\n `all ${alreadyUpToDate.length} component(s) that use this aspect are already up to date. nothing to update`\n );\n }\n return chalk.yellow(`unable to find any components in this workspace that use ${chalk.bold(aspectId)}`);\n }\n}\n\nexport class UnsetAspectCmd implements Command {\n name = 'unset <pattern> <aspect-id>';\n description = `unset an aspect from component(s).`;\n arguments = [\n {\n name: 'pattern',\n description: `the components to target. ${COMPONENT_PATTERN_HELP}`,\n },\n {\n name: 'aspect-id',\n description: \"the aspect's component id\",\n },\n ];\n options = [];\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([pattern, aspectId]: [string, string]) {\n const results = await this.aspect.unsetAspectsFromComponents(pattern, aspectId);\n if (!results.length)\n return chalk.yellow(`unable to find any matching components for ${chalk.bold(pattern)} pattern`);\n return chalk.green(`the following component(s) have been successfully updated:\\n${results.join('\\n')}`);\n }\n}\n\nexport class GetAspectCmd implements Command {\n name = 'get <component-name>';\n description = 'list the aspects set on a component, as well as their configs and data';\n arguments = [\n {\n name: 'component-name',\n description: 'the component name or component id to fetch aspects for',\n },\n ];\n options = [\n ['d', 'debug', 'show the origins where the aspects were taken from'],\n ['j', 'json', 'format as json'],\n ] as CommandOptions;\n group = 'development';\n\n constructor(private aspect: AspectMain) {}\n\n async report([componentName]: [string], { debug }: { debug: boolean }) {\n const extensionsDetailsToString = (extensions: ExtensionDataList) =>\n extensions\n .map((e) => {\n const { name, data, config, extensionId } = e.toComponentObject();\n return `${chalk.bold('name:')} ${name || extensionId?.toString()}\n${chalk.bold('config:')} ${JSON.stringify(config, undefined, 2)}\n${chalk.bold('data:')} ${JSON.stringify(data, undefined, 2)}\n`;\n })\n .join('\\n');\n\n if (debug) {\n const {\n aspects,\n extensions: mergedExtensions,\n beforeMerge,\n } = await this.aspect.getAspectsOfComponentForDebugging(componentName);\n const beforeMergeOutput = beforeMerge\n .map(({ origin, extensions, extraData }) => {\n const title = chalk.green.bold(`Origin: ${origin}`);\n const details = extensionsDetailsToString(extensions);\n const moreData = extraData ? `\\n${chalk.bold('Extra Data:')} ${JSON.stringify(extraData, undefined, 2)}` : '';\n return `${title}\\n${details}${moreData}`;\n })\n .join('\\n\\n');\n\n const afterMergeTitle = chalk.green.bold('After merging the origins above');\n const afterMergeOutput = `${afterMergeTitle}\\n${extensionsDetailsToString(mergedExtensions)}`;\n\n const afterFinalMergeTitle = chalk.green.bold('Final - After merging the origins above and the loaded data');\n const afterFinalMergeOutput = `${afterFinalMergeTitle}\\n${extensionsDetailsToString(aspects.toLegacy())}`;\n\n return `${beforeMergeOutput}\\n\\n${afterMergeOutput}\\n\\n\\n${afterFinalMergeOutput}`;\n }\n const aspects = await this.aspect.getAspectsOfComponent(componentName);\n const extensionDataList = aspects.toLegacy();\n return extensionsDetailsToString(extensionDataList);\n }\n\n async json([componentName]: [string], { debug }: { debug: boolean }) {\n const extensionsDetailsToObject = (extensions: ExtensionDataList) =>\n extensions.reduce((acc, current) => {\n const { name, data, config, extensionId } = current.toComponentObject();\n const aspectName = name || extensionId?.toString() || '<no-name>';\n acc[aspectName] = {\n name: aspectName,\n config,\n data,\n };\n return acc;\n }, {});\n\n if (debug) {\n const {\n aspects,\n extensions: mergedExtensions,\n beforeMerge,\n } = await this.aspect.getAspectsOfComponentForDebugging(componentName);\n const jsonObj: Record<string, any> = {};\n beforeMerge.forEach(({ origin, extensions, extraData }) => {\n jsonObj[origin] = {\n extensions: extensionsDetailsToObject(extensions),\n extraData,\n };\n });\n\n jsonObj.AfterMerge = { extensions: extensionsDetailsToObject(mergedExtensions) };\n jsonObj.FinalAfterMergeIncludeLoad = { extensions: extensionsDetailsToObject(aspects.toLegacy()) };\n return jsonObj;\n }\n\n const aspects = await this.aspect.getAspectsOfComponent(componentName);\n\n return extensionsDetailsToObject(aspects.toLegacy());\n }\n}\n\nexport class AspectCmd implements Command {\n name = 'aspect <sub-command>';\n alias = '';\n description = 'manage aspects';\n options = [];\n group = 'development';\n commands: Command[] = [];\n\n async report([unrecognizedSubcommand]: [string]) {\n return chalk.red(\n `\"${unrecognizedSubcommand}\" is not a subcommand of \"aspect\", please run \"bit aspect --help\" to list the subcommands`\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AALA;;AAQO,MAAMK,aAAa,CAAoB;EAY5CC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAX/B,gBAAgB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACT,6CAA6C;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBAC/C,CACV;MACEC,IAAI,EAAE,SAAS;MACfC,WAAW,EAAEC;IACf,CAAC,CACF;IAAA,IAAAJ,gBAAA,GAAAC,OAAA,mBACS,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,oDAAoD,CAAC,CAAC;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACxE,aAAa;EAEoB;EAEzC,MAAMI,MAAMA,CAAC,C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OAAA,mBACpB,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACJ,aAAa;IAAA,IAAAD,gBAAA,GAAAC,OAAA,oBACC,EAAE;EAAA;EAExB,MAAMI,MAAMA,CAAC,CAACkF,sBAAsB,CAAW,EAAE;IAC/C,OAAO9C,gBAAK,CAAC+C,GAAG,CACb,IAAGD,sBAAuB,2FAC7B,CAAC;EACH;AACF;AAACzD,OAAA,CAAAwD,SAAA,GAAAA,SAAA"}
@@ -211,7 +211,9 @@ class AspectMain {
211
211
  async setAspectsToComponents(pattern, aspectId, config = {}, options = {}) {
212
212
  const componentIds = await this.workspace.idsByPattern(pattern);
213
213
  await Promise.all(componentIds.map(async componentId => {
214
- await this.workspace.addSpecificComponentConfig(componentId, aspectId, config, options.merge);
214
+ await this.workspace.addSpecificComponentConfig(componentId, aspectId, config, {
215
+ shouldMergeWithExisting: options.merge
216
+ });
215
217
  }));
216
218
  await this.workspace.bitMap.write();
217
219
  return componentIds;