Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@module-federation/runtime

Package Overview
Dependencies
Maintainers
8
Versions
650
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/runtime - npm Package Compare versions

Comparing version 0.0.0-next-20241114041727 to 0.0.0-next-20241114065146

3

dist/embedded.cjs.js

@@ -91,5 +91,2 @@ 'use strict';

}
get bridgeHook() {
return this._getInstance().bridgeHook;
}
initOptions(...args) {

@@ -96,0 +93,0 @@ return this._getInstance().initOptions(...args);

@@ -92,16 +92,2 @@ 'use strict';

}
const processModuleAlias = (name, subPath)=>{
// @host/ ./button -> @host/button
let moduleName;
if (name.endsWith('/')) {
moduleName = name.slice(0, -1);
} else {
moduleName = name;
}
if (subPath.startsWith('.')) {
subPath = subPath.slice(1);
}
moduleName = moduleName + subPath;
return moduleName;
};

@@ -201,3 +187,3 @@ const CurrentGlobal = typeof globalThis === 'object' ? globalThis : window;

CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.7.3";
CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.7.2";
}

@@ -932,3 +918,2 @@ }

exports.nativeGlobal = nativeGlobal;
exports.processModuleAlias = processModuleAlias;
exports.registerGlobalPlugins = registerGlobalPlugins;

@@ -935,0 +920,0 @@ exports.resetFederationGlobalInfo = resetFederationGlobalInfo;

@@ -69,8 +69,2 @@ import type { CreateScriptHookReturn, ModuleInfo } from '@module-federation/sdk';

}>;
bridgeHook: PluginSystem<{
beforeBridgeRender: SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeRender: SyncHook<[Record<string, any>], void | Record<string, any>>;
beforeBridgeDestroy: SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeDestroy: SyncHook<[Record<string, any>], void | Record<string, any>>;
}>;
constructor(userOptions: UserOptions);

@@ -77,0 +71,0 @@ initOptions(userOptions: UserOptions): Options;

@@ -81,8 +81,2 @@ import type * as IndexModule from './index';

}>;
get bridgeHook(): import("./utils/hooks").PluginSystem<{
beforeBridgeRender: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeRender: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
beforeBridgeDestroy: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
afterBridgeDestroy: import("./utils/hooks").SyncHook<[Record<string, any>], void | Record<string, any>>;
}>;
initOptions(...args: Parameters<IndexModule.FederationHost['initOptions']>): import("./type").Options;

@@ -89,0 +83,0 @@ loadShare<T>(...args: Parameters<IndexModule.FederationHost['loadShare']>): Promise<false | (() => T | undefined)>;

@@ -35,7 +35,2 @@ import { GlobalModuleInfo, Manifest, ModuleInfo } from '@module-federation/sdk';

}>;
afterLoadSnapshot: AsyncWaterfallHook<{
options: Options;
moduleInfo: Remote;
remoteSnapshot: ModuleInfo;
}>;
}>;

@@ -42,0 +37,0 @@ loaderHook: FederationHost['loaderHook'];

2

dist/src/type/config.d.ts

@@ -7,3 +7,3 @@ import type { RemoteWithEntry, RemoteWithVersion, Module, RemoteEntryType } from '@module-federation/sdk';

};
export interface RemoteInfoCommon {
interface RemoteInfoCommon {
alias?: string;

@@ -10,0 +10,0 @@ shareScope?: string;

@@ -18,6 +18,2 @@ import { FederationHost } from '../core';

}>;
type ModuleBridgeLifeCycle = Module['host']['bridgeHook']['lifecycle'];
type ModuleBridgeLifeCycleCyclePartial = Partial<{
[k in keyof ModuleBridgeLifeCycle]: Parameters<ModuleBridgeLifeCycle[k]['on']>[0];
}>;
type SharedLifeCycle = SharedHandler['hooks']['lifecycle'];

@@ -31,3 +27,3 @@ type SharedLifeCycleCyclePartial = Partial<{

}>;
export type FederationRuntimePlugin = CoreLifeCyclePartial & SnapshotLifeCycleCyclePartial & SharedLifeCycleCyclePartial & RemoteLifeCycleCyclePartial & ModuleLifeCycleCyclePartial & ModuleBridgeLifeCycleCyclePartial & {
export type FederationRuntimePlugin = CoreLifeCyclePartial & SnapshotLifeCycleCyclePartial & SharedLifeCycleCyclePartial & RemoteLifeCycleCyclePartial & ModuleLifeCycleCyclePartial & {
name: string;

@@ -34,0 +30,0 @@ version?: string;

import { FederationHost } from '../core';
import { UserOptions } from '../type';
import { Module } from '../module';
export declare function registerPlugins(plugins: UserOptions['plugins'], hookInstances: Array<FederationHost['hooks'] | FederationHost['snapshotHandler']['hooks'] | FederationHost['sharedHandler']['hooks'] | FederationHost['remoteHandler']['hooks'] | Module['host']['loaderHook'] | Module['host']['bridgeHook']>): import("../type").FederationRuntimePlugin[] | undefined;
export declare function registerPlugins(plugins: UserOptions['plugins'], hookInstances: Array<FederationHost['hooks'] | FederationHost['snapshotHandler']['hooks'] | FederationHost['sharedHandler']['hooks'] | FederationHost['remoteHandler']['hooks'] | Module['host']['loaderHook']>): import("../type").FederationRuntimePlugin[] | undefined;

@@ -18,2 +18,1 @@ import { RemoteWithEntry, ModuleInfo, RemoteEntryType } from '@module-federation/sdk';

};
export declare const processModuleAlias: (name: string, subPath: string) => string;
{
"name": "@module-federation/runtime",
"version": "0.0.0-next-20241114041727",
"version": "0.0.0-next-20241114065146",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -53,5 +53,5 @@ "main": "./dist/index.cjs.js",

"dependencies": {
"@module-federation/sdk": "0.0.0-next-20241114041727",
"@module-federation/error-codes": "0.0.0-next-20241114041727"
"@module-federation/sdk": "0.0.0-next-20241114065146",
"@module-federation/error-codes": "0.0.0-next-20241114065146"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc