@teambit/scope 1.0.233 → 1.0.235
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_scope_scope-preview.js +1 -1
- package/artifacts/schema.json +6 -6
- package/dist/{preview-1713094078096.js → preview-1713185629502.js} +2 -2
- package/dist/scope-aspects-loader.js +21 -2
- package/dist/scope-aspects-loader.js.map +1 -1
- package/package.json +16 -16
|
@@ -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.scope/scope@1.0.
|
|
3
|
+
<testsuite name="teambit.scope/scope@1.0.235" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see teambit_scope_scope-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.scope/scope-preview"]=t():e["teambit.scope/scope-preview"]=t()}(self,(()=>(()=>{var e={95154:(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)}()},69920:(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)}()},48525:()=>{!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(e){}void 0!==HTMLElement.prototype.nativeFocus||e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)})}}()},5163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNavigator=t.isBrowser=t.off=t.on=t.noop=void 0,t.noop=function(){},t.on=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)},t.off=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)},t.isBrowser="undefined"!=typeof window,t.isNavigator="undefined"!=typeof navigator},72181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(41594);t.default=function(e){o.useEffect(e,[])}},59905:(e,t,n)=>{"use strict";var o=n(41594),r=n(5163),i=r.isBrowser?window:null,a=function(e){return!!e.addEventListener},s=function(e){return!!e.on};t.A=function(e,t,n,c){void 0===n&&(n=i),o.useEffect((function(){if(t&&n)return a(n)?r.on(n,e,t,c):s(n)&&n.on(e,t,c),function(){a(n)?r.off(n,e,t,c):s(n)&&n.off(e,t,c)}}),[e,t,n,JSON.stringify(c)])}},85847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(97160),r=n(41594),i=o.__importDefault(n(457));t.default=function(e){var t=r.useRef(0),n=r.useState(e),o=n[0],a=n[1],s=r.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[o,s]}},457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(97160),r=n(41594),i=o.__importDefault(n(72181));t.default=function(e){var t=r.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},97476:(e,t,n)=>{"use strict";var o=n(97160),r=n(41594),i=o.__importDefault(n(85847)),a=n(5163);t.A=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isBrowser?window.innerWidth:e,height:a.isBrowser?window.innerHeight:t}),o=n[0],s=n[1];return r.useEffect((function(){if(a.isBrowser){var e=function(){s({width:window.innerWidth,height:window.innerHeight})};return a.on(window,"resize",e),function(){a.off(window,"resize",e)}}}),[]),o}},8304: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(95154)),s=r(n(5181));function c(e){var{alt:t,className:n,fullWidth:r}=e,c=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},c,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}c.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=c},55341: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(8304),t)},34834:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>y});var o=n(41594),r=n.n(o),i=n(69920),a=n.n(i);n(48525);const s=ReactDom;var c=n(59905),l=n(97476),u=n(97160),p=function(e){return e+"ms"},f={getBoundingClientRect:function(){return{height:0,left:0,top:0,width:0}},style:{transform:null}},d=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom Image":n,a=e.onUnload,d=e.onLoad,m=e.overlayBgColorEnd,h=void 0===m?"rgba(255, 255, 255, 0.95)":m,y=e.overlayBgColorStart,v=void 0===y?"rgba(255, 255, 255, 0)":y,b=e.parentRef,g=e.portalEl,_=void 0===g?document.body:g,w=e.scrollableEl,x=void 0===w?window:w,O=e.transitionDuration,j=void 0===O?300:O,S=e.zoomMargin,E=void 0===S?0:S,P=e.zoomZindex,T=void 0===P?2147483647:P,k=(0,o.useRef)(null),M=(0,o.useState)(0)[1],D=(0,o.useState)(!1),C=D[0],I=D[1],A=(0,o.useState)(!1),B=A[0],z=A[1],N=(0,l.A)(),R=N.width,L=N.height,F=(0,o.useCallback)((function(e){e.preventDefault(),z(!0)}),[]),W=(0,o.useCallback)((function(e){"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),z(!0))}),[]),H=(0,o.useCallback)((function(){M((function(e){return e+1})),B||z(!0)}),[B]);(0,c.A)("keydown",W,document),(0,c.A)("scroll",H,x),(0,o.useEffect)((function(){I(!0),d(),k.current&&k.current.focus({preventScroll:!0})}),[d]),(0,o.useEffect)((function(){var e=B?setTimeout(a,j):null;return function(){e&&clearTimeout(e)}}),[B,a,j]);var X=b.current||f,U=X.getBoundingClientRect(),Z=U.height,G=U.left,$=U.top,J=U.width,V=function(e){var t=e.isLoaded,n=e.isUnloading,o=e.overlayBgColorEnd,r=e.zoomZindex,i={backgroundColor:e.overlayBgColorStart,transitionDuration:p(e.transitionDuration),zIndex:r};return t&&!n&&(i.backgroundColor=o),i}({isLoaded:C,isUnloading:B,overlayBgColorEnd:h,overlayBgColorStart:v,transitionDuration:j,zoomZindex:T}),Y=function(e){var t=e.height,n=e.innerHeight,o=e.innerWidth,r=e.isLoaded,i=e.isUnloading,a=e.left,s=e.originalTransform,c=e.top,l=e.transitionDuration,f=e.width,d=e.zoomMargin,m=p(l);if(!r||i){var h=(0,u.__spreadArrays)(["scale(1)","translate(0, 0)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:h,WebkitTransform:h,transitionDuration:m,width:f}}var y=function(e){var t=e.zoomMargin,n=e.innerWidth/(e.width+t),o=e.innerHeight/(e.height+t);return Math.min(n,o)}({height:t,innerWidth:o,innerHeight:n,width:f,zoomMargin:d}),v=(o/2-(a+f/2))/y,b=(n/2-(c+t/2))/y,g=(0,u.__spreadArrays)(["scale("+y+")","translate("+v+"px, "+b+"px)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:g,WebkitTransform:g,transitionDuration:m,width:f}}({height:Z,isLoaded:C,innerHeight:L,innerWidth:R,isUnloading:B,left:G,originalTransform:X.style.transform,top:$,transitionDuration:j,width:J,zoomMargin:E});return(0,s.createPortal)(r().createElement("div",{"aria-modal":!0,"data-rmiz-overlay":!0,role:"dialog",style:V},r().createElement("div",{"data-rmiz-modal-content":!0,style:Y},t),r().createElement("button",{"aria-label":i,"data-rmiz-btn-close":!0,onClick:F,ref:k})),_)}));const m=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom image":n,a=e.overlayBgColorEnd,s=void 0===a?"rgba(255, 255, 255, 0.95)":a,c=e.overlayBgColorStart,l=void 0===c?"rgba(255, 255, 255, 0)":c,u=e.portalEl,p=e.openText,f=void 0===p?"Zoom image":p,m=e.scrollableEl,h=e.transitionDuration,y=void 0===h?300:h,v=e.wrapElement,b=void 0===v?"div":v,g=e.wrapStyle,_=e.zoomMargin,w=void 0===_?0:_,x=e.zoomZindex,O=void 0===x?2147483647:x,j=(0,o.useState)(!1),S=j[0],E=j[1],P=(0,o.useState)(!1),T=P[0],k=P[1],M=(0,o.useRef)(null),D=(0,o.useRef)(null),C=(0,o.useCallback)((function(e){S||(e.preventDefault(),E(!0))}),[S]),I=(0,o.useCallback)((function(){k(!0)}),[]),A=(0,o.useCallback)((function(){E(!1),k(!1),D.current&&D.current.focus({preventScroll:!0})}),[]),B=S&&T?"hidden":"visible";return r().createElement(o.StrictMode,null,r().createElement(b,{"data-rmiz-wrap":B,ref:M,style:g},t,r().createElement("button",{"aria-label":f,"data-rmiz-btn-open":!0,onClick:C,ref:D}),"undefined"!=typeof window&&S&&r().createElement(d,{closeText:i,onLoad:I,onUnload:A,overlayBgColorEnd:s,overlayBgColorStart:l,parentRef:M,portalEl:u,scrollableEl:m,transitionDuration:y,zoomMargin:w,zoomZindex:O},t)))}));var h=n(55341);const y=e=>{var{center:t=!0,width:n,alt:o,src:i,className:s}=e,c=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}(e,["center","width","alt","src","className"]);return r().createElement("div",{style:{width:n||"100%"},className:a()(t&&"image_center__FZ9yR",s)},r().createElement(m,null,r().createElement(h.BaseImage,Object.assign({fullWidth:!0,alt:o,src:i},c))))};y.__bit_component={id:"teambit.docs/ui/zoomable-image@1.95.0",homepage:"https://bit.dev/teambit/docs/ui/zoomable-image",exported:!0}},62395:(e,t,n)=>{"use strict";Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return o.default}});var o=r(n(14342));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0}},14342:(e,t,n)=>{"use strict";var o={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,p(n(41594));var r=n(5016),i=n(65682),a=p(n(21947)),s=p(n(5980)),c=p(n(51434)),l=n(34834),u=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign||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},f.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,o,r=m(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 m(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}p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o;var h={},y="wrapper";function v(e){var t=e.components,n=d(e,u);return(0,r.mdx)(y,f({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{scopeImage:a.default,scopeGraph:s.default,componentTypes:c.default,Image:l.Image},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Scope Overview"),(0,r.mdx)("p",null,"Scope is a server for hosting components. Scopes help teams to share and use each other's components as by preserving team autonomy through versioning, forking, storing dependencies, and collaborate on changes of independent components.\nScopes defines ownership on components, as a single team owns the components exported to scope."),(0,r.mdx)(l.Image,{width:"70%",src:a.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Full stack of functionality"),(0,r.mdx)("p",null,"Scopes host components of any kind, from React, Angular and Node modules, all the way to a frontend apps or microservices. For a scope they are all Bit Components.",(0,r.mdx)("br",{parentName:"p"}),"\n","For example, the ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev/teambit/mdx"},"MDX scope"),' contains all components relevant to handling MDX functionality in Bit. It exposes various types of components (or "APIs") to achieve this: Webpack loader, Node modules, React components and even a ',(0,r.mdx)("a",{parentName:"p",href:"/"},"Bit Aspect"),". This makes it easy for other teams to take leverage of MDX, not just as a feature but also as an API for their features."),(0,r.mdx)("p",null,"Scopes support various methods for using components, from adding as dependencies to runtime integrations, allowing the consumer to decide how whats the best solution for their use case."),(0,r.mdx)(l.Image,{width:"70%",src:c.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Team collaboration using components"),(0,r.mdx)("p",null,"Scopes provides visibility to components built by other teams, this is the first step towards better collaboration. Developers can find, use and depend on components by other teams. Instead of reinventing the wheel and rebuilding the same functionality, component visibility drives for collaboration. It is similar to how teams build with microservices and build team communication and collaboration by using each-other's APIs.",(0,r.mdx)("br",{parentName:"p"}),"\n","Moreover, developers can use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," and access to any component's source code and contribute change to collaborate on components."),(0,r.mdx)("p",null,"Bit keeps track on all these dependencies and flows, making team collaboration visible, easy to extend and optimize."),(0,r.mdx)(l.Image,{width:"70%",src:s.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Distributed and autonomous"),(0,r.mdx)("p",null,"Hosted scopes form a distributed network, where each scope is connected to the other scopes according to component dependencies. Each scope stores not only the components it hosts, but also the dependencies of those components.",(0,r.mdx)("br",{parentName:"p"}),"\n","When you export a component, the scope then does network calls to fetch the dependencies of the component from their respective scopes. This means that each scope becomes autonomous, as it contains all the dependencies needed to its components to run. In turn this makes teams more autonomous, as they can now build and use their components without having to worry about the dependencies."),(0,r.mdx)("p",null,"Scopes use standard HTTP for inner-scope communication, however, when building a network of scopes, you need to ensure scopes are able to connect to one another to fetch dependencies."),(0,r.mdx)("h2",null,"Source of truth"),(0,r.mdx)("p",null,"Scopes become the source of truth for components. Allowing different stakeholders to collaborate and work together from the same, or from different Workspaces.\nComponents can be maintained from multiple Workspaces in parallel, while Scopes are keeping them in sync, merging changes for all ends."),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," can be used to fetch component updates. Using ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," is similar to using ",(0,r.mdx)("inlineCode",{parentName:"p"},"git fetch")," where new objects are being fetched but not checked out in your workspace. "),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit import\n⡃⢐ fetching 143 components from 18 remotes. delta-only: 143, all-history: 0.\n- up to date teambit.community/ui/hero \n- up to date teambit.community/ui/homepage/sections/distribution \n- updated teambit.design/ui/layouts/sections/left-right \n- updated teambit.design/ui/layouts/sections/section-group \n- updated teambit.design/ui/layouts/sections/top-down \n")),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit export")," is used to share component changes with others. It pushes new objects from a local Workspace to a remote Scope, allowing others to keep in sync with the latest\ncomponent changes."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit export\nexported 8 components successfully to remote scope `community`\n"))))}v.__bit_component=o,v.isMDXComponent=!0},56810:(e,t,n)=>{"use strict";var o={id:"teambit.scope/scope@1.0.233",homepage:"https://bit.cloud/teambit/scope/scope",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/scope.svg"}));a.__bit_component=o,t.Logo=a},5181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__6C+Bi"}},51434:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/3a1072c009accd203fa8.png"},5980:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/ccf5ea377e3a1a72829d.png"},21947:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/aef2176d16de53259dad.png"},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React},65682:e=>{"use strict";e.exports=TeambitMdxUiMdxScopeContext},97160:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>A,__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>j,__asyncValues:()=>E,__await:()=>O,__awaiter:()=>m,__classPrivateFieldGet:()=>D,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>C,__createBinding:()=>y,__decorate:()=>s,__disposeResources:()=>z,__esDecorate:()=>l,__exportStar:()=>v,__extends:()=>r,__generator:()=>h,__importDefault:()=>M,__importStar:()=>k,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>c,__propKey:()=>p,__read:()=>g,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>_,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>b,default:()=>N});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function a(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 s(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,o){t(n,o,e)}}function l(e,t,n,o,r,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?o.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,o.name):{}),f=!1,d=n.length-1;d>=0;d--){var m={};for(var h in o)m[h]="access"===h?{}:o[h];for(var h in o.access)m.access[h]=o.access[h];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[d])("accessor"===c?{get:p.get,set:p.set}:p[l],m);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(p.get=s),(s=a(y.set))&&(p.set=s),(s=a(y.init))&&r.unshift(s)}else(s=a(y))&&("field"===c?r.unshift(s):p[l]=s)}u&&Object.defineProperty(u,o.name,p),f=!0}function u(e,t,n){for(var o=arguments.length>2,r=0;r<t.length;r++)n=o?t[r].call(e,n):t[r].call(e);return o?n:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function h(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o}function x(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){r[e]&&(o[e]=function(t){return new Promise((function(n,o){i.push([e,t,n,o])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:O(e[o](t)),done:!1}:r?r(t):t}:r}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(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)&&y(t,e,n);return T(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function D(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function C(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function A(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose]}if("function"!=typeof o)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t}var B="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o};function z(e){function t(t){e.error=e.hasError?new B(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var o=e.stack.pop();try{var r=o.dispose&&o.dispose.call(o.value);if(o.async)return Promise.resolve(r).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const N={__extends:r,__assign:i,__rest:a,__decorate:s,__param:c,__metadata:d,__awaiter:m,__generator:h,__createBinding:y,__exportStar:v,__values:b,__read:g,__spread:_,__spreadArrays:w,__spreadArray:x,__await:O,__asyncGenerator:j,__asyncDelegator:S,__asyncValues:E,__makeTemplateObject:P,__importStar:k,__importDefault:M,__classPrivateFieldGet:D,__classPrivateFieldSet:C,__classPrivateFieldIn:I,__addDisposableResource:A,__disposeResources:z}}},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.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})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var r=o.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(56810),r=(n(41594),n(5016)),i=n(65682),a=n(62395),s=["components"];function c(){return c=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},c.apply(this,arguments)}var l={},u="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(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}(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}(e,s);return(0,r.mdx)(u,c({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{ScopeOverview:a.Ay},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.Ay,{mdxType:"ScopeOverview"})))}p.isMDXComponent=!0;const f=[t],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),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.scope/scope-preview"]=t():e["teambit.scope/scope-preview"]=t()}(self,(()=>(()=>{var e={95154:(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)}()},69920:(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)}()},48525:()=>{!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(e){}void 0!==HTMLElement.prototype.nativeFocus||e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)})}}()},5163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNavigator=t.isBrowser=t.off=t.on=t.noop=void 0,t.noop=function(){},t.on=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)},t.off=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)},t.isBrowser="undefined"!=typeof window,t.isNavigator="undefined"!=typeof navigator},72181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(41594);t.default=function(e){o.useEffect(e,[])}},59905:(e,t,n)=>{"use strict";var o=n(41594),r=n(5163),i=r.isBrowser?window:null,a=function(e){return!!e.addEventListener},s=function(e){return!!e.on};t.A=function(e,t,n,c){void 0===n&&(n=i),o.useEffect((function(){if(t&&n)return a(n)?r.on(n,e,t,c):s(n)&&n.on(e,t,c),function(){a(n)?r.off(n,e,t,c):s(n)&&n.off(e,t,c)}}),[e,t,n,JSON.stringify(c)])}},85847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(97160),r=n(41594),i=o.__importDefault(n(457));t.default=function(e){var t=r.useRef(0),n=r.useState(e),o=n[0],a=n[1],s=r.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[o,s]}},457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(97160),r=n(41594),i=o.__importDefault(n(72181));t.default=function(e){var t=r.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},97476:(e,t,n)=>{"use strict";var o=n(97160),r=n(41594),i=o.__importDefault(n(85847)),a=n(5163);t.A=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isBrowser?window.innerWidth:e,height:a.isBrowser?window.innerHeight:t}),o=n[0],s=n[1];return r.useEffect((function(){if(a.isBrowser){var e=function(){s({width:window.innerWidth,height:window.innerHeight})};return a.on(window,"resize",e),function(){a.off(window,"resize",e)}}}),[]),o}},8304: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(95154)),s=r(n(5181));function c(e){var{alt:t,className:n,fullWidth:r}=e,c=o(e,["alt","className","fullWidth"]);return i.default.createElement("img",Object.assign({"data-bit-id":"teambit.base-ui/elements/image",alt:t},c,{className:a.default(s.default.image,r&&s.default.fullWidth,n)}))}c.__bit_component={id:"teambit.base-ui/elements/image@1.0.0",homepage:"https://bit.dev/teambit/base-ui/elements/image",exported:!0},t.BaseImage=c},55341: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(8304),t)},34834:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>y});var o=n(41594),r=n.n(o),i=n(69920),a=n.n(i);n(48525);const s=ReactDom;var c=n(59905),l=n(97476),u=n(97160),p=function(e){return e+"ms"},f={getBoundingClientRect:function(){return{height:0,left:0,top:0,width:0}},style:{transform:null}},d=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom Image":n,a=e.onUnload,d=e.onLoad,m=e.overlayBgColorEnd,h=void 0===m?"rgba(255, 255, 255, 0.95)":m,y=e.overlayBgColorStart,v=void 0===y?"rgba(255, 255, 255, 0)":y,b=e.parentRef,g=e.portalEl,_=void 0===g?document.body:g,w=e.scrollableEl,x=void 0===w?window:w,O=e.transitionDuration,j=void 0===O?300:O,S=e.zoomMargin,E=void 0===S?0:S,P=e.zoomZindex,T=void 0===P?2147483647:P,k=(0,o.useRef)(null),M=(0,o.useState)(0)[1],D=(0,o.useState)(!1),C=D[0],I=D[1],A=(0,o.useState)(!1),B=A[0],z=A[1],N=(0,l.A)(),R=N.width,L=N.height,F=(0,o.useCallback)((function(e){e.preventDefault(),z(!0)}),[]),W=(0,o.useCallback)((function(e){"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),z(!0))}),[]),H=(0,o.useCallback)((function(){M((function(e){return e+1})),B||z(!0)}),[B]);(0,c.A)("keydown",W,document),(0,c.A)("scroll",H,x),(0,o.useEffect)((function(){I(!0),d(),k.current&&k.current.focus({preventScroll:!0})}),[d]),(0,o.useEffect)((function(){var e=B?setTimeout(a,j):null;return function(){e&&clearTimeout(e)}}),[B,a,j]);var X=b.current||f,U=X.getBoundingClientRect(),Z=U.height,G=U.left,$=U.top,J=U.width,V=function(e){var t=e.isLoaded,n=e.isUnloading,o=e.overlayBgColorEnd,r=e.zoomZindex,i={backgroundColor:e.overlayBgColorStart,transitionDuration:p(e.transitionDuration),zIndex:r};return t&&!n&&(i.backgroundColor=o),i}({isLoaded:C,isUnloading:B,overlayBgColorEnd:h,overlayBgColorStart:v,transitionDuration:j,zoomZindex:T}),Y=function(e){var t=e.height,n=e.innerHeight,o=e.innerWidth,r=e.isLoaded,i=e.isUnloading,a=e.left,s=e.originalTransform,c=e.top,l=e.transitionDuration,f=e.width,d=e.zoomMargin,m=p(l);if(!r||i){var h=(0,u.__spreadArrays)(["scale(1)","translate(0, 0)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:h,WebkitTransform:h,transitionDuration:m,width:f}}var y=function(e){var t=e.zoomMargin,n=e.innerWidth/(e.width+t),o=e.innerHeight/(e.height+t);return Math.min(n,o)}({height:t,innerWidth:o,innerHeight:n,width:f,zoomMargin:d}),v=(o/2-(a+f/2))/y,b=(n/2-(c+t/2))/y,g=(0,u.__spreadArrays)(["scale("+y+")","translate("+v+"px, "+b+"px)"],s?[s]:[]).join(" ");return{height:t,left:a,top:c,transform:g,WebkitTransform:g,transitionDuration:m,width:f}}({height:Z,isLoaded:C,innerHeight:L,innerWidth:R,isUnloading:B,left:G,originalTransform:X.style.transform,top:$,transitionDuration:j,width:J,zoomMargin:E});return(0,s.createPortal)(r().createElement("div",{"aria-modal":!0,"data-rmiz-overlay":!0,role:"dialog",style:V},r().createElement("div",{"data-rmiz-modal-content":!0,style:Y},t),r().createElement("button",{"aria-label":i,"data-rmiz-btn-close":!0,onClick:F,ref:k})),_)}));const m=(0,o.memo)((function(e){var t=e.children,n=e.closeText,i=void 0===n?"Unzoom image":n,a=e.overlayBgColorEnd,s=void 0===a?"rgba(255, 255, 255, 0.95)":a,c=e.overlayBgColorStart,l=void 0===c?"rgba(255, 255, 255, 0)":c,u=e.portalEl,p=e.openText,f=void 0===p?"Zoom image":p,m=e.scrollableEl,h=e.transitionDuration,y=void 0===h?300:h,v=e.wrapElement,b=void 0===v?"div":v,g=e.wrapStyle,_=e.zoomMargin,w=void 0===_?0:_,x=e.zoomZindex,O=void 0===x?2147483647:x,j=(0,o.useState)(!1),S=j[0],E=j[1],P=(0,o.useState)(!1),T=P[0],k=P[1],M=(0,o.useRef)(null),D=(0,o.useRef)(null),C=(0,o.useCallback)((function(e){S||(e.preventDefault(),E(!0))}),[S]),I=(0,o.useCallback)((function(){k(!0)}),[]),A=(0,o.useCallback)((function(){E(!1),k(!1),D.current&&D.current.focus({preventScroll:!0})}),[]),B=S&&T?"hidden":"visible";return r().createElement(o.StrictMode,null,r().createElement(b,{"data-rmiz-wrap":B,ref:M,style:g},t,r().createElement("button",{"aria-label":f,"data-rmiz-btn-open":!0,onClick:C,ref:D}),"undefined"!=typeof window&&S&&r().createElement(d,{closeText:i,onLoad:I,onUnload:A,overlayBgColorEnd:s,overlayBgColorStart:l,parentRef:M,portalEl:u,scrollableEl:m,transitionDuration:y,zoomMargin:w,zoomZindex:O},t)))}));var h=n(55341);const y=e=>{var{center:t=!0,width:n,alt:o,src:i,className:s}=e,c=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}(e,["center","width","alt","src","className"]);return r().createElement("div",{style:{width:n||"100%"},className:a()(t&&"image_center__FZ9yR",s)},r().createElement(m,null,r().createElement(h.BaseImage,Object.assign({fullWidth:!0,alt:o,src:i},c))))};y.__bit_component={id:"teambit.docs/ui/zoomable-image@1.95.0",homepage:"https://bit.dev/teambit/docs/ui/zoomable-image",exported:!0}},62395:(e,t,n)=>{"use strict";Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return o.default}});var o=r(n(14342));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0}},14342:(e,t,n)=>{"use strict";var o={id:"teambit.scope/content/scope-overview@1.95.0",homepage:"https://bit.dev/teambit/scope/content/scope-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=v,p(n(41594));var r=n(5016),i=n(65682),a=p(n(21947)),s=p(n(5980)),c=p(n(51434)),l=n(34834),u=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign||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},f.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,o,r=m(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 m(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}p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o;var h={},y="wrapper";function v(e){var t=e.components,n=d(e,u);return(0,r.mdx)(y,f({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{scopeImage:a.default,scopeGraph:s.default,componentTypes:c.default,Image:l.Image},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Scope Overview"),(0,r.mdx)("p",null,"Scope is a server for hosting components. Scopes help teams to share and use each other's components as by preserving team autonomy through versioning, forking, storing dependencies, and collaborate on changes of independent components.\nScopes defines ownership on components, as a single team owns the components exported to scope."),(0,r.mdx)(l.Image,{width:"70%",src:a.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Full stack of functionality"),(0,r.mdx)("p",null,"Scopes host components of any kind, from React, Angular and Node modules, all the way to a frontend apps or microservices. For a scope they are all Bit Components.",(0,r.mdx)("br",{parentName:"p"}),"\n","For example, the ",(0,r.mdx)("a",{parentName:"p",href:"https://bit.dev/teambit/mdx"},"MDX scope"),' contains all components relevant to handling MDX functionality in Bit. It exposes various types of components (or "APIs") to achieve this: Webpack loader, Node modules, React components and even a ',(0,r.mdx)("a",{parentName:"p",href:"/"},"Bit Aspect"),". This makes it easy for other teams to take leverage of MDX, not just as a feature but also as an API for their features."),(0,r.mdx)("p",null,"Scopes support various methods for using components, from adding as dependencies to runtime integrations, allowing the consumer to decide how whats the best solution for their use case."),(0,r.mdx)(l.Image,{width:"70%",src:c.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Team collaboration using components"),(0,r.mdx)("p",null,"Scopes provides visibility to components built by other teams, this is the first step towards better collaboration. Developers can find, use and depend on components by other teams. Instead of reinventing the wheel and rebuilding the same functionality, component visibility drives for collaboration. It is similar to how teams build with microservices and build team communication and collaboration by using each-other's APIs.",(0,r.mdx)("br",{parentName:"p"}),"\n","Moreover, developers can use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," and access to any component's source code and contribute change to collaborate on components."),(0,r.mdx)("p",null,"Bit keeps track on all these dependencies and flows, making team collaboration visible, easy to extend and optimize."),(0,r.mdx)(l.Image,{width:"70%",src:s.default,mdxType:"Image"}),(0,r.mdx)("h2",null,"Distributed and autonomous"),(0,r.mdx)("p",null,"Hosted scopes form a distributed network, where each scope is connected to the other scopes according to component dependencies. Each scope stores not only the components it hosts, but also the dependencies of those components.",(0,r.mdx)("br",{parentName:"p"}),"\n","When you export a component, the scope then does network calls to fetch the dependencies of the component from their respective scopes. This means that each scope becomes autonomous, as it contains all the dependencies needed to its components to run. In turn this makes teams more autonomous, as they can now build and use their components without having to worry about the dependencies."),(0,r.mdx)("p",null,"Scopes use standard HTTP for inner-scope communication, however, when building a network of scopes, you need to ensure scopes are able to connect to one another to fetch dependencies."),(0,r.mdx)("h2",null,"Source of truth"),(0,r.mdx)("p",null,"Scopes become the source of truth for components. Allowing different stakeholders to collaborate and work together from the same, or from different Workspaces.\nComponents can be maintained from multiple Workspaces in parallel, while Scopes are keeping them in sync, merging changes for all ends."),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," can be used to fetch component updates. Using ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit import")," is similar to using ",(0,r.mdx)("inlineCode",{parentName:"p"},"git fetch")," where new objects are being fetched but not checked out in your workspace. "),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit import\n⡃⢐ fetching 143 components from 18 remotes. delta-only: 143, all-history: 0.\n- up to date teambit.community/ui/hero \n- up to date teambit.community/ui/homepage/sections/distribution \n- updated teambit.design/ui/layouts/sections/left-right \n- updated teambit.design/ui/layouts/sections/section-group \n- updated teambit.design/ui/layouts/sections/top-down \n")),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit export")," is used to share component changes with others. It pushes new objects from a local Workspace to a remote Scope, allowing others to keep in sync with the latest\ncomponent changes."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit export\nexported 8 components successfully to remote scope `community`\n"))))}v.__bit_component=o,v.isMDXComponent=!0},56900:(e,t,n)=>{"use strict";var o={id:"teambit.scope/scope@1.0.235",homepage:"https://bit.cloud/teambit/scope/scope",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/scope.svg"}));a.__bit_component=o,t.Logo=a},5181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o={fullWidth:"image_fullWidth__6C+Bi"}},51434:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/3a1072c009accd203fa8.png"},5980:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/ccf5ea377e3a1a72829d.png"},21947:(e,t,n)=>{"use strict";e.exports=n.p+"static/images/aef2176d16de53259dad.png"},5016:e=>{"use strict";e.exports=MdxJsReact},41594:e=>{"use strict";e.exports=React},65682:e=>{"use strict";e.exports=TeambitMdxUiMdxScopeContext},97160:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>A,__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>j,__asyncValues:()=>E,__await:()=>O,__awaiter:()=>m,__classPrivateFieldGet:()=>D,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>C,__createBinding:()=>y,__decorate:()=>s,__disposeResources:()=>z,__esDecorate:()=>l,__exportStar:()=>v,__extends:()=>r,__generator:()=>h,__importDefault:()=>M,__importStar:()=>k,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>c,__propKey:()=>p,__read:()=>g,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>_,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>b,default:()=>N});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function a(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 s(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,o){t(n,o,e)}}function l(e,t,n,o,r,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?o.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,o.name):{}),f=!1,d=n.length-1;d>=0;d--){var m={};for(var h in o)m[h]="access"===h?{}:o[h];for(var h in o.access)m.access[h]=o.access[h];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[d])("accessor"===c?{get:p.get,set:p.set}:p[l],m);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(p.get=s),(s=a(y.set))&&(p.set=s),(s=a(y.init))&&r.unshift(s)}else(s=a(y))&&("field"===c?r.unshift(s):p[l]=s)}u&&Object.defineProperty(u,o.name,p),f=!0}function u(e,t,n){for(var o=arguments.length>2,r=0;r<t.length;r++)n=o?t[r].call(e,n):t[r].call(e);return o?n:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function h(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o}function x(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){r[e]&&(o[e]=function(t){return new Promise((function(n,o){i.push([e,t,n,o])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:O(e[o](t)),done:!1}:r?r(t):t}:r}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(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)&&y(t,e,n);return T(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function D(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function C(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function A(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose]}if("function"!=typeof o)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t}var B="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o};function z(e){function t(t){e.error=e.hasError?new B(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var o=e.stack.pop();try{var r=o.dispose&&o.dispose.call(o.value);if(o.async)return Promise.resolve(r).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const N={__extends:r,__assign:i,__rest:a,__decorate:s,__param:c,__metadata:d,__awaiter:m,__generator:h,__createBinding:y,__exportStar:v,__values:b,__read:g,__spread:_,__spreadArrays:w,__spreadArray:x,__await:O,__asyncGenerator:j,__asyncDelegator:S,__asyncValues:E,__makeTemplateObject:P,__importStar:k,__importDefault:M,__classPrivateFieldGet:D,__classPrivateFieldSet:C,__classPrivateFieldIn:I,__addDisposableResource:A,__disposeResources:z}}},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.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})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var r=o.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(56900),r=(n(41594),n(5016)),i=n(65682),a=n(62395),s=["components"];function c(){return c=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},c.apply(this,arguments)}var l={},u="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(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}(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}(e,s);return(0,r.mdx)(u,c({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{ScopeOverview:a.Ay},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.Ay,{mdxType:"ScopeOverview"})))}p.isMDXComponent=!0;const f=[t],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),o})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"_legacy": {
|
|
93
93
|
"scope": "teambit.scope",
|
|
94
94
|
"name": "scope",
|
|
95
|
-
"version": "1.0.
|
|
95
|
+
"version": "1.0.235"
|
|
96
96
|
},
|
|
97
97
|
"_scope": "teambit.scope"
|
|
98
98
|
}
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"_legacy": {
|
|
177
177
|
"scope": "teambit.scope",
|
|
178
178
|
"name": "scope",
|
|
179
|
-
"version": "1.0.
|
|
179
|
+
"version": "1.0.235"
|
|
180
180
|
},
|
|
181
181
|
"_scope": "teambit.scope"
|
|
182
182
|
}
|
|
@@ -8020,7 +8020,7 @@
|
|
|
8020
8020
|
"_legacy": {
|
|
8021
8021
|
"scope": "teambit.scope",
|
|
8022
8022
|
"name": "scope",
|
|
8023
|
-
"version": "1.0.
|
|
8023
|
+
"version": "1.0.235"
|
|
8024
8024
|
},
|
|
8025
8025
|
"_scope": "teambit.scope"
|
|
8026
8026
|
}
|
|
@@ -10806,7 +10806,7 @@
|
|
|
10806
10806
|
"_legacy": {
|
|
10807
10807
|
"scope": "teambit.scope",
|
|
10808
10808
|
"name": "scope",
|
|
10809
|
-
"version": "1.0.
|
|
10809
|
+
"version": "1.0.235"
|
|
10810
10810
|
},
|
|
10811
10811
|
"_scope": "teambit.scope"
|
|
10812
10812
|
}
|
|
@@ -19737,7 +19737,7 @@
|
|
|
19737
19737
|
"_legacy": {
|
|
19738
19738
|
"scope": "teambit.scope",
|
|
19739
19739
|
"name": "scope",
|
|
19740
|
-
"version": "1.0.
|
|
19740
|
+
"version": "1.0.235"
|
|
19741
19741
|
},
|
|
19742
19742
|
"_scope": "teambit.scope"
|
|
19743
19743
|
}
|
|
@@ -23684,7 +23684,7 @@
|
|
|
23684
23684
|
"componentId": {
|
|
23685
23685
|
"scope": "teambit.scope",
|
|
23686
23686
|
"name": "scope",
|
|
23687
|
-
"version": "1.0.
|
|
23687
|
+
"version": "1.0.235"
|
|
23688
23688
|
},
|
|
23689
23689
|
"taggedModuleExports": []
|
|
23690
23690
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.235/dist/scope.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.235/dist/scope.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -53,6 +53,13 @@ function _harmonyModules() {
|
|
|
53
53
|
};
|
|
54
54
|
return data;
|
|
55
55
|
}
|
|
56
|
+
function _bitError() {
|
|
57
|
+
const data = require("@teambit/bit-error");
|
|
58
|
+
_bitError = function () {
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
56
63
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
57
64
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
58
65
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -201,19 +208,30 @@ needed-for: ${neededFor || '<unknown>'}`);
|
|
|
201
208
|
});
|
|
202
209
|
}
|
|
203
210
|
async compileIfNoDist(capsule, component) {
|
|
204
|
-
|
|
205
|
-
|
|
211
|
+
let compiler;
|
|
212
|
+
try {
|
|
213
|
+
const env = this.envs.getEnv(component);
|
|
214
|
+
compiler = env.env.getCompiler();
|
|
215
|
+
} catch (err) {
|
|
216
|
+
this.logger.info(`compileIfNoDist: failed loading compiler for ${component.id.toString()} in capsule ${capsule.path}, error: ${err.message}`);
|
|
217
|
+
}
|
|
206
218
|
const distDir = compiler?.distDir || _constants().DEFAULT_DIST_DIRNAME;
|
|
207
219
|
const distExists = (0, _fsExtra().existsSync)((0, _path().join)(capsule.path, distDir));
|
|
208
220
|
if (distExists) return;
|
|
221
|
+
if (!compiler) {
|
|
222
|
+
throw new (_bitError().BitError)(`unable to compile aspect/env ${component.id.toString()}, no compiler found`);
|
|
223
|
+
}
|
|
209
224
|
const compiledCode = (await Promise.all(component.filesystem.files.flatMap(async file => {
|
|
225
|
+
// @ts-ignore - we know it's not null, we have throw error above if yes
|
|
210
226
|
if (!compiler.isFileSupported(file.path)) {
|
|
211
227
|
return [{
|
|
212
228
|
outputText: file.contents.toString('utf8'),
|
|
213
229
|
outputPath: file.path
|
|
214
230
|
}];
|
|
215
231
|
}
|
|
232
|
+
// @ts-ignore - we know it's not null, we have throw error above if yes
|
|
216
233
|
if (compiler.transpileFile) {
|
|
234
|
+
// @ts-ignore - we know it's not null, we have throw error above if yes
|
|
217
235
|
return compiler.transpileFile(file.contents.toString('utf8'), {
|
|
218
236
|
filePath: file.path,
|
|
219
237
|
componentDir: capsule.path
|
|
@@ -222,6 +240,7 @@ needed-for: ${neededFor || '<unknown>'}`);
|
|
|
222
240
|
return [];
|
|
223
241
|
}))).flat();
|
|
224
242
|
await Promise.all((0, _lodash().compact)(compiledCode).map(compiledFile => {
|
|
243
|
+
// @ts-ignore - we know it's not null, we have throw error above if yes
|
|
225
244
|
const path = compiler.getDistPathBySrcPath(compiledFile.outputPath);
|
|
226
245
|
return capsule?.outputFile(path, compiledFile.outputText);
|
|
227
246
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_fsExtra","_path","_constants","_lodash","_cli","_harmonyModules","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ScopeAspectsLoader","constructor","scope","aspectLoader","envs","isolator","logger","globalConfig","loadAspects","ids","throwOnError","neededFor","lane","opts","callId","Math","floor","random","loggerPrefix","info","join","grouped","groupAspectIdsByEnvOfTheList","envsManifestsIds","getManifestsAndLoadAspects","other","otherManifestsIds","debug","concat","components","getNonLoadedAspects","envsIds","uniq","map","component","getEnvId","envId","isCoreEnv","groupBy","id","includes","manifests","scopeManifests","potentialPluginsIds","getManifestsGraphRecursively","loadExtensionsByManifests","scopePluginsManifests","allManifests","compact","manifest","visited","nonVisitedId","customEnvsIds","undefined","requireAspects","index","isValidAspect","toString","depsToLoad","mapSeries","dependencies","_runtimes","runtime","depIds","d","loaded","notLoadedIds","isAspectLoaded","coreAspectsStringIds","getCoreAspectIds","idsWithoutCore","difference","aspectIds","startsWith","localAspects","loadAspectFromPath","componentIds","resolveMultipleComponentIds","import","reFetchUnBuiltVersion","reason","getMany","getResolvedAspects","isolateOpts","getIsolateOpts","network","isolateComponents","c","legacyScope","capsules","seedersCapsules","capsule","RequireableComponent","plugins","getPlugins","path","has","compileIfNoDist","load","MainRuntime","name","aspect","scopeRuntime","getRuntimePath","mainRuntime","runtimePath","env","getEnv","compiler","getCompiler","distDir","DEFAULT_DIST_DIRNAME","distExists","existsSync","compiledCode","Promise","all","filesystem","files","flatMap","file","isFileSupported","outputText","contents","outputPath","transpileFile","filePath","componentDir","flat","compiledFile","getDistPathBySrcPath","outputFile","tryCompile","requirableAspect","requireableExtensions","error","erroredId","requireWithCatch","requireableAspects","requireableExtension","doRequire","err","code","newErr","warn","resolvedAspectsAgain","skipIfExists","manifestAgain","handleExtensionLoadingError","shouldUseDatedCapsules","getSync","CFG_USE_DATED_CAPSULES","shouldCacheLockFileOnly","CFG_CACHE_LOCK_ONLY_CAPSULES","getAspectCapsulePath","defaultPath","isGlobalScope","CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR","CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR","shouldUseHashForCapsules","getAspectsPackageManager","aspectsPackageManager","getAspectsNodeLinker","aspectsNodeLinker","resolveUserAspects","runtimeName","userAspectsIds","aspectDefs","resolveAspects","getCapsule","Error","localPath","aspectFilePath","getAspectFilePath","aspectPath","originalStringIds","defaultOpts","excludeCore","requestedOnly","filterByRuntime","mergedOpts","coreAspectsIds","groupedByIsCore","false","getUserAspects","localResolved","resolveLocalAspects","withoutLocalAspects","aspectId","find","localAspect","toStringWithoutVersion","userAspectsDefs","coreAspectsDefs","getCoreAspectDefs","allDefs","filteredDefs","filterAspectDefs","overrideOpts","installOptions","packageManagerConfigRootDir","context","workspaceName","defaultsDeep","getDefaultIsolateOpts","useHash","useDatedDirs","cacheLockFileOnly","nodeLinker","datedDirId","baseDir","packageManager","seedersOnly","includeFromNestedHosts","host","copyPeerToRuntimeOnRoot","useNesting","copyPeerToRuntimeOnComponents","installPeersFromEnvs","aspects","exports"],"sources":["scope-aspects-loader.ts"],"sourcesContent":["import { GlobalConfigMain } from '@teambit/global-config';\nimport mapSeries from 'p-map-series';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { existsSync } from 'fs-extra';\nimport { join } from 'path';\nimport {\n DEFAULT_DIST_DIRNAME,\n CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR,\n CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR,\n CFG_USE_DATED_CAPSULES,\n CFG_CACHE_LOCK_ONLY_CAPSULES,\n} from '@teambit/legacy/dist/constants';\nimport { Compiler, TranspileFileOutputOneFile } from '@teambit/compiler';\nimport { Capsule, IsolateComponentsOptions, IsolatorMain } from '@teambit/isolator';\nimport { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';\nimport { compact, uniq, difference, groupBy, defaultsDeep } from 'lodash';\nimport { MainRuntime } from '@teambit/cli';\nimport { RequireableComponent } from '@teambit/harmony.modules.requireable-component';\nimport { ExtensionManifest, Aspect } from '@teambit/harmony';\nimport { Component, ComponentID, LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';\nimport { Logger } from '@teambit/logger';\nimport { EnvsMain } from '@teambit/envs';\nimport { NodeLinker } from '@teambit/dependency-resolver';\nimport { ScopeMain } from './scope.main.runtime';\n\ntype ManifestOrAspect = ExtensionManifest | Aspect;\n\nexport type ScopeLoadAspectsOptions = LoadAspectsOptions & {\n useScopeAspectsCapsule?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n};\n\nexport class ScopeAspectsLoader {\n constructor(\n private scope: ScopeMain,\n private aspectLoader: AspectLoaderMain,\n private envs: EnvsMain,\n private isolator: IsolatorMain,\n private logger: Logger,\n private globalConfig: GlobalConfigMain\n ) {}\n\n async loadAspects(\n ids: string[],\n throwOnError = false,\n neededFor?: string,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n if (!ids.length) return [];\n // generate a random callId to be able to identify the call from the logs\n const callId = Math.floor(Math.random() * 1000);\n const loggerPrefix = `[${callId}] loadAspects,`;\n this.logger.info(`${loggerPrefix} loading ${ids.length} aspects.\nids: ${ids.join(', ')}\nneeded-for: ${neededFor || '<unknown>'}`);\n const grouped = await this.groupAspectIdsByEnvOfTheList(ids, lane);\n this.logger.info(`${loggerPrefix} getManifestsAndLoadAspects for grouped.envs, total ${grouped.envs?.length || 0}`);\n const envsManifestsIds = await this.getManifestsAndLoadAspects(grouped.envs, throwOnError, lane, opts);\n this.logger.info(\n `${loggerPrefix} getManifestsAndLoadAspects for grouped.other, total ${grouped.other?.length || 0}`\n );\n const otherManifestsIds = await this.getManifestsAndLoadAspects(grouped.other, throwOnError, lane, opts);\n this.logger.debug(`${loggerPrefix} finish loading aspects`);\n return envsManifestsIds.concat(otherManifestsIds);\n }\n\n /**\n * This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list\n * @param ids\n */\n async groupAspectIdsByEnvOfTheList(ids: string[], lane?: Lane): Promise<{ envs?: string[]; other?: string[] }> {\n const components = await this.getNonLoadedAspects(ids, lane);\n const envsIds = uniq(\n components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId))\n );\n const grouped = groupBy(ids, (id) => {\n if (envsIds.includes(id)) return 'envs';\n return 'other';\n });\n return grouped as { envs: string[]; other: string[] };\n }\n\n private async getManifestsAndLoadAspects(\n ids: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n const { manifests: scopeManifests, potentialPluginsIds } = await this.getManifestsGraphRecursively(\n ids,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopeManifests);\n const { manifests: scopePluginsManifests } = await this.getManifestsGraphRecursively(\n potentialPluginsIds,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopePluginsManifests);\n const allManifests = scopeManifests.concat(scopePluginsManifests);\n return compact(allManifests.map((manifest) => manifest.id));\n }\n\n async getManifestsGraphRecursively(\n ids: string[],\n visited: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts: {\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n } = {}\n ): Promise<{ manifests: ManifestOrAspect[]; potentialPluginsIds: string[] }> {\n ids = uniq(ids);\n this.logger.debug(`getManifestsGraphRecursively, ids:\\n${ids.join('\\n')}`);\n const nonVisitedId = ids.filter((id) => !visited.includes(id));\n if (!nonVisitedId.length) {\n return { manifests: [], potentialPluginsIds: [] };\n }\n const components = await this.getNonLoadedAspects(nonVisitedId, lane);\n // Adding all the envs ids to the array to support case when one (or more) of the aspects has custom aspect env\n const customEnvsIds = components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId));\n // In case there is custom env we need to load it right away, otherwise we will fail during the require aspects\n await this.getManifestsAndLoadAspects(customEnvsIds, undefined, lane);\n visited.push(...nonVisitedId);\n const manifests = await this.requireAspects(components, throwOnError, opts);\n const potentialPluginsIds = compact(\n manifests.map((manifest, index) => {\n if (this.aspectLoader.isValidAspect(manifest)) return undefined;\n // return index;\n return components[index].id.toString();\n })\n );\n\n const depsToLoad: Array<ExtensionManifest | Aspect> = [];\n await mapSeries(manifests, async (manifest) => {\n depsToLoad.push(...(manifest.dependencies || []));\n // @ts-ignore\n (manifest._runtimes || []).forEach((runtime) => {\n depsToLoad.push(...(runtime.dependencies || []));\n });\n const depIds = depsToLoad.map((d) => d.id).filter((id) => id) as string[];\n this.logger.debug(\n `getManifestsGraphRecursively, id: ${manifest.id || '<unknown>'}, found ${depIds.length}: ${depIds.join(', ')}`\n );\n const { manifests: loaded } = await this.getManifestsGraphRecursively(depIds, visited, throwOnError, lane);\n manifests.push(...loaded);\n });\n\n return { manifests, potentialPluginsIds };\n }\n\n private async getNonLoadedAspects(ids: string[], lane?: Lane): Promise<Component[]> {\n const notLoadedIds = ids.filter((id) => !this.aspectLoader.isAspectLoaded(id));\n if (!notLoadedIds.length) return [];\n const coreAspectsStringIds = this.aspectLoader.getCoreAspectIds();\n const idsWithoutCore: string[] = difference(ids, coreAspectsStringIds);\n const aspectIds = idsWithoutCore.filter((id) => !id.startsWith('file://'));\n // TODO: use diff instead of filter twice\n const localAspects = ids.filter((id) => id.startsWith('file://'));\n this.scope.localAspects = uniq(this.scope.localAspects.concat(localAspects));\n // load local aspects for debugging purposes.\n await this.aspectLoader.loadAspectFromPath(localAspects);\n const componentIds = await this.scope.resolveMultipleComponentIds(aspectIds);\n if (!componentIds || !componentIds.length) return [];\n await this.scope.import(componentIds, {\n reFetchUnBuiltVersion: false,\n lane,\n reason: 'for loading aspects from the scope',\n });\n const components = await this.scope.getMany(componentIds);\n\n return components;\n }\n\n async getResolvedAspects(\n components: Component[],\n opts?: { skipIfExists?: boolean; packageManagerConfigRootDir?: string; workspaceName?: string }\n ): Promise<RequireableComponent[]> {\n if (!components || !components.length) return [];\n const isolateOpts = this.getIsolateOpts(opts);\n const network = await this.isolator.isolateComponents(\n components.map((c) => c.id),\n // includeFromNestedHosts - to support case when you are in a workspace, trying to load aspect defined in the workspace.jsonc but not part of the workspace\n isolateOpts,\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n\n return capsules.map((capsule) => {\n return new RequireableComponent(\n capsule.component,\n async () => {\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const plugins = this.aspectLoader.getPlugins(capsule.component, capsule.path);\n if (plugins.has()) {\n await this.compileIfNoDist(capsule, capsule.component);\n return plugins.load(MainRuntime.name);\n }\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const aspect = require(capsule.path);\n const scopeRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, 'scope');\n const mainRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, MainRuntime.name);\n const runtimePath = scopeRuntime || mainRuntime;\n // eslint-disable-next-line global-require, import/no-dynamic-require\n if (runtimePath) require(runtimePath);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n return aspect;\n },\n capsule\n );\n });\n }\n\n private async compileIfNoDist(capsule: Capsule, component: Component) {\n const env = this.envs.getEnv(component);\n const compiler: Compiler = env.env.getCompiler();\n const distDir = compiler?.distDir || DEFAULT_DIST_DIRNAME;\n const distExists = existsSync(join(capsule.path, distDir));\n if (distExists) return;\n\n const compiledCode = (\n await Promise.all(\n component.filesystem.files.flatMap(async (file) => {\n if (!compiler.isFileSupported(file.path)) {\n return [\n {\n outputText: file.contents.toString('utf8'),\n outputPath: file.path,\n },\n ] as TranspileFileOutputOneFile[];\n }\n\n if (compiler.transpileFile) {\n return compiler.transpileFile(file.contents.toString('utf8'), {\n filePath: file.path,\n componentDir: capsule.path,\n });\n }\n\n return [];\n })\n )\n ).flat();\n\n await Promise.all(\n compact(compiledCode).map((compiledFile) => {\n const path = compiler.getDistPathBySrcPath(compiledFile.outputPath);\n return capsule?.outputFile(path, compiledFile.outputText);\n })\n );\n }\n\n private async tryCompile(requirableAspect: RequireableComponent) {\n if (requirableAspect.capsule) return this.compileIfNoDist(requirableAspect.capsule, requirableAspect.component);\n return undefined;\n }\n\n async requireAspects(\n components: Component[],\n throwOnError = false,\n opts: { packageManagerConfigRootDir?: string; workspaceName?: string } = {}\n ): Promise<Array<ExtensionManifest | Aspect>> {\n const requireableExtensions = await this.getResolvedAspects(components, opts);\n if (!requireableExtensions) {\n return [];\n }\n let error: any;\n let erroredId = '';\n const requireWithCatch = async (requireableAspects: RequireableComponent[]) => {\n error = undefined;\n try {\n const manifests = await mapSeries(requireableAspects, async (requireableExtension) => {\n try {\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (err: any) {\n erroredId = requireableExtension.component.id.toString();\n if (err.code === 'MODULE_NOT_FOUND') {\n try {\n await this.tryCompile(requireableExtension);\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (newErr: any) {\n error = newErr;\n throw newErr;\n }\n }\n error = err;\n throw err;\n }\n });\n return manifests;\n } catch (err) {\n return null;\n }\n };\n const manifests = await requireWithCatch(requireableExtensions);\n if (!error) {\n return compact(manifests);\n }\n if (error.code === 'MODULE_NOT_FOUND') {\n this.logger.warn(\n `failed loading aspects from capsules due to MODULE_NOT_FOUND error, re-creating the capsules and trying again`\n );\n const resolvedAspectsAgain = await this.getResolvedAspects(components, {\n ...opts,\n skipIfExists: false,\n });\n const manifestAgain = await requireWithCatch(resolvedAspectsAgain);\n if (!error) {\n return compact(manifestAgain);\n }\n }\n\n this.aspectLoader.handleExtensionLoadingError(error, erroredId, throwOnError);\n return [];\n }\n\n shouldUseDatedCapsules(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_USE_DATED_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n shouldCacheLockFileOnly(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_CACHE_LOCK_ONLY_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n getAspectCapsulePath() {\n const defaultPath = `${this.scope.path}-aspects`;\n if (this.scope.isGlobalScope) {\n return this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR) || defaultPath;\n }\n return this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR) || defaultPath;\n }\n\n shouldUseHashForCapsules(): boolean {\n if (this.scope.isGlobalScope) {\n return !this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR);\n }\n return !this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR);\n }\n\n getAspectsPackageManager(): string | undefined {\n return this.scope.aspectsPackageManager;\n }\n\n getAspectsNodeLinker(): NodeLinker | undefined {\n return this.scope.aspectsNodeLinker;\n }\n\n private async resolveUserAspects(\n runtimeName?: string,\n userAspectsIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n if (!userAspectsIds || !userAspectsIds.length) return [];\n const components = await this.scope.getMany(userAspectsIds);\n const isolateOpts = this.getIsolateOpts(opts);\n const network = await this.isolator.isolateComponents(userAspectsIds, isolateOpts, this.scope.legacyScope);\n\n const capsules = network.seedersCapsules;\n const aspectDefs = await this.aspectLoader.resolveAspects(components, async (component) => {\n const capsule = capsules.getCapsule(component.id);\n if (!capsule) throw new Error(`failed loading aspect: ${component.id.toString()}`);\n const localPath = capsule.path;\n const runtimePath = runtimeName\n ? await this.aspectLoader.getRuntimePath(component, localPath, runtimeName)\n : null;\n const aspectFilePath = await this.aspectLoader.getAspectFilePath(component, localPath);\n\n this.logger.debug(\n `scope resolveUserAspects, resolving id: ${component.id.toString()}, localPath: ${localPath}, runtimePath: ${runtimePath}`\n );\n\n return {\n id: capsule.component.id,\n aspectPath: localPath,\n aspectFilePath,\n runtimePath,\n };\n });\n return aspectDefs;\n }\n\n async resolveAspects(\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n const originalStringIds = componentIds?.map((id) => id.toString());\n this.logger.debug(`scope resolveAspects, runtimeName: ${runtimeName}, componentIds: ${originalStringIds}`);\n\n const defaultOpts: ResolveAspectsOptions = {\n excludeCore: false,\n requestedOnly: false,\n filterByRuntime: true,\n };\n const mergedOpts = { ...defaultOpts, ...opts };\n const coreAspectsIds = this.aspectLoader.getCoreAspectIds();\n let userAspectsIds: ComponentID[];\n // let requestedCoreStringIds;\n if (componentIds && componentIds.length) {\n const groupedByIsCore = groupBy(componentIds, (id) => coreAspectsIds.includes(id.toString()));\n userAspectsIds = groupedByIsCore.false || [];\n // requestedCoreStringIds = groupedByIsCore.true?.map((id) => id.toStringWithoutVersion()) || [];\n } else {\n userAspectsIds = await this.scope.resolveMultipleComponentIds(this.aspectLoader.getUserAspects());\n }\n const localResolved = await this.aspectLoader.resolveLocalAspects(this.scope.localAspects, runtimeName);\n\n const withoutLocalAspects = userAspectsIds.filter((aspectId) => {\n return !localResolved.find((localAspect) => {\n return localAspect.id === aspectId.toStringWithoutVersion();\n });\n });\n const userAspectsDefs = await this.resolveUserAspects(runtimeName, withoutLocalAspects, opts);\n const coreAspectsDefs = await this.aspectLoader.getCoreAspectDefs(runtimeName);\n\n const allDefs = userAspectsDefs.concat(coreAspectsDefs).concat(localResolved);\n // const userAspectsIdsWithoutVersion = userAspectsIds.map((aspectId) => aspectId.toStringWithoutVersion());\n // const userAspectsIdsWithoutVersionAndCoreRequested = userAspectsIdsWithoutVersion.concat(requestedCoreStringIds);\n const filteredDefs = this.aspectLoader.filterAspectDefs(\n allDefs,\n componentIds || userAspectsIds,\n runtimeName,\n mergedOpts\n );\n return filteredDefs;\n }\n\n getIsolateOpts(opts?: {\n skipIfExists?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n }): IsolateComponentsOptions {\n const overrideOpts = {\n skipIfExists: opts?.skipIfExists ?? true,\n installOptions: {\n packageManagerConfigRootDir: opts?.packageManagerConfigRootDir,\n },\n context: {\n workspaceName: opts?.workspaceName,\n },\n };\n const isolateOpts = defaultsDeep(overrideOpts, this.getDefaultIsolateOpts());\n return isolateOpts;\n }\n\n getDefaultIsolateOpts() {\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const cacheLockFileOnly = this.shouldCacheLockFileOnly();\n const nodeLinker = this.getAspectsNodeLinker();\n\n const opts = {\n datedDirId: this.scope.name,\n baseDir: this.getAspectCapsulePath(),\n useHash,\n packageManager: this.getAspectsPackageManager(),\n nodeLinker,\n useDatedDirs,\n cacheLockFileOnly,\n skipIfExists: true,\n seedersOnly: true,\n includeFromNestedHosts: true,\n host: this.scope,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n context: {\n aspects: true,\n },\n };\n return opts;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,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Aa,EAAE7L,IAAI,EAAE6L;MACvB;IACF,CAAC;IACD,MAAMvH,WAAW,GAAG,IAAAwH,sBAAY,EAACL,YAAY,EAAE,IAAI,CAACM,qBAAqB,CAAC,CAAC,CAAC;IAC5E,OAAOzH,WAAW;EACpB;EAEAyH,qBAAqBA,CAAA,EAAG;IACtB,MAAMC,OAAO,GAAG,IAAI,CAAC9C,wBAAwB,CAAC,CAAC;IAC/C,MAAM+C,YAAY,GAAG,IAAI,CAACzD,sBAAsB,CAAC,CAAC;IAClD,MAAM0D,iBAAiB,GAAG,IAAI,CAACvD,uBAAuB,CAAC,CAAC;IACxD,MAAMwD,UAAU,GAAG,IAAI,CAAC9C,oBAAoB,CAAC,CAAC;IAE9C,MAAMrJ,IAAI,GAAG;MACXoM,UAAU,EAAE,IAAI,CAAC/M,KAAK,CAACkG,IAAI;MAC3B8G,OAAO,EAAE,IAAI,CAACxD,oBAAoB,CAAC,CAAC;MACpCmD,OAAO;MACPM,cAAc,EAAE,IAAI,CAACnD,wBAAwB,CAAC,CAAC;MAC/CgD,UAAU;MACVF,YAAY;MACZC,iBAAiB;MACjB7D,YAAY,EAAE,IAAI;MAClBkE,WAAW,EAAE,IAAI;MACjBC,sBAAsB,EAAE,IAAI;MAC5BC,IAAI,EAAE,IAAI,CAACpN,KAAK;MAChBqM,cAAc,EAAE;QACdgB,uBAAuB,EAAE,IAAI;QAC7BC,UAAU,EAAE,IAAI;QAChBC,6BAA6B,EAAE,IAAI;QACnCC,oBAAoB,EAAE;MACxB,CAAC;MACDjB,OAAO,EAAE;QACPkB,OAAO,EAAE;MACX;IACF,CAAC;IACD,OAAO9M,IAAI;EACb;AACF;AAAC+M,OAAA,CAAA5N,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_fsExtra","_path","_constants","_lodash","_cli","_harmonyModules","_bitError","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ScopeAspectsLoader","constructor","scope","aspectLoader","envs","isolator","logger","globalConfig","loadAspects","ids","throwOnError","neededFor","lane","opts","callId","Math","floor","random","loggerPrefix","info","join","grouped","groupAspectIdsByEnvOfTheList","envsManifestsIds","getManifestsAndLoadAspects","other","otherManifestsIds","debug","concat","components","getNonLoadedAspects","envsIds","uniq","map","component","getEnvId","envId","isCoreEnv","groupBy","id","includes","manifests","scopeManifests","potentialPluginsIds","getManifestsGraphRecursively","loadExtensionsByManifests","scopePluginsManifests","allManifests","compact","manifest","visited","nonVisitedId","customEnvsIds","undefined","requireAspects","index","isValidAspect","toString","depsToLoad","mapSeries","dependencies","_runtimes","runtime","depIds","d","loaded","notLoadedIds","isAspectLoaded","coreAspectsStringIds","getCoreAspectIds","idsWithoutCore","difference","aspectIds","startsWith","localAspects","loadAspectFromPath","componentIds","resolveMultipleComponentIds","import","reFetchUnBuiltVersion","reason","getMany","getResolvedAspects","isolateOpts","getIsolateOpts","network","isolateComponents","c","legacyScope","capsules","seedersCapsules","capsule","RequireableComponent","plugins","getPlugins","path","has","compileIfNoDist","load","MainRuntime","name","aspect","scopeRuntime","getRuntimePath","mainRuntime","runtimePath","compiler","env","getEnv","getCompiler","err","message","distDir","DEFAULT_DIST_DIRNAME","distExists","existsSync","BitError","compiledCode","Promise","all","filesystem","files","flatMap","file","isFileSupported","outputText","contents","outputPath","transpileFile","filePath","componentDir","flat","compiledFile","getDistPathBySrcPath","outputFile","tryCompile","requirableAspect","requireableExtensions","error","erroredId","requireWithCatch","requireableAspects","requireableExtension","doRequire","code","newErr","warn","resolvedAspectsAgain","skipIfExists","manifestAgain","handleExtensionLoadingError","shouldUseDatedCapsules","getSync","CFG_USE_DATED_CAPSULES","shouldCacheLockFileOnly","CFG_CACHE_LOCK_ONLY_CAPSULES","getAspectCapsulePath","defaultPath","isGlobalScope","CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR","CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR","shouldUseHashForCapsules","getAspectsPackageManager","aspectsPackageManager","getAspectsNodeLinker","aspectsNodeLinker","resolveUserAspects","runtimeName","userAspectsIds","aspectDefs","resolveAspects","getCapsule","Error","localPath","aspectFilePath","getAspectFilePath","aspectPath","originalStringIds","defaultOpts","excludeCore","requestedOnly","filterByRuntime","mergedOpts","coreAspectsIds","groupedByIsCore","false","getUserAspects","localResolved","resolveLocalAspects","withoutLocalAspects","aspectId","find","localAspect","toStringWithoutVersion","userAspectsDefs","coreAspectsDefs","getCoreAspectDefs","allDefs","filteredDefs","filterAspectDefs","overrideOpts","installOptions","packageManagerConfigRootDir","context","workspaceName","defaultsDeep","getDefaultIsolateOpts","useHash","useDatedDirs","cacheLockFileOnly","nodeLinker","datedDirId","baseDir","packageManager","seedersOnly","includeFromNestedHosts","host","copyPeerToRuntimeOnRoot","useNesting","copyPeerToRuntimeOnComponents","installPeersFromEnvs","aspects","exports"],"sources":["scope-aspects-loader.ts"],"sourcesContent":["import { GlobalConfigMain } from '@teambit/global-config';\nimport mapSeries from 'p-map-series';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { existsSync } from 'fs-extra';\nimport { join } from 'path';\nimport {\n DEFAULT_DIST_DIRNAME,\n CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR,\n CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR,\n CFG_USE_DATED_CAPSULES,\n CFG_CACHE_LOCK_ONLY_CAPSULES,\n} from '@teambit/legacy/dist/constants';\nimport { Compiler, TranspileFileOutputOneFile } from '@teambit/compiler';\nimport { Capsule, IsolateComponentsOptions, IsolatorMain } from '@teambit/isolator';\nimport { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';\nimport { compact, uniq, difference, groupBy, defaultsDeep } from 'lodash';\nimport { MainRuntime } from '@teambit/cli';\nimport { RequireableComponent } from '@teambit/harmony.modules.requireable-component';\nimport { ExtensionManifest, Aspect } from '@teambit/harmony';\nimport { Component, ComponentID, LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';\nimport { Logger } from '@teambit/logger';\nimport { EnvsMain } from '@teambit/envs';\nimport { NodeLinker } from '@teambit/dependency-resolver';\nimport { BitError } from '@teambit/bit-error';\nimport { ScopeMain } from './scope.main.runtime';\n\ntype ManifestOrAspect = ExtensionManifest | Aspect;\n\nexport type ScopeLoadAspectsOptions = LoadAspectsOptions & {\n useScopeAspectsCapsule?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n};\n\nexport class ScopeAspectsLoader {\n constructor(\n private scope: ScopeMain,\n private aspectLoader: AspectLoaderMain,\n private envs: EnvsMain,\n private isolator: IsolatorMain,\n private logger: Logger,\n private globalConfig: GlobalConfigMain\n ) {}\n\n async loadAspects(\n ids: string[],\n throwOnError = false,\n neededFor?: string,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n if (!ids.length) return [];\n // generate a random callId to be able to identify the call from the logs\n const callId = Math.floor(Math.random() * 1000);\n const loggerPrefix = `[${callId}] loadAspects,`;\n this.logger.info(`${loggerPrefix} loading ${ids.length} aspects.\nids: ${ids.join(', ')}\nneeded-for: ${neededFor || '<unknown>'}`);\n const grouped = await this.groupAspectIdsByEnvOfTheList(ids, lane);\n this.logger.info(`${loggerPrefix} getManifestsAndLoadAspects for grouped.envs, total ${grouped.envs?.length || 0}`);\n const envsManifestsIds = await this.getManifestsAndLoadAspects(grouped.envs, throwOnError, lane, opts);\n this.logger.info(\n `${loggerPrefix} getManifestsAndLoadAspects for grouped.other, total ${grouped.other?.length || 0}`\n );\n const otherManifestsIds = await this.getManifestsAndLoadAspects(grouped.other, throwOnError, lane, opts);\n this.logger.debug(`${loggerPrefix} finish loading aspects`);\n return envsManifestsIds.concat(otherManifestsIds);\n }\n\n /**\n * This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list\n * @param ids\n */\n async groupAspectIdsByEnvOfTheList(ids: string[], lane?: Lane): Promise<{ envs?: string[]; other?: string[] }> {\n const components = await this.getNonLoadedAspects(ids, lane);\n const envsIds = uniq(\n components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId))\n );\n const grouped = groupBy(ids, (id) => {\n if (envsIds.includes(id)) return 'envs';\n return 'other';\n });\n return grouped as { envs: string[]; other: string[] };\n }\n\n private async getManifestsAndLoadAspects(\n ids: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n const { manifests: scopeManifests, potentialPluginsIds } = await this.getManifestsGraphRecursively(\n ids,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopeManifests);\n const { manifests: scopePluginsManifests } = await this.getManifestsGraphRecursively(\n potentialPluginsIds,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopePluginsManifests);\n const allManifests = scopeManifests.concat(scopePluginsManifests);\n return compact(allManifests.map((manifest) => manifest.id));\n }\n\n async getManifestsGraphRecursively(\n ids: string[],\n visited: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts: {\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n } = {}\n ): Promise<{ manifests: ManifestOrAspect[]; potentialPluginsIds: string[] }> {\n ids = uniq(ids);\n this.logger.debug(`getManifestsGraphRecursively, ids:\\n${ids.join('\\n')}`);\n const nonVisitedId = ids.filter((id) => !visited.includes(id));\n if (!nonVisitedId.length) {\n return { manifests: [], potentialPluginsIds: [] };\n }\n const components = await this.getNonLoadedAspects(nonVisitedId, lane);\n // Adding all the envs ids to the array to support case when one (or more) of the aspects has custom aspect env\n const customEnvsIds = components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId));\n // In case there is custom env we need to load it right away, otherwise we will fail during the require aspects\n await this.getManifestsAndLoadAspects(customEnvsIds, undefined, lane);\n visited.push(...nonVisitedId);\n const manifests = await this.requireAspects(components, throwOnError, opts);\n const potentialPluginsIds = compact(\n manifests.map((manifest, index) => {\n if (this.aspectLoader.isValidAspect(manifest)) return undefined;\n // return index;\n return components[index].id.toString();\n })\n );\n\n const depsToLoad: Array<ExtensionManifest | Aspect> = [];\n await mapSeries(manifests, async (manifest) => {\n depsToLoad.push(...(manifest.dependencies || []));\n // @ts-ignore\n (manifest._runtimes || []).forEach((runtime) => {\n depsToLoad.push(...(runtime.dependencies || []));\n });\n const depIds = depsToLoad.map((d) => d.id).filter((id) => id) as string[];\n this.logger.debug(\n `getManifestsGraphRecursively, id: ${manifest.id || '<unknown>'}, found ${depIds.length}: ${depIds.join(', ')}`\n );\n const { manifests: loaded } = await this.getManifestsGraphRecursively(depIds, visited, throwOnError, lane);\n manifests.push(...loaded);\n });\n\n return { manifests, potentialPluginsIds };\n }\n\n private async getNonLoadedAspects(ids: string[], lane?: Lane): Promise<Component[]> {\n const notLoadedIds = ids.filter((id) => !this.aspectLoader.isAspectLoaded(id));\n if (!notLoadedIds.length) return [];\n const coreAspectsStringIds = this.aspectLoader.getCoreAspectIds();\n const idsWithoutCore: string[] = difference(ids, coreAspectsStringIds);\n const aspectIds = idsWithoutCore.filter((id) => !id.startsWith('file://'));\n // TODO: use diff instead of filter twice\n const localAspects = ids.filter((id) => id.startsWith('file://'));\n this.scope.localAspects = uniq(this.scope.localAspects.concat(localAspects));\n // load local aspects for debugging purposes.\n await this.aspectLoader.loadAspectFromPath(localAspects);\n const componentIds = await this.scope.resolveMultipleComponentIds(aspectIds);\n if (!componentIds || !componentIds.length) return [];\n await this.scope.import(componentIds, {\n reFetchUnBuiltVersion: false,\n lane,\n reason: 'for loading aspects from the scope',\n });\n const components = await this.scope.getMany(componentIds);\n\n return components;\n }\n\n async getResolvedAspects(\n components: Component[],\n opts?: { skipIfExists?: boolean; packageManagerConfigRootDir?: string; workspaceName?: string }\n ): Promise<RequireableComponent[]> {\n if (!components || !components.length) return [];\n const isolateOpts = this.getIsolateOpts(opts);\n const network = await this.isolator.isolateComponents(\n components.map((c) => c.id),\n // includeFromNestedHosts - to support case when you are in a workspace, trying to load aspect defined in the workspace.jsonc but not part of the workspace\n isolateOpts,\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n\n return capsules.map((capsule) => {\n return new RequireableComponent(\n capsule.component,\n async () => {\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const plugins = this.aspectLoader.getPlugins(capsule.component, capsule.path);\n if (plugins.has()) {\n await this.compileIfNoDist(capsule, capsule.component);\n return plugins.load(MainRuntime.name);\n }\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const aspect = require(capsule.path);\n const scopeRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, 'scope');\n const mainRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, MainRuntime.name);\n const runtimePath = scopeRuntime || mainRuntime;\n // eslint-disable-next-line global-require, import/no-dynamic-require\n if (runtimePath) require(runtimePath);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n return aspect;\n },\n capsule\n );\n });\n }\n\n private async compileIfNoDist(capsule: Capsule, component: Component) {\n let compiler: Compiler | undefined;\n try {\n const env = this.envs.getEnv(component);\n compiler = env.env.getCompiler();\n } catch (err: any) {\n this.logger.info(\n `compileIfNoDist: failed loading compiler for ${component.id.toString()} in capsule ${capsule.path}, error: ${\n err.message\n }`\n );\n }\n const distDir = compiler?.distDir || DEFAULT_DIST_DIRNAME;\n const distExists = existsSync(join(capsule.path, distDir));\n if (distExists) return;\n if (!compiler) {\n throw new BitError(`unable to compile aspect/env ${component.id.toString()}, no compiler found`);\n }\n\n const compiledCode = (\n await Promise.all(\n component.filesystem.files.flatMap(async (file) => {\n // @ts-ignore - we know it's not null, we have throw error above if yes\n if (!compiler.isFileSupported(file.path)) {\n return [\n {\n outputText: file.contents.toString('utf8'),\n outputPath: file.path,\n },\n ] as TranspileFileOutputOneFile[];\n }\n // @ts-ignore - we know it's not null, we have throw error above if yes\n if (compiler.transpileFile) {\n // @ts-ignore - we know it's not null, we have throw error above if yes\n return compiler.transpileFile(file.contents.toString('utf8'), {\n filePath: file.path,\n componentDir: capsule.path,\n });\n }\n\n return [];\n })\n )\n ).flat();\n\n await Promise.all(\n compact(compiledCode).map((compiledFile) => {\n // @ts-ignore - we know it's not null, we have throw error above if yes\n const path = compiler.getDistPathBySrcPath(compiledFile.outputPath);\n return capsule?.outputFile(path, compiledFile.outputText);\n })\n );\n }\n\n private async tryCompile(requirableAspect: RequireableComponent) {\n if (requirableAspect.capsule) return this.compileIfNoDist(requirableAspect.capsule, requirableAspect.component);\n return undefined;\n }\n\n async requireAspects(\n components: Component[],\n throwOnError = false,\n opts: { packageManagerConfigRootDir?: string; workspaceName?: string } = {}\n ): Promise<Array<ExtensionManifest | Aspect>> {\n const requireableExtensions = await this.getResolvedAspects(components, opts);\n if (!requireableExtensions) {\n return [];\n }\n let error: any;\n let erroredId = '';\n const requireWithCatch = async (requireableAspects: RequireableComponent[]) => {\n error = undefined;\n try {\n const manifests = await mapSeries(requireableAspects, async (requireableExtension) => {\n try {\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (err: any) {\n erroredId = requireableExtension.component.id.toString();\n if (err.code === 'MODULE_NOT_FOUND') {\n try {\n await this.tryCompile(requireableExtension);\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (newErr: any) {\n error = newErr;\n throw newErr;\n }\n }\n error = err;\n throw err;\n }\n });\n return manifests;\n } catch (err) {\n return null;\n }\n };\n const manifests = await requireWithCatch(requireableExtensions);\n if (!error) {\n return compact(manifests);\n }\n if (error.code === 'MODULE_NOT_FOUND') {\n this.logger.warn(\n `failed loading aspects from capsules due to MODULE_NOT_FOUND error, re-creating the capsules and trying again`\n );\n const resolvedAspectsAgain = await this.getResolvedAspects(components, {\n ...opts,\n skipIfExists: false,\n });\n const manifestAgain = await requireWithCatch(resolvedAspectsAgain);\n if (!error) {\n return compact(manifestAgain);\n }\n }\n\n this.aspectLoader.handleExtensionLoadingError(error, erroredId, throwOnError);\n return [];\n }\n\n shouldUseDatedCapsules(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_USE_DATED_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n shouldCacheLockFileOnly(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_CACHE_LOCK_ONLY_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n getAspectCapsulePath() {\n const defaultPath = `${this.scope.path}-aspects`;\n if (this.scope.isGlobalScope) {\n return this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR) || defaultPath;\n }\n return this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR) || defaultPath;\n }\n\n shouldUseHashForCapsules(): boolean {\n if (this.scope.isGlobalScope) {\n return !this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR);\n }\n return !this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR);\n }\n\n getAspectsPackageManager(): string | undefined {\n return this.scope.aspectsPackageManager;\n }\n\n getAspectsNodeLinker(): NodeLinker | undefined {\n return this.scope.aspectsNodeLinker;\n }\n\n private async resolveUserAspects(\n runtimeName?: string,\n userAspectsIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n if (!userAspectsIds || !userAspectsIds.length) return [];\n const components = await this.scope.getMany(userAspectsIds);\n const isolateOpts = this.getIsolateOpts(opts);\n const network = await this.isolator.isolateComponents(userAspectsIds, isolateOpts, this.scope.legacyScope);\n\n const capsules = network.seedersCapsules;\n const aspectDefs = await this.aspectLoader.resolveAspects(components, async (component) => {\n const capsule = capsules.getCapsule(component.id);\n if (!capsule) throw new Error(`failed loading aspect: ${component.id.toString()}`);\n const localPath = capsule.path;\n const runtimePath = runtimeName\n ? await this.aspectLoader.getRuntimePath(component, localPath, runtimeName)\n : null;\n const aspectFilePath = await this.aspectLoader.getAspectFilePath(component, localPath);\n\n this.logger.debug(\n `scope resolveUserAspects, resolving id: ${component.id.toString()}, localPath: ${localPath}, runtimePath: ${runtimePath}`\n );\n\n return {\n id: capsule.component.id,\n aspectPath: localPath,\n aspectFilePath,\n runtimePath,\n };\n });\n return aspectDefs;\n }\n\n async resolveAspects(\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n const originalStringIds = componentIds?.map((id) => id.toString());\n this.logger.debug(`scope resolveAspects, runtimeName: ${runtimeName}, componentIds: ${originalStringIds}`);\n\n const defaultOpts: ResolveAspectsOptions = {\n excludeCore: false,\n requestedOnly: false,\n filterByRuntime: true,\n };\n const mergedOpts = { ...defaultOpts, ...opts };\n const coreAspectsIds = this.aspectLoader.getCoreAspectIds();\n let userAspectsIds: ComponentID[];\n // let requestedCoreStringIds;\n if (componentIds && componentIds.length) {\n const groupedByIsCore = groupBy(componentIds, (id) => coreAspectsIds.includes(id.toString()));\n userAspectsIds = groupedByIsCore.false || [];\n // requestedCoreStringIds = groupedByIsCore.true?.map((id) => id.toStringWithoutVersion()) || [];\n } else {\n userAspectsIds = await this.scope.resolveMultipleComponentIds(this.aspectLoader.getUserAspects());\n }\n const localResolved = await this.aspectLoader.resolveLocalAspects(this.scope.localAspects, runtimeName);\n\n const withoutLocalAspects = userAspectsIds.filter((aspectId) => {\n return !localResolved.find((localAspect) => {\n return localAspect.id === aspectId.toStringWithoutVersion();\n });\n });\n const userAspectsDefs = await this.resolveUserAspects(runtimeName, withoutLocalAspects, opts);\n const coreAspectsDefs = await this.aspectLoader.getCoreAspectDefs(runtimeName);\n\n const allDefs = userAspectsDefs.concat(coreAspectsDefs).concat(localResolved);\n // const userAspectsIdsWithoutVersion = userAspectsIds.map((aspectId) => aspectId.toStringWithoutVersion());\n // const userAspectsIdsWithoutVersionAndCoreRequested = userAspectsIdsWithoutVersion.concat(requestedCoreStringIds);\n const filteredDefs = this.aspectLoader.filterAspectDefs(\n allDefs,\n componentIds || userAspectsIds,\n runtimeName,\n mergedOpts\n );\n return filteredDefs;\n }\n\n getIsolateOpts(opts?: {\n skipIfExists?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n }): IsolateComponentsOptions {\n const overrideOpts = {\n skipIfExists: opts?.skipIfExists ?? true,\n installOptions: {\n packageManagerConfigRootDir: opts?.packageManagerConfigRootDir,\n },\n context: {\n workspaceName: opts?.workspaceName,\n },\n };\n const isolateOpts = defaultsDeep(overrideOpts, this.getDefaultIsolateOpts());\n return isolateOpts;\n }\n\n getDefaultIsolateOpts() {\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const cacheLockFileOnly = this.shouldCacheLockFileOnly();\n const nodeLinker = this.getAspectsNodeLinker();\n\n const opts = {\n datedDirId: this.scope.name,\n baseDir: this.getAspectCapsulePath(),\n useHash,\n packageManager: this.getAspectsPackageManager(),\n nodeLinker,\n useDatedDirs,\n cacheLockFileOnly,\n skipIfExists: true,\n seedersOnly: true,\n includeFromNestedHosts: true,\n host: this.scope,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n context: {\n aspects: true,\n },\n };\n return opts;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAA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BAA6B,EAAE,IAAI;QACnCC,oBAAoB,EAAE;MACxB,CAAC;MACDjB,OAAO,EAAE;QACPkB,OAAO,EAAE;MACX;IACF,CAAC;IACD,OAAOhN,IAAI;EACb;AACF;AAACiN,OAAA,CAAA9N,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/scope",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.235",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/scope/scope",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "scope",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.235"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"classnames": "2.2.6",
|
|
21
21
|
"reset-css": "5.0.1",
|
|
22
22
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.518",
|
|
23
|
+
"@teambit/bit-error": "0.0.404",
|
|
23
24
|
"@teambit/harmony": "0.4.6",
|
|
24
25
|
"@teambit/legacy-component-log": "0.0.402",
|
|
25
|
-
"@teambit/bit-error": "0.0.404",
|
|
26
26
|
"@teambit/component-id": "1.2.0",
|
|
27
27
|
"@teambit/graph.cleargraph": "0.0.8",
|
|
28
28
|
"@teambit/legacy-bit-id": "1.1.1",
|
|
@@ -52,33 +52,33 @@
|
|
|
52
52
|
"@teambit/component.modules.component-url": "0.0.167",
|
|
53
53
|
"@teambit/scope.models.scope-model": "0.0.508",
|
|
54
54
|
"@teambit/scope.ui.hooks.scope-context": "0.0.502",
|
|
55
|
-
"@teambit/aspect-loader": "1.0.
|
|
55
|
+
"@teambit/aspect-loader": "1.0.235",
|
|
56
56
|
"@teambit/cli": "0.0.862",
|
|
57
|
-
"@teambit/compiler": "1.0.
|
|
58
|
-
"@teambit/component": "1.0.
|
|
59
|
-
"@teambit/dependency-resolver": "1.0.
|
|
60
|
-
"@teambit/envs": "1.0.
|
|
57
|
+
"@teambit/compiler": "1.0.235",
|
|
58
|
+
"@teambit/component": "1.0.235",
|
|
59
|
+
"@teambit/dependency-resolver": "1.0.235",
|
|
60
|
+
"@teambit/envs": "1.0.235",
|
|
61
61
|
"@teambit/global-config": "0.0.865",
|
|
62
62
|
"@teambit/harmony.modules.requireable-component": "0.0.497",
|
|
63
|
-
"@teambit/isolator": "1.0.
|
|
63
|
+
"@teambit/isolator": "1.0.235",
|
|
64
64
|
"@teambit/logger": "0.0.955",
|
|
65
|
-
"@teambit/builder": "1.0.
|
|
65
|
+
"@teambit/builder": "1.0.235",
|
|
66
66
|
"@teambit/express": "0.0.961",
|
|
67
|
-
"@teambit/graph": "1.0.
|
|
68
|
-
"@teambit/graphql": "1.0.
|
|
69
|
-
"@teambit/ui": "1.0.
|
|
67
|
+
"@teambit/graph": "1.0.235",
|
|
68
|
+
"@teambit/graphql": "1.0.235",
|
|
69
|
+
"@teambit/ui": "1.0.235",
|
|
70
70
|
"@teambit/workspace.modules.match-pattern": "0.0.505",
|
|
71
71
|
"@teambit/component.ui.component-drawer": "0.0.399",
|
|
72
72
|
"@teambit/lanes.hooks.use-lane-components": "0.0.262",
|
|
73
73
|
"@teambit/lanes.hooks.use-lanes": "0.0.264",
|
|
74
74
|
"@teambit/lanes.ui.models.lanes-model": "0.0.216",
|
|
75
|
-
"@teambit/command-bar": "1.0.
|
|
76
|
-
"@teambit/component-tree": "1.0.
|
|
75
|
+
"@teambit/command-bar": "1.0.235",
|
|
76
|
+
"@teambit/component-tree": "1.0.235",
|
|
77
77
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.222",
|
|
78
78
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.220",
|
|
79
79
|
"@teambit/component.ui.component-filters.env-filter": "0.0.228",
|
|
80
80
|
"@teambit/component.ui.component-filters.show-main-filter": "0.0.213",
|
|
81
|
-
"@teambit/sidebar": "1.0.
|
|
81
|
+
"@teambit/sidebar": "1.0.235",
|
|
82
82
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
|
|
83
83
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.219",
|
|
84
84
|
"@teambit/component-descriptor": "0.0.419",
|