Socket
Socket
Sign inDemoInstall

@module-federation/sdk

Package Overview
Dependencies
Maintainers
8
Versions
520
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/sdk - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

dist/polyfills.cjs.js

53

dist/index.cjs.js

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

var polyfills = require('./polyfills.cjs.js');
const FederationModuleManifest = 'federation-manifest.json';

@@ -65,9 +67,2 @@ const MANIFEST_EXT = '.json';

function safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}
const DEBUG_LOG = '[ FEDERATION DEBUG ]';

@@ -252,12 +247,8 @@ function safeGetLocalStorageItem() {

};
function _extends() {
_extends = Object.assign || function assign(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 safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}

@@ -368,3 +359,3 @@

const prefetchInterface = manifest.metaData.prefetchInterface;
basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
prefetchInterface

@@ -375,3 +366,3 @@ });

const { path, name, type } = manifest.metaData.prefetchEntry;
basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
prefetchEntry: simpleJoinRemoteEntry(path, name),

@@ -382,7 +373,7 @@ prefetchEntryType: type

if ('publicPath' in manifest.metaData) {
remoteSnapshot = _extends({}, basicRemoteSnapshot, {
remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
publicPath: getPublicPath()
});
} else {
remoteSnapshot = _extends({}, basicRemoteSnapshot, {
remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
getPublicPath: getPublicPath()

@@ -472,3 +463,3 @@ });

}
const onScriptComplete = (prev, // eslint-disable-next-line @typescript-eslint/no-explicit-any
const onScriptComplete = async (prev, // eslint-disable-next-line @typescript-eslint/no-explicit-any
event)=>{

@@ -487,8 +478,13 @@ var _info_cb;

});
if (prev) {
if (prev && typeof prev === 'function') {
var _info_cb1;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const res = prev(event);
const result = prev(event);
if (result instanceof Promise) {
var _info_cb2;
const res = await result;
info == null ? void 0 : (_info_cb2 = info.cb) == null ? void 0 : _info_cb2.call(info);
return res;
}
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info);
return res;
return result;
}

@@ -577,3 +573,3 @@ }

cb: resolve,
attrs: _extends({
attrs: polyfills._extends({
fetchpriority: 'high'

@@ -714,3 +710,3 @@ }, attrs),

if (options && typeof options === 'object') {
return _extends({}, defaultOptions, options);
return polyfills._extends({}, defaultOptions, options);
}

@@ -762,2 +758,3 @@ throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);

exports.parseEntry = parseEntry;
exports.safeToString = safeToString;
exports.safeWrapper = safeWrapper;

@@ -764,0 +761,0 @@ exports.sharePlugin = SharePlugin;

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

import { _ as _extends } from './polyfills.esm.js';
const FederationModuleManifest = 'federation-manifest.json';

@@ -60,9 +62,2 @@ const MANIFEST_EXT = '.json';

function safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}
const DEBUG_LOG = '[ FEDERATION DEBUG ]';

@@ -247,12 +242,8 @@ function safeGetLocalStorageItem() {

};
function _extends() {
_extends = Object.assign || function assign(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 safeToString(info) {
try {
return JSON.stringify(info, null, 2);
} catch (e) {
return '';
}
}

@@ -464,3 +455,3 @@

}
const onScriptComplete = (prev, // eslint-disable-next-line @typescript-eslint/no-explicit-any
const onScriptComplete = async (prev, // eslint-disable-next-line @typescript-eslint/no-explicit-any
event)=>{

@@ -479,8 +470,13 @@ var _info_cb;

});
if (prev) {
if (prev && typeof prev === 'function') {
var _info_cb1;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const res = prev(event);
const result = prev(event);
if (result instanceof Promise) {
var _info_cb2;
const res = await result;
info == null ? void 0 : (_info_cb2 = info.cb) == null ? void 0 : _info_cb2.call(info);
return res;
}
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info);
return res;
return result;
}

@@ -711,2 +707,2 @@ }

export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, MFModuleType, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, MFModuleType, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeToString, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
{
"name": "@module-federation/sdk",
"version": "0.6.0",
"version": "0.6.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A sdk for support module federation",

/**
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
*/
export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'script' | 'node-commonjs';
export type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'module-import' | 'script' | 'node-commonjs';
/**

@@ -6,0 +6,0 @@ * 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.

@@ -178,2 +178,5 @@ import type webpack from 'webpack';

virtualRuntimeEntry?: boolean;
experiments?: {
federationRuntime?: false | 'hoisted';
};
}

@@ -180,0 +183,0 @@ /**

@@ -17,2 +17,3 @@ import { RemoteEntryInfo, ModuleInfo } from './types';

declare const warn: (msg: Parameters<typeof console.warn>[0]) => void;
export { parseEntry, logger, decodeName, encodeName, composeKeyWithSeparator, generateExposeFilename, generateShareFilename, getResourceUrl, assert, error, warn, };
declare function safeToString(info: any): string;
export { parseEntry, logger, decodeName, encodeName, composeKeyWithSeparator, generateExposeFilename, generateShareFilename, getResourceUrl, assert, error, warn, safeToString, };
{
"name": "@module-federation/sdk",
"version": "0.6.0",
"version": "0.6.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A sdk for support module federation",

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