@appshell/react 0.1.0-alpha.6
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/CHANGELOG.md +183 -0
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/__tests__/FederatedComponent.spec.tsx +53 -0
- package/__tests__/LoadingError.spec.tsx +14 -0
- package/__tests__/ManifestContext.spec.tsx +36 -0
- package/__tests__/ReactHost.spec.tsx +137 -0
- package/__tests__/__snapshots__/FederatedComponent.spec.tsx.snap +9 -0
- package/__tests__/__snapshots__/LoadingError.spec.tsx.snap +88 -0
- package/__tests__/__snapshots__/ReactHost.spec.tsx.snap +13 -0
- package/__tests__/fixtures/Manifest.ts +16 -0
- package/__tests__/fixtures/TestComponent.tsx +5 -0
- package/__tests__/fixtures/appshell.index.ts +5 -0
- package/__tests__/jsonResource.spec.ts +27 -0
- package/__tests__/utils/waitForResource.ts +15 -0
- package/dist/main.js +1 -0
- package/dist/types/config/src/axios.d.ts +3 -0
- package/dist/types/config/src/axios.d.ts.map +1 -0
- package/dist/types/config/src/configmap.d.ts +7 -0
- package/dist/types/config/src/configmap.d.ts.map +1 -0
- package/dist/types/config/src/generate.env.d.ts +3 -0
- package/dist/types/config/src/generate.env.d.ts.map +1 -0
- package/dist/types/config/src/generate.index.d.ts +4 -0
- package/dist/types/config/src/generate.index.d.ts.map +1 -0
- package/dist/types/config/src/generate.manifest.d.ts +9 -0
- package/dist/types/config/src/generate.manifest.d.ts.map +1 -0
- package/dist/types/config/src/generate.metadata.d.ts +4 -0
- package/dist/types/config/src/generate.metadata.d.ts.map +1 -0
- package/dist/types/config/src/index.d.ts +13 -0
- package/dist/types/config/src/index.d.ts.map +1 -0
- package/dist/types/config/src/mappers/appshell.config.d.ts +3 -0
- package/dist/types/config/src/mappers/appshell.config.d.ts.map +1 -0
- package/dist/types/config/src/register.d.ts +4 -0
- package/dist/types/config/src/register.d.ts.map +1 -0
- package/dist/types/config/src/types.d.ts +213 -0
- package/dist/types/config/src/types.d.ts.map +1 -0
- package/dist/types/config/src/utils/copy.d.ts +11 -0
- package/dist/types/config/src/utils/copy.d.ts.map +1 -0
- package/dist/types/config/src/utils/index.d.ts +7 -0
- package/dist/types/config/src/utils/index.d.ts.map +1 -0
- package/dist/types/config/src/utils/isValidUrl.d.ts +3 -0
- package/dist/types/config/src/utils/isValidUrl.d.ts.map +1 -0
- package/dist/types/config/src/utils/list.d.ts +10 -0
- package/dist/types/config/src/utils/list.d.ts.map +1 -0
- package/dist/types/config/src/utils/load.d.ts +14 -0
- package/dist/types/config/src/utils/load.d.ts.map +1 -0
- package/dist/types/config/src/utils/loadJson.d.ts +3 -0
- package/dist/types/config/src/utils/loadJson.d.ts.map +1 -0
- package/dist/types/config/src/utils/merge.d.ts +4 -0
- package/dist/types/config/src/utils/merge.d.ts.map +1 -0
- package/dist/types/config/src/validators/appshell.config.d.ts +4 -0
- package/dist/types/config/src/validators/appshell.config.d.ts.map +1 -0
- package/dist/types/config/src/validators/appshell.index.d.ts +4 -0
- package/dist/types/config/src/validators/appshell.index.d.ts.map +1 -0
- package/dist/types/config/src/validators/appshell.manifest.d.ts +4 -0
- package/dist/types/config/src/validators/appshell.manifest.d.ts.map +1 -0
- package/dist/types/config/src/validators/appshell.metadata.d.ts +4 -0
- package/dist/types/config/src/validators/appshell.metadata.d.ts.map +1 -0
- package/dist/types/config/src/validators/index.d.ts +6 -0
- package/dist/types/config/src/validators/index.d.ts.map +1 -0
- package/dist/types/config/src/validators/merge.manifests.d.ts +4 -0
- package/dist/types/config/src/validators/merge.manifests.d.ts.map +1 -0
- package/dist/types/loader/src/fetchDynamicScript.d.ts +3 -0
- package/dist/types/loader/src/fetchDynamicScript.d.ts.map +1 -0
- package/dist/types/loader/src/index.d.ts +4 -0
- package/dist/types/loader/src/index.d.ts.map +1 -0
- package/dist/types/loader/src/loadFederatedComponent.d.ts +14 -0
- package/dist/types/loader/src/loadFederatedComponent.d.ts.map +1 -0
- package/dist/types/loader/src/remoteLoader.d.ts +4 -0
- package/dist/types/loader/src/remoteLoader.d.ts.map +1 -0
- package/dist/types/loader/src/types.d.ts +11 -0
- package/dist/types/loader/src/types.d.ts.map +1 -0
- package/dist/types/react/src/components/FederatedComponent.d.ts +20 -0
- package/dist/types/react/src/components/FederatedComponent.d.ts.map +1 -0
- package/dist/types/react/src/components/LoadingError.d.ts +8 -0
- package/dist/types/react/src/components/LoadingError.d.ts.map +1 -0
- package/dist/types/react/src/components/ReactHost.d.ts +10 -0
- package/dist/types/react/src/components/ReactHost.d.ts.map +1 -0
- package/dist/types/react/src/contexts/ManifestContext.d.ts +12 -0
- package/dist/types/react/src/contexts/ManifestContext.d.ts.map +1 -0
- package/dist/types/react/src/contexts/MetadataContext.d.ts +11 -0
- package/dist/types/react/src/contexts/MetadataContext.d.ts.map +1 -0
- package/dist/types/react/src/contexts/RegistryContext.d.ts +11 -0
- package/dist/types/react/src/contexts/RegistryContext.d.ts.map +1 -0
- package/dist/types/react/src/hooks/useManifest.d.ts +4 -0
- package/dist/types/react/src/hooks/useManifest.d.ts.map +1 -0
- package/dist/types/react/src/hooks/useMetadata.d.ts +4 -0
- package/dist/types/react/src/hooks/useMetadata.d.ts.map +1 -0
- package/dist/types/react/src/hooks/useRegistry.d.ts +4 -0
- package/dist/types/react/src/hooks/useRegistry.d.ts.map +1 -0
- package/dist/types/react/src/index.d.ts +10 -0
- package/dist/types/react/src/index.d.ts.map +1 -0
- package/dist/types/react/src/resources/jsonResource.d.ts +5 -0
- package/dist/types/react/src/resources/jsonResource.d.ts.map +1 -0
- package/dist/types/react/src/types.d.ts +4 -0
- package/dist/types/react/src/types.d.ts.map +1 -0
- package/package.json +32 -0
- package/src/components/FederatedComponent.tsx +73 -0
- package/src/components/LoadingError.tsx +15 -0
- package/src/components/ReactHost.tsx +69 -0
- package/src/contexts/ManifestContext.tsx +22 -0
- package/src/contexts/MetadataContext.tsx +17 -0
- package/src/contexts/RegistryContext.tsx +17 -0
- package/src/hooks/useManifest.ts +7 -0
- package/src/hooks/useMetadata.ts +6 -0
- package/src/hooks/useRegistry.ts +6 -0
- package/src/index.ts +9 -0
- package/src/resources/jsonResource.ts +35 -0
- package/src/types.ts +3 -0
- package/tsconfig.json +7 -0
- package/webpack.config.js +42 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @jest-environment jsdom */
|
|
2
|
+
import { AppshellManifest } from '@appshell/config';
|
|
3
|
+
import fetch, { enableFetchMocks } from 'jest-fetch-mock';
|
|
4
|
+
import jsonResource from '../src/resources/jsonResource';
|
|
5
|
+
import manifest from './fixtures/Manifest';
|
|
6
|
+
import waitForResource from './utils/waitForResource';
|
|
7
|
+
|
|
8
|
+
enableFetchMocks();
|
|
9
|
+
|
|
10
|
+
describe('jsonResource', () => {
|
|
11
|
+
it('should return data when fetch succeeds', async () => {
|
|
12
|
+
fetch.mockResponseOnce(() => Promise.resolve(JSON.stringify(manifest)));
|
|
13
|
+
const resource = jsonResource<AppshellManifest>('http://test.com/some-resource.json');
|
|
14
|
+
const data = await waitForResource(resource);
|
|
15
|
+
|
|
16
|
+
expect(data).toEqual(manifest);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should return error when fetch fails', async () => {
|
|
20
|
+
fetch.mockResponseOnce(() =>
|
|
21
|
+
Promise.resolve({ ok: false, status: 404, statusText: 'Failed to fetch resource.' }),
|
|
22
|
+
);
|
|
23
|
+
const resource = jsonResource<AppshellManifest>('http://test.com/some-resource.json');
|
|
24
|
+
|
|
25
|
+
await expect(waitForResource(resource)).rejects.toThrow(/failed to fetch resource/i);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Resource } from '../../src/types';
|
|
2
|
+
|
|
3
|
+
const waitForResource = async <TResource>(
|
|
4
|
+
resource: Resource<TResource>,
|
|
5
|
+
): Promise<TResource | Error | undefined> => {
|
|
6
|
+
try {
|
|
7
|
+
return resource.read();
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
} catch (suspender: any) {
|
|
10
|
+
await suspender;
|
|
11
|
+
return resource.read();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default waitForResource;
|
package/dist/main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(e=>(()=>{"use strict";var t={156:t=>{t.exports=e}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{o.S={};var e={},t={};o.I=(r,n)=>{n||(n=[]);var a=t[r];if(a||(a=t[r]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[r])return e[r];o.o(o.S,r)||(o.S[r]={}),o.S[r];var s=[];return e[r]=s.length?Promise.all(s).then((()=>e[r]=1)):1}}})();var n={};return(()=>{o.r(n),o.d(n,{FederatedComponent:()=>h,ManifestProvider:()=>i,MetadataProvider:()=>w,ReactHost:()=>x,RegistryProvider:()=>u,jsonResource:()=>j,useManifest:()=>$,useMetadata:()=>S,useRegistry:()=>m});const e=new Set,t=new Set,r=new Map;var a=o(156),s=o.n(a);const c=(0,a.createContext)({remotes:{},modules:{},environment:{}}),i=({manifest:e,children:t})=>s().createElement(c.Provider,{value:e},t),l=(c.Consumer,c),d=(0,a.createContext)({}),u=({index:e,children:t})=>s().createElement(d.Provider,{value:e},t),f=(d.Consumer,d),m=()=>s().useContext(f),p=({remote:e,reason:t})=>s().createElement("div",{style:{border:"3px solid red"}},s().createElement("h5",null,`Error loading federated component '${e}.'`),s().createElement("span",{style:{fontSize:"1rem"}},t)),y=({remote:n,fallback:c,...l})=>{const d=m(),[u,f]=(0,a.useState)();return(0,a.useEffect)((()=>{let a=!1;const c=(n=>async a=>{let s;const c=n[a];if(!c)throw new Error(`Remote resource not found in registry. Expected: ${a}`);try{const n=await(async e=>{if(r.has(e))return r.get(e);r.set(e,void 0);const t=await fetch(e);if(t.ok)return t.json();const o=await t.text();throw new Error(`Failed to get manifest from ${e}. ${o}`)})(c);if(n){r.set(c,n);const i=n.remotes[a];if(window[`__appshell_env__${i.scope}`]=n.environment[i.scope]||{},t.has(i.remoteEntryUrl)||await(async t=>{const r=document.createElement("script");return new Promise(((o,n)=>{e.has(t)?o(!1):(e.add(t),r.src=t,r.type="text/javascript",r.async=!0,r.onload=()=>{console.debug(`Remote entry fetched from '${t}'.`),o(!0)},r.onerror=()=>{const e=`Failed to fetch remote entry from '${t}'.`;console.error(e),n(e)},document.head.appendChild(r))})).finally((()=>{document.head.contains(r)&&document.head.removeChild(r)}))})(i.remoteEntryUrl))return t.add(i.remoteEntryUrl),s=await(async(e,t,r="default")=>{console.debug(`loading federated component: { scope: ${e}, module: ${t}, shareScope: ${r} }`),await o.I(r);const n=window[e];if(!n)throw new Error(`Failed to find module container ${e}`);await n.init(o.S[r]);const a=await n.get(t);if(!a)throw new Error(`Invalid factory produced by container for module ${t}.`);const s=a();return console.debug(`federated component loaded: { scope: ${e}, module: ${t}, shareScope: ${r} }`),s.default})(i.scope,i.module,i.shareScope),[s,n]}return[null,null]}catch(e){throw new Error(`Failed to load component '${a}'. ${e?.toString()}`)}})(d);return a||async function(){try{a=!0,f(void 0);const[e,t]=await c(n);if(!e)return;a=!1,f(s().createElement(i,{manifest:t},s().createElement(e,l)))}catch(e){f(s().createElement(p,{remote:n,reason:`${e}`}))}}(),()=>{a=!1}}),[n,d]),console.debug(`rendering FederatedComponent[${n}], loading=${!u}`),s().createElement(s().Fragment,null,u||c)};y.defaultProps={fallback:void 0};const h=y,v=(0,a.createContext)({}),w=({metata:e,children:t})=>s().createElement(v.Provider,{value:e},t),E=(v.Consumer,v);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},b.apply(this,arguments)}const g=({indexUrl:e,metadataUrl:t,remote:r,fallback:o,...n})=>{const[c,i]=s().useState(),[l,d]=s().useState();return(0,a.useEffect)((()=>{c||(async()=>{const t=await fetch(e);if(t.ok){const e=await t.json();i(e)}else i({})})()}),[c,e]),(0,a.useEffect)((()=>{l||(async()=>{const e=await fetch(t);if(e.ok){const t=await e.json();d(t)}else d({})})()}),[l,t]),c&&l?s().createElement(u,{index:c},s().createElement(w,{metata:l},s().createElement(h,b({remote:r,fallback:o},n)))):null};g.defaultProps={fallback:void 0};const x=g,$=()=>s().useContext(l),S=()=>s().useContext(E),j=e=>{let t,r="pending";const o=fetch(e,{headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((e=>{if(e.ok)return e.json().then((e=>{r="success",t=e}));r="error",t=new Error(`${e.status} ${e.statusText} ${e.url}`)}));return{read(){if("pending"===r)throw o;if("error"===r)throw t;if("success"===r)return t}}}})(),n})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../../config/src/axios.ts"],"names":[],"mappings":";AAEA,wBAA8B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppshellConfig, ConfigMap } from './types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
apply: <T extends object>(obj: T, configMap: ConfigMap) => T;
|
|
4
|
+
create: (config: AppshellConfig<import("./types").Metadata>) => Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=configmap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configmap.d.ts","sourceRoot":"","sources":["../../../../../config/src/configmap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;;;;;AAmDpD,wBAGE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.env.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.env.ts"],"names":[],"mappings":"8BAO2B,MAAM;AAAjC,wBA8BK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.index.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;qCAKN,MAAM,EAAE,KAAG,QAAQ,aAAa,CAAC;AAAnE,wBAyBE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an appshell manifest
|
|
3
|
+
* @param configPath path of the appshell config to compile into an appshell manifest
|
|
4
|
+
* @param webpackConfig path of the webpack config
|
|
5
|
+
* @returns an appshell manifest
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: <TMetadata extends Record<string, unknown>>(configPath: string) => Promise<import("./types").AppshellManifest<TMetadata> | null>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=generate.manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.manifest.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.manifest.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;gFAC0E,MAAM;AAAnF,wBAaE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.metadata.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;mEAK6B,MAAM,EAAE;AAAxE,wBAyBE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @appshell/config package API
|
|
3
|
+
*/
|
|
4
|
+
export { default as configmap } from './configmap';
|
|
5
|
+
export { default as generateEnv } from './generate.env';
|
|
6
|
+
export { default as generateIndex } from './generate.index';
|
|
7
|
+
export { default as generateManifest } from './generate.manifest';
|
|
8
|
+
export { default as generateMetadata } from './generate.metadata';
|
|
9
|
+
export { default as register } from './register';
|
|
10
|
+
export type { AppshellConfig, AppshellConfigRemote, AppshellIndex, AppshellManifest, AppshellRemote, Metadata, Schema, } from './types';
|
|
11
|
+
export * as utils from './utils';
|
|
12
|
+
export * as validators from './validators';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../config/src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,MAAM,GACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AppshellConfig, AppshellManifest, ConfigMap } from '../types';
|
|
2
|
+
export declare const toAppshellManifest: <TMetadata extends Record<string, unknown>>(config: AppshellConfig, args: ConfigMap) => AppshellManifest<TMetadata>;
|
|
3
|
+
//# sourceMappingURL=appshell.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/mappers/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EAEd,gBAAgB,EAEhB,SAAS,EACV,MAAM,UAAU,CAAC;AA6DlB,eAAO,MAAM,kBAAkB,sDACrB,cAAc,QAChB,SAAS,gCAQhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../config/src/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;mCAc5B,gBAAgB,YAAY,MAAM;AAAlE,wBA4BE"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { JSONSchema4, JSONSchema6, JSONSchema7 } from 'json-schema';
|
|
2
|
+
export type Schema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
3
|
+
export type ConfigValidator = {
|
|
4
|
+
validate: <T>(...config: T[]) => void;
|
|
5
|
+
};
|
|
6
|
+
export type ConfigMap = Record<string, string>;
|
|
7
|
+
export type AppshellConfigRemote<TMetadata = Metadata> = {
|
|
8
|
+
id: string;
|
|
9
|
+
url: string;
|
|
10
|
+
filename: string;
|
|
11
|
+
metadata: TMetadata;
|
|
12
|
+
};
|
|
13
|
+
export type AppshellConfig<TMetadata = Metadata> = {
|
|
14
|
+
name?: string;
|
|
15
|
+
remotes?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
16
|
+
module: ModuleFederationPluginOptions;
|
|
17
|
+
environment?: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
/** Appshell manifest types */
|
|
20
|
+
export type AppshellRemote<TMetadata = Metadata> = {
|
|
21
|
+
id: string;
|
|
22
|
+
manifestUrl: string;
|
|
23
|
+
remoteEntryUrl: string;
|
|
24
|
+
scope: string;
|
|
25
|
+
module: string;
|
|
26
|
+
shareScope?: string;
|
|
27
|
+
metadata: TMetadata;
|
|
28
|
+
};
|
|
29
|
+
export type AppshellManifest<TMetadata = Metadata> = {
|
|
30
|
+
remotes: Record<string, AppshellRemote<TMetadata>>;
|
|
31
|
+
modules: Record<string, ModuleFederationPluginOptions>;
|
|
32
|
+
environment: Record<string, Record<string, string | number | undefined>>;
|
|
33
|
+
};
|
|
34
|
+
export type AppshellIndex = Record<string, string>;
|
|
35
|
+
export type Metadata = Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Advanced configuration for modules that should be exposed by this container.
|
|
38
|
+
*/
|
|
39
|
+
export interface ExposesConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Request to a module that should be exposed by this container.
|
|
42
|
+
*/
|
|
43
|
+
import: string | string[];
|
|
44
|
+
/**
|
|
45
|
+
* Custom chunk name for the exposed module.
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ExposesObject {
|
|
50
|
+
[index: string]: string | ExposesConfig | string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
|
|
54
|
+
*/
|
|
55
|
+
export interface LibraryCustomUmdCommentObject {
|
|
56
|
+
/**
|
|
57
|
+
* Set comment for `amd` section in UMD.
|
|
58
|
+
*/
|
|
59
|
+
amd?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Set comment for `commonjs` (exports) section in UMD.
|
|
62
|
+
*/
|
|
63
|
+
commonjs?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Set comment for `commonjs2` (module.exports) section in UMD.
|
|
66
|
+
*/
|
|
67
|
+
commonjs2?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Set comment for `root` (global variable) section in UMD.
|
|
70
|
+
*/
|
|
71
|
+
root?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Description object for all UMD variants of the library name.
|
|
75
|
+
*/
|
|
76
|
+
export interface LibraryCustomUmdObject {
|
|
77
|
+
/**
|
|
78
|
+
* Name of the exposed AMD library in the UMD.
|
|
79
|
+
*/
|
|
80
|
+
amd?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Name of the exposed commonjs export in the UMD.
|
|
83
|
+
*/
|
|
84
|
+
commonjs?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Name of the property exposed globally by a UMD library.
|
|
87
|
+
*/
|
|
88
|
+
root?: string | string[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Options for library.
|
|
92
|
+
*/
|
|
93
|
+
export interface LibraryOptions {
|
|
94
|
+
/**
|
|
95
|
+
* Add a comment in the UMD wrapper.
|
|
96
|
+
*/
|
|
97
|
+
auxiliaryComment?: string | LibraryCustomUmdCommentObject;
|
|
98
|
+
/**
|
|
99
|
+
* Specify which export should be exposed as library.
|
|
100
|
+
*/
|
|
101
|
+
export?: string | string[];
|
|
102
|
+
/**
|
|
103
|
+
* The name of the library (some types allow unnamed libraries too).
|
|
104
|
+
*/
|
|
105
|
+
name?: string | string[] | LibraryCustomUmdObject;
|
|
106
|
+
/**
|
|
107
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
|
108
|
+
*/
|
|
109
|
+
type: string;
|
|
110
|
+
/**
|
|
111
|
+
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
|
112
|
+
*/
|
|
113
|
+
umdNamedDefine?: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface SharedConfig {
|
|
116
|
+
/**
|
|
117
|
+
* Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
|
|
118
|
+
*/
|
|
119
|
+
eager?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
|
|
122
|
+
*/
|
|
123
|
+
import?: string | false;
|
|
124
|
+
/**
|
|
125
|
+
* Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
|
|
126
|
+
*/
|
|
127
|
+
packageName?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Version requirement from module in share scope.
|
|
130
|
+
*/
|
|
131
|
+
requiredVersion?: string | false;
|
|
132
|
+
/**
|
|
133
|
+
* Module is looked up under this key from the share scope.
|
|
134
|
+
*/
|
|
135
|
+
shareKey?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Share scope name.
|
|
138
|
+
*/
|
|
139
|
+
shareScope?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Allow only a single version of the shared module in share scope (disabled by default).
|
|
142
|
+
*/
|
|
143
|
+
singleton?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
|
|
146
|
+
*/
|
|
147
|
+
strictVersion?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Version of the provided module. Will replace lower matching versions, but not higher.
|
|
150
|
+
*/
|
|
151
|
+
version?: string | false;
|
|
152
|
+
}
|
|
153
|
+
export interface SharedObject {
|
|
154
|
+
[index: string]: string | SharedConfig;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
|
|
158
|
+
*/
|
|
159
|
+
export interface RemotesConfig {
|
|
160
|
+
/**
|
|
161
|
+
* Container locations from which modules should be resolved and loaded at runtime.
|
|
162
|
+
*/
|
|
163
|
+
external: string | string[];
|
|
164
|
+
/**
|
|
165
|
+
* The name of the share scope shared with this remote.
|
|
166
|
+
*/
|
|
167
|
+
shareScope?: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
|
|
171
|
+
*/
|
|
172
|
+
export interface RemotesObject {
|
|
173
|
+
[index: string]: string | RemotesConfig | string[];
|
|
174
|
+
}
|
|
175
|
+
export interface ModuleFederationPluginOptions {
|
|
176
|
+
/**
|
|
177
|
+
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
|
|
178
|
+
*/
|
|
179
|
+
exposes?: (string | ExposesObject)[] | ExposesObject;
|
|
180
|
+
/**
|
|
181
|
+
* The filename of the container as relative path inside the `output.path` directory.
|
|
182
|
+
*/
|
|
183
|
+
filename?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Options for library.
|
|
186
|
+
*/
|
|
187
|
+
library?: LibraryOptions;
|
|
188
|
+
/**
|
|
189
|
+
* The name of the container.
|
|
190
|
+
*/
|
|
191
|
+
name?: string;
|
|
192
|
+
/**
|
|
193
|
+
* The external type of the remote containers.
|
|
194
|
+
*/
|
|
195
|
+
remoteType?: 'import' | 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'script' | 'node-commonjs';
|
|
196
|
+
/**
|
|
197
|
+
* Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
|
|
198
|
+
*/
|
|
199
|
+
remotes?: (string | RemotesObject)[] | RemotesObject;
|
|
200
|
+
/**
|
|
201
|
+
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
|
202
|
+
*/
|
|
203
|
+
runtime?: string | false;
|
|
204
|
+
/**
|
|
205
|
+
* Share scope name used for all shared modules (defaults to 'default').
|
|
206
|
+
*/
|
|
207
|
+
shareScope?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
|
|
210
|
+
*/
|
|
211
|
+
shared?: (string | SharedObject)[] | SharedObject;
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../config/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,SAAS,GAAG,QAAQ,IAAI;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,SAAS,GAAG,QAAQ,IAAI;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,EAAE,6BAA6B,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,8BAA8B;AAC9B,MAAM,MAAM,cAAc,CAAC,SAAS,GAAG,QAAQ,IAAI;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,SAAS,GAAG,QAAQ,IAAI;IACnD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IACvD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAC1E,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,EAAE,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,6BAA6B,CAAC;IAE1D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,sBAAsB,CAAC;IAElD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,EAAE,CAAC;CACpD;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,GAAG,aAAa,CAAC;IAErD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EACP,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,iBAAiB,GACjB,KAAK,GACL,aAAa,GACb,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,eAAe,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,GAAG,aAAa,CAAC;IAErD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC;CACnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safely copies files and makes directories if they don't exist.
|
|
3
|
+
* @param pattern { from: @type string, to: @type string }
|
|
4
|
+
* @returns void
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: (pattern: {
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/copy.ts"],"names":[],"mappings":"AAGA;;;;GAIG;kCACsB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAArD,wBAOE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as copy } from './copy';
|
|
2
|
+
export { default as isValidUrl } from './isValidUrl';
|
|
3
|
+
export { default as list } from './list';
|
|
4
|
+
export { default as load, loadAll } from './load';
|
|
5
|
+
export { default as loadJson } from './loadJson';
|
|
6
|
+
export { default as merge } from './merge';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValidUrl.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/isValidUrl.ts"],"names":[],"mappings":"oCAA2B,MAAM;AAAjC,wBAME"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists all files found in dirPath or its subdirectories
|
|
3
|
+
* @param dirPath directory to search
|
|
4
|
+
* @param depth depth to which the search should execute
|
|
5
|
+
* @param target filename to filter results on
|
|
6
|
+
* @returns list of paths for all files found
|
|
7
|
+
*/
|
|
8
|
+
declare const list: (dirPath: string, depth?: number, target?: string | RegExp) => string[];
|
|
9
|
+
export default list;
|
|
10
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/list.ts"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,YAAa,MAAM,2BAAqB,MAAM,GAAG,MAAM,aAMhE,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the YAML file
|
|
3
|
+
* @param configPath to configuration file
|
|
4
|
+
* @returns a yaml object
|
|
5
|
+
*/
|
|
6
|
+
declare const load: <TSchema>(configPath: string) => TSchema;
|
|
7
|
+
/**
|
|
8
|
+
* Loads the YAML files specified by paths
|
|
9
|
+
* @param paths Paths to configurations to process
|
|
10
|
+
* @returns yaml objects
|
|
11
|
+
*/
|
|
12
|
+
export declare const loadAll: <TSchema>(...paths: string[]) => TSchema[];
|
|
13
|
+
export default load;
|
|
14
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/load.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,IAAI,wBAAyB,MAAM,YAWxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,sBAAuB,MAAM,EAAE,cAA+C,CAAC;AAEnG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadJson.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/loadJson.ts"],"names":[],"mappings":"qEAkCiB,MAAM,WACb,MAAM,GAAG,MAAM;AAFzB,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;6CAUP,eAAe;AAAnD,wBAiBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAuB3D,wBAkBqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.index.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/appshell.index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAE1D,wBAKqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.manifest.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/appshell.manifest.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAyB7D,wBAkBqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.metadata.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/appshell.metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAE1D,wBAKqB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as appshell_config } from './appshell.config';
|
|
2
|
+
export { default as appshell_index } from './appshell.index';
|
|
3
|
+
export { default as appshell_manifest } from './appshell.manifest';
|
|
4
|
+
export { default as appshell_metadata } from './appshell.metadata';
|
|
5
|
+
export { default as merge_manifests } from './merge.manifests';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.manifests.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/merge.manifests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAE7D,wBAKqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchDynamicScript.d.ts","sourceRoot":"","sources":["../../../../../loader/src/fetchDynamicScript.ts"],"names":[],"mappings":"8BAE2B,MAAM;AAAjC,wBAoCE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../loader/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,cAAc,SAAS,CAAC;AAExB,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ShareScope } from './types';
|
|
2
|
+
declare global {
|
|
3
|
+
function __webpack_init_sharing__(id: string): Promise<void>;
|
|
4
|
+
const __webpack_share_scopes__: {
|
|
5
|
+
default: ShareScope;
|
|
6
|
+
};
|
|
7
|
+
interface Window {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
__webpack_share_scopes__: Record<string, ShareScope>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare const _default: <TComponent>(scope: string, module: string, shareScope?: string) => Promise<TComponent>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=loadFederatedComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadFederatedComponent.d.ts","sourceRoot":"","sources":["../../../../../loader/src/loadFederatedComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD,OAAO,CAAC,MAAM,CAAC;IACb,SAAS,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D,MAAM,wBAAwB,EAAE;QAAE,OAAO,EAAE,UAAU,CAAA;KAAE,CAAC;IACxD,UAAU,MAAM;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QACvB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KACtD;CACF;4CAIwC,MAAM,UAAU,MAAM;AAA/D,wBAgCE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type AppshellIndex, type AppshellManifest } from '@appshell/config';
|
|
2
|
+
declare const _default: (index: AppshellIndex) => <TComponent>(key: string) => Promise<readonly [TComponent, AppshellManifest<import("@appshell/config").Metadata>] | readonly [null, null]>;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=remoteLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteLoader.d.ts","sourceRoot":"","sources":["../../../../../loader/src/remoteLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;gCAwBtD,aAAa,uBACV,MAAM;AADhC,wBAqCI"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ShareScope<TComponent = any> = Record<string, Record<string, {
|
|
2
|
+
loaded?: 1;
|
|
3
|
+
get: () => Promise<TComponent>;
|
|
4
|
+
from: string;
|
|
5
|
+
eager: boolean;
|
|
6
|
+
}>>;
|
|
7
|
+
export interface ModuleContainer<TComponent> {
|
|
8
|
+
init(shareScope: ShareScope<TComponent>): Promise<void>;
|
|
9
|
+
get(module: string): Promise<() => Record<string, TComponent>>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../loader/src/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,CAAC,UAAU,GAAG,GAAG,IAAI,MAAM,CAC/C,MAAM,EACN,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAC7F,CAAC;AAEF,MAAM,WAAW,eAAe,CAAC,UAAU;IACzC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;CAChE"}
|