@@ -2,7 +2,7 @@ import { AppConfig } from "@pulse-editor/shared-utils";
22import { satisfies } from "semver" ;
33import mfRuntime from "../../../node_modules/@module-federation/runtime/package.json" ;
44import packageJson from "../../package.json" ;
5- import { getRemoteConfig , getRemoteManifest } from "./remote" ;
5+ import { getRemoteClientConfig , getRemoteClientManifest } from "./remote" ;
66
77export async function getHostMFVersion ( ) : Promise < string > {
88 return mfRuntime . version ;
@@ -13,9 +13,9 @@ export async function getRemoteMFVersion(
1313 id : string ,
1414 version : string ,
1515) : Promise < string > {
16- const mfManifest = await getRemoteManifest ( remoteOrigin , id , version ) ;
16+ const mfManifest = await getRemoteClientManifest ( remoteOrigin , id , version ) ;
1717 if ( ! mfManifest || ! mfManifest . metaData ) {
18- throw new Error ( "Remote MF manifest or metaData is undefined" ) ;
18+ return "unknown" ;
1919 }
2020 return mfManifest . metaData . pluginVersion ;
2121}
@@ -30,13 +30,13 @@ export async function getRemoteLibVersion(
3030 id : string ,
3131 version : string ,
3232) : Promise < string > {
33- const pulseConfig : AppConfig = await getRemoteConfig (
33+ const pulseConfig : AppConfig = await getRemoteClientConfig (
3434 remoteOrigin ,
3535 id ,
3636 version ,
3737 ) ;
38- if ( ! pulseConfig ) {
39- throw new Error ( "Remote pulse.config.json undefined" ) ;
38+ if ( ! pulseConfig || ! pulseConfig . libVersion ) {
39+ return "unknown" ;
4040 }
4141 const libVersion = pulseConfig . libVersion ;
4242 return libVersion ;
0 commit comments