@teambit/bit 1.8.121 → 1.8.122
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.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_harmony_bit-preview.js +1 -1
- package/artifacts/schema.json +1 -1
- package/dist/bootstrap.js +4 -4
- package/dist/bootstrap.js.map +1 -1
- package/dist/load-bit.js +14 -7
- package/dist/load-bit.js.map +1 -1
- package/dist/{preview-1732245631025.js → preview-1732332052659.js} +2 -2
- package/dist/server-commander.js +7 -7
- package/dist/server-commander.js.map +1 -1
- package/package.json +117 -115
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.harmony/bit@1.8.
|
|
3
|
+
<testsuite name="teambit.harmony/bit@1.8.122" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see teambit_harmony_bit-preview.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/bit-preview"]=t():e["teambit.harmony/bit-preview"]=t()}(self,(()=>(()=>{var e={88443:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=r.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},69685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},84949:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function r(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var o,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(n.call(e,i)){if((o=e[i])||null!=o&&!isNaN(o)||(o=""),i=r(i),o=r(o),null===i||null===o)continue;a.push(i+"="+o)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=o(t[1]),a=o(t[2]);null===i||null===a||i in r||(r[i]=a)}return r}},91788:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},67114:(e,t,n)=>{"use strict";var o=n(91788),r=n(84949),i=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,a=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\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]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function d(e){var t,o=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},r={},a=typeof(e=e||o);if("blob:"===e.protocol)r=new f(unescape(e.pathname),{});else if("string"===a)for(t in r=new f(e,{}),l)delete r[t];else if("object"===a){for(t in e)t in l||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=i.test(e.href))}return r}function p(e){e=u(e);var t=a.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!(t[2]&&t[2].length>=2),rest:t[2]&&1===t[2].length?"/"+t[3]:t[3]}}function f(e,t,n){if(e=u(e),!(this instanceof f))return new f(e,t,n);var i,a,s,l,m,b,_=c.slice(),h=typeof t,y=this,v=0;for("object"!==h&&"string"!==h&&(n=t,t=null),n&&"function"!=typeof n&&(n=r.parse),t=d(t),i=!(a=p(e||"")).protocol&&!a.slashes,y.slashes=a.slashes||i&&t.slashes,y.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(_[3]=[/(.*)/,"pathname"]);v<_.length;v++)"function"!=typeof(l=_[v])?(s=l[0],b=l[1],s!=s?y[b]=e:"string"==typeof s?~(m=e.indexOf(s))&&("number"==typeof l[2]?(y[b]=e.slice(0,m),e=e.slice(m+l[2])):(y[b]=e.slice(m),e=e.slice(0,m))):(m=s.exec(e))&&(y[b]=m[1],e=e.slice(0,m.index)),y[b]=y[b]||i&&l[3]&&t[b]||"",l[4]&&(y[b]=y[b].toLowerCase())):e=l(e);n&&(y.query=n(y.query)),i&&t.slashes&&"/"!==y.pathname.charAt(0)&&(""!==y.pathname||""!==t.pathname)&&(y.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=n.length,r=n[o-1],i=!1,a=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),a++):a&&(0===o&&(i=!0),n.splice(o,1),a--);return i&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(y.pathname,t.pathname)),"/"!==y.pathname.charAt(0)&&y.hostname&&(y.pathname="/"+y.pathname),o(y.port,y.protocol)||(y.host=y.hostname,y.port=""),y.username=y.password="",y.auth&&(l=y.auth.split(":"),y.username=l[0]||"",y.password=l[1]||""),y.origin=y.protocol&&y.host&&"file:"!==y.protocol?y.protocol+"//"+y.host:"null",y.href=y.toString()}f.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||r.parse)(t)),i[e]=t;break;case"port":i[e]=t,o(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;default:i[e]=t}for(var s=0;s<c.length;s++){var u=c[s];u[4]&&(i[u[1]]=i[u[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=r.stringify);var t,n=this,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.slashes?"//":"");return n.username&&(i+=n.username,n.password&&(i+=":"+n.password),i+="@"),i+=n.host+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},f.extractProtocol=p,f.location=d,f.trimLeft=u,f.qs=r,e.exports=f},77789:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImage=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(10388));function u(e){var{alt:t,className:n,fullWidth:r}=e,u=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},u,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}u.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=u},76336:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(77789),t)},43684:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CenterColumn=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(50506));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.centerColumn,n)},r),t)}u.__bit_component={id:"teambit.base-ui/layout/page-frame@1.0.2",homepage:"https://bit.dev/teambit/base-ui/layout/page-frame",exported:!0},t.CenterColumn=u},12950:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CenterColumn=t.WideColumn=t.textColumn=t.wideColumn=t.centerColumn=void 0;const r=o(n(50506));t.centerColumn=r.default.centerColumn,t.wideColumn=r.default.wideColumn,t.textColumn=r.default.textColumn;var i=n(23414);Object.defineProperty(t,"WideColumn",{enumerable:!0,get:function(){return i.WideColumn}});var a=n(43684);Object.defineProperty(t,"CenterColumn",{enumerable:!0,get:function(){return a.CenterColumn}})},23414:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WideColumn=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(50506));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.wideColumn,n)},r),t)}u.__bit_component={id:"teambit.base-ui/layout/page-frame@1.0.2",homepage:"https://bit.dev/teambit/base-ui/layout/page-frame",exported:!0},t.WideColumn=u},17335:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/compare-url@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/compare-url",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;const i=r(n(67114));function a(e,t,{exact:n,strict:o}={}){if(e===t)return!0;o||(e=e.replace(/\/(?=[?#]|$)/,""),t=t.replace(/\/(?=[?#]|$)/,""));const r=i.default(e),a=i.default(t),l=s(r,a),d=!n||u(r,a),p=!o||c(r,a);return l&&d&&p}function s(e,t){return(!t.protocol||t.protocol===e.protocol)&&(!t.hostname||t.hostname===e.hostname)&&(!t.port||t.port===e.port)&&(!t.pathname||e.pathname.startsWith(t.pathname))&&(!t.query||l(t.query,e.query))&&(!t.hash||t.hash===e.hash)&&(!t.password||t.password===e.password)&&(!t.username||t.username===e.username)}function u(e,t){return(!t.pathname||e.pathname===t.pathname)&&(!t.query||l(e.query,t.query))}function c(e,t){return!t.pathname||e.pathname.endsWith("/")===t.pathname.endsWith("/")}function l(e,t){return Object.keys(e).every((n=>e[n]===t[n]))}a.__bit_component=o,t.compareUrl=a,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o,l.__bit_component=o},30580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;var o=n(17335);Object.defineProperty(t,"compareUrl",{enumerable:!0,get:function(){return o.compareUrl}})},27664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;var o=n(31410);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.Link}})},31410:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;const r=o(n(41594)),i=n(37928);function a(e){const t=i.useRouting().Link;return r.default.createElement(t,Object.assign({},e))}a.__bit_component={id:"teambit.base-ui/routing/link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/link",exported:!0},t.Link=a},83372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;var o=n(34830);Object.defineProperty(t,"NativeLink",{enumerable:!0,get:function(){return o.NativeLink}})},34830:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},a=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;const s=i(n(41594)),u={rel:"noopener",target:"_blank"};function c(e){var{href:t="",external:n,replace:o,onClick:r}=e,i=a(e,["href","external","replace","onClick"]);const c=n?u:{},l=s.useCallback((e=>{const i=null==r?void 0:r(e);return e.defaultPrevented||!o||n||(e.preventDefault(),window.location.replace(t)),i}),[t,o,r]);return s.default.createElement("a",Object.assign({},i,c,{onClick:l,href:t}))}c.__bit_component={id:"teambit.base-ui/routing/native-link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/native-link",exported:!0},t.NativeLink=c},75044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavLink=void 0;var o=n(71886);Object.defineProperty(t,"NativeNavLink",{enumerable:!0,get:function(){return o.NativeNavLink}})},71886:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},a=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavLink=void 0;const u=i(n(41594)),c=s(n(88443)),l=n(83372),d=n(30580),p=n(27336);function f(e){var{activeClassName:t,activeStyle:n,isActive:o,exact:r,strict:i,style:s,className:f}=e,m=a(e,["activeClassName","activeStyle","isActive","exact","strict","style","className"]);const b=p.isBrowser?window.location.href:"/",_=u.useMemo((()=>m.href&&d.compareUrl(b,m.href)),[r,i,b,m.href]),h=(null==o?void 0:o())||_,y=u.useMemo((()=>h&&n?Object.assign(Object.assign({},s),n):s),[h,s]);return u.default.createElement(l.NativeLink,Object.assign({},m,{style:y,className:c.default(f,h&&t)}))}f.__bit_component={id:"teambit.base-ui/routing/native-nav-link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/native-nav-link",exported:!0},t.NativeNavLink=f},37928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=t.useRouting=t.RoutingProvider=void 0;var o=n(82042);Object.defineProperty(t,"RoutingProvider",{enumerable:!0,get:function(){return o.RoutingProvider}}),Object.defineProperty(t,"useRouting",{enumerable:!0,get:function(){return o.useRouting}}),Object.defineProperty(t,"useLocation",{enumerable:!0,get:function(){return o.useLocation}})},82042:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/routing-provider@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/routing-provider",exported:!0},r=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=t.useRouting=t.RoutingProvider=void 0;const s=a(n(41594)),u=n(83372),c=n(75044),l=n(27336),d={pathname:"/",search:"",hash:""},p={Link:u.NativeLink,NavLink:c.NativeNavLink,useLocation:()=>l.isBrowser?window.location:d},f=s.createContext(p);function m({value:e,children:t}){return s.default.createElement(f.Provider,{value:e},t)}function b(){return s.useContext(f)}function _(){return b().useLocation()}m.__bit_component=o,t.RoutingProvider=m,b.__bit_component=o,t.useRouting=b,_.__bit_component=o,t.useLocation=_},19264:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Heading=void 0;const i=r(n(41594));function a(e){var{element:t="h1"}=e,n=o(e,["element"]);const r=t;return i.default.createElement(r,Object.assign({"data-bit-id":"teambit.base-ui/text/heading"},n))}a.__bit_component={id:"teambit.base-ui/text/heading@1.0.4",homepage:"https://bit.dev/teambit/base-ui/text/heading",exported:!0},t.Heading=a},63694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Heading=void 0;var o=n(19264);Object.defineProperty(t,"Heading",{enumerable:!0,get:function(){return o.Heading}})},27336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=void 0;var o=n(79879);Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return o.isBrowser}})},79879:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window},16782:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.bitComponent=void 0;const r=o(n(41594)),i=n(17575),a=o(n(42059));t.bitComponent=[{id:"teambit.bit/bit",href:"https://bit.cloud/teambit/harmony/bit",description:"Bit is an open-source component for composing component driven software",envIcon:"https://static.bit.dev/extensions-icons/default.svg",preview:r.default.createElement("div",{className:a.default.logo},r.default.createElement(i.Logo,{customSize:64}))}]},27431:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBitQuickStart=t.Size=t.WhatIsBit=t.default=t.WhatIsBitLong=void 0;var r=n(12001);Object.defineProperty(t,"WhatIsBitLong",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o(r).default}});var i=n(25412);Object.defineProperty(t,"WhatIsBit",{enumerable:!0,get:function(){return i.WhatIsBit}}),Object.defineProperty(t,"Size",{enumerable:!0,get:function(){return i.Size}});var a=n(32703);Object.defineProperty(t,"WhatIsBitQuickStart",{enumerable:!0,get:function(){return a.WhatIsBitQuickStart}})},15556:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit comes with native support in various dev tools like TypeScript, Babel, Jest, Webpack, ESLint, and ready made development environments for React, NodeJS, Angular and more. New tools can be easily integrated by adding one more component into Bit!"))}p.__bit_component=o,p.isMDXComponent=!0},1474:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit comes with native support in various dev tools like TypeScript, Babel, Jest, Webpack, ESLint, and ready made development environments for React, NodeJS, Angular and more. New tools can be easily integrated by adding one more component into Bit!"))}p.__bit_component=o,p.isMDXComponent=!0},12678:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h3",null,"What is Bit?"),(0,r.mdx)("p",null,"Bit is an open-source tool for composing component-driven software."))}p.__bit_component=o,p.isMDXComponent=!0},32703:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBitQuickStart=void 0;const r=o(n(41594)),i=n(79799),a=n(12950),s=n(62130),u=o(n(1474)),c=o(n(15556)),l=o(n(12678)),d=n(16782),p=o(n(30404)),f=()=>r.default.createElement(a.WideColumn,null,r.default.createElement(l.default,null),r.default.createElement(i.LeftRight,{className:p.default.leftRight,left:r.default.createElement(u.default,null),right:r.default.createElement(s.ComponentCardGroup,{components:d.bitComponent})}),r.default.createElement(c.default,null));f.__bit_component={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0},t.WhatIsBitQuickStart=f},59570:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=_,l(n(41594));var r=n(5016),i=n(62130),a=l(n(81063)),s=n(16782),u=l(n(42059)),c=["components"];function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,o,r=f(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}l.__bit_component=o,d.__bit_component=o,p.__bit_component=o,f.__bit_component=o;var m={},b="wrapper";function _(e){var t=e.components,n=p(e,c);return(0,r.mdx)(b,d({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit is an open-source tool for composing component-driven software."),(0,r.mdx)(i.ComponentCardGroup,{components:s.bitComponent,className:u.default.bitCard,mdxType:"ComponentCardGroup"}),(0,r.mdx)("br",null),(0,r.mdx)(a.default,{components:s.bitComponent,mdxType:"WhatIsBitSmall"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit offers native support for various dev tools like ",(0,r.mdx)("a",{parentName:"p",href:"/tools/typescript"},"TypeScript"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/babel"},"Babel"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/jest"},"Jest"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/webpack"},"Webpack"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/eslint"},"ESLint")," and\nready made development environments for ",(0,r.mdx)("a",{parentName:"p",href:"/frameworks/react"},"React"),", ",(0,r.mdx)("a",{parentName:"p",href:"/frameworks/node"},"NodeJS"),", ",(0,r.mdx)("a",{parentName:"p",href:"/envs/angular"},"Angular")," and more. New tools can be easily integrated by\nextending Bit with one more component."))}_.__bit_component=o,_.isMDXComponent=!0},81063:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit stands at the intersection between product and engineering. ",(0,r.mdx)("strong",{parentName:"p"},"It helps you take complex product requirements, and break them down into independent,\nand reusable pieces called")," ",(0,r.mdx)("strong",{parentName:"p"},(0,r.mdx)("em",{parentName:"strong"},'"components"')),". It allows you to create components and compose them with each other. Components are described by names and APIs, and contain source code implementation.\nThey can be of different kinds like apps, pages, UI components, backend services and even content. You can ",(0,r.mdx)("a",{parentName:"p",href:"/thinking-in-components"},"think of almost anything in components"),"."),(0,r.mdx)("p",null,'It is common to think of components that function as full applications, as "large", whereas components that function as simple elements, like a \'button\', as "small".\nFor us, both types of components are "the same size", but each has a different responsibility. An app is a very concrete component. It has many dependencies and just a few (if any) dependents.\nA button, on the other hand, is very abstract. It has just a few dependencies and many dependents. Having this sort of dependents-to-dependencies ratio indicates that a component is highly-reusable.'))}p.__bit_component=o,p.isMDXComponent=!0},25412:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBit=t.Size=void 0;const r=o(n(41594)),i=o(n(12001)),a=o(n(59570)),s=o(n(81063));var u;function c({size:e}){return e===u.SMALL?r.default.createElement(s.default,null):e===u.MEDIUM?r.default.createElement(a.default,null):r.default.createElement(i.default,null)}!function(e){e[e.SMALL=0]="SMALL",e[e.MEDIUM=1]="MEDIUM",e[e.LARGE=2]="LARGE"}(u=t.Size||(t.Size={})),c.__bit_component={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0},t.WhatIsBit=c},12001:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=f,s(n(41594));var r=n(5016),i=s(n(59570)),a=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,o,r=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}s.__bit_component=o,u.__bit_component=o,c.__bit_component=o,l.__bit_component=o;var d={},p="wrapper";function f(e){var t=e.components,n=c(e,a);return(0,r.mdx)(p,u({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h3",null,"What is Bit?"),(0,r.mdx)(i.default,{mdxType:"WhatIsBitShort"}),(0,r.mdx)("h3",null,"What can you do with Bit?"),(0,r.mdx)("p",null,"Anything is possible with Bit! We built ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev"},"Bit")," and ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud"},"bit.cloud")," entirely using Bit. These are complex systems which includes infrastructure\ntools, cloud products and multiple user interfaces."),(0,r.mdx)("p",null,"People use Bit to create all kind of applications, from user interfaces with component-driven frameworks like React, Vue and Angular, to complex\nmicro-service architectures, serverless functions, CLI utilities, desktop applications, native mobile applications and even IoT. You can do with Bit about anything you can do with JS\nand even beyond."),(0,r.mdx)("h3",null,"What Bit supports?"),(0,r.mdx)("p",null,"Bit was built with TypeScript and supports it natively. It was designed to be language-agnostic, and will support other software languages in the future! For now, our development environments use TypeScript as the default compiler for JS and TS components. You can easily switch to Babel or any other compiler. Bit is completely agnostic to your tech stack."))}f.__bit_component=o,f.isMDXComponent=!0},17575:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Logo:()=>c,RecommendedSizes:()=>o});var o,r=n(41594),i=n.n(r),a=n(76336);!function(e){e[e.small=16]="small",e[e.medium=24]="medium",e[e.large=32]="large",e[e.xl=40]="xl"}(o||(o={}));const s=new URL(n(59132),n.b).toString();var u=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function c(e){var{size:t,customSize:n,alt:o}=e,r=u(e,["size","customSize","alt"]);const c=n||t;return i().createElement(a.BaseImage,Object.assign({},r,{src:s,alt:o||"",height:c,width:c}))}c.__bit_component={id:"teambit.design/ui/brand/logo@1.96.2",homepage:"https://bit.dev/teambit/design/ui/brand/logo",exported:!0},c.defaultProps={size:o.medium,alt:"Bit"}},77111:function(e,t,n){"use strict";var o={id:"teambit.design/ui/heading@1.0.16",homepage:"https://bit.dev/teambit/design/ui/heading",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.H6=t.H5=t.H4=t.H3=t.H2=t.H1=void 0;const i=r(n(41594)),a=r(n(88443)),s=n(63694),u=r(n(33747)),c=r(n(8910)),l=r(n(85945));function d(e){return i.default.createElement(s.Heading,Object.assign({element:"h1"},e,{className:(0,a.default)(c.default.h1,l.default.h1,u.default[e.size||"lg"],e.className)}))}function p(e){return i.default.createElement(s.Heading,Object.assign({element:"h2"},e,{className:(0,a.default)(c.default.h2,u.default[e.size||"lg"],e.className)}))}function f(e){return i.default.createElement(s.Heading,Object.assign({element:"h3"},e,{className:(0,a.default)(c.default.h3,u.default[e.size||"md"],e.className)}))}function m(e){return i.default.createElement(s.Heading,Object.assign({element:"h4"},e,{className:(0,a.default)(c.default.h4,u.default[e.size||"sm"],e.className)}))}function b(e){return i.default.createElement(s.Heading,Object.assign({element:"h5"},e,{className:(0,a.default)(c.default.h5,u.default[e.size||"xs"],e.className)}))}function _(e){return i.default.createElement(s.Heading,Object.assign({element:"h6"},e,{className:(0,a.default)(c.default.h6,u.default[e.size||"xxs"],e.className)}))}d.__bit_component=o,t.H1=d,p.__bit_component=o,t.H2=p,f.__bit_component=o,t.H3=f,m.__bit_component=o,t.H4=m,b.__bit_component=o,t.H5=b,_.__bit_component=o,t.H6=_},84517:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(77111),t)},79799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LeftRight:()=>c});var o=n(41594),r=n.n(o),i=n(69685),a=n.n(i);const s={leftRight:"left-right_leftRight__JE-Eu"};var u=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function c(e){var{left:t,right:n}=e,o=u(e,["left","right"]);return r().createElement("section",Object.assign({},o,{className:a()(s.leftRight,o.className)}),r().createElement("div",null,t),r().createElement("div",null,n))}c.__bit_component={id:"teambit.design/ui/layouts/sections/left-right@1.96.2",homepage:"https://bit.dev/teambit/design/ui/layouts/sections/left-right",exported:!0}},13066:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipsis=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(27517));function s(e){return r.default.createElement("div",Object.assign({},e,{className:(0,i.default)(e.className,a.default.ellipsisDiv)}))}s.__bit_component={id:"teambit.design/ui/styles/ellipsis@0.0.347",homepage:"https://bit.dev/teambit/design/ui/styles/ellipsis",exported:!0},t.Ellipsis=s},141:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipsis=t.ellipsis=void 0;const r=o(n(27517));t.ellipsis=r.default.ellipsis;var i=n(13066);Object.defineProperty(t,"Ellipsis",{enumerable:!0,get:function(){return i.Ellipsis}})},37448:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseComponentCard=void 0;const r=o(n(41594)),i=n(42249),a=n(24639),s=n(22609),u=n(82399);function c({id:e="",className:t,preview:n,version:o,description:c,isDeprecated:l,isVerified:d,children:p,contentClass:f}){return r.default.createElement(u.Card,{className:t},r.default.createElement(a.DeprecationSticker,{isDeprecated:l}),r.default.createElement(i.PreviewContainer,{preview:n}),r.default.createElement(s.ComponentDetails,{id:e,version:o,description:c,isVerified:d,className:f}),p)}c.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.BaseComponentCard=c},16773:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(98592));function s({children:e,className:t}){return r.default.createElement("div",{className:(0,i.default)(a.default.componentCard,t)},e)}s.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.Card=s},82399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var o=n(16773);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return o.Card}})},4979:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecationSticker=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(1378));function s({isDeprecated:e}){return r.default.createElement("div",{className:(0,i.default)(a.default.deprecated,{[a.default.show]:e})},"deprecated")}s.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.DeprecationSticker=s},24639:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecationSticker=void 0;var o=n(4979);Object.defineProperty(t,"DeprecationSticker",{enumerable:!0,get:function(){return o.DeprecationSticker}})},23479:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentDetails=void 0;const i=r(n(41594)),a=r(n(88443)),s=n(45582),u=n(141),c=r(n(3238));function l(e){var{id:t,version:n,description:r,isVerified:l,className:d}=e,p=o(e,["id","version","description","isVerified","className"]);const f=t.split("/"),m=f.length>1&&f.slice(0,-1).join(" / "),b=f.slice(-1);return i.default.createElement("div",Object.assign({},p,{className:(0,a.default)(c.default.content,d)}),i.default.createElement("div",null,i.default.createElement("div",{className:c.default.nameSpace},m),i.default.createElement("div",{className:c.default.name},i.default.createElement("span",null,b),i.default.createElement("div",{className:c.default.versionHolder},n&&i.default.createElement(u.Ellipsis,null,"v",n),l&&i.default.createElement("img",{src:"https://static.bit.dev/extensions-icons/verified-field-badge.svg",className:c.default.img}))),i.default.createElement("div",{className:c.default.description},(0,s.ellipsis)(r||"",50))))}l.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.ComponentDetails=l},22609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentDetails=void 0;var o=n(23479);Object.defineProperty(t,"ComponentDetails",{enumerable:!0,get:function(){return o.ComponentDetails}})},4972:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=t.ComponentDetails=t.DeprecationSticker=t.Card=t.BaseComponentCard=void 0;var o=n(37448);Object.defineProperty(t,"BaseComponentCard",{enumerable:!0,get:function(){return o.BaseComponentCard}});var r=n(82399);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return r.Card}});var i=n(24639);Object.defineProperty(t,"DeprecationSticker",{enumerable:!0,get:function(){return i.DeprecationSticker}});var a=n(22609);Object.defineProperty(t,"ComponentDetails",{enumerable:!0,get:function(){return a.ComponentDetails}});var s=n(42249);Object.defineProperty(t,"PreviewContainer",{enumerable:!0,get:function(){return s.PreviewContainer}})},42249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=void 0;var o=n(56371);Object.defineProperty(t,"PreviewContainer",{enumerable:!0,get:function(){return o.PreviewContainer}})},56371:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(13586));function u(e){var{preview:t,className:n}=e,r=o(e,["preview","className"]);return i.default.createElement("div",Object.assign({},r,{className:(0,a.default)(s.default.previewContainer,n)}),i.default.createElement("div",{className:(0,a.default)(s.default.preview,{[s.default.emptyPreview]:!t})},t))}u.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.PreviewContainer=u},83550:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCardGroup=void 0;const i=r(n(41594)),a=n(84517),s=n(83131),u=n(18019);function c(e){var{title:t,components:n}=e,r=o(e,["title","components"]);return i.default.createElement("div",Object.assign({},r),t&&i.default.createElement(a.H2,null,t),i.default.createElement(s.ComponentGrid,null,n.map((e=>i.default.createElement(u.ComponentCard,Object.assign({key:e.id},e))))))}c.__bit_component={id:"teambit.explorer/ui/gallery/component-card-group@1.96.1",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-card-group",exported:!0},t.ComponentCardGroup=c},62130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCardGroup=void 0;var o=n(83550);Object.defineProperty(t,"ComponentCardGroup",{enumerable:!0,get:function(){return o.ComponentCardGroup}})},17603:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCard=void 0;const r=o(n(41594)),i=n(27664),a=n(4972),s=o(n(52522));function u({id:e="",className:t,preview:n,version:o,description:u,envIcon:c,isDeprecated:l=!1,href:d,external:p}){return r.default.createElement(a.Card,{className:t},r.default.createElement(i.Link,{className:s.default.componentCardLink,href:d||e,external:p},r.default.createElement(a.DeprecationSticker,{isDeprecated:l}),r.default.createElement(a.PreviewContainer,{preview:n}),r.default.createElement(a.ComponentDetails,{id:e,version:o,description:u,className:s.default.content}),r.default.createElement("div",{className:s.default.bottom},r.default.createElement("div",{className:s.default.left}),r.default.createElement("img",{src:c,className:s.default.img}))))}u.__bit_component={id:"teambit.explorer/ui/gallery/component-card@0.0.495",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-card",exported:!0},t.ComponentCard=u},18019:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(17603),t)},40001:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentGrid=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(5368));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.componentGrid,n)},r),t)}u.__bit_component={id:"teambit.explorer/ui/gallery/component-grid@0.0.486",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-grid",exported:!0},t.ComponentGrid=u},83131:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(40001),t)},77107:(e,t)=>{"use strict";function n(e,t){return e.length>t?`${e.substring(0,t)}...`:e}Object.defineProperty(t,"__esModule",{value:!0}),t.ellipsis=void 0,n.__bit_component={id:"teambit.toolbox/string/ellipsis@0.0.173",homepage:"https://bit.dev/teambit/toolbox/string/ellipsis",exported:!0},t.ellipsis=n},45582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ellipsis=void 0;var o=n(77107);Object.defineProperty(t,"ellipsis",{enumerable:!0,get:function(){return o.ellipsis}})},8427:(e,t,n)=>{"use strict";var o={id:"teambit.harmony/bit@1.8.121",homepage:"https://bit.cloud/teambit/harmony/bit",exported:!0};function r(){const e=a(n(41594));return r=function(){return e},e}function i(){const e=n(17575);return i=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BitLogo=void 0,r.__bit_component=o,i.__bit_component=o,a.__bit_component=o;const s=()=>r().default.createElement("div",{style:{width:"50%",margin:"auto"}},r().default.createElement(i().Logo,{customSize:64}));s.__bit_component=o,t.BitLogo=s},31551:(e,t,n)=>{"use strict";var o={id:"teambit.harmony/bit@1.8.121",homepage:"https://bit.cloud/teambit/harmony/bit",exported:!0};function r(){const e=a(n(41594));return r=function(){return e},e}function i(){const e=n(27431);return i=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}function s(){return r().default.createElement(i().WhatIsBit,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.abstract=void 0,t.default=s,t.tags=void 0,r.__bit_component=o,i.__bit_component=o,a.__bit_component=o,t.tags=["components","software","composable","component-driven","collaboration","development","design","product","architecture","compounding"],t.abstract="Bit is an open source toolchain for component-driven software",s.__bit_component=o},10388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__sELLz"}},50506:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={centerColumn:"page-frame_centerColumn__XBa-t",wideColumn:"page-frame_wideColumn__NAkt5",textColumn:"page-frame_textColumn__UPfoU"}},30404:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={}},42059:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={bitCard:"what-is-bit_bitCard__6HJgs",logo:"what-is-bit_logo__xM-ZV"}},33747:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={xxs:"heading-sizes_xxs__SWEOY",xs:"heading-sizes_xs__Hy8ol",sm:"heading-sizes_sm__tI7SK",md:"heading-sizes_md__joonV",lg:"heading-sizes_lg__Ltd1S",xl:"heading-sizes_xl__HDfIw",xxl:"heading-sizes_xxl__cFNob"}},8910:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={h1:"heading_h1__nOnz4",h2:"heading_h2__uEyK2",h3:"heading_h3__HdM7Z",h4:"heading_h4__v8USx",h5:"heading_h5__6jcVl",h6:"heading_h6__k7dDb"}},85945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={h1:"margins_h1__e8-sd"}},27517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={ellipsis:"ellipsis_ellipsis__C8hJ8",ellipsisDiv:"ellipsis_ellipsisDiv__9Db5W"}},98592:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentCard:"card_componentCard__Ak9CZ"}},1378:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={deprecated:"deprecation-sticker_deprecated__mKzkW",show:"deprecation-sticker_show__3kEmz"}},3238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={content:"details_content__ifC+P",nameSpace:"details_nameSpace__5bRzq",name:"details_name__znUu1",versionHolder:"details_versionHolder__9dygA",img:"details_img__MjuDx",description:"details_description__PPRv6"}},13586:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={previewContainer:"preview-container_previewContainer__hrQXX",preview:"preview-container_preview__zRjHm",emptyPreview:"preview-container_emptyPreview__YnS1o"}},52522:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentCardLink:"component-card_componentCardLink__Q4l2Z",bottom:"component-card_bottom__kipWC",size:"component-card_size__zZUte",dot:"component-card_dot__FksAd",img:"component-card_img__l5R9+"}},5368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentGrid:"component-grid_componentGrid__pG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jEyIiB4Mj0iMTc3IiB5Mj0iMzM4Ljc5NiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjNzMzOThEIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzU5NEE5NSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo="},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href;var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>r,compositions_metadata:()=>a,overview:()=>i});var e=n(8427),t=n(31551);const r=[e],i=[t],a={compositions:[{displayName:"Bit logo",identifier:"BitLogo"}]}})(),o})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/bit-preview"]=t():e["teambit.harmony/bit-preview"]=t()}(self,(()=>(()=>{var e={88443:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=r.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},69685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},84949:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function r(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var o,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(n.call(e,i)){if((o=e[i])||null!=o&&!isNaN(o)||(o=""),i=r(i),o=r(o),null===i||null===o)continue;a.push(i+"="+o)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=o(t[1]),a=o(t[2]);null===i||null===a||i in r||(r[i]=a)}return r}},91788:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},67114:(e,t,n)=>{"use strict";var o=n(91788),r=n(84949),i=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,a=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\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]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function d(e){var t,o=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},r={},a=typeof(e=e||o);if("blob:"===e.protocol)r=new f(unescape(e.pathname),{});else if("string"===a)for(t in r=new f(e,{}),l)delete r[t];else if("object"===a){for(t in e)t in l||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=i.test(e.href))}return r}function p(e){e=u(e);var t=a.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!(t[2]&&t[2].length>=2),rest:t[2]&&1===t[2].length?"/"+t[3]:t[3]}}function f(e,t,n){if(e=u(e),!(this instanceof f))return new f(e,t,n);var i,a,s,l,m,b,_=c.slice(),h=typeof t,y=this,v=0;for("object"!==h&&"string"!==h&&(n=t,t=null),n&&"function"!=typeof n&&(n=r.parse),t=d(t),i=!(a=p(e||"")).protocol&&!a.slashes,y.slashes=a.slashes||i&&t.slashes,y.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(_[3]=[/(.*)/,"pathname"]);v<_.length;v++)"function"!=typeof(l=_[v])?(s=l[0],b=l[1],s!=s?y[b]=e:"string"==typeof s?~(m=e.indexOf(s))&&("number"==typeof l[2]?(y[b]=e.slice(0,m),e=e.slice(m+l[2])):(y[b]=e.slice(m),e=e.slice(0,m))):(m=s.exec(e))&&(y[b]=m[1],e=e.slice(0,m.index)),y[b]=y[b]||i&&l[3]&&t[b]||"",l[4]&&(y[b]=y[b].toLowerCase())):e=l(e);n&&(y.query=n(y.query)),i&&t.slashes&&"/"!==y.pathname.charAt(0)&&(""!==y.pathname||""!==t.pathname)&&(y.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=n.length,r=n[o-1],i=!1,a=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),a++):a&&(0===o&&(i=!0),n.splice(o,1),a--);return i&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(y.pathname,t.pathname)),"/"!==y.pathname.charAt(0)&&y.hostname&&(y.pathname="/"+y.pathname),o(y.port,y.protocol)||(y.host=y.hostname,y.port=""),y.username=y.password="",y.auth&&(l=y.auth.split(":"),y.username=l[0]||"",y.password=l[1]||""),y.origin=y.protocol&&y.host&&"file:"!==y.protocol?y.protocol+"//"+y.host:"null",y.href=y.toString()}f.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||r.parse)(t)),i[e]=t;break;case"port":i[e]=t,o(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;default:i[e]=t}for(var s=0;s<c.length;s++){var u=c[s];u[4]&&(i[u[1]]=i[u[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=r.stringify);var t,n=this,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.slashes?"//":"");return n.username&&(i+=n.username,n.password&&(i+=":"+n.password),i+="@"),i+=n.host+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},f.extractProtocol=p,f.location=d,f.trimLeft=u,f.qs=r,e.exports=f},77789:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImage=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(10388));function u(e){var{alt:t,className:n,fullWidth:r}=e,u=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},u,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}u.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=u},76336:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(77789),t)},43684:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CenterColumn=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(50506));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.centerColumn,n)},r),t)}u.__bit_component={id:"teambit.base-ui/layout/page-frame@1.0.2",homepage:"https://bit.dev/teambit/base-ui/layout/page-frame",exported:!0},t.CenterColumn=u},12950:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CenterColumn=t.WideColumn=t.textColumn=t.wideColumn=t.centerColumn=void 0;const r=o(n(50506));t.centerColumn=r.default.centerColumn,t.wideColumn=r.default.wideColumn,t.textColumn=r.default.textColumn;var i=n(23414);Object.defineProperty(t,"WideColumn",{enumerable:!0,get:function(){return i.WideColumn}});var a=n(43684);Object.defineProperty(t,"CenterColumn",{enumerable:!0,get:function(){return a.CenterColumn}})},23414:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WideColumn=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(50506));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.wideColumn,n)},r),t)}u.__bit_component={id:"teambit.base-ui/layout/page-frame@1.0.2",homepage:"https://bit.dev/teambit/base-ui/layout/page-frame",exported:!0},t.WideColumn=u},17335:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/compare-url@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/compare-url",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;const i=r(n(67114));function a(e,t,{exact:n,strict:o}={}){if(e===t)return!0;o||(e=e.replace(/\/(?=[?#]|$)/,""),t=t.replace(/\/(?=[?#]|$)/,""));const r=i.default(e),a=i.default(t),l=s(r,a),d=!n||u(r,a),p=!o||c(r,a);return l&&d&&p}function s(e,t){return(!t.protocol||t.protocol===e.protocol)&&(!t.hostname||t.hostname===e.hostname)&&(!t.port||t.port===e.port)&&(!t.pathname||e.pathname.startsWith(t.pathname))&&(!t.query||l(t.query,e.query))&&(!t.hash||t.hash===e.hash)&&(!t.password||t.password===e.password)&&(!t.username||t.username===e.username)}function u(e,t){return(!t.pathname||e.pathname===t.pathname)&&(!t.query||l(e.query,t.query))}function c(e,t){return!t.pathname||e.pathname.endsWith("/")===t.pathname.endsWith("/")}function l(e,t){return Object.keys(e).every((n=>e[n]===t[n]))}a.__bit_component=o,t.compareUrl=a,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o,l.__bit_component=o},30580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;var o=n(17335);Object.defineProperty(t,"compareUrl",{enumerable:!0,get:function(){return o.compareUrl}})},27664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;var o=n(31410);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.Link}})},31410:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;const r=o(n(41594)),i=n(37928);function a(e){const t=i.useRouting().Link;return r.default.createElement(t,Object.assign({},e))}a.__bit_component={id:"teambit.base-ui/routing/link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/link",exported:!0},t.Link=a},83372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;var o=n(34830);Object.defineProperty(t,"NativeLink",{enumerable:!0,get:function(){return o.NativeLink}})},34830:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},a=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;const s=i(n(41594)),u={rel:"noopener",target:"_blank"};function c(e){var{href:t="",external:n,replace:o,onClick:r}=e,i=a(e,["href","external","replace","onClick"]);const c=n?u:{},l=s.useCallback((e=>{const i=null==r?void 0:r(e);return e.defaultPrevented||!o||n||(e.preventDefault(),window.location.replace(t)),i}),[t,o,r]);return s.default.createElement("a",Object.assign({},i,c,{onClick:l,href:t}))}c.__bit_component={id:"teambit.base-ui/routing/native-link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/native-link",exported:!0},t.NativeLink=c},75044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavLink=void 0;var o=n(71886);Object.defineProperty(t,"NativeNavLink",{enumerable:!0,get:function(){return o.NativeNavLink}})},71886:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},a=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeNavLink=void 0;const u=i(n(41594)),c=s(n(88443)),l=n(83372),d=n(30580),p=n(27336);function f(e){var{activeClassName:t,activeStyle:n,isActive:o,exact:r,strict:i,style:s,className:f}=e,m=a(e,["activeClassName","activeStyle","isActive","exact","strict","style","className"]);const b=p.isBrowser?window.location.href:"/",_=u.useMemo((()=>m.href&&d.compareUrl(b,m.href)),[r,i,b,m.href]),h=(null==o?void 0:o())||_,y=u.useMemo((()=>h&&n?Object.assign(Object.assign({},s),n):s),[h,s]);return u.default.createElement(l.NativeLink,Object.assign({},m,{style:y,className:c.default(f,h&&t)}))}f.__bit_component={id:"teambit.base-ui/routing/native-nav-link@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/native-nav-link",exported:!0},t.NativeNavLink=f},37928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=t.useRouting=t.RoutingProvider=void 0;var o=n(82042);Object.defineProperty(t,"RoutingProvider",{enumerable:!0,get:function(){return o.RoutingProvider}}),Object.defineProperty(t,"useRouting",{enumerable:!0,get:function(){return o.useRouting}}),Object.defineProperty(t,"useLocation",{enumerable:!0,get:function(){return o.useLocation}})},82042:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/routing-provider@1.0.0",homepage:"https://bit.dev/teambit/base-ui/routing/routing-provider",exported:!0},r=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=t.useRouting=t.RoutingProvider=void 0;const s=a(n(41594)),u=n(83372),c=n(75044),l=n(27336),d={pathname:"/",search:"",hash:""},p={Link:u.NativeLink,NavLink:c.NativeNavLink,useLocation:()=>l.isBrowser?window.location:d},f=s.createContext(p);function m({value:e,children:t}){return s.default.createElement(f.Provider,{value:e},t)}function b(){return s.useContext(f)}function _(){return b().useLocation()}m.__bit_component=o,t.RoutingProvider=m,b.__bit_component=o,t.useRouting=b,_.__bit_component=o,t.useLocation=_},19264:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Heading=void 0;const i=r(n(41594));function a(e){var{element:t="h1"}=e,n=o(e,["element"]);const r=t;return i.default.createElement(r,Object.assign({"data-bit-id":"teambit.base-ui/text/heading"},n))}a.__bit_component={id:"teambit.base-ui/text/heading@1.0.4",homepage:"https://bit.dev/teambit/base-ui/text/heading",exported:!0},t.Heading=a},63694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Heading=void 0;var o=n(19264);Object.defineProperty(t,"Heading",{enumerable:!0,get:function(){return o.Heading}})},27336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=void 0;var o=n(79879);Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return o.isBrowser}})},79879:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window},16782:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.bitComponent=void 0;const r=o(n(41594)),i=n(17575),a=o(n(42059));t.bitComponent=[{id:"teambit.bit/bit",href:"https://bit.cloud/teambit/harmony/bit",description:"Bit is an open-source component for composing component driven software",envIcon:"https://static.bit.dev/extensions-icons/default.svg",preview:r.default.createElement("div",{className:a.default.logo},r.default.createElement(i.Logo,{customSize:64}))}]},27431:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBitQuickStart=t.Size=t.WhatIsBit=t.default=t.WhatIsBitLong=void 0;var r=n(12001);Object.defineProperty(t,"WhatIsBitLong",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o(r).default}});var i=n(25412);Object.defineProperty(t,"WhatIsBit",{enumerable:!0,get:function(){return i.WhatIsBit}}),Object.defineProperty(t,"Size",{enumerable:!0,get:function(){return i.Size}});var a=n(32703);Object.defineProperty(t,"WhatIsBitQuickStart",{enumerable:!0,get:function(){return a.WhatIsBitQuickStart}})},15556:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit comes with native support in various dev tools like TypeScript, Babel, Jest, Webpack, ESLint, and ready made development environments for React, NodeJS, Angular and more. New tools can be easily integrated by adding one more component into Bit!"))}p.__bit_component=o,p.isMDXComponent=!0},1474:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit comes with native support in various dev tools like TypeScript, Babel, Jest, Webpack, ESLint, and ready made development environments for React, NodeJS, Angular and more. New tools can be easily integrated by adding one more component into Bit!"))}p.__bit_component=o,p.isMDXComponent=!0},12678:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h3",null,"What is Bit?"),(0,r.mdx)("p",null,"Bit is an open-source tool for composing component-driven software."))}p.__bit_component=o,p.isMDXComponent=!0},32703:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBitQuickStart=void 0;const r=o(n(41594)),i=n(79799),a=n(12950),s=n(62130),u=o(n(1474)),c=o(n(15556)),l=o(n(12678)),d=n(16782),p=o(n(30404)),f=()=>r.default.createElement(a.WideColumn,null,r.default.createElement(l.default,null),r.default.createElement(i.LeftRight,{className:p.default.leftRight,left:r.default.createElement(u.default,null),right:r.default.createElement(s.ComponentCardGroup,{components:d.bitComponent})}),r.default.createElement(c.default,null));f.__bit_component={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0},t.WhatIsBitQuickStart=f},59570:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=_,l(n(41594));var r=n(5016),i=n(62130),a=l(n(81063)),s=n(16782),u=l(n(42059)),c=["components"];function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,o,r=f(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function f(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}l.__bit_component=o,d.__bit_component=o,p.__bit_component=o,f.__bit_component=o;var m={},b="wrapper";function _(e){var t=e.components,n=p(e,c);return(0,r.mdx)(b,d({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit is an open-source tool for composing component-driven software."),(0,r.mdx)(i.ComponentCardGroup,{components:s.bitComponent,className:u.default.bitCard,mdxType:"ComponentCardGroup"}),(0,r.mdx)("br",null),(0,r.mdx)(a.default,{components:s.bitComponent,mdxType:"WhatIsBitSmall"}),(0,r.mdx)("p",null,"Bit does not prescribe how to build your entire application. It helps you define and compose components and allows for every component to adopt the dev tools that best fit its nature.\nA React component is likely to be compiled, tested and perhaps even deployed using a composition of tools different than the one a backend-service component, or a generic function, may use.\nBit offers native support for various dev tools like ",(0,r.mdx)("a",{parentName:"p",href:"/tools/typescript"},"TypeScript"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/babel"},"Babel"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/jest"},"Jest"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/webpack"},"Webpack"),", ",(0,r.mdx)("a",{parentName:"p",href:"/tools/eslint"},"ESLint")," and\nready made development environments for ",(0,r.mdx)("a",{parentName:"p",href:"/frameworks/react"},"React"),", ",(0,r.mdx)("a",{parentName:"p",href:"/frameworks/node"},"NodeJS"),", ",(0,r.mdx)("a",{parentName:"p",href:"/envs/angular"},"Angular")," and more. New tools can be easily integrated by\nextending Bit with one more component."))}_.__bit_component=o,_.isMDXComponent=!0},81063:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=p,a(n(41594));var r=n(5016),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}a.__bit_component=o,s.__bit_component=o,u.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function p(e){var t=e.components,n=u(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Bit stands at the intersection between product and engineering. ",(0,r.mdx)("strong",{parentName:"p"},"It helps you take complex product requirements, and break them down into independent,\nand reusable pieces called")," ",(0,r.mdx)("strong",{parentName:"p"},(0,r.mdx)("em",{parentName:"strong"},'"components"')),". It allows you to create components and compose them with each other. Components are described by names and APIs, and contain source code implementation.\nThey can be of different kinds like apps, pages, UI components, backend services and even content. You can ",(0,r.mdx)("a",{parentName:"p",href:"/thinking-in-components"},"think of almost anything in components"),"."),(0,r.mdx)("p",null,'It is common to think of components that function as full applications, as "large", whereas components that function as simple elements, like a \'button\', as "small".\nFor us, both types of components are "the same size", but each has a different responsibility. An app is a very concrete component. It has many dependencies and just a few (if any) dependents.\nA button, on the other hand, is very abstract. It has just a few dependencies and many dependents. Having this sort of dependents-to-dependencies ratio indicates that a component is highly-reusable.'))}p.__bit_component=o,p.isMDXComponent=!0},25412:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WhatIsBit=t.Size=void 0;const r=o(n(41594)),i=o(n(12001)),a=o(n(59570)),s=o(n(81063));var u;function c({size:e}){return e===u.SMALL?r.default.createElement(s.default,null):e===u.MEDIUM?r.default.createElement(a.default,null):r.default.createElement(i.default,null)}!function(e){e[e.SMALL=0]="SMALL",e[e.MEDIUM=1]="MEDIUM",e[e.LARGE=2]="LARGE"}(u=t.Size||(t.Size={})),c.__bit_component={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0},t.WhatIsBit=c},12001:(e,t,n)=>{"use strict";var o={id:"teambit.bit/content/what-is-bit@1.96.2",homepage:"https://bit.dev/teambit/bit/content/what-is-bit",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=f,s(n(41594));var r=n(5016),i=s(n(59570)),a=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,o,r=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}s.__bit_component=o,u.__bit_component=o,c.__bit_component=o,l.__bit_component=o;var d={},p="wrapper";function f(e){var t=e.components,n=c(e,a);return(0,r.mdx)(p,u({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h3",null,"What is Bit?"),(0,r.mdx)(i.default,{mdxType:"WhatIsBitShort"}),(0,r.mdx)("h3",null,"What can you do with Bit?"),(0,r.mdx)("p",null,"Anything is possible with Bit! We built ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev"},"Bit")," and ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud"},"bit.cloud")," entirely using Bit. These are complex systems which includes infrastructure\ntools, cloud products and multiple user interfaces."),(0,r.mdx)("p",null,"People use Bit to create all kind of applications, from user interfaces with component-driven frameworks like React, Vue and Angular, to complex\nmicro-service architectures, serverless functions, CLI utilities, desktop applications, native mobile applications and even IoT. You can do with Bit about anything you can do with JS\nand even beyond."),(0,r.mdx)("h3",null,"What Bit supports?"),(0,r.mdx)("p",null,"Bit was built with TypeScript and supports it natively. It was designed to be language-agnostic, and will support other software languages in the future! For now, our development environments use TypeScript as the default compiler for JS and TS components. You can easily switch to Babel or any other compiler. Bit is completely agnostic to your tech stack."))}f.__bit_component=o,f.isMDXComponent=!0},17575:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Logo:()=>c,RecommendedSizes:()=>o});var o,r=n(41594),i=n.n(r),a=n(76336);!function(e){e[e.small=16]="small",e[e.medium=24]="medium",e[e.large=32]="large",e[e.xl=40]="xl"}(o||(o={}));const s=new URL(n(59132),n.b).toString();var u=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function c(e){var{size:t,customSize:n,alt:o}=e,r=u(e,["size","customSize","alt"]);const c=n||t;return i().createElement(a.BaseImage,Object.assign({},r,{src:s,alt:o||"",height:c,width:c}))}c.__bit_component={id:"teambit.design/ui/brand/logo@1.96.2",homepage:"https://bit.dev/teambit/design/ui/brand/logo",exported:!0},c.defaultProps={size:o.medium,alt:"Bit"}},77111:function(e,t,n){"use strict";var o={id:"teambit.design/ui/heading@1.0.16",homepage:"https://bit.dev/teambit/design/ui/heading",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.H6=t.H5=t.H4=t.H3=t.H2=t.H1=void 0;const i=r(n(41594)),a=r(n(88443)),s=n(63694),u=r(n(33747)),c=r(n(8910)),l=r(n(85945));function d(e){return i.default.createElement(s.Heading,Object.assign({element:"h1"},e,{className:(0,a.default)(c.default.h1,l.default.h1,u.default[e.size||"lg"],e.className)}))}function p(e){return i.default.createElement(s.Heading,Object.assign({element:"h2"},e,{className:(0,a.default)(c.default.h2,u.default[e.size||"lg"],e.className)}))}function f(e){return i.default.createElement(s.Heading,Object.assign({element:"h3"},e,{className:(0,a.default)(c.default.h3,u.default[e.size||"md"],e.className)}))}function m(e){return i.default.createElement(s.Heading,Object.assign({element:"h4"},e,{className:(0,a.default)(c.default.h4,u.default[e.size||"sm"],e.className)}))}function b(e){return i.default.createElement(s.Heading,Object.assign({element:"h5"},e,{className:(0,a.default)(c.default.h5,u.default[e.size||"xs"],e.className)}))}function _(e){return i.default.createElement(s.Heading,Object.assign({element:"h6"},e,{className:(0,a.default)(c.default.h6,u.default[e.size||"xxs"],e.className)}))}d.__bit_component=o,t.H1=d,p.__bit_component=o,t.H2=p,f.__bit_component=o,t.H3=f,m.__bit_component=o,t.H4=m,b.__bit_component=o,t.H5=b,_.__bit_component=o,t.H6=_},84517:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(77111),t)},79799:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LeftRight:()=>c});var o=n(41594),r=n.n(o),i=n(69685),a=n.n(i);const s={leftRight:"left-right_leftRight__JE-Eu"};var u=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function c(e){var{left:t,right:n}=e,o=u(e,["left","right"]);return r().createElement("section",Object.assign({},o,{className:a()(s.leftRight,o.className)}),r().createElement("div",null,t),r().createElement("div",null,n))}c.__bit_component={id:"teambit.design/ui/layouts/sections/left-right@1.96.2",homepage:"https://bit.dev/teambit/design/ui/layouts/sections/left-right",exported:!0}},13066:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipsis=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(27517));function s(e){return r.default.createElement("div",Object.assign({},e,{className:(0,i.default)(e.className,a.default.ellipsisDiv)}))}s.__bit_component={id:"teambit.design/ui/styles/ellipsis@0.0.347",homepage:"https://bit.dev/teambit/design/ui/styles/ellipsis",exported:!0},t.Ellipsis=s},141:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipsis=t.ellipsis=void 0;const r=o(n(27517));t.ellipsis=r.default.ellipsis;var i=n(13066);Object.defineProperty(t,"Ellipsis",{enumerable:!0,get:function(){return i.Ellipsis}})},37448:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseComponentCard=void 0;const r=o(n(41594)),i=n(42249),a=n(24639),s=n(22609),u=n(82399);function c({id:e="",className:t,preview:n,version:o,description:c,isDeprecated:l,isVerified:d,children:p,contentClass:f}){return r.default.createElement(u.Card,{className:t},r.default.createElement(a.DeprecationSticker,{isDeprecated:l}),r.default.createElement(i.PreviewContainer,{preview:n}),r.default.createElement(s.ComponentDetails,{id:e,version:o,description:c,isVerified:d,className:f}),p)}c.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.BaseComponentCard=c},16773:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(98592));function s({children:e,className:t}){return r.default.createElement("div",{className:(0,i.default)(a.default.componentCard,t)},e)}s.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.Card=s},82399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var o=n(16773);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return o.Card}})},4979:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecationSticker=void 0;const r=o(n(41594)),i=o(n(88443)),a=o(n(1378));function s({isDeprecated:e}){return r.default.createElement("div",{className:(0,i.default)(a.default.deprecated,{[a.default.show]:e})},"deprecated")}s.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.DeprecationSticker=s},24639:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecationSticker=void 0;var o=n(4979);Object.defineProperty(t,"DeprecationSticker",{enumerable:!0,get:function(){return o.DeprecationSticker}})},23479:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentDetails=void 0;const i=r(n(41594)),a=r(n(88443)),s=n(45582),u=n(141),c=r(n(3238));function l(e){var{id:t,version:n,description:r,isVerified:l,className:d}=e,p=o(e,["id","version","description","isVerified","className"]);const f=t.split("/"),m=f.length>1&&f.slice(0,-1).join(" / "),b=f.slice(-1);return i.default.createElement("div",Object.assign({},p,{className:(0,a.default)(c.default.content,d)}),i.default.createElement("div",null,i.default.createElement("div",{className:c.default.nameSpace},m),i.default.createElement("div",{className:c.default.name},i.default.createElement("span",null,b),i.default.createElement("div",{className:c.default.versionHolder},n&&i.default.createElement(u.Ellipsis,null,"v",n),l&&i.default.createElement("img",{src:"https://static.bit.dev/extensions-icons/verified-field-badge.svg",className:c.default.img}))),i.default.createElement("div",{className:c.default.description},(0,s.ellipsis)(r||"",50))))}l.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.ComponentDetails=l},22609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentDetails=void 0;var o=n(23479);Object.defineProperty(t,"ComponentDetails",{enumerable:!0,get:function(){return o.ComponentDetails}})},4972:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=t.ComponentDetails=t.DeprecationSticker=t.Card=t.BaseComponentCard=void 0;var o=n(37448);Object.defineProperty(t,"BaseComponentCard",{enumerable:!0,get:function(){return o.BaseComponentCard}});var r=n(82399);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return r.Card}});var i=n(24639);Object.defineProperty(t,"DeprecationSticker",{enumerable:!0,get:function(){return i.DeprecationSticker}});var a=n(22609);Object.defineProperty(t,"ComponentDetails",{enumerable:!0,get:function(){return a.ComponentDetails}});var s=n(42249);Object.defineProperty(t,"PreviewContainer",{enumerable:!0,get:function(){return s.PreviewContainer}})},42249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=void 0;var o=n(56371);Object.defineProperty(t,"PreviewContainer",{enumerable:!0,get:function(){return o.PreviewContainer}})},56371:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewContainer=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(13586));function u(e){var{preview:t,className:n}=e,r=o(e,["preview","className"]);return i.default.createElement("div",Object.assign({},r,{className:(0,a.default)(s.default.previewContainer,n)}),i.default.createElement("div",{className:(0,a.default)(s.default.preview,{[s.default.emptyPreview]:!t})},t))}u.__bit_component={id:"teambit.explorer/ui/gallery/base-component-card@0.0.492",homepage:"https://bit.dev/teambit/explorer/ui/gallery/base-component-card",exported:!0},t.PreviewContainer=u},83550:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCardGroup=void 0;const i=r(n(41594)),a=n(84517),s=n(83131),u=n(18019);function c(e){var{title:t,components:n}=e,r=o(e,["title","components"]);return i.default.createElement("div",Object.assign({},r),t&&i.default.createElement(a.H2,null,t),i.default.createElement(s.ComponentGrid,null,n.map((e=>i.default.createElement(u.ComponentCard,Object.assign({key:e.id},e))))))}c.__bit_component={id:"teambit.explorer/ui/gallery/component-card-group@1.96.1",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-card-group",exported:!0},t.ComponentCardGroup=c},62130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCardGroup=void 0;var o=n(83550);Object.defineProperty(t,"ComponentCardGroup",{enumerable:!0,get:function(){return o.ComponentCardGroup}})},17603:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentCard=void 0;const r=o(n(41594)),i=n(27664),a=n(4972),s=o(n(52522));function u({id:e="",className:t,preview:n,version:o,description:u,envIcon:c,isDeprecated:l=!1,href:d,external:p}){return r.default.createElement(a.Card,{className:t},r.default.createElement(i.Link,{className:s.default.componentCardLink,href:d||e,external:p},r.default.createElement(a.DeprecationSticker,{isDeprecated:l}),r.default.createElement(a.PreviewContainer,{preview:n}),r.default.createElement(a.ComponentDetails,{id:e,version:o,description:u,className:s.default.content}),r.default.createElement("div",{className:s.default.bottom},r.default.createElement("div",{className:s.default.left}),r.default.createElement("img",{src:c,className:s.default.img}))))}u.__bit_component={id:"teambit.explorer/ui/gallery/component-card@0.0.495",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-card",exported:!0},t.ComponentCard=u},18019:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(17603),t)},40001:function(e,t,n){"use strict";var o=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentGrid=void 0;const i=r(n(41594)),a=r(n(88443)),s=r(n(5368));function u(e){var{children:t,className:n}=e,r=o(e,["children","className"]);return i.default.createElement("div",Object.assign({className:(0,a.default)(s.default.componentGrid,n)},r),t)}u.__bit_component={id:"teambit.explorer/ui/gallery/component-grid@0.0.486",homepage:"https://bit.dev/teambit/explorer/ui/gallery/component-grid",exported:!0},t.ComponentGrid=u},83131:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(40001),t)},77107:(e,t)=>{"use strict";function n(e,t){return e.length>t?`${e.substring(0,t)}...`:e}Object.defineProperty(t,"__esModule",{value:!0}),t.ellipsis=void 0,n.__bit_component={id:"teambit.toolbox/string/ellipsis@0.0.173",homepage:"https://bit.dev/teambit/toolbox/string/ellipsis",exported:!0},t.ellipsis=n},45582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ellipsis=void 0;var o=n(77107);Object.defineProperty(t,"ellipsis",{enumerable:!0,get:function(){return o.ellipsis}})},2890:(e,t,n)=>{"use strict";var o={id:"teambit.harmony/bit@1.8.122",homepage:"https://bit.cloud/teambit/harmony/bit",exported:!0};function r(){const e=a(n(41594));return r=function(){return e},e}function i(){const e=n(17575);return i=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BitLogo=void 0,r.__bit_component=o,i.__bit_component=o,a.__bit_component=o;const s=()=>r().default.createElement("div",{style:{width:"50%",margin:"auto"}},r().default.createElement(i().Logo,{customSize:64}));s.__bit_component=o,t.BitLogo=s},66894:(e,t,n)=>{"use strict";var o={id:"teambit.harmony/bit@1.8.122",homepage:"https://bit.cloud/teambit/harmony/bit",exported:!0};function r(){const e=a(n(41594));return r=function(){return e},e}function i(){const e=n(27431);return i=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}function s(){return r().default.createElement(i().WhatIsBit,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.abstract=void 0,t.default=s,t.tags=void 0,r.__bit_component=o,i.__bit_component=o,a.__bit_component=o,t.tags=["components","software","composable","component-driven","collaboration","development","design","product","architecture","compounding"],t.abstract="Bit is an open source toolchain for component-driven software",s.__bit_component=o},10388:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__sELLz"}},50506:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={centerColumn:"page-frame_centerColumn__XBa-t",wideColumn:"page-frame_wideColumn__NAkt5",textColumn:"page-frame_textColumn__UPfoU"}},30404:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={}},42059:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={bitCard:"what-is-bit_bitCard__6HJgs",logo:"what-is-bit_logo__xM-ZV"}},33747:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={xxs:"heading-sizes_xxs__SWEOY",xs:"heading-sizes_xs__Hy8ol",sm:"heading-sizes_sm__tI7SK",md:"heading-sizes_md__joonV",lg:"heading-sizes_lg__Ltd1S",xl:"heading-sizes_xl__HDfIw",xxl:"heading-sizes_xxl__cFNob"}},8910:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={h1:"heading_h1__nOnz4",h2:"heading_h2__uEyK2",h3:"heading_h3__HdM7Z",h4:"heading_h4__v8USx",h5:"heading_h5__6jcVl",h6:"heading_h6__k7dDb"}},85945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={h1:"margins_h1__e8-sd"}},27517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={ellipsis:"ellipsis_ellipsis__C8hJ8",ellipsisDiv:"ellipsis_ellipsisDiv__9Db5W"}},98592:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentCard:"card_componentCard__Ak9CZ"}},1378:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={deprecated:"deprecation-sticker_deprecated__mKzkW",show:"deprecation-sticker_show__3kEmz"}},3238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={content:"details_content__ifC+P",nameSpace:"details_nameSpace__5bRzq",name:"details_name__znUu1",versionHolder:"details_versionHolder__9dygA",img:"details_img__MjuDx",description:"details_description__PPRv6"}},13586:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={previewContainer:"preview-container_previewContainer__hrQXX",preview:"preview-container_preview__zRjHm",emptyPreview:"preview-container_emptyPreview__YnS1o"}},52522:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentCardLink:"component-card_componentCardLink__Q4l2Z",bottom:"component-card_bottom__kipWC",size:"component-card_size__zZUte",dot:"component-card_dot__FksAd",img:"component-card_img__l5R9+"}},5368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={componentGrid:"component-grid_componentGrid__pGx6B"}},59132:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzU0IiBoZWlnaHQ9IjM1NCIgdmlld0JveD0iMCAwIDM1NCAzNTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNzcgMzQ4QzI3MS40NDEgMzQ4IDM0OCAyNzEuNDQxIDM0OCAxNzdDMzQ4IDgyLjU1OTMgMjcxLjQ0MSA2IDE3NyA2QzgyLjU1OTMgNiA2IDgyLjU1OTMgNiAxNzdDNiAyNzEuNDQxIDgyLjU1OTMgMzQ4IDE3NyAzNDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXIpIiBzdHJva2U9IiM3QjcwQjYiIHN0cm9rZS13aWR0aD0iMTIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNjEuMjY1IDE5MS43MDlDMTYxLjI2NSAyMDkuNzI3IDE1MC41MjggMjIxLjMyOCAxMzEuMjc1IDIyMS4zMjhDMTI0LjM2NCAyMjEuMzI4IDExNy45NDcgMjE5Ljk3MSAxMTMuMDEgMjE3LjEzMkMxMDcuMzMzIDIxMy45MjMgMTA3LjMzMyAyMDkuODUxIDEwNy4zMzMgMjA1LjY1NVYxNDMuMzMxQzEwNy4zMzMgMTM4Ljg4OCAxMTAuMDQ4IDEzNi42NjcgMTE1LjYwMiAxMzYuNjY3QzEyMS4xNTUgMTM2LjY2NyAxMjMuODcgMTM4Ljg4OCAxMjMu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5IDY0LjY1ODEgNjUuNTgyNCA4Ny45ODA1IDUzIDExNyIgc3Ryb2tlPSIjN0I3MEI2IiBzdHJva2Utd2lkdGg9IjEyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhciIgeDE9IjE3NyIgeTE9IjEyIiB4Mj0iMTc3IiB5Mj0iMzM4Ljc5NiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjNzMzOThEIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzU5NEE5NSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo="},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href;var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>r,compositions_metadata:()=>a,overview:()=>i});var e=n(2890),t=n(66894);const r=[e],i=[t],a={compositions:[{displayName:"Bit logo",identifier:"BitLogo"}]}})(),o})()));
|
package/artifacts/schema.json
CHANGED
package/dist/bootstrap.js
CHANGED
|
@@ -68,9 +68,9 @@ function _logger() {
|
|
|
68
68
|
};
|
|
69
69
|
return data;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const data =
|
|
73
|
-
|
|
71
|
+
function _legacy2() {
|
|
72
|
+
const data = require("@teambit/legacy.loader");
|
|
73
|
+
_legacy2 = function () {
|
|
74
74
|
return data;
|
|
75
75
|
};
|
|
76
76
|
return data;
|
|
@@ -153,7 +153,7 @@ function enableLoaderIfPossible() {
|
|
|
153
153
|
// status alias
|
|
154
154
|
'compile', 'start', 'add', 'show', 'tag', 'build', 'create', 'test', 'install', 'update', 'link', 'import', 'log', 'checkout', 'merge', 'diff', 'env', 'envs'];
|
|
155
155
|
if (safeCommandsForLoader.includes(process.argv[2]) && !_logger().shouldDisableConsole && !_logger().shouldDisableLoader) {
|
|
156
|
-
|
|
156
|
+
_legacy2().loader.on();
|
|
157
157
|
// loader.start('loading bit...');
|
|
158
158
|
}
|
|
159
159
|
}
|
package/dist/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_bluebird","data","_interopRequireDefault","require","_chalk","_fsExtra","_semver","_bit","_legacy","_cli","_constants","_logger","
|
|
1
|
+
{"version":3,"names":["_bluebird","data","_interopRequireDefault","require","_chalk","_fsExtra","_semver","_bit","_legacy","_cli","_constants","_logger","_legacy2","e","__esModule","default","RECOMMENDED_NODE_VERSIONS","SUPPORTED_NODE_VERSIONS","process","env","MEMFS_DONT_WARN","EventEmitter","defaultMaxListeners","on","err","handleUnhandledRejection","Bluebird","config","longStackTraces","Boolean","BLUEBIRD_DEBUG","BIT_LOG","bootstrap","enableLoaderIfPossible","printBitVersionIfAsked","warnIfRunningAsRoot","verifyNodeVersionCompatibility","ensureDirectories","Analytics","promptAnalyticsIfNeeded","fs","ensureDir","GLOBAL_CONFIG","GLOBAL_LOGS","nodeVersion","versions","node","split","isCompatible","semver","satisfies","console","log","chalk","red","exit","isRecommended","yellow","isRoot","getuid","printWarning","argv","includes","harmonyVersion","getBitVersionGracefully","BIT_VERSION","safeCommandsForLoader","shouldDisableConsole","shouldDisableLoader","loader"],"sources":["bootstrap.ts"],"sourcesContent":["import Bluebird from 'bluebird';\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\nimport semver from 'semver';\nimport { getBitVersionGracefully } from '@teambit/bit.get-bit-version';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport { handleUnhandledRejection } from '@teambit/cli';\nimport { BIT_VERSION, GLOBAL_CONFIG, GLOBAL_LOGS } from '@teambit/legacy/dist/constants';\nimport { printWarning, shouldDisableConsole, shouldDisableLoader } from '@teambit/legacy/dist/logger/logger';\nimport { loader } from '@teambit/legacy.loader';\n\nconst RECOMMENDED_NODE_VERSIONS = '>=20.0.0 <21.0.0';\nconst SUPPORTED_NODE_VERSIONS = '>=16.0.0 <21.0.0';\n\nprocess.env.MEMFS_DONT_WARN = 'true'; // suppress fs experimental warnings from memfs\n\nrequire('events').EventEmitter.defaultMaxListeners = 100; // set max listeners to a more appropriate numbers\n\nrequire('regenerator-runtime/runtime');\n\n// eslint-disable-next-line @typescript-eslint/no-misused-promises\nprocess.on('unhandledRejection', async (err: any) => handleUnhandledRejection(err));\n\n// by default Bluebird enables the longStackTraces when env is `development`, or when\n// BLUEBIRD_DEBUG is set.\n// the drawback of enabling it all the time is a performance hit. (see http://bluebirdjs.com/docs/api/promise.longstacktraces.html)\n// some commands are slower by 20% with this enabled.\nBluebird.config({\n longStackTraces: Boolean(process.env.BLUEBIRD_DEBUG || process.env.BIT_LOG),\n});\n\nexport async function bootstrap() {\n enableLoaderIfPossible();\n printBitVersionIfAsked();\n warnIfRunningAsRoot();\n verifyNodeVersionCompatibility();\n await ensureDirectories();\n await Analytics.promptAnalyticsIfNeeded();\n}\n\nasync function ensureDirectories() {\n await fs.ensureDir(GLOBAL_CONFIG);\n await fs.ensureDir(GLOBAL_LOGS);\n}\n\nfunction verifyNodeVersionCompatibility() {\n const nodeVersion = process.versions.node.split('-')[0];\n const isCompatible = semver.satisfies(nodeVersion, SUPPORTED_NODE_VERSIONS);\n if (!isCompatible) {\n // eslint-disable-next-line no-console\n console.log(\n chalk.red(\n `Node version ${nodeVersion} is not supported, please use Node.js ${SUPPORTED_NODE_VERSIONS}.\nIf you must use legacy versions of Node.js, please use our binary installation methods. https://docs.bit.dev/docs/installation`\n )\n );\n process.exit(1);\n }\n const isRecommended = semver.satisfies(nodeVersion, RECOMMENDED_NODE_VERSIONS);\n if (!isRecommended) {\n // eslint-disable-next-line no-console\n console.log(\n chalk.yellow(\n `warning - use Node ${RECOMMENDED_NODE_VERSIONS} for best performance. Using Node ${nodeVersion} may cause regressions.`\n )\n );\n }\n}\n\nfunction warnIfRunningAsRoot() {\n const isRoot = process.getuid && process.getuid() === 0;\n if (isRoot) {\n printWarning('running bit as root might cause permission issues later');\n }\n}\n\nexport function printBitVersionIfAsked() {\n if (process.argv[2]) {\n if (['-V', '-v', '--version'].includes(process.argv[2])) {\n const harmonyVersion = getBitVersionGracefully();\n if (harmonyVersion) {\n console.log(harmonyVersion); // eslint-disable-line no-console\n } else {\n console.log(BIT_VERSION); // eslint-disable-line no-console\n }\n process.exit();\n }\n }\n}\n\n/**\n * once Yargs and Harmony are fully loaded we have all commands instances and we are able to\n * determine whether or not the loader should be loaded.\n * in this phase, all we have are the args from the cli, so we can only guess when it's ok to start\n * the loader. the reason we start it here is to have the loader report the progress of bit\n * bootstrap process, which can slow at times.\n */\nfunction enableLoaderIfPossible() {\n const safeCommandsForLoader = [\n 'status',\n 's', // status alias\n 'compile',\n 'start',\n 'add',\n 'show',\n 'tag',\n 'build',\n 'create',\n 'test',\n 'install',\n 'update',\n 'link',\n 'import',\n 'log',\n 'checkout',\n 'merge',\n 'diff',\n 'env',\n 'envs',\n ];\n if (safeCommandsForLoader.includes(process.argv[2]) && !shouldDisableConsole && !shouldDisableLoader) {\n loader.on();\n // loader.start('loading bit...');\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAStB,sBAAsBA,CAAA,EAAG;EAChC,MAAMiC,qBAAqB,GAAG,CAC5B,QAAQ,EACR,GAAG;EAAE;EACL,SAAS,EACT,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,KAAK,EACL,UAAU,EACV,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,CACP;EACD,IAAIA,qBAAqB,CAACJ,QAAQ,CAAC5C,OAAO,CAAC2C,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAACM,8BAAoB,IAAI,CAACC,6BAAmB,EAAE;IACpGC,iBAAM,CAAC9C,EAAE,CAAC,CAAC;IACX;EACF;AACF","ignoreList":[]}
|
package/dist/load-bit.js
CHANGED
|
@@ -79,6 +79,13 @@ function _consumer() {
|
|
|
79
79
|
};
|
|
80
80
|
return data;
|
|
81
81
|
}
|
|
82
|
+
function _workspaceModules() {
|
|
83
|
+
const data = require("@teambit/workspace.modules.workspace-locator");
|
|
84
|
+
_workspaceModules = function () {
|
|
85
|
+
return data;
|
|
86
|
+
};
|
|
87
|
+
return data;
|
|
88
|
+
}
|
|
82
89
|
function _legacy() {
|
|
83
90
|
const data = require("@teambit/legacy.bit-map");
|
|
84
91
|
_legacy = function () {
|
|
@@ -114,9 +121,9 @@ function _componentOverrides() {
|
|
|
114
121
|
};
|
|
115
122
|
return data;
|
|
116
123
|
}
|
|
117
|
-
function
|
|
124
|
+
function _workspaceModules2() {
|
|
118
125
|
const data = require("@teambit/workspace.modules.node-modules-linker");
|
|
119
|
-
|
|
126
|
+
_workspaceModules2 = function () {
|
|
120
127
|
return data;
|
|
121
128
|
};
|
|
122
129
|
return data;
|
|
@@ -236,7 +243,7 @@ async function loadLegacyConfig(config) {
|
|
|
236
243
|
await harmony.run(async (aspect, runtime) => requireAspects(aspect, runtime));
|
|
237
244
|
}
|
|
238
245
|
async function getConfig(cwd = process.cwd()) {
|
|
239
|
-
const consumerInfo = await (0,
|
|
246
|
+
const consumerInfo = await (0, _workspaceModules().getWorkspaceInfo)(cwd);
|
|
240
247
|
const scopePath = (0, _scopeModules().findScopePath)(cwd);
|
|
241
248
|
let wsConfig;
|
|
242
249
|
if (consumerInfo) {
|
|
@@ -294,7 +301,7 @@ async function getWsConfig(consumerPath) {
|
|
|
294
301
|
* @param config
|
|
295
302
|
*/
|
|
296
303
|
function attachVersionsFromBitmap(rawConfig, consumerInfo) {
|
|
297
|
-
if (!consumerInfo || !consumerInfo.hasBitMap || !consumerInfo.
|
|
304
|
+
if (!consumerInfo || !consumerInfo.hasBitMap || !consumerInfo.hasWorkspaceConfig) {
|
|
298
305
|
return rawConfig;
|
|
299
306
|
}
|
|
300
307
|
const rawBitmap = _legacy().BitMap.loadRawSync(consumerInfo.path);
|
|
@@ -459,7 +466,7 @@ async function runCLI() {
|
|
|
459
466
|
* of the previous workspace, which leads to hard-to-debug issues.
|
|
460
467
|
*/
|
|
461
468
|
function clearGlobalsIfNeeded() {
|
|
462
|
-
if (!_consumer().loadConsumer.cache && !
|
|
469
|
+
if (!_consumer().loadConsumer.cache && !_workspaceModules2().PackageJsonTransformer.packageJsonTransformersRegistry.length) {
|
|
463
470
|
return;
|
|
464
471
|
}
|
|
465
472
|
delete _consumer().loadConsumer.cache;
|
|
@@ -485,9 +492,9 @@ function takeLegacyGlobalsSnapshot() {
|
|
|
485
492
|
value: _componentConfig().default.componentConfigLoadingRegistry,
|
|
486
493
|
empty: {}
|
|
487
494
|
}, {
|
|
488
|
-
classInstance:
|
|
495
|
+
classInstance: _workspaceModules2().PackageJsonTransformer,
|
|
489
496
|
methodName: 'packageJsonTransformersRegistry',
|
|
490
|
-
value:
|
|
497
|
+
value: _workspaceModules2().PackageJsonTransformer.packageJsonTransformersRegistry,
|
|
491
498
|
empty: []
|
|
492
499
|
}, {
|
|
493
500
|
classInstance: _componentLoader().default,
|
package/dist/load-bit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","_aspectLoader","data","_commentJson","_interopRequireDefault","_userHome","_cli","_config","_harmony","_harmonyConfig","_configReader","_legacyBitId","_consumer","_legacy","_bitError","_componentLoader","_componentConfig","_componentOverrides","_workspaceModules","_semver","_bit","_clearCache","_config2","_workspaceConfig","_componentId","_scopeModules","_logger","_legacy2","_fsExtra","_path","_manifests","_bit2","_bitMain","e","__esModule","default","process","on","err","console","error","exit","env","BROWSERSLIST_IGNORE_OLD_DATA","loadLegacyConfig","config","harmony","Harmony","load","ConfigAspect","ConfigRuntime","name","toObject","run","aspect","runtime","requireAspects","getConfig","cwd","consumerInfo","getConsumerInfo","scopePath","findScopePath","wsConfig","getWsConfig","path","attachVersionsFromBitmap","scopeConfig","scopeConfigPath","join","readConfigFile","globalConfigPath","userHome","globalConfig","mergedConfig","mergeConfigs","Config","workspaceConfig","hostConfig","depsResolver","json","assign","consumerPath","wsPath","fileContent","readFile","includes","Error","constructor","message","location","line","column","toString","rawConfig","hasBitMap","hasConsumerConfig","rawBitmap","BitMap","loadRawSync","parsedBitMap","parse","undefined","_bit_lane","removeNonComponentFields","BitError","defaultScope","allBitmapIds","Object","keys","map","id","getComponentIdFromComponentJson","bitMapBitIds","ComponentIdList","fromArray","result","entries","reduce","acc","aspectId","aspectConfig","newAspectEntry","VERSION_DELIMITER","manifestsMap","versionFromBitmap","getVersionFromBitMapIds","aspectBitId","ComponentID","fromString","found","searchWithoutVersion","searchWithoutScopeAndVersion","hasVersion","version","dirPath","getAspectDistDir","files","readdir","runtimeFile","find","file","resolve","getMainAspect","mainAspectDir","getAspectDir","BitAspect","packageName","getCoreAspectPackageName","packageJson","getCoreAspectName","shouldLoadInSafeMode","currentCommand","argv","commandsThatCanRunInSafeMode","hasSafeModeFlag","isClearCacheCommand","shouldRunAsDaemon","BIT_DAEMON","loadBit","clearGlobalsIfNeeded","logger","info","registerCoreExtensions","configMap","verifyEngine","aspectsToLoad","CLIAspect","loadCLIOnly","push","ClearCacheAspect","isDaemon","MainRuntime","aspectLoader","get","setCoreAspects","values","setMainAspect","bitConfig","engine","bitVersion","getBitVersion","satisfies","msg","engineStrict","runCLI","cli","hasWorkspace","loadConsumer","cache","PackageJsonTransformer","packageJsonTransformersRegistry","length","legacyGlobals","takeLegacyGlobalsSnapshot","forEach","global","classInstance","methodName","empty","ComponentLoader","value","onComponentLoadSubscribers","ComponentOverrides","componentOverridesLoadingRegistry","ComponentConfig","componentConfigLoadingRegistry","loadDeps","ExtensionDataList","toModelObjectsHook","WorkspaceConfig","workspaceConfigLoadingRegistry","ExternalActions","externalActions","restoreGlobalsFromSnapshot","snapshot"],"sources":["load-bit.ts"],"sourcesContent":["/* eslint-disable import/no-dynamic-require */\n/* eslint-disable import/first */\nprocess.on('uncaughtException', (err) => {\n // eslint-disable-next-line no-console\n console.error('uncaughtException', err);\n\n process.exit(1);\n});\n\nprocess.env.BROWSERSLIST_IGNORE_OLD_DATA = 'true';\n\nimport './hook-require';\n\nimport {\n getAspectDir,\n getAspectDistDir,\n AspectLoaderMain,\n getCoreAspectPackageName,\n getCoreAspectName,\n} from '@teambit/aspect-loader';\nimport json from 'comment-json';\nimport userHome from 'user-home';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ConfigAspect, ConfigRuntime } from '@teambit/config';\nimport { Harmony, RuntimeDefinition, Extension } from '@teambit/harmony';\n// TODO: expose this types from harmony (once we have a way to expose it only for node)\nimport { Config } from '@teambit/harmony/dist/harmony-config';\nimport { readConfigFile } from '@teambit/harmony/dist/harmony-config/config-reader';\nimport { VERSION_DELIMITER } from '@teambit/legacy-bit-id';\nimport { getConsumerInfo, loadConsumer } from '@teambit/legacy/dist/consumer';\nimport { ConsumerInfo } from '@teambit/legacy/dist/consumer/consumer-locator';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { BitError } from '@teambit/bit-error';\nimport ComponentLoader from '@teambit/legacy/dist/consumer/component/component-loader';\nimport ComponentConfig from '@teambit/legacy/dist/consumer/config/component-config';\nimport ComponentOverrides from '@teambit/legacy/dist/consumer/config/component-overrides';\nimport { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';\nimport { satisfies } from 'semver';\nimport { getBitVersion } from '@teambit/bit.get-bit-version';\nimport { ClearCacheAspect } from '@teambit/clear-cache';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config';\nimport WorkspaceConfig from '@teambit/legacy/dist/consumer/config/workspace-config';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { ExternalActions } from '@teambit/legacy.scope-api';\nimport { readdir, readFile } from 'fs-extra';\nimport { resolve, join } from 'path';\nimport { manifestsMap } from './manifests';\nimport { BitAspect } from './bit.aspect';\nimport { registerCoreExtensions } from './bit.main.runtime';\nimport { BitConfig } from './bit.provider';\n\nasync function loadLegacyConfig(config: any) {\n const harmony = await Harmony.load([ConfigAspect], ConfigRuntime.name, config.toObject());\n await harmony.run(async (aspect: Extension, runtime: RuntimeDefinition) => requireAspects(aspect, runtime));\n}\n\nasync function getConfig(cwd = process.cwd()) {\n const consumerInfo = await getConsumerInfo(cwd);\n const scopePath = findScopePath(cwd);\n\n let wsConfig;\n if (consumerInfo) {\n wsConfig = await getWsConfig(consumerInfo.path);\n attachVersionsFromBitmap(wsConfig, consumerInfo);\n }\n\n let scopeConfig;\n if (scopePath && !consumerInfo) {\n const scopeConfigPath = join(scopePath, 'scope.jsonc');\n scopeConfig = await readConfigFile(scopeConfigPath, false);\n }\n\n const globalConfigPath = join(userHome, '.bitrc.jsonc');\n const globalConfig = await readConfigFile(globalConfigPath, false);\n // We don't use the harmonyConfig.loadGlobal as we want to manually merge it in a better way\n // harmony merge will prioritize the global config over the workspace config\n // and won't know to handle the dependency resolver config merge\n const mergedConfig = mergeConfigs(globalConfig, wsConfig, scopeConfig);\n\n return new Config(mergedConfig);\n}\n\nfunction mergeConfigs(\n globalConfig: Record<string, any> = {},\n workspaceConfig?: Record<string, any>,\n scopeConfig?: Record<string, any>\n) {\n const hostConfig = workspaceConfig || scopeConfig || {};\n // merge the dependency resolver from the global config with the workspace/scope config\n const depsResolver = json.assign(\n globalConfig['teambit.dependencies/dependency-resolver'] || {},\n hostConfig['teambit.dependencies/dependency-resolver'] || {}\n );\n const mergedConfig = json.assign(globalConfig, workspaceConfig);\n json.assign(mergedConfig, { 'teambit.dependencies/dependency-resolver': depsResolver });\n return mergedConfig;\n}\n\nasync function getWsConfig(consumerPath: string) {\n try {\n const config = await readConfigFile(join(consumerPath, 'workspace.jsonc'), false);\n return config;\n } catch (err: any) {\n // file is there. otherwise, readConfigFile wouldn't throw.\n const wsPath = join(consumerPath, 'workspace.jsonc');\n const fileContent = await readFile(wsPath, 'utf-8');\n // if it has conflicts markers, ask the user to fix them\n if (fileContent.includes('<<<<<<<') || fileContent.includes('>>>>>>>')) {\n throw new Error(`please fix the conflicts in workspace.jsonc to continue`);\n }\n if (err.constructor.name === 'ReadConfigError' && err.err?.message) {\n const location = err.err.line && err.err.column ? ` (${err.err.line}:${err.err.column})` : '';\n throw new Error(`failed parsing the workspace.jsonc file at ${wsPath}. error: ${err.err.toString()}${location}`);\n }\n throw err;\n }\n}\n\n/**\n * This will attach versions of aspects configured in the config without version by resolves them from the bitmap file\n * It's required in order to support a usecase which you develop a local aspect and configure it in your workspace.jsonc\n * in that case you always want the workspace.jsonc config to be linked to your local aspect\n * but you don't want to change your workspace.jsonc version after each tag of the aspect\n * @param config\n */\nfunction attachVersionsFromBitmap(rawConfig: Record<string, any>, consumerInfo: ConsumerInfo): Record<string, any> {\n if (!consumerInfo || !consumerInfo.hasBitMap || !consumerInfo.hasConsumerConfig) {\n return rawConfig;\n }\n const rawBitmap = BitMap.loadRawSync(consumerInfo.path);\n let parsedBitMap = {};\n try {\n parsedBitMap = rawBitmap ? json.parse(rawBitmap?.toString('utf8'), undefined, true) : {};\n // @todo: remove this if statement once we don't need the migration of the bitmap file for lanes\n // @ts-ignore\n if (parsedBitMap?._bit_lane?.name) {\n // backward compatibility. if \"_bit_land\" has the old format, then, later, when the bitmap is loaded again,\n // it'll take care of the migration.\n parsedBitMap = {};\n }\n BitMap.removeNonComponentFields(parsedBitMap);\n // Do nothing here, invalid bitmaps will be handled later\n // eslint-disable-next-line no-empty\n } catch (e: any) {}\n const wsConfig = rawConfig['teambit.workspace/workspace'];\n if (!wsConfig) throw new BitError('workspace.jsonc is missing the \"teambit.workspace/workspace\" property');\n const defaultScope = wsConfig.defaultScope;\n if (!defaultScope)\n throw new BitError('workspace.jsonc is missing the \"defaultScope\" property in \"teambit.workspace/workspace\"');\n const allBitmapIds = Object.keys(parsedBitMap).map((id) =>\n BitMap.getComponentIdFromComponentJson(id, parsedBitMap[id], defaultScope)\n );\n const bitMapBitIds = ComponentIdList.fromArray(allBitmapIds);\n const result = Object.entries(rawConfig).reduce((acc, [aspectId, aspectConfig]) => {\n let newAspectEntry = aspectId;\n // In case the id already has a version we don't want to get it from the bitmap\n // We also don't want to add versions for core aspects\n if (!aspectId.includes(VERSION_DELIMITER) && !manifestsMap[aspectId]) {\n const versionFromBitmap = getVersionFromBitMapIds(bitMapBitIds, aspectId);\n if (versionFromBitmap) {\n newAspectEntry = `${aspectId}${VERSION_DELIMITER}${versionFromBitmap}`;\n }\n }\n acc[newAspectEntry] = aspectConfig;\n return acc;\n }, {});\n return result;\n}\n\nfunction getVersionFromBitMapIds(allBitmapIds: ComponentIdList, aspectId: string): string | undefined {\n let aspectBitId: ComponentID;\n try {\n aspectBitId = ComponentID.fromString(aspectId);\n } catch (err: any) {\n throw new Error(\n `unable to parse the component-id \"${aspectId}\" from the workspace.jsonc file, make sure this is a component id`\n );\n }\n // start by searching id in the bitmap with exact match (including scope name)\n // in case the aspect is not exported yet, it will be in the bitmap without a scope,\n // while in the aspect id it will have the default scope\n const found =\n allBitmapIds.searchWithoutVersion(aspectBitId) || allBitmapIds.searchWithoutScopeAndVersion(aspectBitId);\n return found && found.hasVersion() ? found.version : undefined;\n}\n\nexport async function requireAspects(aspect: Extension, runtime: RuntimeDefinition) {\n const id = aspect.name;\n if (!id) throw new Error('could not retrieve aspect id');\n const dirPath = getAspectDistDir(id);\n const files = await readdir(dirPath);\n const runtimeFile = files.find((file) => file.includes(`.${runtime.name}.runtime.js`));\n if (!runtimeFile) return;\n // eslint-disable-next-line\n require(resolve(`${dirPath}/${runtimeFile}`));\n}\n\nfunction getMainAspect() {\n const mainAspectDir = getAspectDir(BitAspect.id);\n let version: string | undefined;\n const packageName = getCoreAspectPackageName(BitAspect.id);\n\n try {\n // eslint-disable-next-line global-require\n const packageJson = require(`${mainAspectDir}/package.json`);\n version = packageJson.version;\n } catch (err: any) {\n version = undefined;\n }\n\n return {\n path: mainAspectDir,\n version,\n packageName,\n aspect: BitAspect,\n name: getCoreAspectName(BitAspect.id),\n id: BitAspect.id,\n };\n}\n\n/**\n * Bit may crush during the aspect loading phase or workspace/consumer initialization.\n * normally, this is the desired behavior, however, some commands are there to help overcome these\n * errors, such as \"bit clear-cache\". for these commands we're better off loading the bare minimum,\n * which is only the CLI aspect.\n *\n * at this stage we don't have the commands objects, so we can't check the command/flags from there\n * instead, we have to check the `process.argv.` directly instead, which is not 100% accurate.\n */\nfunction shouldLoadInSafeMode() {\n const currentCommand = process.argv[2];\n // harmony commands need the aspects to be loaded and register to the CLI aspect in order to work properly.\n const commandsThatCanRunInSafeMode = [\n 'dependents',\n 'remote',\n 'doctor',\n 'cat-version-history',\n 'cat-component',\n 'cat-scope',\n 'cat-object',\n 'config',\n 'run-action',\n ];\n const hasSafeModeFlag = process.argv.includes('--safe-mode');\n return isClearCacheCommand() || (hasSafeModeFlag && commandsThatCanRunInSafeMode.includes(currentCommand));\n}\n\nfunction isClearCacheCommand() {\n return process.argv[2] === 'clear-cache' || process.argv[2] === 'cc';\n}\n\nfunction shouldRunAsDaemon() {\n return process.env.BIT_DAEMON === 'true';\n}\n\nexport async function loadBit(path = process.cwd()) {\n clearGlobalsIfNeeded();\n logger.info(`*** Loading Bit *** argv:\\n${process.argv.join('\\n')}`);\n const config = await getConfig(path);\n registerCoreExtensions();\n await loadLegacyConfig(config);\n const configMap = config.toObject();\n configMap[BitAspect.id] ||= {};\n configMap[BitAspect.id].cwd = path;\n verifyEngine(configMap[BitAspect.id]);\n\n const aspectsToLoad = [CLIAspect];\n const loadCLIOnly = shouldLoadInSafeMode();\n if (isClearCacheCommand()) aspectsToLoad.push(ClearCacheAspect);\n if (!loadCLIOnly) {\n aspectsToLoad.push(BitAspect);\n }\n if (shouldRunAsDaemon()) {\n logger.isDaemon = true;\n }\n const harmony = await Harmony.load(aspectsToLoad, MainRuntime.name, configMap);\n\n await harmony.run(async (aspect: Extension, runtime: RuntimeDefinition) => requireAspects(aspect, runtime));\n if (loadCLIOnly) return harmony;\n const aspectLoader = harmony.get<AspectLoaderMain>('teambit.harmony/aspect-loader');\n aspectLoader.setCoreAspects(Object.values(manifestsMap));\n aspectLoader.setMainAspect(getMainAspect());\n return harmony;\n}\n\nfunction verifyEngine(bitConfig: BitConfig) {\n if (!bitConfig.engine) {\n return;\n }\n const bitVersion = getBitVersion();\n if (satisfies(bitVersion, bitConfig.engine)) {\n return;\n }\n const msg = `your bit version \"${bitVersion}\" doesn't satisfies the required \"${bitConfig.engine}\" version\nplease run \"bvm install ${bitConfig.engine}\" to install and use a specific version of Bit.`;\n if (bitConfig.engineStrict) {\n throw new Error(`error: ${msg}`);\n }\n logger.console(msg, 'warn', 'yellow');\n}\n\nexport async function runCLI() {\n const harmony = await loadBit();\n const cli = harmony.get<CLIMain>('teambit.harmony/cli');\n let hasWorkspace = true;\n try {\n harmony.get('teambit.workspace/workspace');\n } catch (err: any) {\n hasWorkspace = false;\n }\n await cli.run(hasWorkspace);\n}\n\nexport type LegacyGlobal = { classInstance: any; methodName: string; value: any; empty: any };\n\n/**\n * loadBit may gets called multiple times (currently, it's happening during e2e-tests that call loadBit).\n * when it happens, the static methods in this function still have the callbacks that were added in\n * the previous loadBit call. this callbacks have the old data such as workspace/bitmap/consumer\n * of the previous workspace, which leads to hard-to-debug issues.\n */\nfunction clearGlobalsIfNeeded() {\n if (!loadConsumer.cache && !PackageJsonTransformer.packageJsonTransformersRegistry.length) {\n return;\n }\n delete loadConsumer.cache;\n\n const legacyGlobals = takeLegacyGlobalsSnapshot();\n legacyGlobals.forEach((global) => {\n global.classInstance[global.methodName] = global.empty;\n });\n}\n\nexport function takeLegacyGlobalsSnapshot(): LegacyGlobal[] {\n const legacyGlobals: LegacyGlobal[] = [\n {\n classInstance: ComponentLoader,\n methodName: 'onComponentLoadSubscribers',\n value: ComponentLoader.onComponentLoadSubscribers,\n empty: [],\n },\n {\n classInstance: ComponentOverrides,\n methodName: 'componentOverridesLoadingRegistry',\n value: ComponentOverrides.componentOverridesLoadingRegistry,\n empty: {},\n },\n {\n classInstance: ComponentConfig,\n methodName: 'componentConfigLoadingRegistry',\n value: ComponentConfig.componentConfigLoadingRegistry,\n empty: {},\n },\n {\n classInstance: PackageJsonTransformer,\n methodName: 'packageJsonTransformersRegistry',\n value: PackageJsonTransformer.packageJsonTransformersRegistry,\n empty: [],\n },\n { classInstance: ComponentLoader, methodName: 'loadDeps', value: ComponentLoader.loadDeps, empty: undefined },\n {\n classInstance: ExtensionDataList,\n methodName: 'toModelObjectsHook',\n value: ExtensionDataList.toModelObjectsHook,\n empty: [],\n },\n {\n classInstance: WorkspaceConfig,\n methodName: 'workspaceConfigLoadingRegistry',\n value: WorkspaceConfig.workspaceConfigLoadingRegistry,\n empty: undefined,\n },\n {\n classInstance: ExternalActions,\n methodName: 'externalActions',\n value: ExternalActions.externalActions,\n empty: [],\n },\n ];\n\n return legacyGlobals;\n}\n\nexport function restoreGlobalsFromSnapshot(snapshot: LegacyGlobal[]) {\n snapshot.forEach((global) => {\n global.classInstance[global.methodName] = global.value;\n });\n}\n"],"mappings":";;;;;;;;;;AAWAA,OAAA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AAED,0BAAe,CAACO,QAAQ;IAAER,KAAK,EAAEjG;EAAU,CAAC,EAC7G;IACE+F,aAAa,EAAEW,4BAAiB;IAChCV,UAAU,EAAE,oBAAoB;IAChCG,KAAK,EAAEO,4BAAiB,CAACC,kBAAkB;IAC3CV,KAAK,EAAE;EACT,CAAC,EACD;IACEF,aAAa,EAAEa,0BAAe;IAC9BZ,UAAU,EAAE,gCAAgC;IAC5CG,KAAK,EAAES,0BAAe,CAACC,8BAA8B;IACrDZ,KAAK,EAAEjG;EACT,CAAC,EACD;IACE+F,aAAa,EAAEe,0BAAe;IAC9Bd,UAAU,EAAE,iBAAiB;IAC7BG,KAAK,EAAEW,0BAAe,CAACC,eAAe;IACtCd,KAAK,EAAE;EACT,CAAC,CACF;EAED,OAAON,aAAa;AACtB;AAEO,SAASqB,0BAA0BA,CAACC,QAAwB,EAAE;EACnEA,QAAQ,CAACpB,OAAO,CAAEC,MAAM,IAAK;IAC3BA,MAAM,CAACC,aAAa,CAACD,MAAM,CAACE,UAAU,CAAC,GAAGF,MAAM,CAACK,KAAK;EACxD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["require","_aspectLoader","data","_commentJson","_interopRequireDefault","_userHome","_cli","_config","_harmony","_harmonyConfig","_configReader","_legacyBitId","_consumer","_workspaceModules","_legacy","_bitError","_componentLoader","_componentConfig","_componentOverrides","_workspaceModules2","_semver","_bit","_clearCache","_config2","_workspaceConfig","_componentId","_scopeModules","_logger","_legacy2","_fsExtra","_path","_manifests","_bit2","_bitMain","e","__esModule","default","process","on","err","console","error","exit","env","BROWSERSLIST_IGNORE_OLD_DATA","loadLegacyConfig","config","harmony","Harmony","load","ConfigAspect","ConfigRuntime","name","toObject","run","aspect","runtime","requireAspects","getConfig","cwd","consumerInfo","getWorkspaceInfo","scopePath","findScopePath","wsConfig","getWsConfig","path","attachVersionsFromBitmap","scopeConfig","scopeConfigPath","join","readConfigFile","globalConfigPath","userHome","globalConfig","mergedConfig","mergeConfigs","Config","workspaceConfig","hostConfig","depsResolver","json","assign","consumerPath","wsPath","fileContent","readFile","includes","Error","constructor","message","location","line","column","toString","rawConfig","hasBitMap","hasWorkspaceConfig","rawBitmap","BitMap","loadRawSync","parsedBitMap","parse","undefined","_bit_lane","removeNonComponentFields","BitError","defaultScope","allBitmapIds","Object","keys","map","id","getComponentIdFromComponentJson","bitMapBitIds","ComponentIdList","fromArray","result","entries","reduce","acc","aspectId","aspectConfig","newAspectEntry","VERSION_DELIMITER","manifestsMap","versionFromBitmap","getVersionFromBitMapIds","aspectBitId","ComponentID","fromString","found","searchWithoutVersion","searchWithoutScopeAndVersion","hasVersion","version","dirPath","getAspectDistDir","files","readdir","runtimeFile","find","file","resolve","getMainAspect","mainAspectDir","getAspectDir","BitAspect","packageName","getCoreAspectPackageName","packageJson","getCoreAspectName","shouldLoadInSafeMode","currentCommand","argv","commandsThatCanRunInSafeMode","hasSafeModeFlag","isClearCacheCommand","shouldRunAsDaemon","BIT_DAEMON","loadBit","clearGlobalsIfNeeded","logger","info","registerCoreExtensions","configMap","verifyEngine","aspectsToLoad","CLIAspect","loadCLIOnly","push","ClearCacheAspect","isDaemon","MainRuntime","aspectLoader","get","setCoreAspects","values","setMainAspect","bitConfig","engine","bitVersion","getBitVersion","satisfies","msg","engineStrict","runCLI","cli","hasWorkspace","loadConsumer","cache","PackageJsonTransformer","packageJsonTransformersRegistry","length","legacyGlobals","takeLegacyGlobalsSnapshot","forEach","global","classInstance","methodName","empty","ComponentLoader","value","onComponentLoadSubscribers","ComponentOverrides","componentOverridesLoadingRegistry","ComponentConfig","componentConfigLoadingRegistry","loadDeps","ExtensionDataList","toModelObjectsHook","WorkspaceConfig","workspaceConfigLoadingRegistry","ExternalActions","externalActions","restoreGlobalsFromSnapshot","snapshot"],"sources":["load-bit.ts"],"sourcesContent":["/* eslint-disable import/no-dynamic-require */\n/* eslint-disable import/first */\nprocess.on('uncaughtException', (err) => {\n // eslint-disable-next-line no-console\n console.error('uncaughtException', err);\n\n process.exit(1);\n});\n\nprocess.env.BROWSERSLIST_IGNORE_OLD_DATA = 'true';\n\nimport './hook-require';\n\nimport {\n getAspectDir,\n getAspectDistDir,\n AspectLoaderMain,\n getCoreAspectPackageName,\n getCoreAspectName,\n} from '@teambit/aspect-loader';\nimport json from 'comment-json';\nimport userHome from 'user-home';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ConfigAspect, ConfigRuntime } from '@teambit/config';\nimport { Harmony, RuntimeDefinition, Extension } from '@teambit/harmony';\n// TODO: expose this types from harmony (once we have a way to expose it only for node)\nimport { Config } from '@teambit/harmony/dist/harmony-config';\nimport { readConfigFile } from '@teambit/harmony/dist/harmony-config/config-reader';\nimport { VERSION_DELIMITER } from '@teambit/legacy-bit-id';\nimport { loadConsumer } from '@teambit/legacy/dist/consumer';\nimport { getWorkspaceInfo, WorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { BitError } from '@teambit/bit-error';\nimport ComponentLoader from '@teambit/legacy/dist/consumer/component/component-loader';\nimport ComponentConfig from '@teambit/legacy/dist/consumer/config/component-config';\nimport ComponentOverrides from '@teambit/legacy/dist/consumer/config/component-overrides';\nimport { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';\nimport { satisfies } from 'semver';\nimport { getBitVersion } from '@teambit/bit.get-bit-version';\nimport { ClearCacheAspect } from '@teambit/clear-cache';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config';\nimport WorkspaceConfig from '@teambit/legacy/dist/consumer/config/workspace-config';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { ExternalActions } from '@teambit/legacy.scope-api';\nimport { readdir, readFile } from 'fs-extra';\nimport { resolve, join } from 'path';\nimport { manifestsMap } from './manifests';\nimport { BitAspect } from './bit.aspect';\nimport { registerCoreExtensions } from './bit.main.runtime';\nimport { BitConfig } from './bit.provider';\n\nasync function loadLegacyConfig(config: any) {\n const harmony = await Harmony.load([ConfigAspect], ConfigRuntime.name, config.toObject());\n await harmony.run(async (aspect: Extension, runtime: RuntimeDefinition) => requireAspects(aspect, runtime));\n}\n\nasync function getConfig(cwd = process.cwd()) {\n const consumerInfo = await getWorkspaceInfo(cwd);\n const scopePath = findScopePath(cwd);\n\n let wsConfig;\n if (consumerInfo) {\n wsConfig = await getWsConfig(consumerInfo.path);\n attachVersionsFromBitmap(wsConfig, consumerInfo);\n }\n\n let scopeConfig;\n if (scopePath && !consumerInfo) {\n const scopeConfigPath = join(scopePath, 'scope.jsonc');\n scopeConfig = await readConfigFile(scopeConfigPath, false);\n }\n\n const globalConfigPath = join(userHome, '.bitrc.jsonc');\n const globalConfig = await readConfigFile(globalConfigPath, false);\n // We don't use the harmonyConfig.loadGlobal as we want to manually merge it in a better way\n // harmony merge will prioritize the global config over the workspace config\n // and won't know to handle the dependency resolver config merge\n const mergedConfig = mergeConfigs(globalConfig, wsConfig, scopeConfig);\n\n return new Config(mergedConfig);\n}\n\nfunction mergeConfigs(\n globalConfig: Record<string, any> = {},\n workspaceConfig?: Record<string, any>,\n scopeConfig?: Record<string, any>\n) {\n const hostConfig = workspaceConfig || scopeConfig || {};\n // merge the dependency resolver from the global config with the workspace/scope config\n const depsResolver = json.assign(\n globalConfig['teambit.dependencies/dependency-resolver'] || {},\n hostConfig['teambit.dependencies/dependency-resolver'] || {}\n );\n const mergedConfig = json.assign(globalConfig, workspaceConfig);\n json.assign(mergedConfig, { 'teambit.dependencies/dependency-resolver': depsResolver });\n return mergedConfig;\n}\n\nasync function getWsConfig(consumerPath: string) {\n try {\n const config = await readConfigFile(join(consumerPath, 'workspace.jsonc'), false);\n return config;\n } catch (err: any) {\n // file is there. otherwise, readConfigFile wouldn't throw.\n const wsPath = join(consumerPath, 'workspace.jsonc');\n const fileContent = await readFile(wsPath, 'utf-8');\n // if it has conflicts markers, ask the user to fix them\n if (fileContent.includes('<<<<<<<') || fileContent.includes('>>>>>>>')) {\n throw new Error(`please fix the conflicts in workspace.jsonc to continue`);\n }\n if (err.constructor.name === 'ReadConfigError' && err.err?.message) {\n const location = err.err.line && err.err.column ? ` (${err.err.line}:${err.err.column})` : '';\n throw new Error(`failed parsing the workspace.jsonc file at ${wsPath}. error: ${err.err.toString()}${location}`);\n }\n throw err;\n }\n}\n\n/**\n * This will attach versions of aspects configured in the config without version by resolves them from the bitmap file\n * It's required in order to support a usecase which you develop a local aspect and configure it in your workspace.jsonc\n * in that case you always want the workspace.jsonc config to be linked to your local aspect\n * but you don't want to change your workspace.jsonc version after each tag of the aspect\n * @param config\n */\nfunction attachVersionsFromBitmap(rawConfig: Record<string, any>, consumerInfo: WorkspaceInfo): Record<string, any> {\n if (!consumerInfo || !consumerInfo.hasBitMap || !consumerInfo.hasWorkspaceConfig) {\n return rawConfig;\n }\n const rawBitmap = BitMap.loadRawSync(consumerInfo.path);\n let parsedBitMap = {};\n try {\n parsedBitMap = rawBitmap ? json.parse(rawBitmap?.toString('utf8'), undefined, true) : {};\n // @todo: remove this if statement once we don't need the migration of the bitmap file for lanes\n // @ts-ignore\n if (parsedBitMap?._bit_lane?.name) {\n // backward compatibility. if \"_bit_land\" has the old format, then, later, when the bitmap is loaded again,\n // it'll take care of the migration.\n parsedBitMap = {};\n }\n BitMap.removeNonComponentFields(parsedBitMap);\n // Do nothing here, invalid bitmaps will be handled later\n // eslint-disable-next-line no-empty\n } catch (e: any) {}\n const wsConfig = rawConfig['teambit.workspace/workspace'];\n if (!wsConfig) throw new BitError('workspace.jsonc is missing the \"teambit.workspace/workspace\" property');\n const defaultScope = wsConfig.defaultScope;\n if (!defaultScope)\n throw new BitError('workspace.jsonc is missing the \"defaultScope\" property in \"teambit.workspace/workspace\"');\n const allBitmapIds = Object.keys(parsedBitMap).map((id) =>\n BitMap.getComponentIdFromComponentJson(id, parsedBitMap[id], defaultScope)\n );\n const bitMapBitIds = ComponentIdList.fromArray(allBitmapIds);\n const result = Object.entries(rawConfig).reduce((acc, [aspectId, aspectConfig]) => {\n let newAspectEntry = aspectId;\n // In case the id already has a version we don't want to get it from the bitmap\n // We also don't want to add versions for core aspects\n if (!aspectId.includes(VERSION_DELIMITER) && !manifestsMap[aspectId]) {\n const versionFromBitmap = getVersionFromBitMapIds(bitMapBitIds, aspectId);\n if (versionFromBitmap) {\n newAspectEntry = `${aspectId}${VERSION_DELIMITER}${versionFromBitmap}`;\n }\n }\n acc[newAspectEntry] = aspectConfig;\n return acc;\n }, {});\n return result;\n}\n\nfunction getVersionFromBitMapIds(allBitmapIds: ComponentIdList, aspectId: string): string | undefined {\n let aspectBitId: ComponentID;\n try {\n aspectBitId = ComponentID.fromString(aspectId);\n } catch (err: any) {\n throw new Error(\n `unable to parse the component-id \"${aspectId}\" from the workspace.jsonc file, make sure this is a component id`\n );\n }\n // start by searching id in the bitmap with exact match (including scope name)\n // in case the aspect is not exported yet, it will be in the bitmap without a scope,\n // while in the aspect id it will have the default scope\n const found =\n allBitmapIds.searchWithoutVersion(aspectBitId) || allBitmapIds.searchWithoutScopeAndVersion(aspectBitId);\n return found && found.hasVersion() ? found.version : undefined;\n}\n\nexport async function requireAspects(aspect: Extension, runtime: RuntimeDefinition) {\n const id = aspect.name;\n if (!id) throw new Error('could not retrieve aspect id');\n const dirPath = getAspectDistDir(id);\n const files = await readdir(dirPath);\n const runtimeFile = files.find((file) => file.includes(`.${runtime.name}.runtime.js`));\n if (!runtimeFile) return;\n // eslint-disable-next-line\n require(resolve(`${dirPath}/${runtimeFile}`));\n}\n\nfunction getMainAspect() {\n const mainAspectDir = getAspectDir(BitAspect.id);\n let version: string | undefined;\n const packageName = getCoreAspectPackageName(BitAspect.id);\n\n try {\n // eslint-disable-next-line global-require\n const packageJson = require(`${mainAspectDir}/package.json`);\n version = packageJson.version;\n } catch (err: any) {\n version = undefined;\n }\n\n return {\n path: mainAspectDir,\n version,\n packageName,\n aspect: BitAspect,\n name: getCoreAspectName(BitAspect.id),\n id: BitAspect.id,\n };\n}\n\n/**\n * Bit may crush during the aspect loading phase or workspace/consumer initialization.\n * normally, this is the desired behavior, however, some commands are there to help overcome these\n * errors, such as \"bit clear-cache\". for these commands we're better off loading the bare minimum,\n * which is only the CLI aspect.\n *\n * at this stage we don't have the commands objects, so we can't check the command/flags from there\n * instead, we have to check the `process.argv.` directly instead, which is not 100% accurate.\n */\nfunction shouldLoadInSafeMode() {\n const currentCommand = process.argv[2];\n // harmony commands need the aspects to be loaded and register to the CLI aspect in order to work properly.\n const commandsThatCanRunInSafeMode = [\n 'dependents',\n 'remote',\n 'doctor',\n 'cat-version-history',\n 'cat-component',\n 'cat-scope',\n 'cat-object',\n 'config',\n 'run-action',\n ];\n const hasSafeModeFlag = process.argv.includes('--safe-mode');\n return isClearCacheCommand() || (hasSafeModeFlag && commandsThatCanRunInSafeMode.includes(currentCommand));\n}\n\nfunction isClearCacheCommand() {\n return process.argv[2] === 'clear-cache' || process.argv[2] === 'cc';\n}\n\nfunction shouldRunAsDaemon() {\n return process.env.BIT_DAEMON === 'true';\n}\n\nexport async function loadBit(path = process.cwd()) {\n clearGlobalsIfNeeded();\n logger.info(`*** Loading Bit *** argv:\\n${process.argv.join('\\n')}`);\n const config = await getConfig(path);\n registerCoreExtensions();\n await loadLegacyConfig(config);\n const configMap = config.toObject();\n configMap[BitAspect.id] ||= {};\n configMap[BitAspect.id].cwd = path;\n verifyEngine(configMap[BitAspect.id]);\n\n const aspectsToLoad = [CLIAspect];\n const loadCLIOnly = shouldLoadInSafeMode();\n if (isClearCacheCommand()) aspectsToLoad.push(ClearCacheAspect);\n if (!loadCLIOnly) {\n aspectsToLoad.push(BitAspect);\n }\n if (shouldRunAsDaemon()) {\n logger.isDaemon = true;\n }\n const harmony = await Harmony.load(aspectsToLoad, MainRuntime.name, configMap);\n\n await harmony.run(async (aspect: Extension, runtime: RuntimeDefinition) => requireAspects(aspect, runtime));\n if (loadCLIOnly) return harmony;\n const aspectLoader = harmony.get<AspectLoaderMain>('teambit.harmony/aspect-loader');\n aspectLoader.setCoreAspects(Object.values(manifestsMap));\n aspectLoader.setMainAspect(getMainAspect());\n return harmony;\n}\n\nfunction verifyEngine(bitConfig: BitConfig) {\n if (!bitConfig.engine) {\n return;\n }\n const bitVersion = getBitVersion();\n if (satisfies(bitVersion, bitConfig.engine)) {\n return;\n }\n const msg = `your bit version \"${bitVersion}\" doesn't satisfies the required \"${bitConfig.engine}\" version\nplease run \"bvm install ${bitConfig.engine}\" to install and use a specific version of Bit.`;\n if (bitConfig.engineStrict) {\n throw new Error(`error: ${msg}`);\n }\n logger.console(msg, 'warn', 'yellow');\n}\n\nexport async function runCLI() {\n const harmony = await loadBit();\n const cli = harmony.get<CLIMain>('teambit.harmony/cli');\n let hasWorkspace = true;\n try {\n harmony.get('teambit.workspace/workspace');\n } catch (err: any) {\n hasWorkspace = false;\n }\n await cli.run(hasWorkspace);\n}\n\nexport type LegacyGlobal = { classInstance: any; methodName: string; value: any; empty: any };\n\n/**\n * loadBit may gets called multiple times (currently, it's happening during e2e-tests that call loadBit).\n * when it happens, the static methods in this function still have the callbacks that were added in\n * the previous loadBit call. this callbacks have the old data such as workspace/bitmap/consumer\n * of the previous workspace, which leads to hard-to-debug issues.\n */\nfunction clearGlobalsIfNeeded() {\n if (!loadConsumer.cache && !PackageJsonTransformer.packageJsonTransformersRegistry.length) {\n return;\n }\n delete loadConsumer.cache;\n\n const legacyGlobals = takeLegacyGlobalsSnapshot();\n legacyGlobals.forEach((global) => {\n global.classInstance[global.methodName] = global.empty;\n });\n}\n\nexport function takeLegacyGlobalsSnapshot(): LegacyGlobal[] {\n const legacyGlobals: LegacyGlobal[] = [\n {\n classInstance: ComponentLoader,\n methodName: 'onComponentLoadSubscribers',\n value: ComponentLoader.onComponentLoadSubscribers,\n empty: [],\n },\n {\n classInstance: ComponentOverrides,\n methodName: 'componentOverridesLoadingRegistry',\n value: ComponentOverrides.componentOverridesLoadingRegistry,\n empty: {},\n },\n {\n classInstance: ComponentConfig,\n methodName: 'componentConfigLoadingRegistry',\n value: ComponentConfig.componentConfigLoadingRegistry,\n empty: {},\n },\n {\n classInstance: PackageJsonTransformer,\n methodName: 'packageJsonTransformersRegistry',\n value: PackageJsonTransformer.packageJsonTransformersRegistry,\n empty: [],\n },\n { classInstance: ComponentLoader, methodName: 'loadDeps', value: ComponentLoader.loadDeps, empty: undefined },\n {\n classInstance: ExtensionDataList,\n methodName: 'toModelObjectsHook',\n value: ExtensionDataList.toModelObjectsHook,\n empty: [],\n },\n {\n classInstance: WorkspaceConfig,\n methodName: 'workspaceConfigLoadingRegistry',\n value: WorkspaceConfig.workspaceConfigLoadingRegistry,\n empty: undefined,\n },\n {\n classInstance: ExternalActions,\n methodName: 'externalActions',\n value: ExternalActions.externalActions,\n empty: [],\n },\n ];\n\n return legacyGlobals;\n}\n\nexport function restoreGlobalsFromSnapshot(snapshot: LegacyGlobal[]) {\n snapshot.forEach((global) => {\n global.classInstance[global.methodName] = global.value;\n });\n}\n"],"mappings":";;;;;;;;;;AAWAA,OAAA;AAEA,SAAAC,cAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOA,SAAAC,aAAA;EAAA,MAAAD,IAAA,GAAAE,sBAAA,CAAAJ,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAD,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,sBAAA,CAAAJ,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAF,OAAA;EAAAM,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK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AACC,eAAe;IACtCd,KAAK,EAAE;EACT,CAAC,CACF;EAED,OAAON,aAAa;AACtB;AAEO,SAASqB,0BAA0BA,CAACC,QAAwB,EAAE;EACnEA,QAAQ,CAACpB,OAAO,CAAEC,MAAM,IAAK;IAC3BA,MAAM,CAACC,aAAa,CAACD,MAAM,CAACE,UAAU,CAAC,GAAGF,MAAM,CAACK,KAAK;EACxD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_bit@1.8.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_bit@1.8.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_bit@1.8.122/dist/bit.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_bit@1.8.122/dist/bit.docs.js';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/server-commander.js
CHANGED
|
@@ -61,9 +61,9 @@ function _chalk() {
|
|
|
61
61
|
};
|
|
62
62
|
return data;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const data =
|
|
66
|
-
|
|
64
|
+
function _legacy() {
|
|
65
|
+
const data = require("@teambit/legacy.loader");
|
|
66
|
+
_legacy = function () {
|
|
67
67
|
return data;
|
|
68
68
|
};
|
|
69
69
|
return data;
|
|
@@ -151,7 +151,7 @@ class ServerCommander {
|
|
|
151
151
|
data,
|
|
152
152
|
exitCode
|
|
153
153
|
} = results;
|
|
154
|
-
|
|
154
|
+
_legacy().loader.off();
|
|
155
155
|
const dataToPrint = typeof data === 'string' ? data : JSON.stringify(data, undefined, 2);
|
|
156
156
|
// eslint-disable-next-line no-console
|
|
157
157
|
console.log(dataToPrint);
|
|
@@ -162,7 +162,7 @@ class ServerCommander {
|
|
|
162
162
|
if (err instanceof ScopeNotFound || err instanceof ServerPortFileNotFound || err instanceof ServerIsNotRunning) {
|
|
163
163
|
throw err;
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
_legacy().loader.off();
|
|
166
166
|
// eslint-disable-next-line no-console
|
|
167
167
|
console.error(_chalk().default.red(err.message));
|
|
168
168
|
process.exit(1);
|
|
@@ -190,7 +190,7 @@ class ServerCommander {
|
|
|
190
190
|
// parse the args and options from the command
|
|
191
191
|
const args = process.argv.slice(2);
|
|
192
192
|
if (!args.includes('--json') && !args.includes('-j')) {
|
|
193
|
-
|
|
193
|
+
_legacy().loader.on();
|
|
194
194
|
}
|
|
195
195
|
const endpoint = `cli-raw`;
|
|
196
196
|
const pwd = process.cwd();
|
|
@@ -313,7 +313,7 @@ Please run the command "bit server-forever" first to start the server.`));
|
|
|
313
313
|
method,
|
|
314
314
|
args
|
|
315
315
|
} = parsed;
|
|
316
|
-
|
|
316
|
+
_legacy().loader[method](...(args || []));
|
|
317
317
|
});
|
|
318
318
|
eventSource.addEventListener('onLogWritten', event => {
|
|
319
319
|
const parsed = JSON.parse(event.data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_net","_fsExtra","_child_process","_path","_eventsource","_scopeModules","_chalk","_loader","_bootstrap","_serverForever","e","__esModule","default","ServerPortFileNotFound","Error","constructor","filePath","ServerIsNotRunning","port","ScopeNotFound","scopePath","ServerCommander","execute","results","runCommandWithHttpServer","exitCode","loader","off","dataToPrint","JSON","stringify","undefined","console","log","process","exit","err","error","chalk","red","message","shouldUseTTYPath","platform","env","BIT_CLI_SERVER_TTY","printPortIfAsked","printSocketPortIfAsked","printBitVersionIfAsked","getExistingUsedPort","url","shouldUsePTY","BIT_CLI_SERVER_PTY","connectToSocket","ttyPath","execSync","encoding","stdio","trim","initSSE","args","argv","slice","includes","on","endpoint","pwd","cwd","body","command","envBitFeatures","BIT_FEATURES","isPty","res","fetch","method","headers","code","deleteServerPortFile","join","ok","json","jsonResponse","statusText","Promise","resolve","reject","socketPort","getSocketPort","socket","net","createConnection","resetStdin","stdin","setRawMode","pause","destroy","resume","write","toString","end","stdout","cleanup","eventSource","EventSource","onerror","_error","close","addEventListener","event","parsed","parse","getExistingPort","isPortInUse","client","Socket","once","connect","host","getServerPortFilePath","fileContent","fs","readFile","parseInt","remove","findScopePath","exports","shouldUseBitServer","commandsToSkip","hasFlag","BIT_CLI_SERVER","length"],"sources":["server-commander.ts"],"sourcesContent":["/**\n * This file is responsible for interacting with bit through a long-running background process \"bit-server\" rather than directly.\n * Why not directly?\n * 1. startup cost. currently it takes around 1 second to bootstrap bit.\n * 2. an experimental package-manager saves node_modules in-memory. if a client starts a new process, it won't have the node_modules in-memory.\n *\n * In this file, there are three ways to achieve this. It's outlined in the order it was evolved.\n * The big challenge here is to show the output correctly to the client even though the server is running in a different process.\n *\n * 1. process.env.BIT_CLI_SERVER === 'true'\n * This method uses SSE - Server Send Events. The server sends events to the client with the output to print. The client listens to\n * these events and prints them. It's cumbersome. For this, the logger was changed and every time the logger needs to print to the console,\n * it was using this SSE to send events. Same with the loader.\n * Cons: Other output, such as pnpm, needs an extra effort to print - for pnpm, the \"process\" object was passed to pnpm\n * and its stdout was modified to use the SSE.\n * However, other tools that print directly to the console, such as Jest, won't work.\n *\n * 2. process.env.BIT_CLI_SERVER_TTY === 'true'\n * Because the terminal - tty is a fd (file descriptor) on mac/linux, it can be passed to the server. The server can write to this\n * fd and it will be printed to the client terminal. On the server, the process.stdout.write was monkey-patched to\n * write to the tty. (see cli-raw.route.ts file).\n * It solves the problem of Jest and other tools that print directly to the console.\n * Cons:\n * A. It doesn't work on Windows. Windows doesn't treat tty as a file descriptor.\n * B. We need two ways communication. Commands such as \"bit update\", display a prompt with option to select using the arrow keys.\n * This is not possible with the tty approach. Also, if the client hits Ctrl+C, the server won't know about it and it\n * won't kill the process.\n *\n * 3. process.env.BIT_CLI_SERVER_PTY === 'true'\n * This is the most advanced approach. It spawns a pty (pseudo terminal) process to communicate between the client and the server.\n * The client connects to the server using a socket. The server writes to the socket and the client reads from it.\n * The client also writes to the socket and the server reads from it. See server-forever.ts to understand better.\n * In order to pass terminal sequences, such as arrow keys or Ctrl+C, the stdin of the client is set to raw mode.\n * In theory, this approach could work by spawning a normal process, not pty, however, then, the stdin/stdout are non-tty,\n * and as a result, loaders such as Ora and chalk won't work.\n * With this new approach, we also support terminating and reloading the server. A new command is added\n * \"bit server-forever\", which spawns the pty-process. If the client hits Ctrl+C, this server-forever process will kill\n * the pty-process and re-load it.\n * Keep in mind, that to send the command and get the results, we still using http. The usage of the pty is only for\n * the input/output during the command.\n * I was trying to avoid the http, and use only the pty, by implementing readline to get the command from the socket,\n * but then I wasn't able to return the prompt to the user easily. So, I decided to keep the http for the request/response part.\n */\n\nimport fetch from 'node-fetch';\nimport net from 'net';\nimport fs from 'fs-extra';\nimport { execSync } from 'child_process';\nimport { join } from 'path';\nimport EventSource from 'eventsource';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport chalk from 'chalk';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { printBitVersionIfAsked } from './bootstrap';\nimport { getSocketPort } from './server-forever';\n\nclass ServerPortFileNotFound extends Error {\n constructor(filePath: string) {\n super(`server port file not found at ${filePath}`);\n }\n}\nclass ServerIsNotRunning extends Error {\n constructor(port: number) {\n super(`bit server is not running on port ${port}`);\n }\n}\nclass ScopeNotFound extends Error {\n constructor(scopePath: string) {\n super(`scope not found at ${scopePath}`);\n }\n}\n\ntype CommandResult = { data: any; exitCode: number };\n\nexport class ServerCommander {\n async execute() {\n try {\n const results = await this.runCommandWithHttpServer();\n if (results) {\n const { data, exitCode } = results;\n loader.off();\n const dataToPrint = typeof data === 'string' ? data : JSON.stringify(data, undefined, 2);\n // eslint-disable-next-line no-console\n console.log(dataToPrint);\n process.exit(exitCode);\n }\n\n process.exit(0);\n } catch (err: any) {\n if (err instanceof ScopeNotFound || err instanceof ServerPortFileNotFound || err instanceof ServerIsNotRunning) {\n throw err;\n }\n loader.off();\n // eslint-disable-next-line no-console\n console.error(chalk.red(err.message));\n process.exit(1);\n }\n }\n\n private shouldUseTTYPath() {\n if (process.platform === 'win32') return false; // windows doesn't support tty path\n return process.env.BIT_CLI_SERVER_TTY === 'true';\n }\n\n async runCommandWithHttpServer(): Promise<CommandResult | undefined> {\n await this.printPortIfAsked();\n this.printSocketPortIfAsked();\n printBitVersionIfAsked();\n const port = await this.getExistingUsedPort();\n const url = `http://localhost:${port}/api`;\n const shouldUsePTY = process.env.BIT_CLI_SERVER_PTY === 'true';\n\n if (shouldUsePTY) {\n await this.connectToSocket();\n }\n const ttyPath = this.shouldUseTTYPath()\n ? execSync('tty', {\n encoding: 'utf8',\n stdio: ['inherit', 'pipe', 'pipe'],\n }).trim()\n : undefined;\n if (!ttyPath && !shouldUsePTY) this.initSSE(url);\n // parse the args and options from the command\n const args = process.argv.slice(2);\n if (!args.includes('--json') && !args.includes('-j')) {\n loader.on();\n }\n const endpoint = `cli-raw`;\n const pwd = process.cwd();\n const body = { command: args, pwd, envBitFeatures: process.env.BIT_FEATURES, ttyPath, isPty: shouldUsePTY };\n let res;\n try {\n res = await fetch(`${url}/${endpoint}`, {\n method: 'post',\n body: JSON.stringify(body),\n headers: { 'Content-Type': 'application/json' },\n });\n } catch (err: any) {\n if (err.code === 'ECONNREFUSED') {\n await this.deleteServerPortFile();\n throw new ServerIsNotRunning(port);\n }\n throw new Error(`failed to run command \"${args.join(' ')}\" on the server. ${err.message}`);\n }\n\n if (res.ok) {\n const results = await res.json();\n return results;\n }\n\n let jsonResponse;\n try {\n jsonResponse = await res.json();\n } catch (e: any) {\n // the response is not json, ignore the body.\n }\n throw new Error(jsonResponse?.message || jsonResponse || res.statusText);\n }\n\n private async connectToSocket() {\n return new Promise<void>((resolve, reject) => {\n const socketPort = getSocketPort();\n const socket = net.createConnection({ port: socketPort });\n\n const resetStdin = () => {\n process.stdin.setRawMode(false);\n process.stdin.pause();\n };\n\n // Handle errors that occur before or after connection\n socket.on('error', (err: any) => {\n if (err.code === 'ECONNREFUSED') {\n reject(\n new Error(`Error: Unable to connect to the socket on port ${socketPort}.\nPlease run the command \"bit server-forever\" first to start the server.`)\n );\n }\n resetStdin();\n socket.destroy(); // Ensure the socket is fully closed\n reject(err);\n });\n\n // Handle successful connection\n socket.on('connect', () => {\n process.stdin.setRawMode(true);\n process.stdin.resume();\n\n // Forward stdin to the socket\n process.stdin.on('data', (data: any) => {\n socket.write(data);\n\n // Detect Ctrl+C (hex code '03')\n if (data.toString('hex') === '03') {\n // Important to write it to the socket so the server knows to kill the PTY process\n process.stdin.setRawMode(false);\n process.stdin.pause();\n socket.end();\n process.exit();\n }\n });\n\n // Forward data from the socket to stdout\n socket.on('data', (data: any) => {\n process.stdout.write(data);\n });\n\n // Handle socket close and end events\n const cleanup = () => {\n resetStdin();\n socket.destroy();\n };\n\n socket.on('close', cleanup);\n socket.on('end', cleanup);\n\n resolve(); // Connection successful, resolve the Promise\n });\n });\n }\n\n /**\n * Initialize the server-sent events (SSE) connection to the server.\n * This is used to print the logs and show the loader during the command.\n * Without this, it only shows the response from http server, but not the \"logger.console\" or \"logger.setStatusLine\" texts.\n *\n * I wasn't able to find a better way to do it. The challenge here is that the http server is running in a different\n * process, which is not connected to the current process in any way. (unlike the IDE which is its child process and\n * can access its stdout).\n * One of the attempts I made is sending the \"tty\" path to the server and let the server console log to that path, but\n * it didn't work well. It was printed only after the response came back from the server.\n */\n private initSSE(url: string) {\n const eventSource = new EventSource(`${url}/sse-events`);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n eventSource.onerror = (_error: any) => {\n // eslint-disable-next-line no-console\n // console.error('Error occurred in SSE connection:', _error);\n // probably was unable to connect to the server and will throw ServerNotFound right after. no need to show this error.\n eventSource.close();\n };\n eventSource.addEventListener('onLoader', (event: any) => {\n const parsed = JSON.parse(event.data);\n const { method, args } = parsed;\n loader[method](...(args || []));\n });\n eventSource.addEventListener('onLogWritten', (event: any) => {\n const parsed = JSON.parse(event.data);\n process.stdout.write(parsed.message);\n });\n }\n\n private async printPortIfAsked() {\n if (!process.argv.includes('cli-server-port')) return;\n try {\n const port = await this.getExistingUsedPort();\n process.stdout.write(port.toString());\n process.exit(0);\n } catch (err: any) {\n if (err instanceof ScopeNotFound || err instanceof ServerPortFileNotFound || err instanceof ServerIsNotRunning) {\n process.exit(0);\n }\n console.error(err.message); // eslint-disable-line no-console\n process.exit(1);\n }\n }\n\n private printSocketPortIfAsked() {\n if (!process.argv.includes('cli-server-socket-port')) return;\n try {\n const port = getSocketPort();\n process.stdout.write(port.toString());\n process.exit(0);\n } catch (err: any) {\n console.error(err.message); // eslint-disable-line no-console\n process.exit(1);\n }\n }\n\n private async getExistingUsedPort(): Promise<number> {\n const port = await this.getExistingPort();\n const isPortInUse = await this.isPortInUse(port);\n if (!isPortInUse) {\n await this.deleteServerPortFile();\n throw new ServerIsNotRunning(port);\n }\n\n return port;\n }\n\n private isPortInUse(port: number): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const client = new net.Socket();\n\n client.once('error', (err: any) => {\n if (err.code === 'ECONNREFUSED' || err.code === 'EHOSTUNREACH') {\n resolve(false);\n } else {\n reject(err);\n }\n });\n\n client.once('connect', () => {\n client.end();\n resolve(true);\n });\n\n client.connect({ port, host: 'localhost' });\n });\n }\n\n private async getExistingPort(): Promise<number> {\n const filePath = this.getServerPortFilePath();\n try {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parseInt(fileContent, 10);\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n throw new ServerPortFileNotFound(filePath);\n }\n throw err;\n }\n }\n\n private async deleteServerPortFile() {\n const filePath = this.getServerPortFilePath();\n await fs.remove(filePath);\n }\n\n private getServerPortFilePath() {\n const scopePath = findScopePath(process.cwd());\n if (!scopePath) {\n throw new ScopeNotFound(process.cwd());\n }\n return join(scopePath, 'server-port.txt');\n }\n}\n\nexport function shouldUseBitServer() {\n const commandsToSkip = ['start', 'run', 'watch', 'server'];\n const hasFlag =\n process.env.BIT_CLI_SERVER === 'true' ||\n process.env.BIT_CLI_SERVER === '1' ||\n process.env.BIT_CLI_SERVER_PTY === 'true' ||\n process.env.BIT_CLI_SERVER_TTY === 'true';\n return (\n hasFlag &&\n process.argv.length > 2 && // if it has no args, it shows the help\n !commandsToSkip.includes(process.argv[2])\n );\n}\n"],"mappings":";;;;;;;AA4CA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,eAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,cAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;E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S,GAAG,IAAAwG,6BAAa,EAAC1F,OAAO,CAACgC,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC9C,SAAS,EAAE;MACd,MAAM,IAAID,aAAa,CAACe,OAAO,CAACgC,GAAG,CAAC,CAAC,CAAC;IACxC;IACA,OAAO,IAAAY,YAAI,EAAC1D,SAAS,EAAE,iBAAiB,CAAC;EAC3C;AACF;AAACyG,OAAA,CAAAxG,eAAA,GAAAA,eAAA;AAEM,SAASyG,kBAAkBA,CAAA,EAAG;EACnC,MAAMC,cAAc,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;EAC1D,MAAMC,OAAO,GACX9F,OAAO,CAACS,GAAG,CAACsF,cAAc,KAAK,MAAM,IACrC/F,OAAO,CAACS,GAAG,CAACsF,cAAc,KAAK,GAAG,IAClC/F,OAAO,CAACS,GAAG,CAACQ,kBAAkB,KAAK,MAAM,IACzCjB,OAAO,CAACS,GAAG,CAACC,kBAAkB,KAAK,MAAM;EAC3C,OACEoF,OAAO,IACP9F,OAAO,CAAC0B,IAAI,CAACsE,MAAM,GAAG,CAAC;EAAI;EAC3B,CAACH,cAAc,CAACjE,QAAQ,CAAC5B,OAAO,CAAC0B,IAAI,CAAC,CAAC,CAAC,CAAC;AAE7C","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_net","_fsExtra","_child_process","_path","_eventsource","_scopeModules","_chalk","_legacy","_bootstrap","_serverForever","e","__esModule","default","ServerPortFileNotFound","Error","constructor","filePath","ServerIsNotRunning","port","ScopeNotFound","scopePath","ServerCommander","execute","results","runCommandWithHttpServer","exitCode","loader","off","dataToPrint","JSON","stringify","undefined","console","log","process","exit","err","error","chalk","red","message","shouldUseTTYPath","platform","env","BIT_CLI_SERVER_TTY","printPortIfAsked","printSocketPortIfAsked","printBitVersionIfAsked","getExistingUsedPort","url","shouldUsePTY","BIT_CLI_SERVER_PTY","connectToSocket","ttyPath","execSync","encoding","stdio","trim","initSSE","args","argv","slice","includes","on","endpoint","pwd","cwd","body","command","envBitFeatures","BIT_FEATURES","isPty","res","fetch","method","headers","code","deleteServerPortFile","join","ok","json","jsonResponse","statusText","Promise","resolve","reject","socketPort","getSocketPort","socket","net","createConnection","resetStdin","stdin","setRawMode","pause","destroy","resume","write","toString","end","stdout","cleanup","eventSource","EventSource","onerror","_error","close","addEventListener","event","parsed","parse","getExistingPort","isPortInUse","client","Socket","once","connect","host","getServerPortFilePath","fileContent","fs","readFile","parseInt","remove","findScopePath","exports","shouldUseBitServer","commandsToSkip","hasFlag","BIT_CLI_SERVER","length"],"sources":["server-commander.ts"],"sourcesContent":["/**\n * This file is responsible for interacting with bit through a long-running background process \"bit-server\" rather than directly.\n * Why not directly?\n * 1. startup cost. currently it takes around 1 second to bootstrap bit.\n * 2. an experimental package-manager saves node_modules in-memory. if a client starts a new process, it won't have the node_modules in-memory.\n *\n * In this file, there are three ways to achieve this. It's outlined in the order it was evolved.\n * The big challenge here is to show the output correctly to the client even though the server is running in a different process.\n *\n * 1. process.env.BIT_CLI_SERVER === 'true'\n * This method uses SSE - Server Send Events. The server sends events to the client with the output to print. The client listens to\n * these events and prints them. It's cumbersome. For this, the logger was changed and every time the logger needs to print to the console,\n * it was using this SSE to send events. Same with the loader.\n * Cons: Other output, such as pnpm, needs an extra effort to print - for pnpm, the \"process\" object was passed to pnpm\n * and its stdout was modified to use the SSE.\n * However, other tools that print directly to the console, such as Jest, won't work.\n *\n * 2. process.env.BIT_CLI_SERVER_TTY === 'true'\n * Because the terminal - tty is a fd (file descriptor) on mac/linux, it can be passed to the server. The server can write to this\n * fd and it will be printed to the client terminal. On the server, the process.stdout.write was monkey-patched to\n * write to the tty. (see cli-raw.route.ts file).\n * It solves the problem of Jest and other tools that print directly to the console.\n * Cons:\n * A. It doesn't work on Windows. Windows doesn't treat tty as a file descriptor.\n * B. We need two ways communication. Commands such as \"bit update\", display a prompt with option to select using the arrow keys.\n * This is not possible with the tty approach. Also, if the client hits Ctrl+C, the server won't know about it and it\n * won't kill the process.\n *\n * 3. process.env.BIT_CLI_SERVER_PTY === 'true'\n * This is the most advanced approach. It spawns a pty (pseudo terminal) process to communicate between the client and the server.\n * The client connects to the server using a socket. The server writes to the socket and the client reads from it.\n * The client also writes to the socket and the server reads from it. See server-forever.ts to understand better.\n * In order to pass terminal sequences, such as arrow keys or Ctrl+C, the stdin of the client is set to raw mode.\n * In theory, this approach could work by spawning a normal process, not pty, however, then, the stdin/stdout are non-tty,\n * and as a result, loaders such as Ora and chalk won't work.\n * With this new approach, we also support terminating and reloading the server. A new command is added\n * \"bit server-forever\", which spawns the pty-process. If the client hits Ctrl+C, this server-forever process will kill\n * the pty-process and re-load it.\n * Keep in mind, that to send the command and get the results, we still using http. The usage of the pty is only for\n * the input/output during the command.\n * I was trying to avoid the http, and use only the pty, by implementing readline to get the command from the socket,\n * but then I wasn't able to return the prompt to the user easily. So, I decided to keep the http for the request/response part.\n */\n\nimport fetch from 'node-fetch';\nimport net from 'net';\nimport fs from 'fs-extra';\nimport { execSync } from 'child_process';\nimport { join } from 'path';\nimport EventSource from 'eventsource';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport chalk from 'chalk';\nimport { loader } from '@teambit/legacy.loader';\nimport { printBitVersionIfAsked } from './bootstrap';\nimport { getSocketPort } from './server-forever';\n\nclass ServerPortFileNotFound extends Error {\n constructor(filePath: string) {\n super(`server port file not found at ${filePath}`);\n }\n}\nclass ServerIsNotRunning extends Error {\n constructor(port: number) {\n super(`bit server is not running on port ${port}`);\n }\n}\nclass ScopeNotFound extends Error {\n constructor(scopePath: string) {\n super(`scope not found at ${scopePath}`);\n }\n}\n\ntype CommandResult = { data: any; exitCode: number };\n\nexport class ServerCommander {\n async execute() {\n try {\n const results = await this.runCommandWithHttpServer();\n if (results) {\n const { data, exitCode } = results;\n loader.off();\n const dataToPrint = typeof data === 'string' ? data : JSON.stringify(data, undefined, 2);\n // eslint-disable-next-line no-console\n console.log(dataToPrint);\n process.exit(exitCode);\n }\n\n process.exit(0);\n } catch (err: any) {\n if (err instanceof ScopeNotFound || err instanceof ServerPortFileNotFound || err instanceof ServerIsNotRunning) {\n throw err;\n }\n loader.off();\n // eslint-disable-next-line no-console\n console.error(chalk.red(err.message));\n process.exit(1);\n }\n }\n\n private shouldUseTTYPath() {\n if (process.platform === 'win32') return false; // windows doesn't support tty path\n return process.env.BIT_CLI_SERVER_TTY === 'true';\n }\n\n async runCommandWithHttpServer(): Promise<CommandResult | undefined> {\n await this.printPortIfAsked();\n this.printSocketPortIfAsked();\n printBitVersionIfAsked();\n const port = await this.getExistingUsedPort();\n const url = `http://localhost:${port}/api`;\n const shouldUsePTY = process.env.BIT_CLI_SERVER_PTY === 'true';\n\n if (shouldUsePTY) {\n await this.connectToSocket();\n }\n const ttyPath = this.shouldUseTTYPath()\n ? execSync('tty', {\n encoding: 'utf8',\n stdio: ['inherit', 'pipe', 'pipe'],\n }).trim()\n : undefined;\n if (!ttyPath && !shouldUsePTY) this.initSSE(url);\n // parse the args and options from the command\n const args = process.argv.slice(2);\n if (!args.includes('--json') && !args.includes('-j')) {\n loader.on();\n }\n const endpoint = `cli-raw`;\n const pwd = process.cwd();\n const body = { command: args, pwd, envBitFeatures: process.env.BIT_FEATURES, ttyPath, isPty: shouldUsePTY };\n let res;\n try {\n res = await fetch(`${url}/${endpoint}`, {\n method: 'post',\n body: JSON.stringify(body),\n headers: { 'Content-Type': 'application/json' },\n });\n } catch (err: any) {\n if (err.code === 'ECONNREFUSED') {\n await this.deleteServerPortFile();\n throw new ServerIsNotRunning(port);\n }\n throw new Error(`failed to run command \"${args.join(' ')}\" on the server. ${err.message}`);\n }\n\n if (res.ok) {\n const results = await res.json();\n return results;\n }\n\n let jsonResponse;\n try {\n jsonResponse = await res.json();\n } catch (e: any) {\n // the response is not json, ignore the body.\n }\n throw new Error(jsonResponse?.message || jsonResponse || res.statusText);\n }\n\n private async connectToSocket() {\n return new Promise<void>((resolve, reject) => {\n const socketPort = getSocketPort();\n const socket = net.createConnection({ port: socketPort });\n\n const resetStdin = () => {\n process.stdin.setRawMode(false);\n process.stdin.pause();\n };\n\n // Handle errors that occur before or after connection\n socket.on('error', (err: any) => {\n if (err.code === 'ECONNREFUSED') {\n reject(\n new Error(`Error: Unable to connect to the socket on port ${socketPort}.\nPlease run the command \"bit server-forever\" first to start the server.`)\n );\n }\n resetStdin();\n socket.destroy(); // Ensure the socket is fully closed\n reject(err);\n });\n\n // Handle successful connection\n socket.on('connect', () => {\n process.stdin.setRawMode(true);\n process.stdin.resume();\n\n // Forward stdin to the socket\n process.stdin.on('data', (data: any) => {\n socket.write(data);\n\n // Detect Ctrl+C (hex code '03')\n if (data.toString('hex') === '03') {\n // Important to write it to the socket so the server knows to kill the PTY process\n process.stdin.setRawMode(false);\n process.stdin.pause();\n socket.end();\n process.exit();\n }\n });\n\n // Forward data from the socket to stdout\n socket.on('data', (data: any) => {\n process.stdout.write(data);\n });\n\n // Handle socket close and end events\n const cleanup = () => {\n resetStdin();\n socket.destroy();\n };\n\n socket.on('close', cleanup);\n socket.on('end', cleanup);\n\n resolve(); // Connection successful, resolve the Promise\n });\n });\n }\n\n /**\n * Initialize the server-sent events (SSE) connection to the server.\n * This is used to print the logs and show the loader during the command.\n * Without this, it only shows the response from http server, but not the \"logger.console\" or \"logger.setStatusLine\" texts.\n *\n * I wasn't able to find a better way to do it. The challenge here is that the http server is running in a different\n * process, which is not connected to the current process in any way. (unlike the IDE which is its child process and\n * can access its stdout).\n * One of the attempts I made is sending the \"tty\" path to the server and let the server console log to that path, but\n * it didn't work well. It was printed only after the response came back from the server.\n */\n private initSSE(url: string) {\n const eventSource = new EventSource(`${url}/sse-events`);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n eventSource.onerror = (_error: any) => {\n // eslint-disable-next-line no-console\n // console.error('Error occurred in SSE connection:', _error);\n // probably was unable to connect to the server and will throw ServerNotFound right after. no need to show this error.\n eventSource.close();\n };\n eventSource.addEventListener('onLoader', (event: any) => {\n const parsed = JSON.parse(event.data);\n const { method, args } = parsed;\n loader[method](...(args || []));\n });\n eventSource.addEventListener('onLogWritten', (event: any) => {\n const parsed = JSON.parse(event.data);\n process.stdout.write(parsed.message);\n });\n }\n\n private async printPortIfAsked() {\n if (!process.argv.includes('cli-server-port')) return;\n try {\n const port = await this.getExistingUsedPort();\n process.stdout.write(port.toString());\n process.exit(0);\n } catch (err: any) {\n if (err instanceof ScopeNotFound || err instanceof ServerPortFileNotFound || err instanceof ServerIsNotRunning) {\n process.exit(0);\n }\n console.error(err.message); // eslint-disable-line no-console\n process.exit(1);\n }\n }\n\n private printSocketPortIfAsked() {\n if (!process.argv.includes('cli-server-socket-port')) return;\n try {\n const port = getSocketPort();\n process.stdout.write(port.toString());\n process.exit(0);\n } catch (err: any) {\n console.error(err.message); // eslint-disable-line no-console\n process.exit(1);\n }\n }\n\n private async getExistingUsedPort(): Promise<number> {\n const port = await this.getExistingPort();\n const isPortInUse = await this.isPortInUse(port);\n if (!isPortInUse) {\n await this.deleteServerPortFile();\n throw new ServerIsNotRunning(port);\n }\n\n return port;\n }\n\n private isPortInUse(port: number): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const client = new net.Socket();\n\n client.once('error', (err: any) => {\n if (err.code === 'ECONNREFUSED' || err.code === 'EHOSTUNREACH') {\n resolve(false);\n } else {\n reject(err);\n }\n });\n\n client.once('connect', () => {\n client.end();\n resolve(true);\n });\n\n client.connect({ port, host: 'localhost' });\n });\n }\n\n private async getExistingPort(): Promise<number> {\n const filePath = this.getServerPortFilePath();\n try {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parseInt(fileContent, 10);\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n throw new ServerPortFileNotFound(filePath);\n }\n throw err;\n }\n }\n\n private async deleteServerPortFile() {\n const filePath = this.getServerPortFilePath();\n await fs.remove(filePath);\n }\n\n private getServerPortFilePath() {\n const scopePath = findScopePath(process.cwd());\n if (!scopePath) {\n throw new ScopeNotFound(process.cwd());\n }\n return join(scopePath, 'server-port.txt');\n }\n}\n\nexport function shouldUseBitServer() {\n const commandsToSkip = ['start', 'run', 'watch', 'server'];\n const hasFlag =\n process.env.BIT_CLI_SERVER === 'true' ||\n process.env.BIT_CLI_SERVER === '1' ||\n process.env.BIT_CLI_SERVER_PTY === 'true' ||\n process.env.BIT_CLI_SERVER_TTY === 'true';\n return (\n hasFlag &&\n process.argv.length > 2 && // if it has no args, it shows the help\n !commandsToSkip.includes(process.argv[2])\n );\n}\n"],"mappings":";;;;;;;AA4CA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,eAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,cAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;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AAqBA,CAAA,EAAG;IAC9B,MAAMlG,SAAS,GAAG,IAAAwG,6BAAa,EAAC1F,OAAO,CAACgC,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC9C,SAAS,EAAE;MACd,MAAM,IAAID,aAAa,CAACe,OAAO,CAACgC,GAAG,CAAC,CAAC,CAAC;IACxC;IACA,OAAO,IAAAY,YAAI,EAAC1D,SAAS,EAAE,iBAAiB,CAAC;EAC3C;AACF;AAACyG,OAAA,CAAAxG,eAAA,GAAAA,eAAA;AAEM,SAASyG,kBAAkBA,CAAA,EAAG;EACnC,MAAMC,cAAc,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;EAC1D,MAAMC,OAAO,GACX9F,OAAO,CAACS,GAAG,CAACsF,cAAc,KAAK,MAAM,IACrC/F,OAAO,CAACS,GAAG,CAACsF,cAAc,KAAK,GAAG,IAClC/F,OAAO,CAACS,GAAG,CAACQ,kBAAkB,KAAK,MAAM,IACzCjB,OAAO,CAACS,GAAG,CAACC,kBAAkB,KAAK,MAAM;EAC3C,OACEoF,OAAO,IACP9F,OAAO,CAAC0B,IAAI,CAACsE,MAAM,GAAG,CAAC;EAAI;EAC3B,CAACH,cAAc,CAACjE,QAAQ,CAAC5B,OAAO,CAAC0B,IAAI,CAAC,CAAC,CAAC,CAAC;AAE7C","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/bit",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.122",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/bit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "bit",
|
|
9
|
-
"version": "1.8.
|
|
9
|
+
"version": "1.8.122"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graceful-fs": "4.2.10",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@yarnpkg/plugin-pack": "3.2.0",
|
|
43
43
|
"@yarnpkg/core": "3.5.2",
|
|
44
44
|
"@yarnpkg/cli": "3.6.1",
|
|
45
|
-
"@teambit/legacy": "1.0.
|
|
45
|
+
"@teambit/legacy": "1.0.764",
|
|
46
46
|
"@apollo/client": "3.6.9",
|
|
47
47
|
"@teambit/harmony": "0.4.6",
|
|
48
48
|
"@teambit/design.ui.brand.logo": "1.96.2",
|
|
@@ -52,118 +52,120 @@
|
|
|
52
52
|
"@teambit/scope.modules.find-scope-path": "0.0.1",
|
|
53
53
|
"@teambit/ui-foundation.ui.navigation.react-router-adapter": "6.1.1",
|
|
54
54
|
"@teambit/base-react.navigation.link": "2.0.31",
|
|
55
|
-
"@teambit/cli": "0.0.
|
|
56
|
-
"@teambit/harmony.content.cli-reference": "2.0.
|
|
55
|
+
"@teambit/cli": "0.0.1048",
|
|
56
|
+
"@teambit/harmony.content.cli-reference": "2.0.475",
|
|
57
57
|
"@teambit/bit.get-bit-version": "0.0.1",
|
|
58
|
-
"@teambit/legacy.analytics": "0.0.
|
|
59
|
-
"@teambit/
|
|
60
|
-
"@teambit/
|
|
61
|
-
"@teambit/
|
|
62
|
-
"@teambit/
|
|
63
|
-
"@teambit/legacy.
|
|
64
|
-
"@teambit/
|
|
65
|
-
"@teambit/
|
|
66
|
-
"@teambit/
|
|
67
|
-
"@teambit/
|
|
68
|
-
"@teambit/
|
|
69
|
-
"@teambit/
|
|
70
|
-
"@teambit/
|
|
71
|
-
"@teambit/
|
|
72
|
-
"@teambit/
|
|
73
|
-
"@teambit/
|
|
74
|
-
"@teambit/
|
|
75
|
-
"@teambit/
|
|
76
|
-
"@teambit/
|
|
77
|
-
"@teambit/
|
|
78
|
-
"@teambit/
|
|
79
|
-
"@teambit/
|
|
80
|
-
"@teambit/
|
|
81
|
-
"@teambit/
|
|
82
|
-
"@teambit/
|
|
83
|
-
"@teambit/component-
|
|
84
|
-
"@teambit/component-
|
|
85
|
-
"@teambit/component-
|
|
86
|
-
"@teambit/component": "1.0.
|
|
87
|
-
"@teambit/
|
|
88
|
-
"@teambit/
|
|
89
|
-
"@teambit/
|
|
90
|
-
"@teambit/
|
|
91
|
-
"@teambit/
|
|
92
|
-
"@teambit/
|
|
93
|
-
"@teambit/
|
|
94
|
-
"@teambit/
|
|
95
|
-
"@teambit/
|
|
96
|
-
"@teambit/
|
|
97
|
-
"@teambit/
|
|
98
|
-
"@teambit/
|
|
99
|
-
"@teambit/
|
|
100
|
-
"@teambit/
|
|
101
|
-
"@teambit/
|
|
102
|
-
"@teambit/
|
|
103
|
-
"@teambit/
|
|
104
|
-
"@teambit/
|
|
105
|
-
"@teambit/
|
|
106
|
-
"@teambit/
|
|
107
|
-
"@teambit/
|
|
108
|
-
"@teambit/
|
|
109
|
-
"@teambit/
|
|
110
|
-
"@teambit/
|
|
111
|
-
"@teambit/
|
|
112
|
-
"@teambit/
|
|
113
|
-
"@teambit/
|
|
114
|
-
"@teambit/
|
|
115
|
-
"@teambit/
|
|
116
|
-
"@teambit/
|
|
117
|
-
"@teambit/
|
|
118
|
-
"@teambit/
|
|
119
|
-
"@teambit/
|
|
120
|
-
"@teambit/
|
|
121
|
-
"@teambit/
|
|
122
|
-
"@teambit/
|
|
123
|
-
"@teambit/
|
|
124
|
-
"@teambit/
|
|
125
|
-
"@teambit/
|
|
126
|
-
"@teambit/
|
|
127
|
-
"@teambit/
|
|
128
|
-
"@teambit/
|
|
129
|
-
"@teambit/
|
|
130
|
-
"@teambit/
|
|
131
|
-
"@teambit/
|
|
132
|
-
"@teambit/
|
|
133
|
-
"@teambit/
|
|
134
|
-
"@teambit/
|
|
135
|
-
"@teambit/
|
|
136
|
-
"@teambit/
|
|
137
|
-
"@teambit/
|
|
138
|
-
"@teambit/
|
|
139
|
-
"@teambit/
|
|
140
|
-
"@teambit/
|
|
141
|
-
"@teambit/react": "1.0.
|
|
142
|
-
"@teambit/
|
|
143
|
-
"@teambit/
|
|
144
|
-
"@teambit/
|
|
145
|
-
"@teambit/
|
|
146
|
-
"@teambit/
|
|
147
|
-
"@teambit/
|
|
148
|
-
"@teambit/
|
|
149
|
-
"@teambit/
|
|
150
|
-
"@teambit/
|
|
151
|
-
"@teambit/
|
|
152
|
-
"@teambit/
|
|
153
|
-
"@teambit/
|
|
154
|
-
"@teambit/
|
|
155
|
-
"@teambit/
|
|
156
|
-
"@teambit/
|
|
157
|
-
"@teambit/
|
|
158
|
-
"@teambit/
|
|
159
|
-
"@teambit/
|
|
160
|
-
"@teambit/
|
|
161
|
-
"@teambit/
|
|
162
|
-
"@teambit/
|
|
163
|
-
"@teambit/
|
|
164
|
-
"@teambit/
|
|
165
|
-
"@teambit/
|
|
166
|
-
"@teambit/
|
|
58
|
+
"@teambit/legacy.analytics": "0.0.52",
|
|
59
|
+
"@teambit/legacy.loader": "0.0.1",
|
|
60
|
+
"@teambit/aspect-loader": "1.0.471",
|
|
61
|
+
"@teambit/clear-cache": "0.0.415",
|
|
62
|
+
"@teambit/config": "0.0.1222",
|
|
63
|
+
"@teambit/legacy.bit-map": "0.0.52",
|
|
64
|
+
"@teambit/legacy.scope-api": "0.0.50",
|
|
65
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.223",
|
|
66
|
+
"@teambit/workspace.modules.workspace-locator": "0.0.1",
|
|
67
|
+
"@teambit/api-reference": "1.0.471",
|
|
68
|
+
"@teambit/api-server": "1.0.471",
|
|
69
|
+
"@teambit/application": "1.0.471",
|
|
70
|
+
"@teambit/apply": "0.0.17",
|
|
71
|
+
"@teambit/aspect": "1.0.471",
|
|
72
|
+
"@teambit/babel": "1.0.471",
|
|
73
|
+
"@teambit/builder": "1.0.471",
|
|
74
|
+
"@teambit/bundler": "1.0.471",
|
|
75
|
+
"@teambit/cache": "0.0.1141",
|
|
76
|
+
"@teambit/changelog": "1.0.471",
|
|
77
|
+
"@teambit/checkout": "1.0.471",
|
|
78
|
+
"@teambit/cloud": "0.0.747",
|
|
79
|
+
"@teambit/code": "1.0.471",
|
|
80
|
+
"@teambit/command-bar": "1.0.471",
|
|
81
|
+
"@teambit/community": "1.0.471",
|
|
82
|
+
"@teambit/compiler": "1.0.471",
|
|
83
|
+
"@teambit/component-compare": "1.0.471",
|
|
84
|
+
"@teambit/component-log": "1.0.471",
|
|
85
|
+
"@teambit/component-sizer": "1.0.471",
|
|
86
|
+
"@teambit/component-tree": "1.0.471",
|
|
87
|
+
"@teambit/component-writer": "1.0.471",
|
|
88
|
+
"@teambit/component": "1.0.471",
|
|
89
|
+
"@teambit/compositions": "1.0.471",
|
|
90
|
+
"@teambit/config-merger": "0.0.338",
|
|
91
|
+
"@teambit/dependencies": "1.0.471",
|
|
92
|
+
"@teambit/dependency-resolver": "1.0.471",
|
|
93
|
+
"@teambit/deprecation": "1.0.471",
|
|
94
|
+
"@teambit/dev-files": "1.0.471",
|
|
95
|
+
"@teambit/diagnostic": "1.0.471",
|
|
96
|
+
"@teambit/docs": "1.0.471",
|
|
97
|
+
"@teambit/doctor": "0.0.154",
|
|
98
|
+
"@teambit/eject": "1.0.471",
|
|
99
|
+
"@teambit/env": "1.0.471",
|
|
100
|
+
"@teambit/envs": "1.0.471",
|
|
101
|
+
"@teambit/eslint": "1.0.471",
|
|
102
|
+
"@teambit/export": "1.0.471",
|
|
103
|
+
"@teambit/express": "0.0.1147",
|
|
104
|
+
"@teambit/forking": "1.0.471",
|
|
105
|
+
"@teambit/formatter": "1.0.471",
|
|
106
|
+
"@teambit/generator": "1.0.472",
|
|
107
|
+
"@teambit/git": "1.0.471",
|
|
108
|
+
"@teambit/global-config": "0.0.1051",
|
|
109
|
+
"@teambit/graph": "1.0.471",
|
|
110
|
+
"@teambit/graphql": "1.0.471",
|
|
111
|
+
"@teambit/harmony-ui-app": "1.0.471",
|
|
112
|
+
"@teambit/host-initializer": "0.0.184",
|
|
113
|
+
"@teambit/html": "1.0.471",
|
|
114
|
+
"@teambit/importer": "1.0.471",
|
|
115
|
+
"@teambit/insights": "1.0.471",
|
|
116
|
+
"@teambit/install": "1.0.471",
|
|
117
|
+
"@teambit/ipc-events": "1.0.471",
|
|
118
|
+
"@teambit/isolator": "1.0.471",
|
|
119
|
+
"@teambit/issues": "1.0.471",
|
|
120
|
+
"@teambit/jest": "1.0.471",
|
|
121
|
+
"@teambit/lanes": "1.0.471",
|
|
122
|
+
"@teambit/linter": "1.0.471",
|
|
123
|
+
"@teambit/lister": "1.0.471",
|
|
124
|
+
"@teambit/logger": "0.0.1141",
|
|
125
|
+
"@teambit/mdx": "1.0.471",
|
|
126
|
+
"@teambit/merge-lanes": "1.0.471",
|
|
127
|
+
"@teambit/merging": "1.0.471",
|
|
128
|
+
"@teambit/mocha": "1.0.471",
|
|
129
|
+
"@teambit/mover": "1.0.471",
|
|
130
|
+
"@teambit/multi-compiler": "1.0.471",
|
|
131
|
+
"@teambit/multi-tester": "1.0.471",
|
|
132
|
+
"@teambit/new-component-helper": "1.0.471",
|
|
133
|
+
"@teambit/node": "1.0.471",
|
|
134
|
+
"@teambit/notifications": "1.0.471",
|
|
135
|
+
"@teambit/panels": "0.0.1050",
|
|
136
|
+
"@teambit/pkg": "1.0.471",
|
|
137
|
+
"@teambit/pnpm": "1.0.471",
|
|
138
|
+
"@teambit/prettier": "1.0.471",
|
|
139
|
+
"@teambit/preview": "1.0.471",
|
|
140
|
+
"@teambit/pubsub": "1.0.471",
|
|
141
|
+
"@teambit/react-native": "1.0.471",
|
|
142
|
+
"@teambit/react-router": "1.0.471",
|
|
143
|
+
"@teambit/react": "1.0.471",
|
|
144
|
+
"@teambit/readme": "1.0.471",
|
|
145
|
+
"@teambit/refactoring": "1.0.471",
|
|
146
|
+
"@teambit/remove": "1.0.471",
|
|
147
|
+
"@teambit/renaming": "1.0.471",
|
|
148
|
+
"@teambit/schema": "1.0.471",
|
|
149
|
+
"@teambit/scope": "1.0.471",
|
|
150
|
+
"@teambit/sidebar": "1.0.471",
|
|
151
|
+
"@teambit/sign": "1.0.471",
|
|
152
|
+
"@teambit/snapping": "1.0.471",
|
|
153
|
+
"@teambit/stash": "1.0.471",
|
|
154
|
+
"@teambit/status": "1.0.471",
|
|
155
|
+
"@teambit/tester": "1.0.471",
|
|
156
|
+
"@teambit/tracker": "1.0.471",
|
|
157
|
+
"@teambit/typescript": "1.0.471",
|
|
158
|
+
"@teambit/ui": "1.0.471",
|
|
159
|
+
"@teambit/update-dependencies": "1.0.471",
|
|
160
|
+
"@teambit/user-agent": "1.0.471",
|
|
161
|
+
"@teambit/variants": "0.0.1315",
|
|
162
|
+
"@teambit/version-history": "0.0.263",
|
|
163
|
+
"@teambit/watcher": "1.0.471",
|
|
164
|
+
"@teambit/webpack": "1.0.471",
|
|
165
|
+
"@teambit/worker": "0.0.1352",
|
|
166
|
+
"@teambit/workspace-config-files": "1.0.471",
|
|
167
|
+
"@teambit/workspace": "1.0.471",
|
|
168
|
+
"@teambit/yarn": "1.0.471"
|
|
167
169
|
},
|
|
168
170
|
"devDependencies": {
|
|
169
171
|
"@types/fs-extra": "9.0.7",
|
|
@@ -176,7 +178,7 @@
|
|
|
176
178
|
},
|
|
177
179
|
"peerDependencies": {
|
|
178
180
|
"react": "17.0.2",
|
|
179
|
-
"@teambit/legacy": "1.0.
|
|
181
|
+
"@teambit/legacy": "1.0.764",
|
|
180
182
|
"@types/react": "^17.0.73"
|
|
181
183
|
},
|
|
182
184
|
"license": "Apache-2.0",
|