@appshell/loader 0.4.0 → 0.5.0
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 +32 -0
- package/__tests__/remoteLoader.spec.ts +1 -2
- package/dist/main.js +1 -1
- package/dist/types/config/src/configmap.d.ts +1 -1
- package/dist/types/config/src/configmap.d.ts.map +1 -1
- package/dist/types/config/src/generate.env.d.ts +1 -1
- package/dist/types/config/src/generate.env.d.ts.map +1 -1
- package/dist/types/config/src/generate.global-config.d.ts +3 -0
- package/dist/types/config/src/generate.global-config.d.ts.map +1 -1
- package/dist/types/config/src/generate.manifest.d.ts.map +1 -1
- package/dist/types/config/src/index.d.ts +3 -1
- package/dist/types/config/src/index.d.ts.map +1 -1
- package/dist/types/config/src/mappers/appshell.config.d.ts.map +1 -1
- package/dist/types/config/src/outdated.d.ts +4 -0
- package/dist/types/config/src/outdated.d.ts.map +1 -0
- package/dist/types/config/src/sync.d.ts +21 -0
- package/dist/types/config/src/sync.d.ts.map +1 -0
- package/dist/types/config/src/types.d.ts +43 -0
- package/dist/types/config/src/types.d.ts.map +1 -1
- package/dist/types/config/src/utils/blur.d.ts +3 -0
- package/dist/types/config/src/utils/blur.d.ts.map +1 -0
- package/dist/types/config/src/utils/compare.d.ts +8 -0
- package/dist/types/config/src/utils/compare.d.ts.map +1 -0
- package/dist/types/config/src/utils/config.d.ts +6 -0
- package/dist/types/config/src/utils/config.d.ts.map +1 -0
- package/dist/types/config/src/utils/index.d.ts +3 -0
- package/dist/types/config/src/utils/index.d.ts.map +1 -1
- package/dist/types/config/src/utils/load.d.ts.map +1 -1
- package/dist/types/config/src/utils/loadJson.d.ts +3 -0
- package/dist/types/config/src/utils/loadJson.d.ts.map +1 -1
- package/dist/types/config/src/utils/merge.d.ts.map +1 -1
- package/dist/types/config/src/validators/AppshellGlobalConfigValidator.d.ts.map +1 -1
- package/dist/types/config/src/validators/AppshellManifestValidator.d.ts.map +1 -1
- package/dist/types/config/src/validators/AppshellTemplateValidator.d.ts.map +1 -1
- package/dist/types/loader/src/loadAppshellComponent.d.ts.map +1 -1
- package/dist/types/loader/src/remoteLoader.d.ts +1 -1
- package/dist/types/loader/src/remoteLoader.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/remoteLoader.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.5.0](https://github.com/navaris/appshell/compare/@appshell/loader@0.4.0...@appshell/loader@0.5.0) (2025-08-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* configurable api key header support, minor fixes ([2f0bf02](https://github.com/navaris/appshell/commit/2f0bf027b92398f91b8e8cbfbf543d61fe37b7a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* appshell cli api key support, init sync and outdated commands ([#6](https://github.com/navaris/appshell/issues/6)) ([acc5fa2](https://github.com/navaris/appshell/commit/acc5fa234f91a167038161d5080481c43f8eb8b4))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [0.5.0-alpha.0](https://github.com/navaris/appshell/compare/@appshell/loader@0.4.0...@appshell/loader@0.5.0-alpha.0) (2025-08-10)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* include credentials when fetching the manifests ([4e0ee79](https://github.com/navaris/appshell/commit/4e0ee79b4ba93d34fd6a0e1a5f6bf2fc9f3994cc))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* appshell cli api key support, init sync and outdated commands ([#6](https://github.com/navaris/appshell/issues/6)) ([acc5fa2](https://github.com/navaris/appshell/commit/acc5fa234f91a167038161d5080481c43f8eb8b4))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [0.4.0](https://github.com/navaris/appshell/compare/@appshell/loader@0.3.0...@appshell/loader@0.4.0) (2024-09-24)
|
|
7
39
|
|
|
8
40
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jest-environment jsdom */
|
|
2
|
-
import { AppshellManifest } from '@appshell/config';
|
|
3
|
-
import { AppshellGlobalConfig } from '@appshell/config/src/types';
|
|
2
|
+
import { AppshellGlobalConfig, AppshellManifest } from '@appshell/config';
|
|
4
3
|
import fetch, { enableFetchMocks } from 'jest-fetch-mock';
|
|
5
4
|
import * as fetchDynamicScript from '../src/fetchDynamicScript';
|
|
6
5
|
import * as loadAppshellComponent from '../src/loadAppshellComponent';
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};(()=>{e.S={};var o={},t={};e.I=(r,n)=>{n||(n=[]);var a=t[r];if(a||(a=t[r]={}),!(n.indexOf(a)>=0)){if(n.push(a),o[r])return o[r];e.o(e.S,r)||(e.S[r]={}),e.S[r];var i=[];return o[r]=i.length?Promise.all(i).then((()=>o[r]=1)):1}}})();var o={};e.r(o),e.d(o,{default:()=>a});const t=new Set,r=new Set,n=new Map,a=o=>async a=>{let i;const d=o.index[a];if(!d)throw new Error(`Remote resource not found in registry. Expected: ${a}`);try{const c=await(async e=>{if(n.has(e))return n.get(e);n.set(e,void 0);const o=await fetch(e);if(o.ok)return o.json();const t=await o.text();throw new Error(`Failed to get manifest from ${e}. ${t}`)})(d);if(c){n.set(d,c);const s=c.remotes[a],l=c.environment[s.scope]||{},f=o.overrides?.environment&&o.overrides?.environment[s.scope]||{};if(window[`__appshell_env__${s.scope}`]={...l,...f},r.has(s.remoteEntryUrl)||await(async e=>{const o=document.createElement("script");return new Promise(((r,n)=>{t.has(e)?r(!1):(t.add(e),o.src=e,o.type="text/javascript",o.async=!0,o.onload=()=>{console.debug(`Remote entry fetched from '${e}'.`),r(!0)},o.onerror=()=>{const o=`Failed to fetch remote entry from '${e}'.`;console.error(o),t.delete(e),n(o)},document.head.appendChild(o))})).finally((()=>{document.head.contains(o)&&document.head.removeChild(o)}))})(s.remoteEntryUrl))return r.add(s.remoteEntryUrl),i=await(async(o,t,r="default")=>{console.debug(`loading Appshell component: { scope: ${o}, module: ${t}, shareScope: ${r} }`),await e.I(r);const n=window[o];if(!n)throw new Error(`Failed to find module container ${o}`);await n.init(e.S[r]);const a=await n.get(t);if(!a)throw new Error(`Invalid factory produced by container for module ${t}.`);const i=a();return console.debug(`Appshell component loaded: { scope: ${o}, module: ${t}, shareScope: ${r} }`),i.default})(s.scope,s.module,s.shareScope),[i,c]}return[null,null]}catch(e){throw new Error(`Failed to load component '${a}'. ${e?.toString()}`)}};return o})()));
|
|
1
|
+
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};(()=>{e.S={};var o={},t={};e.I=(r,n)=>{n||(n=[]);var a=t[r];if(a||(a=t[r]={}),!(n.indexOf(a)>=0)){if(n.push(a),o[r])return o[r];e.o(e.S,r)||(e.S[r]={}),e.S[r];var i=[];return o[r]=i.length?Promise.all(i).then((()=>o[r]=1)):1}}})();var o={};e.r(o),e.d(o,{default:()=>a});const t=new Set,r=new Set,n=new Map,a=o=>async a=>{let i;const d=o.index[a];if(!d)throw new Error(`Remote resource not found in registry. Expected: ${a}`);try{const c=await(async e=>{if(n.has(e))return n.get(e);n.set(e,void 0);const o=await fetch(e,{credentials:"include"});if(o.ok)return o.json();const t=await o.text();throw new Error(`Failed to get manifest from ${e}. ${t}`)})(d);if(c){n.set(d,c);const s=c.remotes[a],l=c.environment[s.scope]||{},f=o.overrides?.environment&&o.overrides?.environment[s.scope]||{};if(window[`__appshell_env__${s.scope}`]={...l,...f},r.has(s.remoteEntryUrl)||await(async e=>{const o=document.createElement("script");return new Promise(((r,n)=>{t.has(e)?r(!1):(t.add(e),o.src=e,o.type="text/javascript",o.async=!0,o.onload=()=>{console.debug(`Remote entry fetched from '${e}'.`),r(!0)},o.onerror=()=>{const o=`Failed to fetch remote entry from '${e}'.`;console.error(o),t.delete(e),n(o)},document.head.appendChild(o))})).finally((()=>{document.head.contains(o)&&document.head.removeChild(o)}))})(s.remoteEntryUrl))return r.add(s.remoteEntryUrl),i=await(async(o,t,r="default")=>{console.debug(`loading Appshell component: { scope: ${o}, module: ${t}, shareScope: ${r} }`),await e.I(r);const n=window[o];if(!n)throw new Error(`Failed to find module container ${o}`);await n.init(e.S[r]);const a=await n.get(t);if(!a)throw new Error(`Invalid factory produced by container for module ${t}.`);const i=a();return console.debug(`Appshell component loaded: { scope: ${o}, module: ${t}, shareScope: ${r} }`),i.default})(s.scope,s.module,s.shareScope),[i,c]}return[null,null]}catch(e){throw new Error(`Failed to load component '${a}'. ${e?.toString()}`)}};return o})()));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppshellConfig, ConfigMap } from './types';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
apply: <T extends object>(obj: T, configMap: ConfigMap) => T;
|
|
4
|
-
create: (config: AppshellConfig
|
|
4
|
+
create: (config: AppshellConfig) => Record<string, string>;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=configmap.d.ts.map
|
|
@@ -1 +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
|
|
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;;YA0BrC,CAAC,SAAS,MAAM,OAAO,CAAC,aAAa,SAAS,KAAG,CAAC;qBAuBzC,cAAc;;AAEtC,wBAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.env.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.env.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.env.ts"],"names":[],"mappings":";AAGA,wBAuBK"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AppshellGlobalConfig } from './types';
|
|
2
2
|
type GenerateGlobalConfigOptions = {
|
|
3
3
|
insecure: boolean;
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
apiKeyHeader?: string;
|
|
6
|
+
proxyUrl?: string;
|
|
4
7
|
};
|
|
5
8
|
declare const _default: (registries: string[], options?: GenerateGlobalConfigOptions) => Promise<AppshellGlobalConfig>;
|
|
6
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.global-config.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.global-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.global-config.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.global-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;qCAGY,MAAM,EAAE,YACX,2BAA2B,KACnC,OAAO,CAAC,oBAAoB,CAAC;AAHhC,wBA8CE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.manifest.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.manifest.ts"],"names":[],"mappings":"AAOA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"generate.manifest.d.ts","sourceRoot":"","sources":["../../../../../config/src/generate.manifest.ts"],"names":[],"mappings":"AAOA;;;;GAIG;yBACmB,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,MAAM;AAArF,wBAaE"}
|
|
@@ -6,8 +6,10 @@ export { default as deregister } from './deregister';
|
|
|
6
6
|
export { default as generateEnv } from './generate.env';
|
|
7
7
|
export { default as generateGlobalConfig } from './generate.global-config';
|
|
8
8
|
export { default as generateManifest } from './generate.manifest';
|
|
9
|
+
export { default as outdated } from './outdated';
|
|
9
10
|
export { default as register } from './register';
|
|
10
|
-
export
|
|
11
|
+
export { default as sync } from './sync';
|
|
12
|
+
export type { AppshellConfig, AppshellConfigRemote, AppshellGlobalConfig, AppshellIndex, AppshellManifest, AppshellRemote, AppshellTemplate, ComparisonResult, ComparisonResults, ComparisonTarget, Metadata, ModuleFederationPluginOptions, PackageSpec, Schema, SharedModuleSpec, } from './types';
|
|
11
13
|
export * as utils from './utils';
|
|
12
14
|
export * as validators from './validators';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,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,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,MAAM,
|
|
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,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,6BAA6B,EAC7B,WAAW,EACX,MAAM,EACN,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/mappers/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,gBAAgB,EAEhB,gBAAgB,EAChB,SAAS,EACV,MAAM,UAAU,CAAC;AAiElB,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/mappers/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,gBAAgB,EAEhB,gBAAgB,EAChB,SAAS,EACV,MAAM,UAAU,CAAC;AAiElB,eAAO,MAAM,kBAAkB,GAAI,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAChE,gBAAgB,QACpB,SAAS,gCAQhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outdated.d.ts","sourceRoot":"","sources":["../../../../../config/src/outdated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;sCAGrB,WAAW,oBAAoB,gBAAgB;AAAlF,wBAYE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComparisonResult } from './types';
|
|
2
|
+
export type ResolutionStrategy = 'highest' | 'lowest';
|
|
3
|
+
export type PackageManager = 'npm' | 'yarn';
|
|
4
|
+
export declare const logPackageConflicts: (conflicts: ComparisonResult[]) => void;
|
|
5
|
+
export declare const syncDependencies: (workingDir: string, registry: string, packages: string[], packageManager: "npm" | "yarn") => Promise<void>;
|
|
6
|
+
export declare const resolveConflicts: (conflicts: ComparisonResult[][], resolutionStrategy: ResolutionStrategy) => string[];
|
|
7
|
+
export declare const groupByPackageName: (conflicts: Record<string, ComparisonResult>) => ComparisonResult[][];
|
|
8
|
+
export declare const groupBySampleModule: (conflicts: Record<string, ComparisonResult>) => ComparisonResult[][];
|
|
9
|
+
export declare const groupByBaselineModule: (conflicts: Record<string, ComparisonResult>) => ComparisonResult[][];
|
|
10
|
+
/**
|
|
11
|
+
* Syncs shared dependencies
|
|
12
|
+
* @param workingDir - working directory
|
|
13
|
+
* @param registry - registry to sync dependencies with
|
|
14
|
+
* @param conflicts - shared dependencies to sync
|
|
15
|
+
* @param resolutionStrategy - resolution strategy to use for syncing dependencies (highest or lowest)
|
|
16
|
+
* @param packageManager - package manager to use for syncing dependencies (npm or yarn)
|
|
17
|
+
* @param dryRun - if true, only logs the shared dependencies to sync
|
|
18
|
+
*/
|
|
19
|
+
declare const _default: (workingDir: string, registry: string, conflicts: Record<string, ComparisonResult>, resolutionStrategy?: ResolutionStrategy, packageManager?: PackageManager, dryRun?: boolean) => Promise<void>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../config/src/sync.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,mBAAmB,cAAe,gBAAgB,EAAE,SAuBhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,eACf,MAAM,YACR,MAAM,YACN,MAAM,EAAE,kBACF,KAAK,GAAG,MAAM,kBAwB/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,cAChB,gBAAgB,EAAE,EAAE,sBACX,kBAAkB,aAmBvC,CAAC;AAEF,eAAO,MAAM,kBAAkB,cAAe,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,yBACQ,CAAC;AAEvF,eAAO,MAAM,mBAAmB,cAAe,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,yBACQ,CAAC;AAExF,eAAO,MAAM,qBAAqB,cAAe,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,yBACQ,CAAC;AAE1F;;;;;;;;GAQG;qCAEW,MAAM,YACR,MAAM,aACL,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,uBACvB,kBAAkB,mBACtB,cAAc;AALhC,wBA6BE"}
|
|
@@ -4,6 +4,49 @@ export type ConfigValidator = {
|
|
|
4
4
|
validate: <T>(...config: T[]) => void;
|
|
5
5
|
};
|
|
6
6
|
export type ConfigMap = Record<string, string>;
|
|
7
|
+
export type PackageSpec = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
main: string;
|
|
12
|
+
scripts?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
author?: string;
|
|
17
|
+
license?: string;
|
|
18
|
+
dependencies?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
devDependencies?: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type SharedModuleSpec = {
|
|
26
|
+
name: string;
|
|
27
|
+
shared: SharedObject;
|
|
28
|
+
};
|
|
29
|
+
export type ComparisonResult = {
|
|
30
|
+
status: 'conflict' | 'missing' | 'satisfied';
|
|
31
|
+
packageName: string;
|
|
32
|
+
sampleModule: string;
|
|
33
|
+
sampleVersion: string;
|
|
34
|
+
baselineModule: string;
|
|
35
|
+
baselineVersion: string;
|
|
36
|
+
};
|
|
37
|
+
export type ComparisonResults = {
|
|
38
|
+
conflicts: Record<string, ComparisonResult>;
|
|
39
|
+
missing: Record<string, ComparisonResult>;
|
|
40
|
+
satisfied: Record<string, ComparisonResult>;
|
|
41
|
+
};
|
|
42
|
+
export type ComparisonTarget = {
|
|
43
|
+
name: string;
|
|
44
|
+
dependencies: Record<string, string | undefined>;
|
|
45
|
+
};
|
|
46
|
+
export type CliConfig = Record<string, string> & {
|
|
47
|
+
apiKey: string;
|
|
48
|
+
registry: string;
|
|
49
|
+
};
|
|
7
50
|
export type AppshellConfigRemote<TMetadata = Metadata> = {
|
|
8
51
|
id: string;
|
|
9
52
|
url: string;
|
|
@@ -1 +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;
|
|
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,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E,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 @@
|
|
|
1
|
+
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/blur.ts"],"names":[],"mappings":";AAAA,wBAA8F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComparisonResults, ComparisonTarget, PackageSpec, SharedModuleSpec } from '../types';
|
|
2
|
+
export declare const extractDependencies: (sharedModule: SharedModuleSpec) => Record<string, string | undefined>;
|
|
3
|
+
export declare const compareDependency: (packageName: string, sampleModule: string, sampleVersion: string | undefined, baselineModule: string, baselineVersion: string | undefined, results: ComparisonResults) => ComparisonResults;
|
|
4
|
+
export declare const compareDependencies: (sample: ComparisonTarget, baseline: ComparisonTarget) => ComparisonResults;
|
|
5
|
+
export declare const compareSharedDependencies: (packageSpec: PackageSpec, sharedModule: SharedModuleSpec) => ComparisonResults;
|
|
6
|
+
export declare const compareSharedModules: (sampleSpec: SharedModuleSpec, baselineSpec: SharedModuleSpec) => ComparisonResults;
|
|
7
|
+
export declare const printResults: (results: ComparisonResults) => void;
|
|
8
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/compare.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,mBAAmB,iBAAkB,gBAAgB,uCAMpB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,gBACf,MAAM,gBACL,MAAM,iBACL,MAAM,GAAG,SAAS,kBACjB,MAAM,mBACL,MAAM,GAAG,SAAS,WAC1B,iBAAiB,sBAiD3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY,gBAAgB,YAAY,gBAAgB,sBAYrF,CAAC;AAEJ,eAAO,MAAM,yBAAyB,gBACvB,WAAW,gBACV,gBAAgB,sBAoB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,eACnB,gBAAgB,gBACd,gBAAgB,sBAY/B,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,iBAAiB,SAsBtD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import yargs from 'yargs';
|
|
2
|
+
import { CliConfig } from '../types';
|
|
3
|
+
export declare const readConfig: (configPath: string) => CliConfig;
|
|
4
|
+
export declare const writeConfig: (configPath: string, config: CliConfig) => void;
|
|
5
|
+
export declare const mergeConfigWithArgs: (config: CliConfig, argv: yargs.ArgumentsCamelCase<unknown>) => void;
|
|
6
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAIrC,eAAO,MAAM,UAAU,eAAgB,MAAM,cAkB5C,CAAC;AAEF,eAAO,MAAM,WAAW,eAAgB,MAAM,UAAU,SAAS,SAchE,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY,SAAS,QAAQ,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAe7F,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { default as blur } from './blur';
|
|
2
|
+
export { compareDependencies, compareDependency, compareSharedDependencies, compareSharedModules, extractDependencies, printResults, } from './compare';
|
|
3
|
+
export { mergeConfigWithArgs, readConfig, writeConfig } from './config';
|
|
1
4
|
export { default as copy } from './copy';
|
|
2
5
|
export { default as isValidUrl } from './isValidUrl';
|
|
3
6
|
export { default as list } from './list';
|
|
@@ -1 +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"}
|
|
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,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxE,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/load.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/load.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,cAAc,MAAM,KAAG,OAU3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,MAAM,EAAE,KAAG,OAAO,EAAqC,CAAC;AAEnG,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
type LoadJsonOptions = {
|
|
2
2
|
insecure: boolean;
|
|
3
3
|
target: string | RegExp;
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
apiKeyHeader?: string;
|
|
6
|
+
proxyUrl?: string;
|
|
4
7
|
};
|
|
5
8
|
declare const _default: <T = Record<string, unknown>>(jsonPathOrUrl: string, options?: LoadJsonOptions) => Promise<T[]>;
|
|
6
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadJson.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/loadJson.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"loadJson.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/loadJson.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;yBAsDoB,CAAC,2CACN,MAAM,YACZ,eAAe,KAOvB,OAAO,CAAC,CAAC,EAAE,CAAC;AATf,wBAqBE"}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../../../config/src/utils/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;yBAU3B,OAAO,aAAa,eAAe,gBAAgB,OAAO,EAAE;AAA5E,wBAiBE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppshellGlobalConfigValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellGlobalConfigValidator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"AppshellGlobalConfigValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellGlobalConfigValidator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAC;wBAO5D,eAAe;AALpB,wBAKqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppshellManifestValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellManifestValidator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,eAAe,
|
|
1
|
+
{"version":3,"file":"AppshellManifestValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellManifestValidator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,eAAe,EAAgB,MAAM,UAAU,CAAC;wBA0EtE,eAAe;AAtBpB,wBAsBqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppshellTemplateValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellTemplateValidator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"AppshellTemplateValidator.d.ts","sourceRoot":"","sources":["../../../../../../config/src/validators/AppshellTemplateValidator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAC;wBAyCxD,eAAe;AAlBpB,wBAkBqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadAppshellComponent.d.ts","sourceRoot":"","sources":["../../../../src/loadAppshellComponent.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;
|
|
1
|
+
{"version":3,"file":"loadAppshellComponent.d.ts","sourceRoot":"","sources":["../../../../src/loadAppshellComponent.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;yBAIqB,UAAU,SAAS,MAAM,UAAU,MAAM;AAA/D,wBAgCE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AppshellManifest } from '@appshell/config';
|
|
2
2
|
import { AppshellGlobalConfig } from 'packages/config/src/types';
|
|
3
|
-
declare const _default: (config: AppshellGlobalConfig) => <TComponent>(key: string) => Promise<readonly [TComponent, AppshellManifest
|
|
3
|
+
declare const _default: (config: AppshellGlobalConfig) => <TComponent>(key: string) => Promise<readonly [TComponent, AppshellManifest] | readonly [null, null]>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=remoteLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteLoader.d.ts","sourceRoot":"","sources":["../../../../src/remoteLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;iCAwBzC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"remoteLoader.d.ts","sourceRoot":"","sources":["../../../../src/remoteLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;iCAwBzC,oBAAoB,MACnC,UAAU,OAAO,MAAM;AADhC,wBA4CI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appshell/loader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Utility for loading Appshell components",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/loader/src/index.d.ts",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"appshell"
|
|
25
25
|
],
|
|
26
26
|
"license": "MIT",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "2e78583ddc849c8137e89ffc98c7f7182e9d3bce"
|
|
28
28
|
}
|
package/src/remoteLoader.ts
CHANGED
|
@@ -14,7 +14,7 @@ const fetchManifest = async (url: string): Promise<AppshellManifest | undefined>
|
|
|
14
14
|
|
|
15
15
|
fetchedManifestCache.set(url, undefined);
|
|
16
16
|
|
|
17
|
-
const response = await fetch(url);
|
|
17
|
+
const response = await fetch(url, { credentials: 'include' });
|
|
18
18
|
|
|
19
19
|
if (response.ok) {
|
|
20
20
|
return response.json();
|