Socket
Socket
Sign inDemoInstall

@module-federation/runtime

Package Overview
Dependencies
Maintainers
8
Versions
524
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.6.0 to 0.6.1

dist/embedded.cjs.d.ts

2

dist/helpers.cjs.js
'use strict';
var share = require('./share.cjs.js');
require('./polyfills.cjs.js');
require('@module-federation/sdk');

@@ -5,0 +7,0 @@ const ShareUtils = {

4

dist/helpers.esm.js

@@ -1,2 +0,4 @@

import { q as getRegisteredShare, A as getGlobalShareScope, G as Global, K as nativeGlobal, L as resetFederationGlobalInfo, F as getGlobalFederationInstance, I as setGlobalFederationInstance, H as getGlobalFederationConstructor, E as setGlobalFederationConstructor, n as getInfoWithoutType, x as getGlobalSnapshot, M as getTargetSnapshotInfoByModuleInfo, t as getGlobalSnapshotInfoByModuleInfo, v as setGlobalSnapshotInfoByModuleInfo, u as addGlobalSnapshot, c as getRemoteEntryExports, J as registerGlobalPlugins, g as getGlobalHostPlugins, o as getPreloaded, p as setPreloaded } from './share.esm.js';
import { o as getRegisteredShare, y as getGlobalShareScope, G as Global, I as nativeGlobal, J as resetFederationGlobalInfo, C as getGlobalFederationInstance, F as setGlobalFederationInstance, E as getGlobalFederationConstructor, B as setGlobalFederationConstructor, m as getInfoWithoutType, u as getGlobalSnapshot, K as getTargetSnapshotInfoByModuleInfo, q as getGlobalSnapshotInfoByModuleInfo, t as setGlobalSnapshotInfoByModuleInfo, r as addGlobalSnapshot, c as getRemoteEntryExports, H as registerGlobalPlugins, g as getGlobalHostPlugins, n as getPreloaded, s as setPreloaded } from './share.esm.js';
import './polyfills.esm.js';
import '@module-federation/sdk';

@@ -3,0 +5,0 @@ const ShareUtils = {

{
"name": "@module-federation/runtime",
"version": "0.6.0",
"version": "0.6.1",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -32,6 +32,6 @@ "main": "./index.cjs.js",

},
"./retry-plugin": {
"types": "./dist/retry-plugin.cjs.d.ts",
"import": "./dist/retry-plugin.esm.js",
"require": "./dist/retry-plugin.cjs.js"
"./embedded": {
"types": "./dist/embedded.cjs.d.ts",
"import": "./dist/embedded.esm.js",
"require": "./dist/embedded.cjs.js"
},

@@ -50,5 +50,2 @@ "./*": "./*"

"./dist/types.cjs.d.ts"
],
"retry-plugin": [
"./dist/retry-plugin.cjs.d.ts"
]

@@ -55,0 +52,0 @@ }

'use strict';
var polyfills = require('./polyfills.cjs.js');
var sdk = require('@module-federation/sdk');
function getBuilderId() {

@@ -7,8 +10,2 @@ //@ts-ignore

}
function isDebugMode() {
return Boolean("");
}
function isBrowserEnv() {
return typeof window !== 'undefined';
}

@@ -59,10 +56,2 @@ const LOG_CATEGORY = '[ Federation Runtime ]';

}
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}
function isObject(val) {

@@ -87,3 +76,3 @@ return val && typeof val === 'object';

};
if (isBrowserEnv()) {
if (sdk.isBrowserEnv()) {
return 'remoteEntry' in snapshot ? {

@@ -105,28 +94,2 @@ url: snapshot.remoteEntry,

function _extends$1() {
_extends$1 = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends$1.apply(this, arguments);
}
function _object_without_properties_loose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for(i = 0; i < sourceKeys.length; i++){
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const nativeGlobal = (()=>{

@@ -216,6 +179,6 @@ try {

}
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
function setGlobalFederationConstructor(FederationConstructor, isDebug = sdk.isDebugMode()) {
if (isDebug) {
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.0";
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.1";
}

@@ -268,3 +231,3 @@ }

if ('version' in moduleInfo && moduleInfo['version']) {
const { version } = moduleInfo, resModuleInfo = _object_without_properties_loose(moduleInfo, [
const { version } = moduleInfo, resModuleInfo = polyfills._object_without_properties_loose(moduleInfo, [
"version"

@@ -287,3 +250,3 @@ ]);

const addGlobalSnapshot = (moduleInfos)=>{
nativeGlobal.__FEDERATION__.moduleInfo = _extends$1({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
nativeGlobal.__FEDERATION__.moduleInfo = polyfills._extends({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
return ()=>{

@@ -681,16 +644,2 @@ const keys = Object.keys(moduleInfos);

function _extends() {
_extends = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function formatShare(shareArgs, from, name, shareStrategy) {

@@ -712,3 +661,3 @@ let get;

var _shareArgs_version, _shareArgs_scope, _shareArgs_strategy;
return _extends({
return polyfills._extends({
deps: [],

@@ -719,3 +668,3 @@ useIn: [],

}, shareArgs, {
shareConfig: _extends({
shareConfig: polyfills._extends({
requiredVersion: `^${shareArgs.version}`,

@@ -746,3 +695,3 @@ singleton: false,

}, {});
const shared = _extends({}, globalOptions.shared);
const shared = polyfills._extends({}, globalOptions.shared);
Object.keys(shareInfos).forEach((shareKey)=>{

@@ -936,3 +885,2 @@ if (!shared[shareKey]) {

exports.globalLoading = globalLoading;
exports.isBrowserEnv = isBrowserEnv;
exports.isObject = isObject;

@@ -945,3 +893,2 @@ exports.isPlainObject = isPlainObject;

exports.resetFederationGlobalInfo = resetFederationGlobalInfo;
exports.safeToString = safeToString;
exports.setGlobalFederationConstructor = setGlobalFederationConstructor;

@@ -948,0 +895,0 @@ exports.setGlobalFederationInstance = setGlobalFederationInstance;

@@ -0,1 +1,4 @@

import { a as _object_without_properties_loose, _ as _extends } from './polyfills.esm.js';
import { isBrowserEnv, isDebugMode } from '@module-federation/sdk';
function getBuilderId() {

@@ -5,8 +8,2 @@ //@ts-ignore

}
function isDebugMode() {
return Boolean("");
}
function isBrowserEnv() {
return typeof window !== 'undefined';
}

@@ -57,10 +54,2 @@ const LOG_CATEGORY = '[ Federation Runtime ]';

}
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}
function isObject(val) {

@@ -102,28 +91,2 @@ return val && typeof val === 'object';

function _extends$1() {
_extends$1 = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends$1.apply(this, arguments);
}
function _object_without_properties_loose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for(i = 0; i < sourceKeys.length; i++){
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const nativeGlobal = (()=>{

@@ -216,3 +179,3 @@ try {

globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.0";
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.1";
}

@@ -283,3 +246,3 @@ }

const addGlobalSnapshot = (moduleInfos)=>{
nativeGlobal.__FEDERATION__.moduleInfo = _extends$1({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
nativeGlobal.__FEDERATION__.moduleInfo = _extends({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
return ()=>{

@@ -677,16 +640,2 @@ const keys = Object.keys(moduleInfos);

function _extends() {
_extends = Object.assign || function(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i];
for(var key in source){
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function formatShare(shareArgs, from, name, shareStrategy) {

@@ -904,2 +853,2 @@ let get;

export { getGlobalShareScope as A, addUniqueItem as B, getBuilderId as C, DEFAULT_REMOTE_TYPE as D, setGlobalFederationConstructor as E, getGlobalFederationInstance as F, Global as G, getGlobalFederationConstructor as H, setGlobalFederationInstance as I, registerGlobalPlugins as J, nativeGlobal as K, resetFederationGlobalInfo as L, getTargetSnapshotInfoByModuleInfo as M, globalLoading as a, DEFAULT_SCOPE as b, getRemoteEntryExports as c, assert as d, getFMId as e, error as f, getGlobalHostPlugins as g, isPlainObject as h, isObject as i, isRemoteInfoWithEntry as j, isPureRemoteEntry as k, getRemoteEntryInfoFromSnapshot as l, isBrowserEnv as m, getInfoWithoutType as n, getPreloaded as o, setPreloaded as p, getRegisteredShare as q, arrayOptions as r, safeToString as s, getGlobalSnapshotInfoByModuleInfo as t, addGlobalSnapshot as u, setGlobalSnapshotInfoByModuleInfo as v, warn as w, getGlobalSnapshot as x, formatShareConfigs as y, getTargetSharedOptions as z };
export { getBuilderId as A, setGlobalFederationConstructor as B, getGlobalFederationInstance as C, DEFAULT_REMOTE_TYPE as D, getGlobalFederationConstructor as E, setGlobalFederationInstance as F, Global as G, registerGlobalPlugins as H, nativeGlobal as I, resetFederationGlobalInfo as J, getTargetSnapshotInfoByModuleInfo as K, globalLoading as a, DEFAULT_SCOPE as b, getRemoteEntryExports as c, assert as d, getFMId as e, error as f, getGlobalHostPlugins as g, isPlainObject as h, isObject as i, isRemoteInfoWithEntry as j, isPureRemoteEntry as k, getRemoteEntryInfoFromSnapshot as l, getInfoWithoutType as m, getPreloaded as n, getRegisteredShare as o, arrayOptions as p, getGlobalSnapshotInfoByModuleInfo as q, addGlobalSnapshot as r, setPreloaded as s, setGlobalSnapshotInfoByModuleInfo as t, getGlobalSnapshot as u, formatShareConfigs as v, warn as w, getTargetSharedOptions as x, getGlobalShareScope as y, addUniqueItem as z };

@@ -1,2 +0,2 @@

import type { ModuleInfo, GlobalModuleInfo } from '@module-federation/sdk';
import { ModuleInfo, GlobalModuleInfo } from '@module-federation/sdk';
import { Options, UserOptions, PreloadAssets, PreloadOptions, PreloadRemoteArgs, Remote, RemoteInfo, RemoteEntryExports, CallFrom } from '../type';

@@ -3,0 +3,0 @@ import { FederationHost } from '../core';

@@ -0,4 +1,3 @@

export { isBrowserEnv, isDebugMode } from '@module-federation/sdk';
export declare function isDevelopmentMode(): boolean;
export declare function getBuilderId(): string;
export declare function isDebugMode(): boolean;
export declare function isBrowserEnv(): boolean;

@@ -1,2 +0,2 @@

import type { RemoteWithEntry, ModuleInfo, RemoteEntryType } from '@module-federation/sdk';
import { RemoteWithEntry, ModuleInfo, RemoteEntryType } from '@module-federation/sdk';
import { Remote, RemoteInfoOptionalVersion } from '../type';

@@ -8,3 +8,2 @@ export declare function addUniqueItem(arr: Array<string>, item: string): Array<string>;

export declare function safeWrapper<T extends (...args: Array<any>) => any>(callback: T, disableWarn?: boolean): Promise<ReturnType<T> | undefined>;
export declare function safeToString(info: any): string;
export declare function isObject(val: any): boolean;

@@ -11,0 +10,0 @@ export declare const objectToString: () => string;

{
"name": "@module-federation/runtime",
"version": "0.6.0",
"version": "0.6.1",
"author": "zhouxiao <codingzx@gmail.com>",

@@ -32,6 +32,6 @@ "main": "./dist/index.cjs.js",

},
"./retry-plugin": {
"types": "./dist/retry-plugin.cjs.d.ts",
"import": "./dist/retry-plugin.esm.js",
"require": "./dist/retry-plugin.cjs.js"
"./embedded": {
"types": "./dist/embedded.cjs.d.ts",
"import": "./dist/embedded.esm.js",
"require": "./dist/embedded.cjs.js"
},

@@ -50,5 +50,2 @@ "./*": "./*"

"./dist/types.cjs.d.ts"
],
"retry-plugin": [
"./dist/retry-plugin.cjs.d.ts"
]

@@ -58,4 +55,4 @@ }

"dependencies": {
"@module-federation/sdk": "0.6.0"
"@module-federation/sdk": "0.6.1"
}
}

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

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

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