@equinor/echo-cli 0.17.3 → 0.17.4-beta-1
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/client/main.echo.bundle.js +1 -1
- package/client/main.echo.bundle.js.map +1 -1
- package/lib/config/rollup/echoModulePlugin.d.ts +7 -0
- package/lib/config/rollup/echoModulePlugin.js +18 -0
- package/lib/config/rollup/echoModulePlugin.js.map +1 -0
- package/lib/config/rollup/options.d.ts +4 -0
- package/lib/config/rollup/options.js +24 -0
- package/lib/config/rollup/options.js.map +1 -0
- package/lib/config/rollup/plugins.d.ts +4 -0
- package/lib/config/rollup/plugins.js +59 -0
- package/lib/config/rollup/plugins.js.map +1 -0
- package/lib/config/rollup/productionConfig.d.ts +3 -0
- package/lib/config/rollup/productionConfig.js +13 -0
- package/lib/config/rollup/productionConfig.js.map +1 -0
- package/lib/config/rollup/serverConfig.d.ts +2 -0
- package/lib/config/rollup/serverConfig.js +24 -0
- package/lib/config/rollup/serverConfig.js.map +1 -0
- package/lib/config/webpack/configBuilders/devServer.js +1 -1
- package/lib/config/webpack/configBuilders/devServer.js.map +1 -1
- package/lib/echo-run.d.ts +13 -0
- package/lib/echo-run.js +40 -0
- package/lib/echo-run.js.map +1 -0
- package/lib/tools/buildScripts/rollupBuild.d.ts +3 -0
- package/lib/tools/buildScripts/rollupBuild.js +79 -0
- package/lib/tools/buildScripts/rollupBuild.js.map +1 -0
- package/lib/tools/run/start.d.ts +9 -0
- package/lib/tools/run/start.js +27 -0
- package/lib/tools/run/start.js.map +1 -0
- package/lib/tools/run/watch.d.ts +1 -0
- package/lib/tools/run/watch.js +8 -0
- package/lib/tools/run/watch.js.map +1 -0
- package/package.json +2 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see main.echo.bundle.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e,n,t,o={"./node_modules/css-loader/dist/cjs.js!./src/app.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var o=t("./node_modules/css-loader/dist/runtime/sourceMaps.js"),r=t.n(o),s=t("./node_modules/css-loader/dist/runtime/api.js"),i=t.n(s)()(r());i.push([e.id,"/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n","",{version:3,sources:["webpack://./src/app.css"],names:[],mappings:"AAAA,wEAAwE;AACxE;;;IAGI,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,WAAW;AACf",sourcesContent:["/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n"],sourceRoot:""}]);const u=i},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/Home/home.module.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var o=t("./node_modules/css-loader/dist/runtime/sourceMaps.js"),r=t.n(o),s=t("./node_modules/css-loader/dist/runtime/api.js"),i=t.n(s)()(r());i.push([e.id,".echo-Home__home-pPNVd {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.echo-Home__plantSelector-AlrNf {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.echo-Home__heading-vnGkQ {\n padding-left: 18px;\n}\n\n.echo-Home__brandSliderContainer-qt0N4 {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.echo-Home__appBar-XBn9u {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n","",{version:3,sources:["webpack://./src/components/Home/home.module.css"],names:[],mappings:"AAAA;IACI,aAAa;IACb,uCAAuC;IACvC,SAAS;IACT,YAAY;IACZ,WAAW;AACf;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;AACnB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,SAAS;IACT,yBAAyB;IACzB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,mBAAmB;IACnB,aAAa;IACb,eAAe;IACf,uBAAuB;IACvB,uBAAuB;AAC3B",sourcesContent:[".home {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.plantSelector {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.heading {\n padding-left: 18px;\n}\n\n.brandSliderContainer {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.appBar {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n"],sourceRoot:""}]),i.locals={home:"echo-Home__home-pPNVd",plantSelector:"echo-Home__plantSelector-AlrNf",heading:"echo-Home__heading-vnGkQ",brandSliderContainer:"echo-Home__brandSliderContainer-qt0N4",appBar:"echo-Home__appBar-XBn9u"};const u=i},"./src/images/frontpage-brand-placeholder.jpg":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});const o=t.p+"d2d97a9feca22f12a8c8c7413d7867ac.jpg"},"./src/app.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_});var o=t("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=t.n(o),s=t("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=t.n(s),u=t("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=t.n(u),l=t("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),a=t.n(l),d=t("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=t.n(d),h=t("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=t.n(h),m=t("./node_modules/css-loader/dist/cjs.js!./src/app.css"),A={};A.styleTagTransform=p(),A.setAttributes=a(),A.insert=c().bind(null,"head"),A.domAPI=i(),A.insertStyleElement=f(),r()(m.default,A);const _=m.default&&m.default.locals?m.default.locals:void 0},"./src/components/Home/home.module.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_});var o=t("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=t.n(o),s=t("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=t.n(s),u=t("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=t.n(u),l=t("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),a=t.n(l),d=t("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=t.n(d),h=t("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=t.n(h),m=t("./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/Home/home.module.css"),A={};A.styleTagTransform=p(),A.setAttributes=a(),A.insert=c().bind(null,"head"),A.domAPI=i(),A.insertStyleElement=f(),r()(m.default,A);const _=m.default&&m.default.locals?m.default.locals:void 0},"./src/api/api-plants.ts":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getCorePlants=function(){return o(this,void 0,void 0,(function(){var e,n,t;return r(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,i()];case 1:return(e=null!==(t=o.sent())&&void 0!==t?t:[])&&e.length>0&&(0,s.setPlantsData)({plants:e}),[3,3];case 2:return n=o.sent(),console.error(n),[3,3];case 3:return[2]}}))}))};var s=t("./node_modules/@equinor/echo-core/index.cjs.js");function i(){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){return e="".concat(s.EchoEnv.env().REACT_APP_API_URL,"/plants"),[2,(0,s.request)({url:e,cache:{timeInSeconds:14400}})]}))}))}},"./src/app.tsx":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.EchoApp=void 0;var s=t("../../node_modules/react/jsx-runtime.js"),i=t("./node_modules/@equinor/echo-core/index.cjs.js"),u=t("./node_modules/@equinor/echo-framework/index.cjs.js"),c=t("./node_modules/@equinor/echo-search/index.cjs.js"),l=t("./node_modules/@equinor/echo-utils/index.esm.js"),a=t("../../node_modules/react-router-dom/esm/react-router-dom.js"),d=t("./src/api/api-plants.ts");t("./src/app.css");var f=t("./src/components/Home/Home.tsx"),h=t("./src/components/legend.tsx");n.EchoApp=function(){return(0,i.useInitial)((function(){return o(void 0,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,c.Syncer.configuration.setApiBaseUrl(i.EchoEnv.env().REACT_APP_API_URL)];case 1:return e.sent(),(0,l.fireAndForget)(d.getCorePlants),[2]}}))}))})),(0,s.jsx)(u.EchoEventHandler,{children:(0,s.jsxs)(u.EchoContent,{Legend:h.Legend,children:[(0,s.jsxs)(a.Switch,{children:[(0,s.jsx)(u.EchoRoutes,{homeComponent:f.Home}),(0,s.jsx)(a.Route,{render:function(){return(0,s.jsx)(a.Redirect,{to:"/"})}})]}),(0,s.jsx)(u.Toasters,{})]})})}},"./src/components/Home/Home.tsx":function(e,n,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Home=void 0;var r=t("../../node_modules/react/jsx-runtime.js"),s=t("./node_modules/@equinor/echo-framework/index.cjs.js"),i=o(t("./src/images/frontpage-brand-placeholder.jpg")),u=o(t("./src/components/Home/home.module.css"));n.Home=function(){return(0,r.jsxs)("main",{className:u.default.home,children:[(0,r.jsxs)("div",{className:u.default.plantSelector,children:[(0,r.jsx)("div",{children:(0,r.jsx)(s.EchoLogo,{})}),(0,r.jsx)(s.PlantSelector,{variant:"compact"})]}),(0,r.jsx)(s.AppLinks,{}),(0,r.jsx)("div",{className:u.default.brandSliderContainer,children:(0,r.jsx)("img",{src:i.default,alt:"Application Echo on tablet"})}),(0,r.jsx)(s.Footer,{})]})}},"./src/components/legend.tsx":(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Legend=void 0,n.Legend=function(){return null}},"./src/index.tsx":function(e,n,t){"use strict";var o,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},r.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,n,t,o){void 0===o&&(o=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,o,r)}:function(e,n,t,o){void 0===o&&(o=t),e[o]=n[t]}),i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),u=this&&this.__importStar||(o=function(e){return o=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},o(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=o(e),r=0;r<t.length;r++)"default"!==t[r]&&s(n,e,t[r]);return i(n,e),n});Object.defineProperty(n,"__esModule",{value:!0});var c=t("../../node_modules/react/jsx-runtime.js");t("./node_modules/@equinor/echo-components/style-reset.css");var l=u(t("./node_modules/@equinor/echo-core/index.cjs.js")),a=t("./node_modules/@equinor/echo-framework/index.cjs.js"),d=t("./node_modules/@equinor/eds-core-react/dist/esm/index.js"),f=u(t("./node_modules/@equinor/eds-icons/dist/esm/index.js")),h=t("./src/utils/setupSkipAuth.ts"),p=t("../../node_modules/@tanstack/react-query/build/modern/index.cjs"),m=t("../../node_modules/react-dom/client.js"),A=t("../../node_modules/react-router-dom/esm/react-router-dom.js"),_=t("./src/app.tsx"),v=A.BrowserRouter,j=l.EventHubProvider;if(window===window.parent||window.opener){var b=document.getElementById("root");(0,m.createRoot)(b).render((0,c.jsx)((function(){(0,h.initForE2ETests)();var e=l.default.useEchoSetup({leftPanels:[a.searchPanel],rightPanel:a.mainMenu});d.Icon.add(r({},f));var n={createApi:(0,l.createEchoAppModuleApi)(),dependencies:{react:t("../../node_modules/react/index.js"),"react-dom":t("../../node_modules/react-dom/index.js"),"react-router-dom":t("../../node_modules/react-router-dom/esm/react-router-dom.js"),"@equinor/echo-core":t("./node_modules/@equinor/echo-core/index.cjs.js"),"@equinor/echo-framework":t("./node_modules/@equinor/echo-framework/index.cjs.js"),"@equinor/echo-utils":t("./node_modules/@equinor/echo-utils/index.esm.js"),"@equinor/echo-components":t("./node_modules/@equinor/echo-components/index.cjs.js"),"@equinor/echo-base":t("./node_modules/@equinor/echo-base/index.cjs.js"),"@equinor/echo-search":t("./node_modules/@equinor/echo-search/index.cjs.js"),"@equinor/eds-core-react":t("./node_modules/@equinor/eds-core-react/dist/esm/index.js"),"@equinor/eds-icons":t("./node_modules/@equinor/eds-icons/dist/esm/index.js"),"styled-components":t("../../node_modules/styled-components/dist/styled-components.browser.esm.js"),classnames:t("../../node_modules/classnames/index.js"),lodash:t("../../node_modules/lodash/lodash.js"),zustand:t("../../node_modules/zustand/esm/index.js")},fetchModules:function(){return new Promise((function(e){fetch("/echoModuleManifest.json").then((function(n){n.json().then((function(n){n.forEach((function(e){e.fileUri="/index.js"})),e(n)}))}))}))}};return(0,c.jsx)(c.Fragment,{children:e&&(0,c.jsx)(l.default.AuthProviderComponent,{children:(0,c.jsx)(p.QueryClientProvider,{client:l.queryClient,children:(0,c.jsxs)(j,{children:[(0,c.jsx)(a.Mediator,{options:n}),(0,c.jsx)(v,{children:(0,c.jsx)(_.EchoApp,{})})]})})})})}),{}))}},"./src/utils/setupSkipAuth.ts":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.initForE2ETests=function(){var e=(0,u.getDeepLinkParams)(["skipAuth"]).skipAuth;"true"===(null==e?void 0:e.toLowerCase())&&l()},n.setupSkipAuth=l;var i=s(t("./node_modules/@equinor/echo-core/index.cjs.js")),u=t("./node_modules/@equinor/echo-utils/index.esm.js"),c=function(){i.default.EchoAuthProvider.isAuthenticated=!0,i.default.EchoAuthProvider.userProperties={account:{homeAccountId:"homeAccountId",environment:"testingEnvironment",tenantId:"tenantId",username:"tester",localAccountId:"tester123"}}};function l(){var e=this;i.default.EchoAuthProvider.isAuthenticated=!0,i.default.EchoAuthProvider.handleLogin=function(n){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve(void 0)]}))}))},i.default.EchoAuthProvider.ssoSilentOrRedirectToAuthenticate=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve(void 0)]}))}))},i.default.EchoAuthProvider.aquireTokenSilentOrRedirectToAuthenticate=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,null]}))}))},i.default.EchoAuthProvider.login=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve()]}))}))}}},"?d546":()=>{},"?8131":()=>{},"?3fc0":()=>{},"?cad2":()=>{},"?593c":()=>{},"?4068":()=>{},"?e7e4":()=>{},"?7bec":()=>{},"?802b":()=>{},"?1e44":()=>{},"?0aec":()=>{},"?fbf1":()=>{},"?3e83":()=>{},"?19e6":()=>{}},r={};function s(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,s),t.loaded=!0,t.exports}s.m=o,e=[],s.O=(n,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<e.length;a++){for(var[t,o,r]=e[a],u=!0,c=0;c<t.length;c++)(!1&r||i>=r)&&Object.keys(s.O).every((e=>s.O[e](t[c])))?t.splice(c--,1):(u=!1,r<i&&(i=r));if(u){e.splice(a--,1);var l=o();void 0!==l&&(n=l)}}return n}r=r||0;for(var a=e.length;a>0&&e[a-1][2]>r;a--)e[a]=e[a-1];e[a]=[t,o,r]},s.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return s.d(n,{a:n}),n},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var r=Object.create(null);s.r(r);var i={};n=n||[null,t({}),t([]),t(t)];for(var u=2&o&&e;"object"==typeof u&&!~n.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((n=>i[n]=()=>e[n]));return i.default=()=>e,s.d(r,i),r},s.d=(e,n)=>{for(var t in n)s.o(n,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="/",(()=>{var e={main:0};s.O.j=n=>0===e[n];var n=(n,t)=>{var o,r,[i,u,c]=t,l=0;if(i.some((n=>0!==e[n]))){for(o in u)s.o(u,o)&&(s.m[o]=u[o]);if(c)var a=c(s)}for(n&&n(t);l<i.length;l++)r=i[l],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(a)},t=self.webpackChunk_equinor_echo_client=self.webpackChunk_equinor_echo_client||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})(),s.nc=void 0,s.O(void 0,["vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76"],(()=>s("./node_modules/@babel/polyfill/lib/index.js")));var i=s.O(void 0,["vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76"],(()=>s("./src/index.tsx")));i=s.O(i)})();
|
|
2
|
+
(()=>{var e,n,t,o={"./node_modules/css-loader/dist/cjs.js!./src/app.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var o=t("./node_modules/css-loader/dist/runtime/sourceMaps.js"),r=t.n(o),s=t("./node_modules/css-loader/dist/runtime/api.js"),i=t.n(s)()(r());i.push([e.id,"/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n","",{version:3,sources:["webpack://./src/app.css"],names:[],mappings:"AAAA,wEAAwE;AACxE;;;IAGI,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,WAAW;AACf",sourcesContent:["/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n"],sourceRoot:""}]);const u=i},"./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/Home/home.module.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var o=t("./node_modules/css-loader/dist/runtime/sourceMaps.js"),r=t.n(o),s=t("./node_modules/css-loader/dist/runtime/api.js"),i=t.n(s)()(r());i.push([e.id,".echo-Home__home-pPNVd {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.echo-Home__plantSelector-AlrNf {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.echo-Home__heading-vnGkQ {\n padding-left: 18px;\n}\n\n.echo-Home__brandSliderContainer-qt0N4 {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.echo-Home__appBar-XBn9u {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n","",{version:3,sources:["webpack://./src/components/Home/home.module.css"],names:[],mappings:"AAAA;IACI,aAAa;IACb,uCAAuC;IACvC,SAAS;IACT,YAAY;IACZ,WAAW;AACf;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;AACnB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,SAAS;IACT,yBAAyB;IACzB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,mBAAmB;IACnB,aAAa;IACb,eAAe;IACf,uBAAuB;IACvB,uBAAuB;AAC3B",sourcesContent:[".home {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.plantSelector {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.heading {\n padding-left: 18px;\n}\n\n.brandSliderContainer {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.appBar {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n"],sourceRoot:""}]),i.locals={home:"echo-Home__home-pPNVd",plantSelector:"echo-Home__plantSelector-AlrNf",heading:"echo-Home__heading-vnGkQ",brandSliderContainer:"echo-Home__brandSliderContainer-qt0N4",appBar:"echo-Home__appBar-XBn9u"};const u=i},"./src/images/frontpage-brand-placeholder.jpg":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});const o=t.p+"d2d97a9feca22f12a8c8c7413d7867ac.jpg"},"./src/app.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_});var o=t("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=t.n(o),s=t("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=t.n(s),u=t("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=t.n(u),l=t("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),a=t.n(l),d=t("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=t.n(d),h=t("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=t.n(h),m=t("./node_modules/css-loader/dist/cjs.js!./src/app.css"),A={};A.styleTagTransform=p(),A.setAttributes=a(),A.insert=c().bind(null,"head"),A.domAPI=i(),A.insertStyleElement=f(),r()(m.default,A);const _=m.default&&m.default.locals?m.default.locals:void 0},"./src/components/Home/home.module.css":(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_});var o=t("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=t.n(o),s=t("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),i=t.n(s),u=t("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=t.n(u),l=t("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),a=t.n(l),d=t("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),f=t.n(d),h=t("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=t.n(h),m=t("./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./src/components/Home/home.module.css"),A={};A.styleTagTransform=p(),A.setAttributes=a(),A.insert=c().bind(null,"head"),A.domAPI=i(),A.insertStyleElement=f(),r()(m.default,A);const _=m.default&&m.default.locals?m.default.locals:void 0},"./src/api/api-plants.ts":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.getCorePlants=function(){return o(this,void 0,void 0,(function(){var e,n,t;return r(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,i()];case 1:return(e=null!==(t=o.sent())&&void 0!==t?t:[])&&e.length>0&&(0,s.setPlantsData)({plants:e}),[3,3];case 2:return n=o.sent(),console.error(n),[3,3];case 3:return[2]}}))}))};var s=t("./node_modules/@equinor/echo-core/index.cjs.js");function i(){return o(this,void 0,void 0,(function(){var e;return r(this,(function(n){return e="".concat(s.EchoEnv.env().REACT_APP_API_URL,"/plants"),[2,(0,s.request)({url:e,cache:{timeInSeconds:14400}})]}))}))}},"./src/app.tsx":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.EchoApp=void 0;var s=t("../../node_modules/react/jsx-runtime.js"),i=t("./node_modules/@equinor/echo-core/index.cjs.js"),u=t("./node_modules/@equinor/echo-framework/index.cjs.js"),c=t("./node_modules/@equinor/echo-search/index.cjs.js"),l=t("./node_modules/@equinor/echo-utils/index.esm.js"),a=t("../../node_modules/react-router-dom/esm/react-router-dom.js"),d=t("./src/api/api-plants.ts");t("./src/app.css");var f=t("./src/components/Home/Home.tsx"),h=t("./src/components/legend.tsx");n.EchoApp=function(){return(0,i.useInitial)((function(){return o(void 0,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,c.Syncer.configuration.setApiBaseUrl(i.EchoEnv.env().REACT_APP_API_URL)];case 1:return e.sent(),(0,l.fireAndForget)(d.getCorePlants),[2]}}))}))})),(0,s.jsx)(u.EchoEventHandler,{children:(0,s.jsxs)(u.EchoContent,{Legend:h.Legend,children:[(0,s.jsxs)(a.Switch,{children:[(0,s.jsx)(u.EchoRoutes,{homeComponent:f.Home}),(0,s.jsx)(a.Route,{render:function(){return(0,s.jsx)(a.Redirect,{to:"/"})}})]}),(0,s.jsx)(u.Toasters,{})]})})}},"./src/components/Home/Home.tsx":function(e,n,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Home=void 0;var r=t("../../node_modules/react/jsx-runtime.js"),s=t("./node_modules/@equinor/echo-framework/index.cjs.js"),i=o(t("./src/images/frontpage-brand-placeholder.jpg")),u=o(t("./src/components/Home/home.module.css"));n.Home=function(){return(0,r.jsxs)("main",{className:u.default.home,children:[(0,r.jsxs)("div",{className:u.default.plantSelector,children:[(0,r.jsx)("div",{children:(0,r.jsx)(s.EchoLogo,{})}),(0,r.jsx)(s.PlantSelector,{variant:"compact"})]}),(0,r.jsx)(s.AppLinks,{}),(0,r.jsx)("div",{className:u.default.brandSliderContainer,children:(0,r.jsx)("img",{src:i.default,alt:"Application Echo on tablet"})}),(0,r.jsx)(s.Footer,{})]})}},"./src/components/legend.tsx":(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Legend=void 0,n.Legend=function(){return null}},"./src/index.tsx":function(e,n,t){"use strict";var o,r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},r.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,n,t,o){void 0===o&&(o=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,o,r)}:function(e,n,t,o){void 0===o&&(o=t),e[o]=n[t]}),i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),u=this&&this.__importStar||(o=function(e){return o=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},o(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=o(e),r=0;r<t.length;r++)"default"!==t[r]&&s(n,e,t[r]);return i(n,e),n});Object.defineProperty(n,"__esModule",{value:!0});var c=t("../../node_modules/react/jsx-runtime.js");t("./node_modules/@equinor/echo-components/style-reset.css");var l=u(t("./node_modules/@equinor/echo-core/index.cjs.js")),a=t("./node_modules/@equinor/echo-framework/index.cjs.js"),d=t("./node_modules/@equinor/eds-core-react/dist/esm/index.js"),f=u(t("./node_modules/@equinor/eds-icons/dist/esm/index.js")),h=t("./src/utils/setupSkipAuth.ts"),p=t("../../node_modules/@tanstack/react-query/build/modern/index.cjs"),m=t("../../node_modules/react-dom/client.js"),A=t("../../node_modules/react-router-dom/esm/react-router-dom.js"),_=t("./src/app.tsx"),v=A.BrowserRouter,j=l.EventHubProvider;if(window===window.parent||window.opener){var b=document.getElementById("root");(0,m.createRoot)(b).render((0,c.jsx)((function(){(0,h.initForE2ETests)();var e=l.default.useEchoSetup({leftPanels:[a.searchPanel],rightPanel:a.mainMenu});d.Icon.add(r({},f));var n={createApi:(0,l.createEchoAppModuleApi)(),dependencies:{react:t("../../node_modules/react/index.js"),"react-dom":t("../../node_modules/react-dom/index.js"),"react-router-dom":t("../../node_modules/react-router-dom/esm/react-router-dom.js"),"@equinor/echo-core":t("./node_modules/@equinor/echo-core/index.cjs.js"),"@equinor/echo-framework":t("./node_modules/@equinor/echo-framework/index.cjs.js"),"@equinor/echo-utils":t("./node_modules/@equinor/echo-utils/index.esm.js"),"@equinor/echo-components":t("./node_modules/@equinor/echo-components/index.cjs.js"),"@equinor/echo-base":t("./node_modules/@equinor/echo-base/index.cjs.js"),"@equinor/echo-search":t("./node_modules/@equinor/echo-search/index.cjs.js"),"@equinor/eds-core-react":t("./node_modules/@equinor/eds-core-react/dist/esm/index.js"),"@equinor/eds-icons":t("./node_modules/@equinor/eds-icons/dist/esm/index.js"),"styled-components":t("../../node_modules/styled-components/dist/styled-components.browser.esm.js"),classnames:t("../../node_modules/classnames/index.js"),lodash:t("../../node_modules/lodash/lodash.js"),zustand:t("../../node_modules/zustand/esm/index.js")},fetchModules:function(){return new Promise((function(e){fetch("/echoModuleManifest.json").then((function(n){console.log(n.headers.get("content-type")),n.json().then((function(n){n.forEach((function(e){e.fileUri="/index.js"})),e(n)}))}))}))}};return(0,c.jsx)(c.Fragment,{children:e&&(0,c.jsx)(l.default.AuthProviderComponent,{children:(0,c.jsx)(p.QueryClientProvider,{client:l.queryClient,children:(0,c.jsxs)(j,{children:[(0,c.jsx)(a.Mediator,{options:n}),(0,c.jsx)(v,{children:(0,c.jsx)(_.EchoApp,{})})]})})})})}),{}))}},"./src/utils/setupSkipAuth.ts":function(e,n,t){"use strict";var o=this&&this.__awaiter||function(e,n,t,o){return new(t||(t=Promise))((function(r,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function u(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,u)}c((o=o.apply(e,n||[])).next())}))},r=this&&this.__generator||function(e,n){var t,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(t=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,o=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=n.call(e,s)}catch(e){u=[6,e],o=0}finally{t=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.initForE2ETests=function(){var e=(0,u.getDeepLinkParams)(["skipAuth"]).skipAuth;"true"===(null==e?void 0:e.toLowerCase())&&l()},n.setupSkipAuth=l;var i=s(t("./node_modules/@equinor/echo-core/index.cjs.js")),u=t("./node_modules/@equinor/echo-utils/index.esm.js"),c=function(){i.default.EchoAuthProvider.isAuthenticated=!0,i.default.EchoAuthProvider.userProperties={account:{homeAccountId:"homeAccountId",environment:"testingEnvironment",tenantId:"tenantId",username:"tester",localAccountId:"tester123"}}};function l(){var e=this;i.default.EchoAuthProvider.isAuthenticated=!0,i.default.EchoAuthProvider.handleLogin=function(n){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve(void 0)]}))}))},i.default.EchoAuthProvider.ssoSilentOrRedirectToAuthenticate=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve(void 0)]}))}))},i.default.EchoAuthProvider.aquireTokenSilentOrRedirectToAuthenticate=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,null]}))}))},i.default.EchoAuthProvider.login=function(){return o(e,void 0,void 0,(function(){return r(this,(function(e){return c(),[2,Promise.resolve()]}))}))}}},"?d546":()=>{},"?8131":()=>{},"?3fc0":()=>{},"?cad2":()=>{},"?593c":()=>{},"?4068":()=>{},"?e7e4":()=>{},"?7bec":()=>{},"?802b":()=>{},"?1e44":()=>{},"?0aec":()=>{},"?fbf1":()=>{},"?3e83":()=>{},"?19e6":()=>{}},r={};function s(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,s),t.loaded=!0,t.exports}s.m=o,e=[],s.O=(n,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<e.length;a++){for(var[t,o,r]=e[a],u=!0,c=0;c<t.length;c++)(!1&r||i>=r)&&Object.keys(s.O).every((e=>s.O[e](t[c])))?t.splice(c--,1):(u=!1,r<i&&(i=r));if(u){e.splice(a--,1);var l=o();void 0!==l&&(n=l)}}return n}r=r||0;for(var a=e.length;a>0&&e[a-1][2]>r;a--)e[a]=e[a-1];e[a]=[t,o,r]},s.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return s.d(n,{a:n}),n},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var r=Object.create(null);s.r(r);var i={};n=n||[null,t({}),t([]),t(t)];for(var u=2&o&&e;"object"==typeof u&&!~n.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((n=>i[n]=()=>e[n]));return i.default=()=>e,s.d(r,i),r},s.d=(e,n)=>{for(var t in n)s.o(n,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="/",(()=>{var e={main:0};s.O.j=n=>0===e[n];var n=(n,t)=>{var o,r,[i,u,c]=t,l=0;if(i.some((n=>0!==e[n]))){for(o in u)s.o(u,o)&&(s.m[o]=u[o]);if(c)var a=c(s)}for(n&&n(t);l<i.length;l++)r=i[l],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(a)},t=self.webpackChunk_equinor_echo_client=self.webpackChunk_equinor_echo_client||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})(),s.nc=void 0,s.O(void 0,["vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76"],(()=>s("./node_modules/@babel/polyfill/lib/index.js")));var i=s.O(void 0,["vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76"],(()=>s("./src/index.tsx")));i=s.O(i)})();
|
|
3
3
|
//# sourceMappingURL=main.echo.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.echo.bundle.js","mappings":";UAAIA,ECCAC,EADAC,8OCGAC,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gNAYtC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2BAA2B,MAAQ,GAAG,SAAW,oFAAoF,eAAiB,CAAC,iNAAiN,WAAa,MAEnZ,wSChBIH,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,8tBAsCtC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,mDAAmD,MAAQ,GAAG,SAAW,gUAAgU,eAAiB,CAAC,0oBAA0oB,WAAa,MAEhlCH,EAAwBI,OAAS,CAChC,KAAQ,wBACR,cAAiB,iCACjB,QAAW,2BACX,qBAAwB,wCACxB,OAAU,2BAEX,+GCpDA,QAAe,IAA0B,8oBCWrCC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,UAASL,GAKnB,QAAe,WAAW,UAAQD,OAAS,UAA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,GAHTlD,EAAUsD,EAAaC,GAAWF,EAGhBhD,EAAI,EAC3B,GAAGL,EAASwD,MAAMlL,GAAgC,IAAxB2K,EAAgB3K,KAAa,CACtD,IAAIiH,KAAY+D,EACZhE,EAAoB0C,EAAEsB,EAAa/D,KACrCD,EAAoBO,EAAEN,GAAY+D,EAAY/D,IAGhD,GAAGgE,EAAS,IAAIxD,EAASwD,EAAQjE,EAClC,CAEA,IADG8D,GAA4BA,EAA2BC,GACrDhD,EAAIL,EAAS/G,OAAQoH,IACzB6C,EAAUlD,EAASK,GAChBf,EAAoB0C,EAAEiB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO5D,EAAoBQ,EAAEC,EAAO,EAGjC0D,EAAqBC,KAAuC,iCAAIA,KAAuC,kCAAK,GAChHD,EAAmB9F,QAAQwF,EAAqBQ,KAAK,KAAM,IAC3DF,EAAmBrL,KAAO+K,EAAqBQ,KAAK,KAAMF,EAAmBrL,KAAKuL,KAAKF,QChDvFnE,EAAoBsE,QAAK9K,ECGzBwG,EAAoBQ,OAAEhH,EAAW,CAAC,yGAAyG,IAAOwG,EAAoB,iDACtK,IAAIuE,EAAsBvE,EAAoBQ,OAAEhH,EAAW,CAAC,yGAAyG,IAAOwG,EAAoB,qBAChMuE,EAAsBvE,EAAoBQ,EAAE+D","sources":["webpack://@equinor/echo-client/webpack/runtime/chunk loaded","webpack://@equinor/echo-client/webpack/runtime/create fake namespace object","webpack://@equinor/echo-client/./src/app.css","webpack://@equinor/echo-client/./src/components/Home/home.module.css","webpack://@equinor/echo-client/./src/images/frontpage-brand-placeholder.jpg","webpack://@equinor/echo-client/./src/app.css?a672","webpack://@equinor/echo-client/./src/components/Home/home.module.css?96e0","webpack://@equinor/echo-client/./src/api/api-plants.ts","webpack://@equinor/echo-client/./src/app.tsx","webpack://@equinor/echo-client/./src/components/Home/Home.tsx","webpack://@equinor/echo-client/./src/components/legend.tsx","webpack://@equinor/echo-client/./src/index.tsx","webpack://@equinor/echo-client/./src/utils/setupSkipAuth.ts","webpack://@equinor/echo-client/webpack/bootstrap","webpack://@equinor/echo-client/webpack/runtime/compat get default export","webpack://@equinor/echo-client/webpack/runtime/define property getters","webpack://@equinor/echo-client/webpack/runtime/global","webpack://@equinor/echo-client/webpack/runtime/hasOwnProperty shorthand","webpack://@equinor/echo-client/webpack/runtime/make namespace object","webpack://@equinor/echo-client/webpack/runtime/node module decorator","webpack://@equinor/echo-client/webpack/runtime/publicPath","webpack://@equinor/echo-client/webpack/runtime/jsonp chunk loading","webpack://@equinor/echo-client/webpack/runtime/nonce","webpack://@equinor/echo-client/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app.css\"],\"names\":[],\"mappings\":\"AAAA,wEAAwE;AACxE;;;IAGI,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,WAAW;AACf\",\"sourcesContent\":[\"/* Applied in echo application by bootstrap so it should exist here to */\\n*,\\n:after,\\n:before {\\n box-sizing: border-box;\\n}\\n\\n#root {\\n height: 100%;\\n overflow: hidden;\\n width: 100%;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.echo-Home__home-pPNVd {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.echo-Home__plantSelector-AlrNf {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.echo-Home__heading-vnGkQ {\n padding-left: 18px;\n}\n\n.echo-Home__brandSliderContainer-qt0N4 {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.echo-Home__appBar-XBn9u {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/Home/home.module.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,aAAa;IACb,uCAAuC;IACvC,SAAS;IACT,YAAY;IACZ,WAAW;AACf;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;AACnB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,SAAS;IACT,yBAAyB;IACzB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,mBAAmB;IACnB,aAAa;IACb,eAAe;IACf,uBAAuB;IACvB,uBAAuB;AAC3B\",\"sourcesContent\":[\".home {\\n display: grid;\\n grid-template-rows: 30% 100px auto 56px;\\n gap: 1rem;\\n height: 100%;\\n width: 100%;\\n}\\n\\n.plantSelector {\\n display: flex;\\n justify-content: center;\\n align-items: baseline;\\n align-self: center;\\n flex-flow: wrap;\\n}\\n\\n.heading {\\n padding-left: 18px;\\n}\\n\\n.brandSliderContainer {\\n display: flex;\\n flex: 1 1;\\n flex-flow: column-reverse;\\n margin: 0;\\n width: 100%;\\n overflow: hidden;\\n object-fit: cover;\\n}\\n\\n.appBar {\\n margin: 0 auto 48px;\\n display: flex;\\n flex-wrap: wrap;\\n justify-content: center;\\n align-items: flex-start;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"home\": `echo-Home__home-pPNVd`,\n\t\"plantSelector\": `echo-Home__plantSelector-AlrNf`,\n\t\"heading\": `echo-Home__heading-vnGkQ`,\n\t\"brandSliderContainer\": `echo-Home__brandSliderContainer-qt0N4`,\n\t\"appBar\": `echo-Home__appBar-XBn9u`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","export default __webpack_public_path__ + \"d2d97a9feca22f12a8c8c7413d7867ac.jpg\";","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./app.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./app.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./home.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./home.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { EchoEnv, Plant, request, setPlantsData } from '@equinor/echo-core';\n\nasync function getPlantsFromApi(): Promise<Plant[] | undefined> {\n const url = `${EchoEnv.env().REACT_APP_API_URL}/plants`;\n return request<Plant[]>({\n url, cache: {\n timeInSeconds: 4 * 60 * 60 // 4 hours\n }\n });\n}\n\nexport async function getCorePlants(): Promise<void> {\n try {\n const apiPlants = (await getPlantsFromApi() ?? []);\n\n if (apiPlants && apiPlants.length > 0) {\n setPlantsData({ plants: apiPlants });\n }\n } catch (ex) {\n console.error(ex);\n }\n}\n","import { EchoEnv, useInitial } from '@equinor/echo-core';\nimport { EchoContent, EchoEventHandler, EchoRoutes, Toasters } from '@equinor/echo-framework';\nimport { Syncer } from '@equinor/echo-search';\nimport { fireAndForget } from '@equinor/echo-utils';\nimport React from 'react';\nimport { Redirect as TypedRedirect, Route as TypedRoute, Switch as TypedSwitch } from 'react-router-dom';\nimport { getCorePlants } from './api/api-plants';\nimport './app.css';\nimport { Home } from './components/Home/Home';\nimport { Legend } from './components/legend';\n\nexport const EchoApp: React.FC = () => {\n useInitial(async () => {\n await Syncer.configuration.setApiBaseUrl(EchoEnv.env().REACT_APP_API_URL);\n fireAndForget(getCorePlants);\n });\n\n return (\n <EchoEventHandler>\n <EchoContent Legend={Legend}>\n <TypedSwitch>\n <EchoRoutes homeComponent={Home} />\n <TypedRoute render={(): JSX.Element => <TypedRedirect to=\"/\" />} />\n </TypedSwitch>\n <Toasters />\n </EchoContent>\n </EchoEventHandler>\n );\n};\n","import { AppLinks, EchoLogo, Footer, PlantSelector } from '@equinor/echo-framework';\nimport React from 'react';\nimport placeholderHomeImage from '../../images/frontpage-brand-placeholder.jpg';\nimport style from './home.module.css';\n\nexport const Home: React.FC = () => {\n return (\n <main className={style.home}>\n <div className={style.plantSelector}>\n <div>\n <EchoLogo />\n </div>\n\n <PlantSelector variant=\"compact\" />\n </div>\n <AppLinks />\n <div className={style.brandSliderContainer}>\n <img src={placeholderHomeImage} alt=\"Application Echo on tablet\" />\n </div>\n <Footer />\n </main>\n );\n};\n\n","export const Legend: React.FC = () => {\n return null;\n};\n","import { LoadingModuleOptions } from '@equinor/echo-base';\nimport '@equinor/echo-components/style-reset.css';\nimport EchoCore, { createEchoAppModuleApi, queryClient, EventHubProvider as TypedEventHubProvider } from '@equinor/echo-core';\nimport { mainMenu, Mediator, searchPanel } from '@equinor/echo-framework';\nimport { Icon } from '@equinor/eds-core-react';\nimport * as Icons from '@equinor/eds-icons';\nimport React from 'react';\nimport { initForE2ETests } from './utils/setupSkipAuth';\n\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { createRoot } from 'react-dom/client';\nimport { BrowserRouter as TypedBrowserRouter } from 'react-router-dom';\nimport { EchoApp } from './app';\n\n/**\n * TODO: further investigation needed.\n * Getting these type errors for React components, which have children.\n * Same setup works in echopediaWeb. Maybe it will be resolved with a next version bump?\n * Doing a workaround now: setting them to 'any' type.\n *\n * TS2786: 'BrowserRouter' cannot be used as a JSX component.\n Its type 'typeof BrowserRouter' is not a valid JSX element type.\n Type 'typeof BrowserRouter' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any,\n any, any>'.\n Construct signature return types 'BrowserRouter' and 'Component<any, any, any>' are incompatible.\n The types returned by 'render()' are incompatible between these types.\n */\nconst BrowserRouter = TypedBrowserRouter as any;\nconst EventHubProvider = TypedEventHubProvider as any;\n\nconst useEdsIcon = (): void => {\n Icon.add({\n ...Icons\n });\n};\n\nconst Echo: React.FC = (): JSX.Element => {\n /* Needed to skip authentication when running e2e tests*/\n initForE2ETests();\n\n const isAuthenticated = EchoCore.useEchoSetup({\n leftPanels: [searchPanel],\n rightPanel: mainMenu\n });\n useEdsIcon();\n const moduleOptions: LoadingModuleOptions = {\n createApi: createEchoAppModuleApi(),\n dependencies: {\n react: require('react'),\n 'react-dom': require('react-dom'),\n 'react-router-dom': require('react-router-dom'),\n '@equinor/echo-core': require('@equinor/echo-core'),\n '@equinor/echo-framework': require('@equinor/echo-framework'),\n '@equinor/echo-utils': require('@equinor/echo-utils'),\n '@equinor/echo-components': require('@equinor/echo-components'),\n '@equinor/echo-base': require('@equinor/echo-base'),\n '@equinor/echo-search': require('@equinor/echo-search'),\n '@equinor/eds-core-react': require('@equinor/eds-core-react'),\n '@equinor/eds-icons': require('@equinor/eds-icons'),\n 'styled-components': require('styled-components'),\n classnames: require('classnames'),\n lodash: require('lodash'),\n zustand: require('zustand')\n },\n fetchModules: () => {\n return new Promise((resolve) => {\n fetch('/echoModuleManifest.json').then((response) => {\n response.json().then((manifests) => {\n manifests.forEach((manifest) => {\n manifest.fileUri = `/index.js`;\n });\n resolve(manifests);\n });\n });\n });\n }\n };\n return (\n <>\n {isAuthenticated && (\n <EchoCore.AuthProviderComponent>\n <QueryClientProvider client={queryClient}>\n <EventHubProvider>\n <Mediator options={moduleOptions} />\n <BrowserRouter>\n <EchoApp />\n </BrowserRouter>\n </EventHubProvider>\n </QueryClientProvider>\n </EchoCore.AuthProviderComponent>\n )}\n </>\n );\n};\n\nif (!(window !== window.parent && !window.opener)) {\n const container = document.getElementById('root') as HTMLElement;\n const root = createRoot(container);\n root.render(<Echo />);\n}\n","import EchoCore, { AuthenticationResult } from '@equinor/echo-core';\nimport { getDeepLinkParams } from '@equinor/echo-utils';\n\nexport function initForE2ETests() {\n const { skipAuth } = getDeepLinkParams(['skipAuth']);\n if (skipAuth?.toLowerCase() === 'true') {\n setupSkipAuth();\n }\n}\n\nconst setAuthentication = () => {\n EchoCore.EchoAuthProvider.isAuthenticated = true;\n EchoCore.EchoAuthProvider.userProperties = {\n account: {\n homeAccountId: 'homeAccountId',\n environment: 'testingEnvironment',\n tenantId: 'tenantId',\n username: 'tester',\n localAccountId: 'tester123'\n }\n };\n};\n\nexport function setupSkipAuth() {\n EchoCore.EchoAuthProvider.isAuthenticated = true;\n EchoCore.EchoAuthProvider.handleLogin = async (logRequest?: (...args: unknown[]) => void): Promise<void> => {\n setAuthentication();\n return Promise.resolve(undefined);\n };\n EchoCore.EchoAuthProvider.ssoSilentOrRedirectToAuthenticate = async () => {\n setAuthentication();\n return Promise.resolve(undefined);\n };\n EchoCore.EchoAuthProvider.aquireTokenSilentOrRedirectToAuthenticate =\n async (): Promise<AuthenticationResult | null> => {\n setAuthentication();\n return null;\n };\n EchoCore.EchoAuthProvider.login = async () => {\n setAuthentication();\n return Promise.resolve();\n };\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"main\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_equinor_echo_client\"] = self[\"webpackChunk_equinor_echo_client\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\n__webpack_require__.O(undefined, [\"vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76\"], () => (__webpack_require__(\"./node_modules/@babel/polyfill/lib/index.js\")))\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76\"], () => (__webpack_require__(\"./src/index.tsx\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","getPlantsFromApi","apiPlants","length","setPlantsData","plants","console","error","url","EchoEnv","env","REACT_APP_API_URL","request","cache","timeInSeconds","EchoApp","useInitial","Syncer","configuration","setApiBaseUrl","fireAndForget","getCorePlants","EchoEventHandler","EchoContent","Legend","EchoRoutes","homeComponent","Home","render","to","Toasters","className","home","plantSelector","EchoLogo","PlantSelector","variant","AppLinks","brandSliderContainer","src","alt","Footer","BrowserRouter","EventHubProvider","window","parent","opener","container","document","getElementById","createRoot","initForE2ETests","isAuthenticated","useEchoSetup","leftPanels","searchPanel","rightPanel","mainMenu","Icon","add","Icons","moduleOptions","createApi","createEchoAppModuleApi","dependencies","react","classnames","lodash","zustand","fetchModules","Promise","resolve","fetch","then","response","json","manifests","forEach","manifest","fileUri","AuthProviderComponent","QueryClientProvider","client","queryClient","Mediator","skipAuth","getDeepLinkParams","toLowerCase","setupSkipAuth","setAuthentication","EchoAuthProvider","userProperties","account","homeAccountId","environment","tenantId","username","localAccountId","handleLogin","logRequest","ssoSilentOrRedirectToAuthenticate","aquireTokenSilentOrRedirectToAuthenticate","login","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","getPrototypeOf","obj","t","value","mode","this","ns","create","def","current","indexOf","getOwnPropertyNames","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","p","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","bind","nc","__webpack_exports__"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"main.echo.bundle.js","mappings":";UAAIA,ECCAC,EADAC,8OCGAC,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gNAYtC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2BAA2B,MAAQ,GAAG,SAAW,oFAAoF,eAAiB,CAAC,iNAAiN,WAAa,MAEnZ,wSChB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OAAEnH,EAAW,CAAC,yGAAyG,IAAO2G,EAAoB,iDACtK,IAAIsE,EAAsBtE,EAAoBQ,OAAEnH,EAAW,CAAC,yGAAyG,IAAO2G,EAAoB,qBAChMsE,EAAsBtE,EAAoBQ,EAAE8D","sources":["webpack://@equinor/echo-client/webpack/runtime/chunk loaded","webpack://@equinor/echo-client/webpack/runtime/create fake namespace object","webpack://@equinor/echo-client/./src/app.css","webpack://@equinor/echo-client/./src/components/Home/home.module.css","webpack://@equinor/echo-client/./src/images/frontpage-brand-placeholder.jpg","webpack://@equinor/echo-client/./src/app.css?a672","webpack://@equinor/echo-client/./src/components/Home/home.module.css?96e0","webpack://@equinor/echo-client/./src/api/api-plants.ts","webpack://@equinor/echo-client/./src/app.tsx","webpack://@equinor/echo-client/./src/components/Home/Home.tsx","webpack://@equinor/echo-client/./src/components/legend.tsx","webpack://@equinor/echo-client/./src/index.tsx","webpack://@equinor/echo-client/./src/utils/setupSkipAuth.ts","webpack://@equinor/echo-client/webpack/bootstrap","webpack://@equinor/echo-client/webpack/runtime/compat get default export","webpack://@equinor/echo-client/webpack/runtime/define property getters","webpack://@equinor/echo-client/webpack/runtime/global","webpack://@equinor/echo-client/webpack/runtime/hasOwnProperty shorthand","webpack://@equinor/echo-client/webpack/runtime/make namespace object","webpack://@equinor/echo-client/webpack/runtime/node module decorator","webpack://@equinor/echo-client/webpack/runtime/publicPath","webpack://@equinor/echo-client/webpack/runtime/jsonp chunk loading","webpack://@equinor/echo-client/webpack/runtime/nonce","webpack://@equinor/echo-client/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/* Applied in echo application by bootstrap so it should exist here to */\n*,\n:after,\n:before {\n box-sizing: border-box;\n}\n\n#root {\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app.css\"],\"names\":[],\"mappings\":\"AAAA,wEAAwE;AACxE;;;IAGI,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,gBAAgB;IAChB,WAAW;AACf\",\"sourcesContent\":[\"/* Applied in echo application by bootstrap so it should exist here to */\\n*,\\n:after,\\n:before {\\n box-sizing: border-box;\\n}\\n\\n#root {\\n height: 100%;\\n overflow: hidden;\\n width: 100%;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.echo-Home__home-pPNVd {\n display: grid;\n grid-template-rows: 30% 100px auto 56px;\n gap: 1rem;\n height: 100%;\n width: 100%;\n}\n\n.echo-Home__plantSelector-AlrNf {\n display: flex;\n justify-content: center;\n align-items: baseline;\n align-self: center;\n flex-flow: wrap;\n}\n\n.echo-Home__heading-vnGkQ {\n padding-left: 18px;\n}\n\n.echo-Home__brandSliderContainer-qt0N4 {\n display: flex;\n flex: 1 1;\n flex-flow: column-reverse;\n margin: 0;\n width: 100%;\n overflow: hidden;\n object-fit: cover;\n}\n\n.echo-Home__appBar-XBn9u {\n margin: 0 auto 48px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n}\n\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/Home/home.module.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,aAAa;IACb,uCAAuC;IACvC,SAAS;IACT,YAAY;IACZ,WAAW;AACf;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;AACnB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,SAAS;IACT,yBAAyB;IACzB,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,mBAAmB;IACnB,aAAa;IACb,eAAe;IACf,uBAAuB;IACvB,uBAAuB;AAC3B\",\"sourcesContent\":[\".home {\\n display: grid;\\n grid-template-rows: 30% 100px auto 56px;\\n gap: 1rem;\\n height: 100%;\\n width: 100%;\\n}\\n\\n.plantSelector {\\n display: flex;\\n justify-content: center;\\n align-items: baseline;\\n align-self: center;\\n flex-flow: wrap;\\n}\\n\\n.heading {\\n padding-left: 18px;\\n}\\n\\n.brandSliderContainer {\\n display: flex;\\n flex: 1 1;\\n flex-flow: column-reverse;\\n margin: 0;\\n width: 100%;\\n overflow: hidden;\\n object-fit: cover;\\n}\\n\\n.appBar {\\n margin: 0 auto 48px;\\n display: flex;\\n flex-wrap: wrap;\\n justify-content: center;\\n align-items: flex-start;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"home\": `echo-Home__home-pPNVd`,\n\t\"plantSelector\": `echo-Home__plantSelector-AlrNf`,\n\t\"heading\": `echo-Home__heading-vnGkQ`,\n\t\"brandSliderContainer\": `echo-Home__brandSliderContainer-qt0N4`,\n\t\"appBar\": `echo-Home__appBar-XBn9u`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","export default __webpack_public_path__ + \"d2d97a9feca22f12a8c8c7413d7867ac.jpg\";","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./app.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./app.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./home.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./home.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { EchoEnv, Plant, request, setPlantsData } from '@equinor/echo-core';\n\nasync function getPlantsFromApi(): Promise<Plant[] | undefined> {\n const url = `${EchoEnv.env().REACT_APP_API_URL}/plants`;\n return request<Plant[]>({\n url, cache: {\n timeInSeconds: 4 * 60 * 60 // 4 hours\n }\n });\n}\n\nexport async function getCorePlants(): Promise<void> {\n try {\n const apiPlants = (await getPlantsFromApi() ?? []);\n\n if (apiPlants && apiPlants.length > 0) {\n setPlantsData({ plants: apiPlants });\n }\n } catch (ex) {\n console.error(ex);\n }\n}\n","import { EchoEnv, useInitial } from '@equinor/echo-core';\nimport { EchoContent, EchoEventHandler, EchoRoutes, Toasters } from '@equinor/echo-framework';\nimport { Syncer } from '@equinor/echo-search';\nimport { fireAndForget } from '@equinor/echo-utils';\nimport React from 'react';\nimport { Redirect as TypedRedirect, Route as TypedRoute, Switch as TypedSwitch } from 'react-router-dom';\nimport { getCorePlants } from './api/api-plants';\nimport './app.css';\nimport { Home } from './components/Home/Home';\nimport { Legend } from './components/legend';\n\nexport const EchoApp: React.FC = () => {\n useInitial(async () => {\n await Syncer.configuration.setApiBaseUrl(EchoEnv.env().REACT_APP_API_URL);\n fireAndForget(getCorePlants);\n });\n\n return (\n <EchoEventHandler>\n <EchoContent Legend={Legend}>\n <TypedSwitch>\n <EchoRoutes homeComponent={Home} />\n <TypedRoute render={(): JSX.Element => <TypedRedirect to=\"/\" />} />\n </TypedSwitch>\n <Toasters />\n </EchoContent>\n </EchoEventHandler>\n );\n};\n","import { AppLinks, EchoLogo, Footer, PlantSelector } from '@equinor/echo-framework';\nimport React from 'react';\nimport placeholderHomeImage from '../../images/frontpage-brand-placeholder.jpg';\nimport style from './home.module.css';\n\nexport const Home: React.FC = () => {\n return (\n <main className={style.home}>\n <div className={style.plantSelector}>\n <div>\n <EchoLogo />\n </div>\n\n <PlantSelector variant=\"compact\" />\n </div>\n <AppLinks />\n <div className={style.brandSliderContainer}>\n <img src={placeholderHomeImage} alt=\"Application Echo on tablet\" />\n </div>\n <Footer />\n </main>\n );\n};\n\n","export const Legend: React.FC = () => {\n return null;\n};\n","import { LoadingModuleOptions } from '@equinor/echo-base';\nimport '@equinor/echo-components/style-reset.css';\nimport EchoCore, {\n createEchoAppModuleApi,\n queryClient,\n EventHubProvider as TypedEventHubProvider\n} from '@equinor/echo-core';\nimport { mainMenu, Mediator, searchPanel } from '@equinor/echo-framework';\nimport { Icon } from '@equinor/eds-core-react';\nimport * as Icons from '@equinor/eds-icons';\nimport React from 'react';\nimport { initForE2ETests } from './utils/setupSkipAuth';\n\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { createRoot } from 'react-dom/client';\nimport { BrowserRouter as TypedBrowserRouter } from 'react-router-dom';\nimport { EchoApp } from './app';\n\n/**\n * TODO: further investigation needed.\n * Getting these type errors for React components, which have children.\n * Same setup works in echopediaWeb. Maybe it will be resolved with a next version bump?\n * Doing a workaround now: setting them to 'any' type.\n *\n * TS2786: 'BrowserRouter' cannot be used as a JSX component.\n Its type 'typeof BrowserRouter' is not a valid JSX element type.\n Type 'typeof BrowserRouter' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any,\n any, any>'.\n Construct signature return types 'BrowserRouter' and 'Component<any, any, any>' are incompatible.\n The types returned by 'render()' are incompatible between these types.\n */\nconst BrowserRouter = TypedBrowserRouter as any;\nconst EventHubProvider = TypedEventHubProvider as any;\n\nconst useEdsIcon = (): void => {\n Icon.add({\n ...Icons\n });\n};\n\nconst Echo: React.FC = (): JSX.Element => {\n /* Needed to skip authentication when running e2e tests*/\n initForE2ETests();\n\n const isAuthenticated = EchoCore.useEchoSetup({\n leftPanels: [searchPanel],\n rightPanel: mainMenu\n });\n useEdsIcon();\n const moduleOptions: LoadingModuleOptions = {\n createApi: createEchoAppModuleApi(),\n dependencies: {\n react: require('react'),\n 'react-dom': require('react-dom'),\n 'react-router-dom': require('react-router-dom'),\n '@equinor/echo-core': require('@equinor/echo-core'),\n '@equinor/echo-framework': require('@equinor/echo-framework'),\n '@equinor/echo-utils': require('@equinor/echo-utils'),\n '@equinor/echo-components': require('@equinor/echo-components'),\n '@equinor/echo-base': require('@equinor/echo-base'),\n '@equinor/echo-search': require('@equinor/echo-search'),\n '@equinor/eds-core-react': require('@equinor/eds-core-react'),\n '@equinor/eds-icons': require('@equinor/eds-icons'),\n 'styled-components': require('styled-components'),\n classnames: require('classnames'),\n lodash: require('lodash'),\n zustand: require('zustand')\n },\n fetchModules: () => {\n return new Promise((resolve) => {\n fetch('/echoModuleManifest.json').then((response) => {\n console.log(response.headers.get('content-type'));\n response.json().then((manifests) => {\n manifests.forEach((manifest) => {\n manifest.fileUri = `/index.js`;\n });\n resolve(manifests);\n });\n });\n });\n }\n };\n return (\n <>\n {isAuthenticated && (\n <EchoCore.AuthProviderComponent>\n <QueryClientProvider client={queryClient}>\n <EventHubProvider>\n <Mediator options={moduleOptions} />\n <BrowserRouter>\n <EchoApp />\n </BrowserRouter>\n </EventHubProvider>\n </QueryClientProvider>\n </EchoCore.AuthProviderComponent>\n )}\n </>\n );\n};\n\nif (!(window !== window.parent && !window.opener)) {\n const container = document.getElementById('root') as HTMLElement;\n const root = createRoot(container);\n root.render(<Echo />);\n}\n","import EchoCore, { AuthenticationResult } from '@equinor/echo-core';\nimport { getDeepLinkParams } from '@equinor/echo-utils';\n\nexport function initForE2ETests() {\n const { skipAuth } = getDeepLinkParams(['skipAuth']);\n if (skipAuth?.toLowerCase() === 'true') {\n setupSkipAuth();\n }\n}\n\nconst setAuthentication = () => {\n EchoCore.EchoAuthProvider.isAuthenticated = true;\n EchoCore.EchoAuthProvider.userProperties = {\n account: {\n homeAccountId: 'homeAccountId',\n environment: 'testingEnvironment',\n tenantId: 'tenantId',\n username: 'tester',\n localAccountId: 'tester123'\n }\n };\n};\n\nexport function setupSkipAuth() {\n EchoCore.EchoAuthProvider.isAuthenticated = true;\n EchoCore.EchoAuthProvider.handleLogin = async (logRequest?: (...args: unknown[]) => void): Promise<void> => {\n setAuthentication();\n return Promise.resolve(undefined);\n };\n EchoCore.EchoAuthProvider.ssoSilentOrRedirectToAuthenticate = async () => {\n setAuthentication();\n return Promise.resolve(undefined);\n };\n EchoCore.EchoAuthProvider.aquireTokenSilentOrRedirectToAuthenticate =\n async (): Promise<AuthenticationResult | null> => {\n setAuthentication();\n return null;\n };\n EchoCore.EchoAuthProvider.login = async () => {\n setAuthentication();\n return Promise.resolve();\n };\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"main\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_equinor_echo_client\"] = self[\"webpackChunk_equinor_echo_client\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\n__webpack_require__.O(undefined, [\"vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76\"], () => (__webpack_require__(\"./node_modules/@babel/polyfill/lib/index.js\")))\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_react-dom_client_js-node_modules_babel_polyfill_lib_index_js-node_module-cb4c76\"], () => (__webpack_require__(\"./src/index.tsx\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","getPlantsFromApi","apiPlants","length","setPlantsData","plants","console","error","url","EchoEnv","env","REACT_APP_API_URL","request","cache","timeInSeconds","EchoApp","useInitial","Syncer","configuration","setApiBaseUrl","fireAndForget","getCorePlants","EchoEventHandler","EchoContent","Legend","EchoRoutes","homeComponent","Home","render","to","Toasters","className","home","plantSelector","EchoLogo","PlantSelector","variant","AppLinks","brandSliderContainer","src","alt","Footer","BrowserRouter","EventHubProvider","window","parent","opener","container","document","getElementById","createRoot","initForE2ETests","isAuthenticated","useEchoSetup","leftPanels","searchPanel","rightPanel","mainMenu","Icon","add","Icons","moduleOptions","createApi","createEchoAppModuleApi","dependencies","react","classnames","lodash","zustand","fetchModules","Promise","resolve","fetch","then","response","log","headers","get","json","manifests","forEach","manifest","fileUri","AuthProviderComponent","QueryClientProvider","client","queryClient","Mediator","skipAuth","getDeepLinkParams","toLowerCase","setupSkipAuth","setAuthentication","EchoAuthProvider","userProperties","account","homeAccountId","environment","tenantId","username","localAccountId","handleLogin","logRequest","ssoSilentOrRedirectToAuthenticate","aquireTokenSilentOrRedirectToAuthenticate","login","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","getPrototypeOf","obj","t","value","mode","this","ns","create","def","current","indexOf","getOwnPropertyNames","definition","o","defineProperty","enumerable","g","globalThis","Function","e","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","p","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","bind","nc","__webpack_exports__"],"sourceRoot":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OutputOptions } from 'rollup';
|
|
2
|
+
interface EchoModuleCreator {
|
|
3
|
+
name: string;
|
|
4
|
+
writeBundle(options: OutputOptions, bundle: any): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export default function echoModuleCreator(filepath: string, fileToChange: string, requireRef?: string): EchoModuleCreator;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
export default function echoModuleCreator(filepath, fileToChange, requireRef) {
|
|
3
|
+
return {
|
|
4
|
+
name: 'echo-moduleCreator',
|
|
5
|
+
async writeBundle(options, bundle) {
|
|
6
|
+
const config = {
|
|
7
|
+
fileName: 'index.js',
|
|
8
|
+
match: /\(function\(g\,f\)\{/,
|
|
9
|
+
replace: `(function(g,f){function define(d, f){typeof document !== "undefined" && (document.currentScript.module = {});f(document.currentScript.module, ...d.filter((d) => d !== "exports").map(window["${requireRef}"]));}define.amd = !0;`
|
|
10
|
+
};
|
|
11
|
+
if (bundle[config.fileName]) {
|
|
12
|
+
const data = bundle[config.fileName].code.replace(config.match, config.replace);
|
|
13
|
+
fs.writeFileSync(filepath, data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=echoModulePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echoModulePlugin.js","sourceRoot":"","sources":["../../../src/config/rollup/echoModulePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,IAAI,CAAC;AAQlC,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACrC,QAAgB,EAChB,YAAoB,EACpB,UAAmB;IAEnB,OAAO;QACH,IAAI,EAAE,oBAAoB;QAC1B,KAAK,CAAC,WAAW,CAAC,OAAsB,EAAE,MAAM;YAC5C,MAAM,MAAM,GAAG;gBACX,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,iMAAiM,UAAU,wBAAwB;aAC/O,CAAC;YACF,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC1B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;gBAChF,EAAE,CAAC,aAAa,CAAC,QAAoB,EAAE,IAAI,CAAC,CAAC;YACjD,CAAC;QACL,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OutputOptions, RollupOptions } from 'rollup';
|
|
2
|
+
import { EchoBundleOptions } from '../common/initOptions.js';
|
|
3
|
+
export declare function defineRollupInputOptions(options: Partial<EchoBundleOptions>): Promise<RollupOptions>;
|
|
4
|
+
export declare function defineRollupOutputOptions(options: Partial<EchoBundleOptions>): Promise<OutputOptions>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getBuildFilePath, getSrcFilePath } from '../common/getCurrentIndexFile.js';
|
|
2
|
+
import echoModuleCreator from './echoModulePlugin.js';
|
|
3
|
+
import { getBuildPlugging } from './plugins.js';
|
|
4
|
+
export async function defineRollupInputOptions(options) {
|
|
5
|
+
return {
|
|
6
|
+
input: getSrcFilePath(options.currentDir, options.source),
|
|
7
|
+
external: options.peerDependencies && Object.keys(options.peerDependencies),
|
|
8
|
+
plugins: getBuildPlugging(options)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export async function defineRollupOutputOptions(options) {
|
|
12
|
+
const file = getBuildFilePath(options.currentDir, options.main);
|
|
13
|
+
return {
|
|
14
|
+
file,
|
|
15
|
+
format: 'umd',
|
|
16
|
+
exports: 'named',
|
|
17
|
+
sourcemap: true,
|
|
18
|
+
name: 'echo-module',
|
|
19
|
+
compact: true,
|
|
20
|
+
globals: options.peerDependencies,
|
|
21
|
+
plugins: [echoModuleCreator(file, options.main ? options.main : 'index.js', options.requireRef)]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/config/rollup/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEpF,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,OAAmC;IAC9E,OAAO;QACH,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC;QACzD,QAAQ,EAAE,OAAO,CAAC,gBAAgB,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAC3E,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;KACrC,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,OAAmC;IAC/E,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO;QACH,IAAI;QACJ,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,OAAO,CAAC,gBAAgB;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;KACnG,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import workerLoader from '@qortal/rollup-plugin-web-worker-loader';
|
|
2
|
+
import babel from '@rollup/plugin-babel';
|
|
3
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
4
|
+
import json from '@rollup/plugin-json';
|
|
5
|
+
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
6
|
+
import url from '@rollup/plugin-url';
|
|
7
|
+
import svgr from '@svgr/rollup';
|
|
8
|
+
import autoprefixer from 'autoprefixer';
|
|
9
|
+
import nodePolyfills from 'rollup-plugin-node-polyfills';
|
|
10
|
+
import postcss from 'rollup-plugin-postcss';
|
|
11
|
+
import typescript2 from 'rollup-plugin-typescript2';
|
|
12
|
+
import { merge } from '../../utils/merge.js';
|
|
13
|
+
import { extensions } from '../common/extensions.js';
|
|
14
|
+
import { productionConfig } from './productionConfig.js';
|
|
15
|
+
import { serverConfig } from './serverConfig.js';
|
|
16
|
+
export function getBuildPlugging(options) {
|
|
17
|
+
return merge(initialConfig(), productionConfig(options), serverConfig(options));
|
|
18
|
+
}
|
|
19
|
+
export function initialConfig() {
|
|
20
|
+
return [
|
|
21
|
+
// del({ targets: `${options.currentDir}/lib/*`, runOnce: true }),
|
|
22
|
+
nodePolyfills({
|
|
23
|
+
fs: true
|
|
24
|
+
}),
|
|
25
|
+
nodeResolve({
|
|
26
|
+
extensions: extensions,
|
|
27
|
+
preferBuiltins: true,
|
|
28
|
+
browser: true
|
|
29
|
+
}),
|
|
30
|
+
workerLoader({
|
|
31
|
+
preserveFileNames: true,
|
|
32
|
+
inline: false
|
|
33
|
+
}),
|
|
34
|
+
typescript2(),
|
|
35
|
+
json(),
|
|
36
|
+
postcss({
|
|
37
|
+
plugins: [autoprefixer()],
|
|
38
|
+
sourceMap: false,
|
|
39
|
+
minimize: true
|
|
40
|
+
// modules: true
|
|
41
|
+
}),
|
|
42
|
+
url(),
|
|
43
|
+
svgr(),
|
|
44
|
+
commonjs({
|
|
45
|
+
// transformMixedEsModules: true,
|
|
46
|
+
}),
|
|
47
|
+
babel({
|
|
48
|
+
babelrc: false,
|
|
49
|
+
presets: [
|
|
50
|
+
['@babel/preset-env', { modules: false }],
|
|
51
|
+
['@babel/preset-react', { runtime: 'automatic' }]
|
|
52
|
+
],
|
|
53
|
+
extensions,
|
|
54
|
+
exclude: 'node_modules/**',
|
|
55
|
+
babelHelpers: 'bundled'
|
|
56
|
+
})
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/config/rollup/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,GAAG,MAAM,oBAAoB,CAAC;AACrC,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,gBAAgB,CAAC,OAAmC;IAChE,OAAO,KAAK,CAAC,aAAa,EAAE,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,aAAa;IACzB,OAAO;QACH,kEAAkE;QAClE,aAAa,CAAC;YACV,EAAE,EAAE,IAAI;SACX,CAAC;QACF,WAAW,CAAC;YACR,UAAU,EAAE,UAAU;YACtB,cAAc,EAAE,IAAI;YACpB,OAAO,EAAE,IAAI;SAChB,CAAC;QACF,YAAY,CAAC;YACT,iBAAiB,EAAE,IAAI;YACvB,MAAM,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE;QACb,IAAI,EAAE;QACN,OAAO,CAAC;YACJ,OAAO,EAAE,CAAC,YAAY,EAAE,CAAC;YACzB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,IAAI;YACd,gBAAgB;SACnB,CAAC;QACF,GAAG,EAAE;QACL,IAAI,EAAE;QACN,QAAQ,CAAC;QACL,iCAAiC;SACpC,CAAC;QACF,KAAK,CAAC;YACF,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACL,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;gBACzC,CAAC,qBAAqB,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;aACpD;YACD,UAAU;YACV,OAAO,EAAE,iBAAiB;YAC1B,YAAY,EAAE,SAAS;SAC1B,CAAC;KACL,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import cleanup from 'rollup-plugin-cleanup';
|
|
2
|
+
export function productionConfig({ isProduction }) {
|
|
3
|
+
if (isProduction) {
|
|
4
|
+
return [
|
|
5
|
+
cleanup({
|
|
6
|
+
comments: 'none',
|
|
7
|
+
extensions: ['js', 'ts']
|
|
8
|
+
})
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=productionConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productionConfig.js","sourceRoot":"","sources":["../../../src/config/rollup/productionConfig.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAG5C,MAAM,UAAU,gBAAgB,CAAC,EAAE,YAAY,EAA8B;IACzE,IAAI,YAAY,EAAE,CAAC;QACf,OAAO;YACH,OAAO,CAAC;gBACJ,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;aAC3B,CAAC;SACL,CAAC;IACN,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import livereload from 'rollup-plugin-livereload';
|
|
2
|
+
import serve from 'rollup-plugin-serve';
|
|
3
|
+
export function serverConfig(options) {
|
|
4
|
+
if (options.serve && options.wwwRoot && options.echoModuleConfig) {
|
|
5
|
+
const { contentBase, port, open, host } = options.echoModuleConfig.server;
|
|
6
|
+
return [
|
|
7
|
+
serve({
|
|
8
|
+
contentBase: [`${options.currentDir}${contentBase}`, options.wwwRoot],
|
|
9
|
+
port: port.toString(),
|
|
10
|
+
verbose: true,
|
|
11
|
+
open,
|
|
12
|
+
https: options.https,
|
|
13
|
+
host: host,
|
|
14
|
+
historyApiFallback: true
|
|
15
|
+
}),
|
|
16
|
+
livereload({
|
|
17
|
+
watch: `${options.currentDir}${contentBase}`,
|
|
18
|
+
https: options.https
|
|
19
|
+
})
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=serverConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverConfig.js","sourceRoot":"","sources":["../../../src/config/rollup/serverConfig.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAGxC,MAAM,UAAU,YAAY,CAAC,OAAmC;IAC5D,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC/D,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAC1E,OAAO;YACH,KAAK,CAAC;gBACF,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,GAAG,WAAW,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC;gBACrE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACrB,OAAO,EAAE,IAAI;gBACb,IAAI;gBACJ,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,IAAI,EAAE,IAAI;gBACV,kBAAkB,EAAE,IAAI;aAC3B,CAAC;YAEF,UAAU,CAAC;gBACP,KAAK,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,WAAW,EAAE;gBAC5C,KAAK,EAAE,OAAO,CAAC,KAAK;aACvB,CAAC;SACL,CAAC;IACN,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -10,7 +10,7 @@ export function defineDevServer(current, root, modulePath, echoModuleConfig) {
|
|
|
10
10
|
const { port, host, open, logging } = echoModuleConfig.server;
|
|
11
11
|
const { stats } = echoModuleConfig.devMiddleware;
|
|
12
12
|
return {
|
|
13
|
-
|
|
13
|
+
server: 'https',
|
|
14
14
|
host,
|
|
15
15
|
port,
|
|
16
16
|
static: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devServer.js","sourceRoot":"","sources":["../../../../src/config/webpack/configBuilders/devServer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC3B,OAAe,EACf,IAAY,EACZ,UAAkB,EAClB,gBAAkC;IAElC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,aAAa,CAAC;IAEjD,OAAO;QACH,
|
|
1
|
+
{"version":3,"file":"devServer.js","sourceRoot":"","sources":["../../../../src/config/webpack/configBuilders/devServer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC3B,OAAe,EACf,IAAY,EACZ,UAAkB,EAClB,gBAAkC;IAElC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,aAAa,CAAC;IAEjD,OAAO;QACH,MAAM,EAAE,OAAO;QACf,IAAI;QACJ,IAAI;QACJ,MAAM,EAAE;YACJ;gBACI,SAAS,EAAE,IAAI;gBACf,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,GAAG;aAClB;YACD;gBACI,SAAS,EAAE,UAAU;gBACrB,KAAK,EAAE,IAAI;aACd;SACJ;QACD,GAAG,EAAE,IAAI;QACT,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,UAAU;YACV,KAAK,EAAE,IAAI;YACX,KAAK;SACR;QACD,gBAAgB,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE;YACzC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACzD,CAAC;YAED,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAE3E,WAAW,CAAC,IAAI,CAAC;gBACb,IAAI,EAAE,GAAG;gBACT,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,aAAa,CAAC;aAC/D,CAAC,CAAC;YAEH,OAAO,WAAW,CAAC;QACvB,CAAC;QACD,MAAM,EAAE;YACJ,aAAa;YACb,oBAAoB;YACpB,sBAAsB;YACtB,KAAK;YACL,OAAO;SACV;QACD,kBAAkB,EAAE,IAAI;QACxB,IAAI;QACJ,QAAQ,EAAE,IAAI;KACjB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import Command, { flags } from '@oclif/command';
|
|
3
|
+
export default class StartApp extends Command {
|
|
4
|
+
static description: string;
|
|
5
|
+
static flags: {
|
|
6
|
+
help: import("@oclif/parser/lib/flags.js").IBooleanFlag<void>;
|
|
7
|
+
production: import("@oclif/parser/lib/flags.js").IBooleanFlag<boolean>;
|
|
8
|
+
port: import("@oclif/parser/lib/flags.js").IOptionFlag<number>;
|
|
9
|
+
type: flags.IOptionFlag<string>;
|
|
10
|
+
open: import("@oclif/parser/lib/flags.js").IBooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
package/lib/echo-run.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import Command, { flags } from '@oclif/command';
|
|
3
|
+
import { echoAppDevelopmentStart, echoPluginDevelopmentStart } from './tools/run/start.js';
|
|
4
|
+
export default class StartApp extends Command {
|
|
5
|
+
static description = 'Start a fusion app';
|
|
6
|
+
static flags = {
|
|
7
|
+
help: flags.help({ char: 'h' }),
|
|
8
|
+
production: flags.boolean({
|
|
9
|
+
char: 'P',
|
|
10
|
+
description: 'Use production config'
|
|
11
|
+
}),
|
|
12
|
+
port: flags.integer({
|
|
13
|
+
char: 'p',
|
|
14
|
+
description: 'Development server port. default port:3000',
|
|
15
|
+
default: 3000
|
|
16
|
+
}),
|
|
17
|
+
type: flags.string({
|
|
18
|
+
char: 't',
|
|
19
|
+
description: 'Type of bundling configuration, webpack | rollup',
|
|
20
|
+
default: 'webpack',
|
|
21
|
+
options: ['webpack', 'rollup']
|
|
22
|
+
}),
|
|
23
|
+
open: flags.boolean({
|
|
24
|
+
char: 'o',
|
|
25
|
+
default: false
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
console.log('Starting Echo Development...');
|
|
30
|
+
const options = this.parse(StartApp).flags;
|
|
31
|
+
if (options.type === 'webpack') {
|
|
32
|
+
echoAppDevelopmentStart(options);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
echoPluginDevelopmentStart(options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
StartApp.run();
|
|
40
|
+
//# sourceMappingURL=echo-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echo-run.js","sourceRoot":"","sources":["../src/echo-run.ts"],"names":[],"mappings":";AAEA,OAAO,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,uBAA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+
import { Listr } from 'listr2';
|
|
4
|
+
import { rollup, watch } from 'rollup';
|
|
5
|
+
import { copyClientFiles } from '../../config/common/copyFile.js';
|
|
6
|
+
import { createEchoModuleManifest } from '../../config/common/echoManifest.js';
|
|
7
|
+
import { defineHttps } from '../../config/common/https.js';
|
|
8
|
+
import { defineInitOptions } from '../../config/common/initOptions.js';
|
|
9
|
+
import { defineRollupInputOptions, defineRollupOutputOptions } from '../../config/rollup/options.js';
|
|
10
|
+
async function echoWatch(options) {
|
|
11
|
+
const WATCH_OPTS = {
|
|
12
|
+
exclude: 'node_modules/**',
|
|
13
|
+
chokidar: true,
|
|
14
|
+
clearScreen: true
|
|
15
|
+
};
|
|
16
|
+
const watchOptions = Object.assign({
|
|
17
|
+
output: options.outputOptions,
|
|
18
|
+
watch: WATCH_OPTS
|
|
19
|
+
}, options.inputOptions);
|
|
20
|
+
new Promise((resolve) => {
|
|
21
|
+
const watcher = watch(watchOptions).on('event', (e) => {
|
|
22
|
+
if (e.code === 'START') {
|
|
23
|
+
console.log('%s Compiling Module', chalk.cyan.bold('START'));
|
|
24
|
+
}
|
|
25
|
+
if (e.code === 'ERROR') {
|
|
26
|
+
console.log(`%s ${e.error.message}`, chalk.red.bold(e.code));
|
|
27
|
+
console.log(e.error.stack);
|
|
28
|
+
}
|
|
29
|
+
if (e.code === 'END') {
|
|
30
|
+
console.log('%s Module ready', chalk.green.bold('DONE'));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
resolve({ watcher });
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export async function echoRollupBuild(echoBundleOptions, isDevelopment) {
|
|
37
|
+
const options = (await defineInitOptions(echoBundleOptions, isDevelopment));
|
|
38
|
+
const tasks = new Listr([
|
|
39
|
+
{
|
|
40
|
+
task: async () => {
|
|
41
|
+
options.https = await defineHttps();
|
|
42
|
+
},
|
|
43
|
+
title: 'Get SSL Certificate'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
task: async () => {
|
|
47
|
+
await createEchoModuleManifest(options.echoModuleConfig, options.currentDir, options.requireRef, options.adminModulePath, options.adminModule);
|
|
48
|
+
},
|
|
49
|
+
title: 'Create Echo Manifest'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
task: async () => {
|
|
53
|
+
options.inputOptions = await defineRollupInputOptions(options);
|
|
54
|
+
options.outputOptions = await defineRollupOutputOptions(options);
|
|
55
|
+
},
|
|
56
|
+
title: 'Generate Options Rollup'
|
|
57
|
+
}
|
|
58
|
+
]);
|
|
59
|
+
console.log(`Creating ${chalk.cyan('module')} configuration for ${chalk.green.bold(options.echoModuleConfig.manifest.name)}`);
|
|
60
|
+
await tasks.run();
|
|
61
|
+
try {
|
|
62
|
+
if (options.serve) {
|
|
63
|
+
echoWatch(options);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
console.log(`%s Compiling Module`, chalk.cyan.bold('START'));
|
|
67
|
+
const bundle = await rollup(options.inputOptions);
|
|
68
|
+
await bundle.write(options.outputOptions);
|
|
69
|
+
bundle.close();
|
|
70
|
+
if (options.copy) {
|
|
71
|
+
copyClientFiles(options);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.log(error);
|
|
76
|
+
}
|
|
77
|
+
console.log('%s Module ready!', chalk.green.bold('DONE'));
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=rollupBuild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollupBuild.js","sourceRoot":"","sources":["../../../src/tools/buildScripts/rollupBuild.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAiB,KAAK,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,wBAAwB,E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C;QACD,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,SAAS,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO;QACX,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,YAA6B,CAAC,CAAC;QACnE,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,aAA8B,CAAC,CAAC;QAC3D,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface EchoStartOptions {
|
|
2
|
+
port: number;
|
|
3
|
+
open: boolean;
|
|
4
|
+
type: string;
|
|
5
|
+
production: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function echoAppDevelopmentStart(initialOptions: EchoStartOptions): void;
|
|
8
|
+
export declare function echoPluginDevelopmentStart(initialOptions: EchoStartOptions): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
export function echoAppDevelopmentStart(initialOptions) {
|
|
3
|
+
const options = getInitialOptions(initialOptions);
|
|
4
|
+
console.log(options);
|
|
5
|
+
}
|
|
6
|
+
export function echoPluginDevelopmentStart(initialOptions) {
|
|
7
|
+
const options = getInitialOptions(initialOptions);
|
|
8
|
+
console.log(options);
|
|
9
|
+
}
|
|
10
|
+
async function getInitialOptions(initialOptions) {
|
|
11
|
+
const currentDir = process.cwd();
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
13
|
+
const packageJson = require(`${currentDir}/package.json`);
|
|
14
|
+
if (packageJson) {
|
|
15
|
+
console.log(packageJson);
|
|
16
|
+
}
|
|
17
|
+
const options = {
|
|
18
|
+
...initialOptions,
|
|
19
|
+
isProduction: initialOptions.production ? true : false,
|
|
20
|
+
currentDir: process.cwd(),
|
|
21
|
+
wwwRoot: path.resolve(__dirname, '../../../', 'client'),
|
|
22
|
+
name: packageJson.name,
|
|
23
|
+
input: packageJson.main
|
|
24
|
+
};
|
|
25
|
+
return options;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=start.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/tools/run/start.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB,MAAM,UAAU,uBAAuB,CAAC,cAAgC;IACpE,MAAM,OAAO,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,cAAgC;IACvE,MAAM,OAAO,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,KAAK,UAAU,iBAAiB,CAAC,cAAgC;IAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,8DAA8D;IAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,UAAU,eAAe,CAAC,CAAC;IAC1D,IAAI,WAAW,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;IACD,MAAM,OAAO,GAAG;QACZ,GAAG,cAAc;QACjB,YAAY,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;QACtD,UAAU,EAAE,OAAO,CAAC,GAAG,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC;QACvD,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,KAAK,EAAE,WAAW,CAAC,IAAI;KAC1B,CAAC;IAEF,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function echoWatch(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function echoWatch() {
|
|
2
|
+
const currentDir = process.cwd();
|
|
3
|
+
const [, , ...args] = process.argv;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
5
|
+
const pkg = require(`${currentDir}/package.json`);
|
|
6
|
+
console.log(pkg);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../../src/tools/run/watch.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS;IACrB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,AAAD,EAAG,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnC,8DAA8D;IAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,UAAU,eAAe,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4-beta-1",
|
|
4
4
|
"description": "Command line interface for Echo Apps",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"source": "src/test.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"webpack": "5.97.1",
|
|
81
81
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
82
82
|
"webpack-dev-middleware": "^7.4.2",
|
|
83
|
-
"webpack-dev-server": "^
|
|
83
|
+
"webpack-dev-server": "^5.2.0",
|
|
84
84
|
"webpack-hot-middleware": "^2.26.1",
|
|
85
85
|
"webpack-merge": "^6.0.1",
|
|
86
86
|
"webpackbar": "^7.0.0"
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"@types/react": "18.3.18",
|
|
96
96
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
97
97
|
"@types/webpack-dev-middleware": "^5.3.0",
|
|
98
|
-
"@types/webpack-dev-server": "^4.7.2",
|
|
99
98
|
"@types/webpack-hot-middleware": "^2.25.9",
|
|
100
99
|
"@typescript-eslint/eslint-plugin": "8.23.0",
|
|
101
100
|
"@typescript-eslint/parser": "8.23.0",
|