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

@module-federation/sdk

Package Overview
Dependencies
Maintainers
8
Versions
612
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.0.0-next-20240827062238 to 0.0.0-next-20240829065118

38

dist/index.cjs.js

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

var _extends = require('@swc/helpers/_/_extends');
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 = _extends._({}, basicRemoteSnapshot, {
prefetchInterface

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

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

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

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

@@ -575,3 +566,3 @@ });

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

@@ -712,3 +703,3 @@ }, attrs),

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

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

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

@@ -762,0 +754,0 @@ exports.sharePlugin = SharePlugin;

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

import { _ } from '@swc/helpers/_/_extends';
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 '';
}
}

@@ -363,3 +354,3 @@

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

@@ -370,3 +361,3 @@ });

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

@@ -377,7 +368,7 @@ prefetchEntryType: type

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

@@ -570,3 +561,3 @@ });

cb: resolve,
attrs: _extends({
attrs: _({
fetchpriority: 'high'

@@ -707,3 +698,3 @@ }, attrs),

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

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

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.5.2",
"version": "0.6.0",
"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,3 @@ import type webpack from 'webpack';

virtualRuntimeEntry?: boolean;
embedRuntime?: boolean;
}

@@ -180,0 +181,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.0.0-next-20240827062238",
"version": "0.0.0-next-20240829065118",
"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